Kruelgor
Emperor
Kael's example for adding or updating a table within a table wasn't exactly a good example, imo.
Here is the example of a table within a table that Kael's guide addresses:
The above example show an assets that only has one table. But most of the assets in Civilization V have multiple tables. Consider the following for the engineer specialist:
<GameData>
<Specialists>
<Row>
<Type>SPECIALIST_ENGINEER</Type>
<Description>TXT_KEY_SPECIALIST_ENGINEER</Description>
<Strategy>TXT_KEY_SPECIALIST_ENGINEER_STRATEGY</Strategy>
<GreatPeopleTitle>TXT_KEY_SPECIALIST_ENGINEER_TITLE</GreatPeopleTitle>
<Visible>true</Visible>
<Cost>0</Cost>
<GreatPeopleUnitClass>UNITCLASS_ENGINEER</GreatPeopleUnitClass>
<GreatPeopleRateChange>3</GreatPeopleRateChange>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>1</PortraitIndex>
</Row>
</Specialists>
<SpecialistYields>
<Row>
<SpecialistType>SPECIALIST_ENGINEER</SpecialistType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
</SpecialistYields>
</GameData>
First of all that doesn't even truly look like a table within a table.
Audio2DScripts.xml appears to have true tables within a table, and this is where I get confused on what syntax to use to when updating or adding rows.
A snippet:
<Script2DFile>
<Script2DSounds>
<Script2DSound>
<ScriptID>AS2D_MINOR_CIV_WARSAW</ScriptID>
<SoundID>SND_MINOR_CIV_WARSAW</SoundID>
<SoundType>GAME_MUSIC_STINGS</SoundType>
<iMinVolume>55</iMinVolume>
<iMaxVolume>55</iMaxVolume>
<iMinTimeDelay>0</iMinTimeDelay>
<iDontPlayMoreThan>1</iDontPlayMoreThan>
<bDontTriggerDuplicates>True</bDontTriggerDuplicates>
<iMinTimeMustNotPlayAgain>0</iMinTimeMustNotPlayAgain>
<fTaperSoundtrackVolume>0.0</fTaperSoundtrackVolume>
</Script2DSound>
</Script2DSounds>
</Script2DFile>
How would you <update> and add a new <row> for a file like that with tables within tables?
Here is the example of a table within a table that Kael's guide addresses:
The above example show an assets that only has one table. But most of the assets in Civilization V have multiple tables. Consider the following for the engineer specialist:
<GameData>
<Specialists>
<Row>
<Type>SPECIALIST_ENGINEER</Type>
<Description>TXT_KEY_SPECIALIST_ENGINEER</Description>
<Strategy>TXT_KEY_SPECIALIST_ENGINEER_STRATEGY</Strategy>
<GreatPeopleTitle>TXT_KEY_SPECIALIST_ENGINEER_TITLE</GreatPeopleTitle>
<Visible>true</Visible>
<Cost>0</Cost>
<GreatPeopleUnitClass>UNITCLASS_ENGINEER</GreatPeopleUnitClass>
<GreatPeopleRateChange>3</GreatPeopleRateChange>
<IconAtlas>CITIZEN_ATLAS</IconAtlas>
<PortraitIndex>1</PortraitIndex>
</Row>
</Specialists>
<SpecialistYields>
<Row>
<SpecialistType>SPECIALIST_ENGINEER</SpecialistType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
</SpecialistYields>
</GameData>
First of all that doesn't even truly look like a table within a table.
Audio2DScripts.xml appears to have true tables within a table, and this is where I get confused on what syntax to use to when updating or adding rows.
A snippet:
<Script2DFile>
<Script2DSounds>
<Script2DSound>
<ScriptID>AS2D_MINOR_CIV_WARSAW</ScriptID>
<SoundID>SND_MINOR_CIV_WARSAW</SoundID>
<SoundType>GAME_MUSIC_STINGS</SoundType>
<iMinVolume>55</iMinVolume>
<iMaxVolume>55</iMaxVolume>
<iMinTimeDelay>0</iMinTimeDelay>
<iDontPlayMoreThan>1</iDontPlayMoreThan>
<bDontTriggerDuplicates>True</bDontTriggerDuplicates>
<iMinTimeMustNotPlayAgain>0</iMinTimeMustNotPlayAgain>
<fTaperSoundtrackVolume>0.0</fTaperSoundtrackVolume>
</Script2DSound>
</Script2DSounds>
</Script2DFile>
How would you <update> and add a new <row> for a file like that with tables within tables?