Promotion adding models

PPQ_Purple

Purple Cube (retired)
Joined
Oct 11, 2008
Messages
5,762
We all know how the great leader can attach him self to a unit to give it a upgrade. More importmantly, he apears as an extra model in the unit.
Is there any way to have diferent upgrades relplace one or more models in a unit with other models or add new models without a great leader?

For example, turn a unit of infantry (3 models of infantry) into (2 infantry and 1 machine gun model).Or, turning a unit of infantry (3 models of infantry) into (3 infantry and 1 leader model).
(effecting only models, not stats).
 
I had tried that once throught he same mechanic as the Great Leader junk, but that is too rigidly constructed. Best approach I can tell you to use is set up the Art Define for your unit to be flexible, then have the promotion change the art define. It is fairly easy to have the Promotions reduce the number of unit models used, then you would re-define one of the earlier model ArtDefs to be the new appearance you want.
 
I had tried that once throught he same mechanic as the Great Leader junk, but that is too rigidly constructed. Best approach I can tell you to use is set up the Art Define for your unit to be flexible, then have the promotion change the art define. It is fairly easy to have the Promotions reduce the number of unit models used, then you would re-define one of the earlier model ArtDefs to be the new appearance you want.

Could you explain exacly how. This is sort of my 2nd Pyton thing I am doing in my life?
1. How to make a units art define flexible?
2. How to make a promotion change the art define of an unit to add/remove one/more models?
3. How to make a promotion re define the art define of an unit of one/more models or the entire unit?
 
Unfortunately I am not familiar with unmodded BtS, but I do not believe that you can change the number of models in a unit graphic with just python. So that part would require DLL work as well.


Flexible Art Defines means instead of saying there are 3 UNIT_ART_RIFLEMAN units, you would say there is 1 UNIT_ART_RIFLEMAN_1, 1 UNIT_ART_RIFLEMAN_2, and 1 UNIT_ART_RIFLEMAN_3. Then you create artstyles which re-define individual ones of those units. ARTDEF_RIFLEMAN_WITH_TURRET replaces UNIT_ART_RIFLEMAN_2 with UNIT_ART_RIFLEMAN_TURRET, while maybe ARTDEF_RIFLEMAN_WITH_TANK replaces UNIT_ART_RIFLEMAN_3 with UNIT_ART_RIFLEMAN_TANK.
 
Actualy, I was planing to try it using FFH2 as a base.
As for:
U
Flexible Art Defines means instead of saying there are 3 UNIT_ART_RIFLEMAN units, you would say there is 1 UNIT_ART_RIFLEMAN_1, 1 UNIT_ART_RIFLEMAN_2, and 1 UNIT_ART_RIFLEMAN_3. Then you create artstyles which re-define individual ones of those units. ARTDEF_RIFLEMAN_WITH_TURRET replaces UNIT_ART_RIFLEMAN_2 with UNIT_ART_RIFLEMAN_TURRET, while maybe ARTDEF_RIFLEMAN_WITH_TANK replaces UNIT_ART_RIFLEMAN_3 with UNIT_ART_RIFLEMAN_TANK.
Do you meen use the same thing as the settlers in regular BTS? I think I get it.
But how to do stepps 2 and 3?

2. How to make a promotion change the art define of an unit to add/remove one/more models?
3. How to make a promotion re define the art define of an unit of one/more models or the entire unit?
 
Look at how ArtDefs are handled for Civilizations. Since you plan to base it on FfH code, check them out for how a warrior looks different when it is owned by the Clan of Embers than when owned by the Elohim. Or look at how Wonder makes your Archmage into a Baboon. Also check out how Illusion makes some units seem transparent.

In each case, the Civilization, python, or the promotion changes the ArtStyle, which points each ArtDef in a new direction.
 
Look at how ArtDefs are handled for Civilizations. Since you plan to base it on FfH code, check them out for how a warrior looks different when it is owned by the Clan of Embers than when owned by the Elohim. Or look at how Wonder makes your Archmage into a Baboon. Also check out how Illusion makes some units seem transparent.

In each case, the Civilization, python, or the promotion changes the ArtStyle, which points each ArtDef in a new direction.

If I could be allowed to rant. I just love these replies when you tell a lot but don't realy tell anything.
I have spent the whole morning looking at these promotions and still haven't figured out anything.
I am sorry, but I am a noob and need someone to literaly tell me what fields in the CIV4PromotionInfos.xml to change and what values to put into them in order to get the resaults I need.

2. How to make a promotion change the art define of an unit to add/remove one/more models?
3. How to make a promotion re define the art define of an unit of one/more models or the entire unit?

update, still have not been able to figure it out.
 
The difficult way would be, to define a new, not buildable unit with this model, and to upgrade it via python.
To complex, it would call for destroying the existing unit, and spawning another one, than copy pasting all the inporovements.

I wish xienwolf would just tell me. I still can not figure it out.
 
Sorry, but I don't know how to say it much more clearly without writing a full walkthrough and I don't have time for that.

And spawning a new unit, destroying the existing one, and transferring all data is VERY simple. Did you read the link that was provided? 3 lines of python and a new unit is far easier than what I am trying to point you toward.
 
I think I finaly figured it out. I get what you were trying to say with promotions changing the art style. By chaniging it, it changes all the models (mesh groups) already used in the units.

Unfortunatively, by doing so it can still not add/remove 1 model (mesh group) to and from the unit. It only changes the models I am already using.

And the problem with spawning new units is that I would have to define units for each combination. Witch would cause a huge spam of usles units to pop up in the civlopedia.
 
Top Bottom