I'm trying to create a mod to allow the player to change a city's specialization - for example from a Conclave to a Fortress - but I can't figure out how to do it.
My initial thought is to do it through an improvement.
The relevant XML seems to be the following, found under the "CityHub1" improvement:
<GameModifier>
<ModType>LevelBarrier</ModType>
<Attribute>Population</Attribute>
<Value>50</Value>
<CityUpgrade>CityHub2</CityUpgrade>
</GameModifier>
First, its not clear to me how this XML even works, since it seems to point to "CityHub2" rather than "CityHub2_Town" for example. Where is the reference that turns a level 2 city into one of the specializations?
Second, how would I write XML for an improvement that changes the specialization? Something with <CityUpgrade>CityHub2_Town</CityUpgrade> in it? And it would also have to roll back the bonuses to research, gildar, etc. I assume.
Any help is greatly appreciated. Thanks