I've written some very simple mods that change the costs of units etc.
But I've come unstuck trying to alter the general level of unhappiness in the civilisation. I know some ppl increase the happiness caused by buildings etc but I'd like to alter the base level of unhappiness. However I couldn't find any reference to unhappiness in the xml. Does anyone know where it is?
So, as an alternative I thought I could alter the handicaps of the difficulty level.
For chieftain I did this:
<GameData>
<HandicapInfos>
<Update>
<Set HappinessDefault="18"/> (from 12)
<Where type="HANDICAP_CHIEFTAIN"/>
<Set NumCitiesUnhappinessMod="30"/> (from 60)
<Where type="HANDICAP_CHIEFTAIN"/>
<Set PopulationUnhappinessMod="30"/> (from 60)
<Where type="HANDICAP_CHIEFTAIN"/>
<Set ProductionFreeUnits="10"/> (from 7)
<Where type="HANDICAP_CHIEFTAIN"/>
<Set ProductionFreeUnitsPerCity="5"/> (from 3)
<Where type="HANDICAP_CHIEFTAIN"/>
</Update>
</HandicapInfos>
</GameData>
Obviously the bits in ( ) not included in the code.
Does anyone know why this doesn't make any difference to happiness level?
I'm absolutely certain the paths and build etc are correct because when I remove this code and have ONLY this code:
<GameData>
<Units>
<Update>
<Set Cost="10"/>
<Where Type="UNIT_WARRIOR"/>
</Update>
</Units>
</GameData>
A warrior does cost only 10.
HOWEVER... If both bits of code are in like this:
<GameData>
<Units>
<Update>
<Set Cost="10"/>
<Where Type="UNIT_WARRIOR"/>
</Update>
</Units>
<HandicapInfos>
<Update>
<Set HappinessDefault="18"/>
<Where type="HANDICAP_CHIEFTAIN"/>
<Set NumCitiesUnhappinessMod="30"/>
<Where type="HANDICAP_CHIEFTAIN"/>
<Set PopulationUnhappinessMod="30"/>
<Where type="HANDICAP_CHIEFTAIN"/>
<Set ProductionFreeUnits="10"/>
<Where type="HANDICAP_CHIEFTAIN"/>
<Set ProductionFreeUnitsPerCity="5"/>
<Where type="HANDICAP_CHIEFTAIN"/>
</Update>
</HandicapInfos>
</GameData>
Nothing changes. A warrior costs 40 and happiness is unchanged.
I'm sure I'm making a simple mistake but I can't figure it out.
Also, does anyone know if you have to exit Civ 5 and re-enter it every time you make an adjustment to a mod - I'm getting tired of the first 15 seconds of that start movie!
Thanks a lot.
But I've come unstuck trying to alter the general level of unhappiness in the civilisation. I know some ppl increase the happiness caused by buildings etc but I'd like to alter the base level of unhappiness. However I couldn't find any reference to unhappiness in the xml. Does anyone know where it is?
So, as an alternative I thought I could alter the handicaps of the difficulty level.
For chieftain I did this:
<GameData>
<HandicapInfos>
<Update>
<Set HappinessDefault="18"/> (from 12)
<Where type="HANDICAP_CHIEFTAIN"/>
<Set NumCitiesUnhappinessMod="30"/> (from 60)
<Where type="HANDICAP_CHIEFTAIN"/>
<Set PopulationUnhappinessMod="30"/> (from 60)
<Where type="HANDICAP_CHIEFTAIN"/>
<Set ProductionFreeUnits="10"/> (from 7)
<Where type="HANDICAP_CHIEFTAIN"/>
<Set ProductionFreeUnitsPerCity="5"/> (from 3)
<Where type="HANDICAP_CHIEFTAIN"/>
</Update>
</HandicapInfos>
</GameData>
Obviously the bits in ( ) not included in the code.
Does anyone know why this doesn't make any difference to happiness level?
I'm absolutely certain the paths and build etc are correct because when I remove this code and have ONLY this code:
<GameData>
<Units>
<Update>
<Set Cost="10"/>
<Where Type="UNIT_WARRIOR"/>
</Update>
</Units>
</GameData>
A warrior does cost only 10.
HOWEVER... If both bits of code are in like this:
<GameData>
<Units>
<Update>
<Set Cost="10"/>
<Where Type="UNIT_WARRIOR"/>
</Update>
</Units>
<HandicapInfos>
<Update>
<Set HappinessDefault="18"/>
<Where type="HANDICAP_CHIEFTAIN"/>
<Set NumCitiesUnhappinessMod="30"/>
<Where type="HANDICAP_CHIEFTAIN"/>
<Set PopulationUnhappinessMod="30"/>
<Where type="HANDICAP_CHIEFTAIN"/>
<Set ProductionFreeUnits="10"/>
<Where type="HANDICAP_CHIEFTAIN"/>
<Set ProductionFreeUnitsPerCity="5"/>
<Where type="HANDICAP_CHIEFTAIN"/>
</Update>
</HandicapInfos>
</GameData>
Nothing changes. A warrior costs 40 and happiness is unchanged.
I'm sure I'm making a simple mistake but I can't figure it out.
Also, does anyone know if you have to exit Civ 5 and re-enter it every time you make an adjustment to a mod - I'm getting tired of the first 15 seconds of that start movie!
Thanks a lot.