Quick Modding Question

jmills

Chieftain
Joined
Nov 25, 2012
Messages
10
Location
Alabama, USA
I'll post this here, since I didn't see a section for questions in the modding forum. Sorry if this is the wrong place to post.
Moderator Action: -> main modding forum is the place to go. Thread moved.

I did some basic Civ 4 modding, so I'm used to modding by replacing values. From what I've read in Kael's modding PDF, that's not the case in Civ 5.

The guide says that to change a value in a base XML file you have to use <Update> and <Where>. How does the <update> know in which file to update the value, I suspect since all the base files are loaded up, it's just going to search it until it finds what is desired to be updates.

Thank you very much.
 
I was the same way and it took a bit of an adjustment period for myself. I read up on things a few times, but not until I just dived into it and tried some things out did the light bulb really turn on.

The <Where> tag is what searches for the parameters (you can put more than one in there) within the <Update> and then the <Set> sets whatever other parameters tied to that row (or the same ones you've searched for) to other values.

Also, just like when using <Row> and adding something into a table, your <Update> tag will need to be within a table as well. So, I guess that also narrows the search down.

Code:
<GameData>
	<[COLOR="red"]Table[/COLOR]>
		<Update>
			<Where [COLOR="red"]X[/COLOR]="[COLOR="red"]Y[/COLOR]">
			<Set [COLOR="red"]Z[/COLOR]="[COLOR="red"]W[/COLOR]"/>
		</Update>
	<[COLOR="Red"]/Table[/COLOR]>
</GameData>

Examples of tables are: Units, Buildings, Improvements, Defines, Language_en_US, TacticalMoves, etc.
 
Top Bottom