maconnolly
Warlord
- Joined
- Jun 3, 2019
- Messages
- 210
This is a fairly simple question - is it possible to grant an existing Unique Ability and/or a Unique Unit to additional civilizations?
As a simple example, could I grant the Aztec Eagle Warrior to, say, England?
I thought I would be able to do this, simply by assigning the relevant trait as a Civilization Trait (or, indeed, a Leader Trait).
The same thinking applies for Unique Abilities.
However, in testing, simply assigning the traits does not have the desired effect. There are no errors to suggest anything hasn't been executed - but to use my favoured, simple example, England does not start the game with the Eagle Warrior.
I know there is not a limit on UUs applied to a civilization - but is there a hard-coded limit of the number of civilizations to which a single UU can be applied? If not hard-coded, is this exposed in the code and, if so, where? For units, I thought all of the 'replacement' logic was built into the unit, hence the idea that granting the trait could make this nice and simple.
Same questions for Unique Abilities, too, essentially. I thought you could use traits in a modular way to grant different civilizations existing abilities.
Edit: I should add, I understand that the workaround for UAs would be to create a new entry in the Traits table and link that new trait to the same ModifierId under the TraitModifiers table as the original.
I am less clear as to whether the TraitType variable in the Units table can hold multiple references simultaneously (not tested yet), as if it cannot, I see that the workaround would require making a complete copy of the unit itself in order to apply the second TraitType that is then linked to the second civilization (and, in the case of a scenario where you want to link one unit to, say, five different civilizations as a 'partially-common unique', you need to do this once for each civ).
As a simple example, could I grant the Aztec Eagle Warrior to, say, England?
I thought I would be able to do this, simply by assigning the relevant trait as a Civilization Trait (or, indeed, a Leader Trait).
The same thinking applies for Unique Abilities.
However, in testing, simply assigning the traits does not have the desired effect. There are no errors to suggest anything hasn't been executed - but to use my favoured, simple example, England does not start the game with the Eagle Warrior.
I know there is not a limit on UUs applied to a civilization - but is there a hard-coded limit of the number of civilizations to which a single UU can be applied? If not hard-coded, is this exposed in the code and, if so, where? For units, I thought all of the 'replacement' logic was built into the unit, hence the idea that granting the trait could make this nice and simple.
Same questions for Unique Abilities, too, essentially. I thought you could use traits in a modular way to grant different civilizations existing abilities.
Edit: I should add, I understand that the workaround for UAs would be to create a new entry in the Traits table and link that new trait to the same ModifierId under the TraitModifiers table as the original.
I am less clear as to whether the TraitType variable in the Units table can hold multiple references simultaneously (not tested yet), as if it cannot, I see that the workaround would require making a complete copy of the unit itself in order to apply the second TraitType that is then linked to the second civilization (and, in the case of a scenario where you want to link one unit to, say, five different civilizations as a 'partially-common unique', you need to do this once for each civ).
Last edited: