How To Write Multiple Set/Wheres?

Balaak

Chieftain
Joined
Dec 23, 2002
Messages
14
I'm figuring out Modbuddy and uploaded a basic change or two to test things out - such as the Super Settlers change.

Was wondering where I might be doing something wrong. Was attempting to give Rome two technologies as a further test of my modding "skillz." I used the following:

Code:
<GameData>
	<Civilization_FreeTechs>
		<Update>
			<Set TechType="TECH_ARCHERY"/>
			<Set TechType="TECH_AGRICULTURE"/>
			<Where CivilizationType="CIVILIZATION_ROME"/>
		</Update>
	</Civilization_FreeTechs>
</GameData>

Also tried this previously:

Code:
<GameData>
	<Civilization_FreeTechs>
		<Update>
			<Set TechType="TECH_ARCHERY" "TECH_AGRICULTURE"/>
			<Where CivilizationType="CIVILIZATION_ROME"/>
		</Update>
	</Civilization_FreeTechs>
</GameData>

That didn't work, either. How does one put in multiple "SETS" into one update?

Thanks in advance! :)
 
You need to insert new rows, not update current rows.

I know how to do it via sql, but I'm unfamiliar with the syntax in XML.
 
I'm figuring out Modbuddy and uploaded a basic change or two to test things out - such as the Super Settlers change.

Was wondering where I might be doing something wrong. Was attempting to give Rome two technologies as a further test of my modding "skillz." I used the following:

Code:
<GameData>
	<Civilization_FreeTechs>
		<Update>
			<Set TechType="TECH_ARCHERY"/>
			<Set TechType="TECH_AGRICULTURE"/>
			<Where CivilizationType="CIVILIZATION_ROME"/>
		</Update>
	</Civilization_FreeTechs>
</GameData>

Also tried this previously:

Code:
<GameData>
	<Civilization_FreeTechs>
		<Update>
			<Set TechType="TECH_ARCHERY" "TECH_AGRICULTURE"/>
			<Where CivilizationType="CIVILIZATION_ROME"/>
		</Update>
	</Civilization_FreeTechs>
</GameData>

That didn't work, either. How does one put in multiple "SETS" into one update?

Thanks in advance! :)
  1. You can't repeat a column name within a pair or <Row> -- </Row> or within a pair of <Update> -- </Update>. Any such occurance will cause the entire file to be discarded by the game.
  2. You can set multiple values within the same <Update> wrap, but each "value" has to be writing to a different column name:
    Code:
    <GameData>
    	<Traits>
    		<Update>
    			<Where Type="TRAIT_CAPITAL_BUILDINGS_CHEAPER"/>
    			<Set>
    				<LandUnitMaintenanceModifier>-25</LandUnitMaintenanceModifier>
    				<PlunderModifier>200</PlunderModifier>
    				<FasterAlongRiver>true</FasterAlongRiver>
    				<RazeSpeedModifier>200</RazeSpeedModifier>
    				<CityCultureBonus>2</CityCultureBonus>
    				<WonderProductionModifier>10</WonderProductionModifier>
    				<LandBarbarianConversionPercent>50</LandBarbarianConversionPercent>
    				<ExtraFoundedCityTerritoryClaimRange>6</ExtraFoundedCityTerritoryClaimRange>
    			</Set>
    		</Update>
    	</Traits>
    </GameData>
    or
    Code:
    <GameData>
    	<Traits>
    		<Update>
    			<Where Type="TRAIT_CAPITAL_BUILDINGS_CHEAPER"/>
    			<Set LandUnitMaintenanceModifier="-25" PlunderModifier="200" FasterAlongRiver="true" RazeSpeedModifier="200" CityCultureBonus="2" WonderProductionModifier="10" LandBarbarianConversionPercent="50" ExtraFoundedCityTerritoryClaimRange="6" />
    		</Update>
    	</Traits>
    </GameData>
    These have the exact same effects in-game.​
  3. But your main problem is that you are going to need to add entirely new <Row>s to the game-table <Civilization_FreeTechs>. This is because any attempt to use <Update> will simply write over the top of the existing Agriculture Tech leaving you with only Archery as Rome's free techs, and a second <Update> to try to re-add Agriculture back to Rome will simply re-re-write over the top of the Update to add Archery, so you would end up with Agriculture as Rome's one and only Free Starting Tech. So what you want is:
    Code:
    <GameData>
    	<Civilization_FreeTechs>
    		<Row>
    			<CivilizationType>CIVILIZATION_ROME</CivilizationType>
    			<TechType>TECH_ARCHERY</TechType>
    		</Row>
    	</Civilization_FreeTechs>
    </GameData>
 
Top Bottom