I'm trying to make a mod that changes the in-game calendar. I've made mods before that change aspects of gameplay, and I know how to update xml files with lines like:
<Set Range="1"/>
<Where Type="UNIT_CHINESE_CHUKONU"/>
This works when a type of variable only has one value assigned to it. But I'm trying to mod Civ5GameSpeeds.xml and I have a problem - there are many numbers marked MonthIncrement and TurnsPerIncrement, which are read in chronological order, all as part of "GAMESPEED_STANDARD". For instance:
<Row>
<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
<MonthIncrement>480</MonthIncrement>
<TurnsPerIncrement>75</TurnsPerIncrement>
</Row>
<Row>
<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
<MonthIncrement>300</MonthIncrement>
<TurnsPerIncrement>60</TurnsPerIncrement>
</Row>
I'm not able to update this in xml, because multiple values correlate to GAMESPEED_STANDARD! I've modified the actual gamefile to verify that I can modify the calendar, but I don't know how to make it work as a mod. I've tried simply copying the values I want and setting an action to update Civ5GameSpeeds.xml - this did not work. I've also unsuccessfully tried setting it to update Civ5GameSpeeds.xml with the following:
<GameData>
<GameSpeeds>
<Update>
<Set MonthIncrement="1440"/>
<Set TurnsPerIncrement="25"/>
<Set MonthIncrement="420"/>
<Set TurnsPerIncrement="35"/>
<Set MonthIncrement="300"/>
<Set TurnsPerIncrement="45"/>
<Set MonthIncrement="120"/>
<Set TurnsPerIncrement="45"/>
<Set MonthIncrement="48"/>
<Set TurnsPerIncrement="25"/>
<Set MonthIncrement="12"/>
<Set TurnsPerIncrement="65"/>
<Set MonthIncrement="6"/>
<Set TurnsPerIncrement="100"/>
<Set MonthIncrement="3"/>
<Set TurnsPerIncrement="100"/>
<Set MonthIncrement="2"/>
<Set TurnsPerIncrement="60"/>
<Where GameSpeedType="GAMESPEED_STANDARD"/>
</Update>
</GameSpeeds>
</GameData>
This also doesn't work. I don't know how to make these changes, which is frustrating because I just need the game to read my modified XML file with the modded data values. How can I do this, or make a mod to update the values some other way?
<Set Range="1"/>
<Where Type="UNIT_CHINESE_CHUKONU"/>
This works when a type of variable only has one value assigned to it. But I'm trying to mod Civ5GameSpeeds.xml and I have a problem - there are many numbers marked MonthIncrement and TurnsPerIncrement, which are read in chronological order, all as part of "GAMESPEED_STANDARD". For instance:
<Row>
<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
<MonthIncrement>480</MonthIncrement>
<TurnsPerIncrement>75</TurnsPerIncrement>
</Row>
<Row>
<GameSpeedType>GAMESPEED_STANDARD</GameSpeedType>
<MonthIncrement>300</MonthIncrement>
<TurnsPerIncrement>60</TurnsPerIncrement>
</Row>
I'm not able to update this in xml, because multiple values correlate to GAMESPEED_STANDARD! I've modified the actual gamefile to verify that I can modify the calendar, but I don't know how to make it work as a mod. I've tried simply copying the values I want and setting an action to update Civ5GameSpeeds.xml - this did not work. I've also unsuccessfully tried setting it to update Civ5GameSpeeds.xml with the following:
<GameData>
<GameSpeeds>
<Update>
<Set MonthIncrement="1440"/>
<Set TurnsPerIncrement="25"/>
<Set MonthIncrement="420"/>
<Set TurnsPerIncrement="35"/>
<Set MonthIncrement="300"/>
<Set TurnsPerIncrement="45"/>
<Set MonthIncrement="120"/>
<Set TurnsPerIncrement="45"/>
<Set MonthIncrement="48"/>
<Set TurnsPerIncrement="25"/>
<Set MonthIncrement="12"/>
<Set TurnsPerIncrement="65"/>
<Set MonthIncrement="6"/>
<Set TurnsPerIncrement="100"/>
<Set MonthIncrement="3"/>
<Set TurnsPerIncrement="100"/>
<Set MonthIncrement="2"/>
<Set TurnsPerIncrement="60"/>
<Where GameSpeedType="GAMESPEED_STANDARD"/>
</Update>
</GameSpeeds>
</GameData>
This also doesn't work. I don't know how to make these changes, which is frustrating because I just need the game to read my modified XML file with the modded data values. How can I do this, or make a mod to update the values some other way?