Jump to content

Can NPC animation's colors be scripted to change? How?


ericp07

Recommended Posts

Hello,

 

Say you want a mod NPC's animation colors to change on meeting a certain condition, such as a calendar date. Is there any code to use (in the NPC's .baf) to make this happen efficiently? Or would it be better, if possible, to write something in the .tp2 to handle it? I'm hoping to avoid having to make a different .cre for each color change, and will dismiss the idea if it comes to that. I ask only because this is thematically relevant to my mod.

 

Thanks,

Eric

Link to comment
Say you want a mod NPC's animation colors to change on meeting a certain condition, such as a calendar date. Is there any code to use (in the NPC's .baf) to make this happen efficiently?

I would script the NPC to cast custom spells that would effect the change. Fairly simple.

Link to comment
Have you found a way to detect the current calendar date? I thought your code for that was still acting flaky.

 

I have the code set up properly. Haven't been able to test it in-game yet. Using the same method (CalanderDay, CalanderDayLT(x), or CalanderDayGT(x)) will probably work to determine *when* the change happens, so all I need to do is write up *how* it happens. I have no experience creating spells, so not sure yet how to set that up.

Link to comment

Here's what I've put together in the NPC's .baf:

 

// Summer
IF
~InParty(Myself)
CalanderDayGT(49)
CalanderDayLT(142)~
THEN
RESPONSE #100
ApplySpellRES(EP#SUM,Myself)
END

 

EP#SUM.spl is meant to set the NPC's major and minor colors if it's summer (which starts on game day 50). I've done the same for autumn and winter. No need to account for spring, as that's the season during which the game begins, and the .cre installs with spring colors already set. Does this look like it would work?

 

All I need to do now is have the .tp2 install the .spl files, but I don't know if that's done by a simple COPY command, or if it's written another way. Please advise? :laugh:

 

Thanks,

Eric

Link to comment
All I need to do now is have the .tp2 install the .spl files, but I don't know if that's done by a simple COPY command
Yes. If you want a message to appear when the spell is applied, the easiest way is to SAY NAME1 ~Seasonal Change (or whatever)~ the spell after the COPY.
Link to comment
All I need to do now is have the .tp2 install the .spl files, but I don't know if that's done by a simple COPY command
Yes. If you want a message to appear when the spell is applied, the easiest way is to SAY NAME1 ~Seasonal Change (or whatever)~ the spell after the COPY.

 

I'd prefer that there be no message. If I really want to push it over the cliff, I'll work the changes into dialogue, but likely I'll skip that. Now, when the .spl effect is applied, I hope the NPC's animation won't make any spellcasting gestures or anything like that (other than, perhaps, the crouch we see sometimes when a script affects a character).

Link to comment
Now, when the .spl effect is applied, I hope the NPC's animation won't make any spellcasting gestures or anything like that
ApplySpell/RES doesn't use any gestures.

 

Beautiful :D That will be perfect, then. Whether or not it will be revealed in the game, to be fair, Erysseril always travels with at least one set of clothing that's in colors that are a season ahead of the current one, whatever that may be, during her adventuring. I realize that most players might see only the spring and summer colors, but whatever pertains to Erysseril that's tied to a specific time of year, I'd like to have that represented in my mod.

 

Now, back to mixing and mastering the Character Theme :)

Link to comment

Question: How long in-game-time do people take to complete SoA?

 

If you're going to the trouble to have these spells, you might consider having a change of "clothes" on a weekly basis. It certainly doesn't fit your reasons but it's a neat idea that's possibly going to rarely be seen.

Link to comment
Question: How long in-game-time do people take to complete SoA?

 

If you're going to the trouble to have these spells, you might consider having a change of "clothes" on a weekly basis. It certainly doesn't fit your reasons but it's a neat idea that's possibly going to rarely be seen.

 

I've seen various responses to that question. Your comments give me an idea, though. I can't represent this on the animation, or on the inventory paperdoll, but Erysseril does own two very fine dresses, you know, fancy ball type dresses with lots of petticoats. They're even on her PnP character sheet. She rarely has occasion to wear them, but I wonder if something could be done with that...or perhaps certain times and places might call for a change. It's something to consider.

 

I expect that most players will at least see the change from spring to summer, except for those who rest as seldom as possible.

Link to comment
I can't represent this on the animation, or on the inventory paperdoll, but Meleryn does own two very fine dresses, you know, fancy ball type dresses with lots of petticoats. They're even on her PnP character sheet. She rarely has occasion to wear them, but I wonder if something could be done with that...or perhaps certain times and places might call for a change.
You could, sort of, if you make it a robe (paperdoll animations 2W-4W) and change the avatar to a mage when the dress is equipped (which could be a 'while equipped' effect on the dress itself).
Link to comment
I can't represent this on the animation, or on the inventory paperdoll, but Meleryn does own two very fine dresses, you know, fancy ball type dresses with lots of petticoats. They're even on her PnP character sheet. She rarely has occasion to wear them, but I wonder if something could be done with that...or perhaps certain times and places might call for a change.
You could, sort of, if you make it a robe (paperdoll animations 2W-4W) and change the avatar to a mage when the dress is equipped (which could be a 'while equipped' effect on the dress itself).

 

Say...that would do the trick! So, first I need to determine if and when the character would want to change into a fancy dress (definitely a non-combat situation!), to present herself in a more "classy" way, and then write a script that will handle the change. Meeting with Trademeet's High Merchant would be such an occasion, I think, and the character would change back into her adventuring gear upon leaving the building. I'll have to remember to also have her appear empty-handed, as she normally walks around holding her melee weapons (but not when dressed up!).

 

We might be on to something here :) Now I'll give thought also to creating her "dresses," just grabbing two robe .itm files and customizing the colors. I always imagined a blue dress and a green dress, so I'll play around with that some.

 

Thanks!

Eric

Link to comment

So, I used NI to make custom items based on the mage robe of cold resistance, removing the magical effects and usability restrictions, and changing the colors. After dropping the custom items into the override folder, and using the CLUAConsole to bring them into the game, I equipped what should have been a blue dress with white trim on Erysseril, and it showed the vanilla item's colors instead! I don't understand why this happened. Is there a way to fix it? Some detail in the .itm's fields that I need to change?

 

Please advise!

Thanks,

Eric

 

[Edit]

Added an effect to polymorph into a female elf mage, appearance only, while equipped. About to test in-game.

[/Edit]

Link to comment

Archived

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

×
×
  • Create New...