Modding Basics: XML 101

That is because the tutorial has a bug.

I should fix it. The problem is that to make a UU appear, you also have to tell the Civilization that it has a UU, and what it replaces. It is data duplication I didn't expect. :/

I thought I'd mentioned the fix in the thread -- change in the (a copy, naturally) of XML/Civilizations/CIV4CivilizationInfos.xml in the viking entry
This:
Code:
			<Units>
				<Unit>
					<UnitClassType>UNITCLASS_MACEMAN</UnitClassType>
					<UnitType>UNIT_VIKING_BESERKER</UnitType>
				</Unit>
			</Units>
to this:
Code:
			<Units>
				<Unit>
					<UnitClassType>UNITCLASS_AXEMAN</UnitClassType>
					<UnitType>UNIT_VIKING_BESERKER</UnitType>
				</Unit>
			</Units>
and I think it'll be working. Let me know if it works, and I'll get around to patching the tutorial. :)
 
Thanks; but the change you recommend already appear to be done! I checked every occurence of UNIT_VIKING-BESERKER - none had a MACEMAN line above it, while one had an AXEMAN line.

When I made Playpen, the changes showed in the Civilopedia; it wasn't until I made Viking Axes that it stopped working.
 
Do you have any 'diff' tools?

You can install windiff via Microsfot Support Tools toolkit.

Then use windiff to work out exactly what you changed between the playpen and the original source tree (windiff takes paths, and can tell you what files are new etc, and then give you a graphical description of what you changed).

Also useful for debugging would be a dump of your playpen directory tree. Do you know the command line? Cd into the playpen directory, and type dir/s/b. "Make sure it is plugged in". :)
 
I'll try, although I know I didn't make any changes between the two - I cut and pasted straight from playpen. And have since deleted the file and recopied from playpen. Oh well, we'll see!
 
I found the solution to Phrossacks problem the directory you need is C:\Users\yourname\AppData\Roaming\2K Games\Firaxis Games\Sid Meier's Civilization 4 Gold\Assets\XML except replace yourname with your user name for windows and sid meier's civilization gold with what ever version you have i think it should work if not just try C:\Users\yourname\AppData\Roaming\2K Games\Firaxis Game\ Hope it helps
 
I forgot you might need to then put it in the my games directory under mods for it to work
 
correction it should be C:\Users\yourname\AppData\Roaming\2K Games\Firaxis Games\Sid Meier's Civilization 4 Gold\Warlords\Assets\XML
 
I like this tuitorial but I am having problems. I got everything up to making the 100 strength warrior. When I start a mod I keep getting a strength 2 warrior instead of the 100 strength I just modded.

I am also running the BUG mod in BTS. Can I make my own mod while using the BUG mod???
 
It should work just fine, but I've heard there are limits on how high you can set it. 100 sounds low, but maybe try 99?

Thanks! I redid everything from scratch and found my mistake. SO I can mod units, now what to do with it!
 
Notepad sucks, but it will do.
do you have any reccomendations for free XML editors? i've heard that Notepad ++ is pretty good, but i was wondering if u have any reccomendations
Can you compile all your stuff into a handy downloadable pdf file?
i could prolly do that sometime soon...it'd be a big help to me, too

also, i have to say, i love this tutorial! very easy to understand and makes it easy to learn how to mod using xml!!!
 
the attached file is the tutorial which includes the questions and answers afterward. i also changed some of the spelling and grammar to make it easier to read. if there are any suggestions on how i could improve it, just let me know!!!
 

Attachments

Bumping this because its fab. Making a start with modding can be pretty daunting but this guide makes it so easy. I laughed out loud when I saw that I had given my warrior strength 1056 - its like, "w00t, I did that!". It helped that I took a class in XML today so I feel like I know what's going on. Now to take a look in the schema... :)
 
hey i've gotten in and edited the xml but it won't let me save my new copy. it asks me if i want to replace the exitsting file and i say yes but then it says "access denied" and tries to save again. what do i do?
 
thanks man. well i finally figured out what i needed to change. but now i have another problem :p k so i change the stregnths and stuff and i run the mod but when i get into a game all the information and buttons around the units dont show. the game is running and i can move my starting units around but the options (settle/skip/move) and such don't show. Also, it says "bugInit-cannot find XML for Mod Init" in the world news spot. I checked and it's doing that with all my mods suddenly... but not with the original game thankfully. What did i do wrong and how do i fix it?
 
I just joined. I am just starting to mod. I am currently having a few problems. First, when I copied the xml file into the playpen/assets directory there were 3 extra xml files. Is anyone else having that problem. Second, When I try to load the mod It stops me saying that there is a problem with one of the files. If you want I can copy the text from the error onto another response.

Other than those 2 issues this is a great thread. Thanks.
 
I just joined. I am just starting to mod. I am currently having a few problems. First, when I copied the xml file into the playpen/assets directory there were 3 extra xml files. Is anyone else having that problem.

I can't really follow you here :dunno:.

Second, When I try to load the mod It stops me saying that there is a problem with one of the files. If you want I can copy the text from the error onto another response.

That would be helpful :yup:.


And welcome to CFC :).
 
Back
Top Bottom