It would be great if you could answer! We have tried many things, and we are not sure if it just not possible or if there is some obscure way of doing it. We have created a Player tech that is only meant to be given when you have a certain spell or city improvement.
This is the code I have created, and modified around a certain theme, but no luck yet:
<Spells>
<SpellDef InternalName="GetAmulet">
<DisplayName>Get Amulet</DisplayName>
<Description>Turns on AmuletOfFlames 2 for Unit Design</Description>
<Cooldown>1</Cooldown>
<AutoUnlock>1</AutoUnlock>
<SpellBookSortCategory>World</SpellBookSortCategory>
<SpellType>Strategic</SpellType>
<SpellClass>Other</SpellClass>
<SpellSubClass>Other</SpellSubClass>
<SpellTargetType>Self</SpellTargetType>
<CasterMustBeSov>1</CasterMustBeSov>
<GameModifier>
<ModType>Player</ModType>
<Attribute>AbilityBonusOption</Attribute>
<StrVal>AOF_RARE_UD</StrVal>
<BoolVal1>1</BoolVal1>
<Duration>-1</Duration>
</GameModifier>
</SpellDef>
</Spells>
<AbilityBonuses>
<AbilityBonus InternalName="AOF_RARE_UDAbility">
<AbilityBonusType>Player</AbilityBonusType>
<AbilityBonusOption InternalName="AOF_RARE_UD">
<AbilityBonusType>Player</AbilityBonusType>
<Type>Army</Type>
<DisplayName>Amulet Of Flames II</DisplayName>
<Cost>10</Cost>
</AbilityBonusOption>
</AbilityBonus>
</AbilityBonuses>
<GameItemTypes>
<GameItemType InternalName="AmuletOfFlames_RARE2">
<DisplayName>Amulet of Flames II</DisplayName>
<Description>When it is worn even the wearer's caress burns those he or she touches. Although some see this as a weapon, the Quendar are known to use it for pleasure.</Description>
<Type>Accessory</Type>
<CanBeEquipped>1</CanBeEquipped>
<ShopValue>300</ShopValue>
<AdditionalTrainingTurns>24</AdditionalTrainingTurns>
<Prereq>
<Type>AbilityBonusOption</Type>
<Attribute>AOF_RARE_UD</Attribute>
<Target>Player</Target>
</Prereq>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>AdjustUnitStat</Attribute>
<StrVal>UnitStat_Attack_Fire</StrVal>
<Value>3</Value>
</GameModifier>
<IsAvailableForSovereignCustomization>0</IsAvailableForSovereignCustomization>
<Likelihood>100</Likelihood>
<RarityDisplay>Rare</RarityDisplay>
<IsUsable>0</IsUsable>
<Prereq>
<Type>UnitStat_Level</Type>
<Attribute>7</Attribute>
</Prereq>
<ArtDef>AmuletOfFlames_ArtDef2</ArtDef>
<GameItemTypeArtDef InternalName="AmuletOfFlames_ArtDef2">
<GameItemTypeModelPack InternalName="AmuletOfFlames_Default2">
<IconFile>Gfx//Xtra//Icons//AmuletofFlame_Item2.png</IconFile>
</GameItemTypeModelPack>
</GameItemTypeArtDef>
</GameItemType>
So, is there currently any game capability to add a trait, especially a Player trait, by a Spell or Improvement?
I look forward to your reply!