Not that I dont appreciate the guide but can anyone post something for thoes of us who are brand new to modding and really need an idiots guide? I followed it as well as I could but its still not working for me. Rather then making a new Civ Id like to see how to do something really simple, like changing a units combat power or move rate. I saw the samurai example and understand it somewhat but I need to see a full out complete example like with the engineer specialist.
Its a very nice guide but I think its written for people who may have modded Civ 4 of have some knowlege, I'd like one just showing just how to do the most basic mods like your teaching your grand parents, so we can get a start and then move on to more advanced stuff later.
CrazyAce posted this:
<GameData>
<Units>
<Update>
<Set Moves="1"/>
<Where UnitType="UNIT_WARRIOR"/>
</Update>
</Units>
</GameData>
Kael said it looked good, so I copy and pasted it into my xml, I went to action, did OnModActivate, UpDateDatabase, and then where the file is located... loaded the mod, and it doesn't work.. I just don't get what to do.
For those of you who, like myself, were trying the basic change the warrior's move to 1 or some such number and weren't getting anywhere, after much consternation I figured out what I was doing wrong...or what I wasn't doing. In the Mod Info screen of your mod in ModBuddy there are two options in Systems: Reload Landmark System and Reload Unit System. Well not knowing any better and not being aware enough that Reload Unit System plays a role in modding units (at least in my mind) I left these unchecked. Once I checked "Reload Unit System", my mod finally worked and was able to change the Warrior's move from 2 to 5.
And BTW the where statement above should be <Where Type="UNIT_WARRIOR"/> not <Where UnitType="UNIT_WARRIOR"/> ... well at least as far as I can tell.
Now I'm going to go on a rambling tangent...because I'm too old to stay up this late and post things
I'm sure someone else has covered this elsewhere since the XML is in effect being transformed into a database. Each line in the XML file that falls between <ROW></ROW> is the equivelant to a field in a database and the corresponding data assigned to that particular record for that field. So, in the exmaple above where it says <Where Type="UNIT_WARRIOR"/> "TYPE" is the equivelant of a field (or column if you lke. The SQL (don't beat me up to bad for my rusty SQL) equivelant would be "UPDATE UNITS SET MOVES = "1" WHERE TYPE = "UNIT_WARRIOR"
UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value
As you can see the the above SQL update statement encompasses the XML statement above
UNITS = table_name
<Set Moves = "1"/> = SET Column1=value
<Where Type="UNIT WARRIOR"/> = some_column=some_value
I say all this to illustrate the importance of spelling and referring to the right "column/field" and table (look into any of the core XML files and you will see a statement similar to this one "Table name = "Units">) as these are all explicit references.
Now, its 4 in the morning and I'm not sure why I said all that...but I'm happy cause I got the darn unit moves to change....