Jump to content


Photo

Changing paperdolls colors and making it part of a weidu installer


  • Please log in to reply
11 replies to this topic

#1 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 30 October 2005 - 08:27 PM

I am sure Lightspeed could answer this, but most of the cats who worked on Baldur's Goth probably can too.

Quite simply, how do I do it?

- The transitioned former modder once known as MTS.


#2 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 31 October 2005 - 03:11 AM

I commented the Baldur's Goth tp2 quite well, so looking at examples are often a good idea. :)

In any case, this is what I did:

COPY_EXISTING ~aerie.cre~ ~override~
  PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN
	WRITE_BYTE 0x2c 0x1b // Metal colour
	WRITE_BYTE 0x2d 0x2e // Minor colour
	WRITE_BYTE 0x2e 0x15 // Major colour
	WRITE_BYTE 0x2f 0x69 // Skin colour
	WRITE_BYTE 0x30 0x16 // Leather colour
	WRITE_BYTE 0x31 0x1d // Armor colour
	WRITE_BYTE 0x32 0x42 // Hair colour
  END
BUT_ONLY_IF_IT_CHANGES
Basically, I copy the creature-file, and then I individually patch the different colours with WRITE_BYTE. To see which specific bit of the creature file you want to edit, you can look it up in NI if you have "Show hex offsets" turned on in the options.

There, I can see that the colour listed as "Metal colour" is at 2c, which means that we want to tell WeiDU to patch that specific byte - so we write it like this:

WRITE_BYTE 0x2c

The 0x before 2c simply tells WeiDU that we're dealing with hex offsets instead of anything else.

Then, we need to figure out how to write the new colour. Since we want Colour index 27, we'll need to figure out the hex code for that specific colour is. To do that, simply right-click on that row and choose "Edit at hex". We'll see that the hex is 1b, which gives us the code 0x1b.

Simply put, to change the "Metal colour" to Colour index 27, this is the code to use:

WRITE_BYTE 0x2c 0x1b

And then you can continue with the other colours in the same manner. :)

- Seb.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#3 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 31 October 2005 - 04:10 AM

Then, we need to figure out how to write the new colour. Since we want Colour index 27, we'll need to figure out the hex code for that specific colour is. To do that, simply right-click on that row and choose "Edit at hex". We'll see that the hex is 1b, which gives us the code 0x1b.

Simply put, to change the "Metal colour" to Colour index 27, this is the code to use:

WRITE_BYTE 0x2c 0x1b

Or you can just use

WRITE_BYTE 0x2c 27

since WeiDU doesn't require hex values. :)

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
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.


#4 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 31 October 2005 - 04:18 AM

So I should include the .CRE files in my install files then?

- The transitioned former modder once known as MTS.


#5 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 31 October 2005 - 04:23 AM

No, you can COPY_EXISTING any creature file already in the game.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#6 Ghreyfain

Ghreyfain
  • Member
  • 137 posts

Posted 31 October 2005 - 07:28 AM

Also note that many armours in the game override the colours on the .cre, so you might not get the intended effect. That could be solved by patching every item in the game to have a 0% chance of adding their colour effects.

#7 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 31 October 2005 - 02:47 PM

This sounds easier then I thought it would be. Thanks for all the help so far, cats.

I assume I need to do it for each of a character's .cre files? The Bioware ones have more then one dependant on you level.

Sorry for so many n00bish questions.

- The transitioned former modder once known as MTS.


#8 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 31 October 2005 - 10:34 PM

Yeah, all of the .cre files are necessary to edit - if you want to edit all possible occurances of a character.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#9 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 31 October 2005 - 11:52 PM

I had thought so, but I wanted to check.

Last question. In SConrad's first post he listed two sets of colors for each category. I was using shadowkeeper to figure out the colors (yes I tested them in game first), but it only lists one color. Who do I get both, and which order do I list them in?

- The transitioned former modder once known as MTS.


#10 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 01 November 2005 - 12:34 AM

I had thought so, but I wanted to check.

Last question. In SConrad's first post he listed two sets of colors for each category. I was using shadowkeeper to figure out the colors (yes I tested them in game first), but it only lists one color. Who do I get both, and which order do I list them in?


I'm not exactly sure what you mean. SConrad listed one colour/per catagory on that post. The first hex offset is the location to write too. The second hex (or use decimal as Cam mentioned) is the actual colour. The only things else on the lines are comments. In the code, anything after a // will be ignored. Eg)

WRITE_BYTE 0x2c 0x1b // Metal colour preferably something shiny or maybe glossy.
This comment is ignored.

The great wolf Fenrir gapes ever at the dwelling of the gods.


#11 igi

igi

    IESDP Guardian

  • Administrator
  • 1058 posts

Posted 01 November 2005 - 12:36 AM

The first number SConrad listed is the offset in the .cre file.

Visit the IESDP


#12 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 01 November 2005 - 01:16 AM

The first number SConrad listed is the offset in the .cre file.


I already said that. :fish: :whistling:

The great wolf Fenrir gapes ever at the dwelling of the gods.