Jump to content

Can You Spell Help?


Domi

Recommended Posts

Heh, I am tryng to add a small but interesting detail to my NPC, and for that I need a spell that will change the major color on her avatar. I tried:

 

Color character 1 through 3 and Set Item Color/Major Color in Effects as a spell cast on oneself.

 

Well, unsuccesfully.

 

Is that possible, and if yes, how do I go about it? IWD2 coding environment, heh.

Link to comment

I don't think there were any color effects that let you re-color the specific base color swatches. Did you try using a timing mode of 9 (I'm pretty sure they won't ever overwrite the colors, so you want the effect attached to the CRE)?

 

Outside of subtracting the small but interesting detail, I'm not sure there's anything else you could try. Maybe you could create an item to change the color while equipped (ugly), or add a persistent color glow (uglier), but those are fugly and probably won't even work.

Link to comment

I just experimented with this on BG2 (no IWD2 installed currently :)), opcode 51 with location set to 2, and it seems kind of hard to guarantee the results. Most of the time there will be quite a noticeable change, but depending on what the player has set the character's major colour to, it can vary between being classified as approximately the same colour you specified (ie. pink-ish) or off by a ways (orangey red to dark purple).

 

Discovering this has actually made me kind of happy. Now I can make more unique-looking characters and/or crazy items.

Link to comment

Oh, let me try it. I did not set the location. As long as the colors are *changing* that's what is important to me, not which color in particular that is. Where did you define the colors? I just put 99 in Red, Green or Blue respectively, 0-ing out the other color choices.

Link to comment
Oh, let me try it. I did not set the location. As long as the colors are *changing* that's what is important to me, not which color in particular that is. Where did you define the colors? I just put 99 in Red, Green or Blue respectively, 0-ing out the other color choices.

The second parameter is the location, where a value of 2 specifies Major Colour. The first parameter controls the colour, expand it out and enter the R G and B values into the second, third, and fourth bytes. The first byte doesn't seem to do anything.

 

Oops, no location, but my opcode 51 is 'character color 2'. It didn't work. :) I guess, I'll just have to drop my little thinggie.

Looking at the IESDP, it describes your opcode 51 as Color Tint Solid and 52 as Color Light Solid, and our 51 as Strong/Dark by RGB and Very Bright by RGB, which seem to correspond.

 

When I used it, there was almost always a noticeable change, except when the base colour is quite similar to what you've specified. As devSin said, it seems to apply it on top of whatever the base colour is set to, so it is possible for someone to change their base colour and their avatar's colour will change as well, with the effect still applied on top of that.

 

Edit: I should mention I've only been testing this using targeting mode 2 (Pre-Target) and duration 9 (Permanent after Death).

Link to comment

That should be RGB tint. The location parameter shouldn't do anything (it's a whole-avatar tint); it's applied translucently to the sprite, so you need to specify a fairly bright color to see anything. Try 255,0,0 or 0,255,255 or something to see if it works in ID2.

 

The other one (50 or 52, I forget) should produce a brighter tint, but I don't think it's something you'd be interested in either (unless you want the character's skin, hair, teeth, etc., shaded some funky color).

 

EDIT: what I was suggesting, and what I thought you were trying, was to use the "Set item color" effect (7 or 8 or something). This should allow you to target the correct location with a gradient (IIRC, it's from the palette and not stupid RGB params), but I don't know if you can make it persistent (outside of an equipped item effect).

Link to comment

Okay, what I am getting seems to be a glow of blue that does not stay, but comes in waves. Hey, I'll take that, it's sort of pretty.

 

Edit: or maybe I am just seeing things. Anyway, I probably should get to something more important than Salomeya's wardrobe.

Link to comment
That should be RGB tint. The location parameter shouldn't do anything (it's a whole-avatar tint); it's applied translucently to the sprite, so you need to specify a fairly bright color to see anything. Try 255,0,0 or 0,255,255 or something to see if it works in ID2.

 

The other one (50 or 52, I forget) should produce a brighter tint, but I don't think it's something you'd be interested in either (unless you want the character's skin, hair, teeth, etc., shaded some funky color).

 

EDIT: what I was suggesting, and what I thought you were trying, was to use the "Set item color" effect (7 or 8 or something). This should allow you to target the correct location with a gradient (IIRC, it's from the palette and not stupid RGB params), but I don't know if you can make it persistent (outside of an equipped item effect).

I'm not sure if you're referring specifically to IWD2 here or not, but opcode 51 doesn't apply to the entire sprite in BG2. Opcode 50 did apply to the whole thing, and opcode 52 did something similar to 51 but it looked awful. Here's some screens I took using opcode 51, location set to 2, all using this colour, with different base colours.

 

colour01.jpgcolour02.jpgcolour03.jpgcolour04.jpg

 

And here's some I took using this colour:

 

colour05.jpgcolour07.jpgcolour08.jpgcolour10.jpg

 

Okay, what I am getting seems to be a glow of blue that does not stay, but comes in waves. Hey, I'll take that, it's sort of pretty.

Which opcode did you use? And what are you trying to do anyways?

Link to comment
So... a spell effect with opcode 7 (set character colours by palette), timing mode 9 and location 2 won't change the target's major colour?

Just tried that, and it worked for me... completely overrode the default colouring, which sounds like what Domi was trying for in the first place.

 

There is still one thing that I've been wondering about, though. If these effects aren't tied to an equipped item or have a set duration, how are they going to be removed at a later point?

Link to comment
If these effects aren't tied to an equipped item or have a set duration, how are they going to be removed at a later point?
Well, they wouldn't be. But Domi didn't say she wanted to restore the original colour later. She could of course do another spell effect that does that. Since it's her own NPC, she should know what the original colour was :).
Link to comment
I'm not sure if you're referring specifically to IWD2 here or not, but opcode 51 doesn't apply to the entire sprite in BG2. Opcode 50 did apply to the whole thing, and opcode 52 did something similar to 51 but it looked awful. Here's some screens I took using opcode 51, location set to 2, all using this colour, with different base colours.
Entirely possible. I didn't remove the location parameter in my NI build, so it must have worked when I tested it. It isn't ever used on characters that have color regions (in which case, it does behave as a whole-sprite tint), so I wouldn't have been in a position to really pay attention to it since. 52 is an artificially bright tinting (but otherwise identical to 51), so you have to be careful with what colors you use (it's never used anyway).

 

I wouldn't be at all surprised to learn that ID2 just doesn't support the tint effects (although I would find it odd if she couldn't get the color glow to work).

 

The effects could have a (long) duration; the engine wouldn't really care. She could also pull a Jaheira and just reapply the spell every day until she was done with her wacky colors. :)

 

Hopefully, most of the effect removal opcodes don't work in ID2 so Domi isn't tempted to wander into the hackish crap that BG2 modders sometimes pull! ;)

Link to comment

You cannot recolor single slots with arbitrary colour.

You can only use gradients.

 

Hmm, actually, in IWD2 you should be able. Still, i would go with gradients.

A permanent (timing mode 1) major color slot change should work on the base stats, thus there is no lingering effect.

It would be exactly like you change the major slot via the gui interface.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...