New level up city structures code question - Solved

The code should be adding a new building, very common for testing purposes to the level up options of a fortress.  It is not showing up as an option.

 

<AbilityBonusOption InternalName="UnlockPsionicTrainingAcademy">
<DisplayName>Psionic Training Academy</DisplayName>
<Description>Unlock the mental forces latent in your race. All units trained here will have the psionic bolt trait, allowing them to attack the minds of their enemies.</Description>
<Icon>K_Oracle_Thumb_01.png</Icon>
<GameModifier>
<ModType>City</ModType>
<Attribute>UnlockImprovement</Attribute>
<BoolVal1>1</BoolVal1>
<StrVal>PsionicTrainingAcademy</StrVal>
</GameModifier>
<HideWhenUpgraded>0</HideWhenUpgraded>
<Likelihood>10000</Likelihood>
<RarityDisplay>Rare</RarityDisplay>
<RequiredLevel>3</RequiredLevel>
<Prereq>
<Type>AbilityBonusOption</Type>
<Target>City</Target>
<Attribute>UnlockFortress</Attribute>
</Prereq>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
</AbilityBonusOption>

 

 

 

 

 

And later, under improvements,

<ImprovementType InternalName="PsionicTrainingAcademy">
<DisplayName>Psionic Training Academy</DisplayName>
<Description>Units trained in this city posess the ability to attack their enemies psionicly</Description>
<RequiresCity>1</RequiresCity>
<RequiresForceUnlock>1</RequiresForceUnlock>
<BarredTerrain>River</BarredTerrain>
<BarredTerrain>SwampTerrain</BarredTerrain>
<PreferredTerrain>City</PreferredTerrain>
<PreferredTerrain>Category:Land</PreferredTerrain>
<PreferredTerrain>Forest</PreferredTerrain>
<RequiresCityImprovement>1</RequiresCityImprovement>
<RequiredImprovement>Fortress</RequiredImprovement>
<LaborToBuild>0</LaborToBuild>
<GameModifier>
<ModType>CityTrainingBonus</ModType>
<Attribute>TrainingBonus_ApplyAbilityBonus</Attribute>
<StrVal>PsionicBoltAbility</StrVal>
<Provides>Trained units can utilize the psionic blast ability</Provides>
</GameModifier>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
<AITag>CommandPost</AITag>
</AIData>
<ArtDef>Art_Watchtower</ArtDef>
</ImprovementType>

4,763 views 6 replies
Reply #1 Top

*shoots all the trouble*...

Sorry I had to :)

Did you remove one of the other buildings, or set so the city will have more than 3 options per levelup?

Edit: Found it here in the "ElementalDefs.xml"
To be honest, I can't tell if the code is correct or not, not too experienced with that, but I did notice this one item last time I looked through the definitions.

Sincerely
~ Kongdej, Troubleshooter

Reply #2 Top

no, I want it to show up as a random option, kinda like level up traits for heroes.   The idea is that this would be a rare option for an upgrade, once I change the chance of it showing up to 25 or so.

Reply #3 Top

Quoting emmagine, reply 2
no, I want it to show up as a random option.   The idea is that this would be a rare option for an upgrade, once I change the chance of it showing up to 25 or so.

Arh, sorry, also just noticed your high likelihood (first glance just told me you had it ;)).

Just my first though, re-edited my first post a few times though, because I didn't feel like I said it all at first, and had to correct it... (but you responded rather quickly :))

Edit: Also, looks like a perfect copy/paste of the Underforge (my ability of reference), so myself is at a loss. sorry

Sincerely
~ Kongdej

Reply #4 Top

No worries.  I did use your advice for further trouble shooting, when I delete one of the other options from the list, it only gives me two level up choices.  So it is not showing up at all.

Reply #5 Top

Solved it.   I somehow missed the tag  <AbilityBonus InternalName="CityLevel_UnlockLevel3">

Thanks for your help,  you got my mind working on a more reasonable track :)

Reply #6 Top

Quoting emmagine, reply 6
Thanks for your help, you got my mind working on a more reasonable track

Oh great... Now I am working to make my own mind work... at all... ;)

Sincerely
~ Kongdej