Jump to content


small portraits


  • Please log in to reply
6 replies to this topic

#1 -sogdiane-

-sogdiane-
  • Guest

Posted 27 April 2018 - 04:10 AM

Hello all,

 

 

I'm trying to create small portraits for NPC included in  BG1 and BG2 and in various mods, which are not already covered by the said mods or some other specially dedicated ones.

 

I have the right NPC codes, the pictures have the right size and are both in the "Override" and the "Portraits" files.

 

Nevertheless, they don't appear when my character launch a conversation with the NPC concerned.

 

Something is obviously missing in the process but I am not a modder and I fail to see what it is.

 

Could anybody give me a hand?

 

Thanks



#2 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 27 April 2018 - 05:22 AM

What do you mean with "have the right NPC codes". The small portrait is defined by the name of the corresponding bmp file which is defined in the cre-file at offset 0x34 (or 0x3c for the large one)  if there is any. If there is none yet defined, you need to define one yourself, i.e.the name of the bmp-file without the extension.

You do that either with Near Infinity for your local use, or you need to write a little bit of weidu code if you want to share your work (or preserve it for the next game as well.)


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#3 -sogdiane-

-sogdiane-
  • Guest

Posted 27 April 2018 - 05:40 AM

What do you mean with "have the right NPC codes". The small portrait is defined by the name of the corresponding bmp file which is defined in the cre-file at offset 0x34 (or 0x3c for the large one)  if there is any. If there is none yet defined, you need to define one yourself, i.e.the name of the bmp-file without the extension.

You do that either with Near Infinity for your local use, or you need to write a little bit of weidu code if you want to share your work (or preserve it for the next game as well.)

 

I mean the code you use with the command:  "CreateCreature"

 

As I said, not being a modder implies that I may confuse one thing with another.

 

I got these codes using the infExp tool.



#4 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 27 April 2018 - 06:47 AM

What do you mean with "have the right NPC codes". The small portrait is defined by the name of the corresponding bmp file which is defined in the cre-file at offset 0x34 (or 0x3c for the large one)  if there is any. If there is none yet defined, you need to define one yourself, i.e.the name of the bmp-file without the extension.

You do that either with Near Infinity for your local use, or you need to write a little bit of weidu code if you want to share your work (or preserve it for the next game as well.)

 

I mean the code you use with the command:  "CreateCreature"

 

As I said, not being a modder implies that I may confuse one thing with another.

 

I got these codes using the infExp tool.

This is the name of the creature file, SomeNPC.cre. Inside of this file there is the data that says what script the creature uses and which dialogue, which class and levels and many more things. One other piece of data is the name of small and large portrait. This is the information you need to match your picture to the creature.

If it is minor NPCs, it may be the case that this name is not even given, i.e. is *None* in which case you need to give it one.

 

So you either need something like Near Infinity to take a look INTO that creture file. Or you use weidu and blindly assign names to the ones you want, which is no problem if you only use this for yourself.

 

Just post the name of a creature file and the name of your bmp picture to give you some example of how to do it.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#5 -sogdiane-

-sogdiane-
  • Guest

Posted 27 April 2018 - 07:11 AM

What do you mean with "have the right NPC codes". The small portrait is defined by the name of the corresponding bmp file which is defined in the cre-file at offset 0x34 (or 0x3c for the large one)  if there is any. If there is none yet defined, you need to define one yourself, i.e.the name of the bmp-file without the extension.

You do that either with Near Infinity for your local use, or you need to write a little bit of weidu code if you want to share your work (or preserve it for the next game as well.)

 

I mean the code you use with the command:  "CreateCreature"

 

As I said, not being a modder implies that I may confuse one thing with another.

 

I got these codes using the infExp tool.

This is the name of the creature file, SomeNPC.cre. Inside of this file there is the data that says what script the creature uses and which dialogue, which class and levels and many more things. One other piece of data is the name of small and large portrait. This is the information you need to match your picture to the creature.

If it is minor NPCs, it may be the case that this name is not even given, i.e. is *None* in which case you need to give it one.

 

So you either need something like Near Infinity to take a look INTO that creture file. Or you use weidu and blindly assign names to the ones you want, which is no problem if you only use this for yourself.

 

Just post the name of a creature file and the name of your bmp picture to give you some example of how to do it.

 

Sure, 

 

For instance, in the Ascalon Quest Pack mod, there is a NPC called Aiwell (The werewolf quest)  but its .cre file is acq10116 (or something looking like that).   

I took a (small) picture and renamed it acq10116, which didn't work.  

I understand that I have to edit the cre file and give it the name of the picture (for instance aiwell) if there is no name beforehand; conversely, if this name exists, I have to copy it to the picture. Is it right?

 

Thanks a lot.



#6 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 27 April 2018 - 07:47 AM

First of all - the creature name is acq16001. So rename the portrait file to acq16001.bmp.

 

Now download this

Attached File  MyPortraits.zip   877.41K   458 downloads

Unzip it to somewhere on your computer.

You have a setup.exe and a folder named MyPortraits with two subfolders backup and BMP.

 

(You can later give the stuff some name you like, here is just for the demo).

 

1. Copy your portrait files into BMP subfolder

2. Now copy everything to your game directory just like the mods you already have.

3. Run the setup

4. Spawn CreateCreature("acq16001") and see that she has her portrait.

Important - you only see the effects on new creatures, i.e. those you have not yet met and that are in areas you have not already visited, because your changes do not affect saved games.

 

 

If that initial test is successful, we can go to add more NPCs.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#7 -sogdiane-

-sogdiane-
  • Guest

Posted 27 April 2018 - 08:03 AM

First of all - the creature name is acq16001. So rename the portrait file to acq16001.bmp.

 

Now download this

attachicon.gifMyPortraits.zip

Unzip it to somewhere on your computer.

You have a setup.exe and a folder named MyPortraits with two subfolders backup and BMP.

 

(You can later give the stuff some name you like, here is just for the demo).

 

1. Copy your portrait files into BMP subfolder

2. Now copy everything to your game directory just like the mods you already have.

3. Run the setup

4. Spawn CreateCreature("acq16001") and see that she has her portrait.

Important - you only see the effects on new creatures, i.e. those you have not yet met and that are in areas you have not already visited, because your changes do not affect saved games.

 

 

If that initial test is successful, we can go to add more NPCs.

Thanks a lot Roxanne.

 

I 'll give it a try as soon as possible.