View Full Version : Can unit appearance change with added items?

Jan 25, 2008, 10:20 AM
I was wondering if a unit picking up an item could change its appearance and I guess attack animation.

For example, if a hero unit picked up an axe in FFH could it be coded so that its weapon changed to an axe?

Or more abstractly if spearmen picked up rifles could their weapon and animation change to rifles?

Jan 25, 2008, 11:08 AM

There are several ways to accomplish this, with different degrees of difficulty and different issues created by it.

1) different units types. you can write a script that when a certain event/action occurs it changes the unit type of the effected unit, thus allowing you to have different graphics and unit abilities.

2) an ability was added in BtS that allows you to change what Unit art is displayed while keeping the unit type the same. this is used for ethnically diverse units in the game and in mods.

3) the third and most difficult method is used in the Afterworld scenario. when creating unit graphics you can create them in such a way as the graphics will toggle parts on and off with the addition/removal of promotions. this one is not able to change the animation used.

the difficulty of the first 2 methods is that you need to generate a separate nif(unit art) file for every version of the unit. so if you want one specific hero to display an axe, that requires 1 additional unit, but if you want ANY unit to display the axe it will require hundreds of new units.

Jan 25, 2008, 11:33 AM
So if I created an infantry unit with 3 entries and art defines, I could have possession of an item change the appearance.


Could I do this with an promotion? Specifically I am tryin to create a post-apocalyptic mod where the initial units start out armed only with pistols. Then they would purchase or "find" upgrades (in goody huts) that would grant them a weapon promotion like Assault rifles.

I am having a limited number of units by type, the "better" units wouldn't really be better just better armed. Instead of Axemen to Macemen, they would still be Militia, just Militia with Assault Rifles instead of Pistols.

Does that make sense?