Extra slot for unit design perks?
Where are the slots for the unit designs stored? I would like to have the number of perks you may design a unit with increase with certain techs.
Where are the slots for the unit designs stored? I would like to have the number of perks you may design a unit with increase with certain techs.
Possibly hard-coded.
It is a faction-global called A_Traits,
<GameModifier>
<ModType>Player</ModType>
<Attribute>AbilityBonus</Attribute>
<StrVal>A_Traits</StrVal>
<Value>1</Value>
<Provides>Increases the available traits for designed units by 1</Provides>
</GameModifier>
Will I need to edit this in a core, or can I tag it in a file in \mygames? Can I set one unit or even faction to have more perks than others?
The plan is to make 1-2 more perks unlock throughout the tree.
This can be from a building, a spell, a unit coded to have it, or something else.
It's definitely faction-global so you can't just add it to one unit. You can put it pretty much anywhere where such modtypes are used in the game (techs, unit trait, improvement, spell, used item, finished quest and so on). For techs you'd need to modify the core files since they can't be altered from the mods folder.
Thanks for the help! Now, I will be able to make 2 wonders (one upgradable from the other) that give +1 and +2. With this being universal, I can know that it will work for everyone. Once I get this done, just a matter of running through some tests.
Just a note to this. You can go negative with this value and, for example, make units have -1 unit traits and have that as a faction weakness (for custom factions). However, AI may have problems with it as it won't be able to make explorers that actually use 4 traits. To go around it, you need to edit CoreUnit file and remove weak from all scout units.
When I first tried modding this in LH I went with <Value>3</Value> and got 7 trait units with one funny side effect:

I get it, so I can have a faction with 4 traits, or a faction with 3 traits. I noticed I can also have faction exclusive traits.
I just need to keep in line unit design for those special factions.
Welcome Guest! Please take the time to register with us.