Author Topic: Changing Portraits for Non-Playable NPCs  (Read 1704 times)

Offline Parvini

  • Planewalker
  • *****
  • Posts: 17
Changing Portraits for Non-Playable NPCs
« on: April 20, 2006, 03:46:01 AM »
Ok - I'm a COMPLETE newb when it comes to modding, I've never even thought about doing such things.

However - given that ALL I want to do is simply edit a few NPC files to add portraits to them - I am guessing it can't be so hard.

I've downloaded Near Infinity and InfExpoler and read a few of the tutorials but none of them mention how to simply change an existing NPC's portrait.

All I want to do is add the portraits and then make an executable pack that automatically makes those changes (via Weidu???) so that everyone else can use them too.

I am guessing this is not hard but someone will need to tell me how to do it if I am going to do it  :D !

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: Changing Portraits for Non-Playable NPCs
« Reply #1 on: April 20, 2006, 04:44:46 AM »
Basically you want a bog standard tp2 header with BACKUP, AUTHRO and BEGIN ~name of mod~.

Then you want code like the following:

Code: [Select]
COPY_EXITING ~foo.cre~ ~override/foo.cre~
    WRITE_ASCII PORTRAIT_SMALL ~bmpname~

Just have one of them for each creature you want to assign a portrait to.

Edit: Oh and should you be changing the portrait for a joinable NPC you'll want something like this instead:

Code: [Select]
COPY_EXITING ~foo.cre~ ~override/foo.cre~
    WRITE_ASCII PORTRAIT_LARGE ~bmpname1~
    WRITE_ASCII PORTRAIT_SMALL ~bmpname2~
« Last Edit: April 20, 2006, 05:00:19 AM by Grim Squeaker »
"You alone can make my song take flight..."

Offline Parvini

  • Planewalker
  • *****
  • Posts: 17
Re: Changing Portraits for Non-Playable NPCs
« Reply #2 on: April 20, 2006, 01:55:51 PM »
As an experiment I'v been trying to give the genie right at the start of SoA, Aataqah, a portrait..

Here's what I've been trying:

BACKUP ~NPNPC Portraits/backup~
AUTHOR ~Parvini~
BEGIN ~NPNPC Portraits~

COPY ~NPNPC Portraits/AataqahS.bmp~ ~override/AataqahS.bmp~
COPY ~NPNPC Portraits/AataqahS.bmp~ ~portraits/AataqahS.bmp~

COPY_EXISTING ~AATAQAH.CRE~ ~override/AATAQAH.CRE~

WRITE_ASCII 0x34 "AataqahS"

The Weidu setup file is claiming it has installed...

However when I speak to Aataqah there is still no portrait in his dialogue. I've tried Grim Squeaker's suggestion of WRITE_ASCII PORTRAIT_SMALL "AataqahS" as well but the same thing happens... there is no portrait when I speak to him.

How can I get the portrait to show up??

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: Changing Portraits for Non-Playable NPCs
« Reply #3 on: April 20, 2006, 02:14:08 PM »
Well first of all there's no point copying it to the portraits directory and override, just one will be fine.

Are you loading a saved game when AATAQAH has already been spawned i.e. one where you're already in his area?  If so then start a new game and hopefully it'll work fine.

My other thought is that you have a gap between your COPY_EXISTING line and your WRITE_ASCII line.  I don't know if that'll make a different but try having them consecutively like the code I gave you.

PS: If it doesn't work for PORTRAIT_SMALL it won't work for 0x34 as one is just a name for the other.

PPS: What's the extra NP stand for in your 'NPNPC portraits' name?

"You alone can make my song take flight..."

Offline CamDawg

  • Infidel
  • Planewalker
  • *****
  • Posts: 859
  • Dreaming of a red Xmas
    • The Gibberlings Three
Re: Changing Portraits for Non-Playable NPCs
« Reply #4 on: April 20, 2006, 02:17:05 PM »
My other thought is that you have a gap between your COPY_EXISTING line and your WRITE_ASCII line.  I don't know if that'll make a different but try having them consecutively like the code I gave you.
No difference; WeiDU evaluates patch directives against the previous action until the next 'top level' action it encounters (e.g. COPY, ACTION_IF, COMPILE, etc.) I'm thinking it's a save game issue, as you suggest.
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: Changing Portraits for Non-Playable NPCs
« Reply #5 on: April 20, 2006, 02:17:51 PM »
The problem is most likely with the portrait. Did you check to see if you could choose the portrait for your character?
Also, check Aat in NI, his small portrait field should say Aataqah.bmp (there's absolutely no reason for it not too based on the code you pasted, but check just in case)
« Last Edit: April 20, 2006, 02:19:24 PM by Duality »
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: Changing Portraits for Non-Playable NPCs
« Reply #6 on: April 20, 2006, 02:19:23 PM »
My other thought is that you have a gap between your COPY_EXISTING line and your WRITE_ASCII line.  I don't know if that'll make a different but try having them consecutively like the code I gave you.
No difference; WeiDU evaluates patch directives against the previous action until the next 'top level' action it encounters (e.g. COPY, ACTION_IF, COMPILE, etc.) I'm thinking it's a save game issue, as you suggest.

Yeah, I thought it just treated it as whitespace but I was basically throwing down anything I could think of :P
"You alone can make my song take flight..."

Offline CamDawg

  • Infidel
  • Planewalker
  • *****
  • Posts: 859
  • Dreaming of a red Xmas
    • The Gibberlings Three
Re: Changing Portraits for Non-Playable NPCs
« Reply #7 on: April 20, 2006, 02:22:48 PM »
One other way to verify the patch--Near Infinity includes a thumbnail of a creature's portrait when viewing the creature file.
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.

Offline Parvini

  • Planewalker
  • *****
  • Posts: 17
Re: Changing Portraits for Non-Playable NPCs
« Reply #8 on: April 21, 2006, 03:26:23 AM »
Well... I've been playing from the first auto-save after speaking to Irenicus. Given that he "appears" I thought this wouldn't matter.

I'll try from a New Game tonight when I get in... if all is good, should have a new mod for you guys in the next week or so.

PS. The other "NP" stands for "non-playable"... I'm going to make a mod that adds portraits to non-playable NPCs.
« Last Edit: April 21, 2006, 03:37:39 AM by Parvini »

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: Changing Portraits for Non-Playable NPCs
« Reply #9 on: April 21, 2006, 04:39:35 AM »
Well... I've been playing from the first auto-save after speaking to Irenicus. Given that he "appears" I thought this wouldn't matter.

I'll try from a New Game tonight when I get in... if all is good, should have a new mod for you guys in the next week or so.

PS. The other "NP" stands for "non-playable"... I'm going to make a mod that adds portraits to non-playable NPCs.

Nah, he'll have already spawned by that point as he's built into the area.  By that point the your game is using a local copy of that particular creature and so any external changes that your mod makes won't affect it.  Start a new game and it should work fine.

PS: But the original NP stands for non-playable (well, non-player)!  So yours is the non-playable non-player characters portrait mod :P
« Last Edit: April 21, 2006, 04:49:24 AM by Grim Squeaker »
"You alone can make my song take flight..."

Offline Parvini

  • Planewalker
  • *****
  • Posts: 17
Re: Changing Portraits for Non-Playable NPCs
« Reply #10 on: April 21, 2006, 05:41:44 AM »
If you can think of a better name for it I'd be happy.

Also, I've made a new thread:

http://forums.pocketplane.net/index.php/topic,22172.0.html

Here you can give suggestions of what you want in the mod.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: