View Full Version : Mods for Dummies...
ejday Jul 14, 2006, 04:59 PM That "dummy" being me.
Anyone know where in C&C (or where ever) that we can find basic info on how to make a real, real, real low level mod. We're talking XML only. All I want to do is simple stuff: add a building (I'll recycle art), add a unit (again, same art), modify a present unit and mostly: modify terrain properties (make peaks passable like mountains were in Civ3).
I've poked around but I'm currently at a loss. Can anyone point me at what thread around here has a build-from-scratch mod guide?
AlanH Jul 14, 2006, 05:12 PM There was a tutorial on XML modding way back in the early days of Civ4, oooh, seven, maybe eight months ago :p Let's have a look ...
How about this? I followed some breadcrumbs from it that led to this tutorial (http://civ4wiki.com/wiki/index.php/Adding_a_Civilization) on adding a civilization.
HTH
Gatekeeper Jul 15, 2006, 02:24 AM If that's the "simple" way to add a civilization, I don't think I'll ever be able to do it. Good God. My eyes were glazing over by the time part five showed up. Hmm. Maybe it'd be easier to modify an existing civilization?
Gatekeeper
P.S. Is there a text editor that comes with an Intel iMac capable of editing XML files? I heard software capable of editing Python files does come native to the iMac, but haven't heard anything about plain old text editors.
ejday Jul 15, 2006, 02:49 AM AFAIK, "TextEdit" works fine for both. Not as elegant as, say, "GoLive" but it will work.
Gatekeeper Jul 15, 2006, 03:34 AM Good to hear because, undoubtably, I'll be doing some messing around with the Civ IV files at some point.
Gatekeeper
ejday Jul 15, 2006, 03:31 PM Good to hear because, undoubtably, I'll be doing some messing around with the Civ IV files at some point.
Gatekeeper
XML itself is pretty simple (if HTML doesn't scare you). I'm certainly no HTML whiz but the principles are fairly straight forward.
The complex part, I'm finding, is in the file structure. For instance: I found where peaks are in the game XML. The "impassable" value was marked as "0" so according to that one default bit, a peak should be passable – but it isn't. So... obviously, there's something somewhere that overriding it.
AlanH Jul 15, 2006, 03:44 PM XML itself is pretty simple (if HTML doesn't scare you). I'm certainly no HTML whiz but the principles are fairly straight forward.
The complex part, I'm finding, is in the file structure. For instance: I found where peaks are in the game XML. The "impassable" value was marked as "0" so according to that one default bit, a peak should be passable – but it isn't. So... obviously, there's something somewhere that overriding it.
Have you checked out Sirian's Map Reference (http://forums.civfanatics.com/showthread.php?t=134226)? (Sirian is a developer at Firaxis)
[EDIT] Whoops! That isn't the one I was thinking of ... I'll look again.
[EDIT 2] Dale created a listing that I thought would provide what you want, but I think the best source is now the Civ4Wiki (http://civ4wiki.com/wiki/index.php/XML_files). You'll find some information about each XML entity and attribute there.
Re. mountains: impassible = zero should mean they are passable. However, there's also a movement cost for each terrain, and that might be a high number making them *effectively* impassable. But I haven't checked ...
ejday Jul 15, 2006, 10:01 PM ...but I think the best source is now the Civ4Wiki (http://civ4wiki.com/wiki/index.php/XML_files). You'll find some information about each XML entity and attribute there.
Re. mountains: impassible = zero should mean they are passable. However, there's also a movement cost for each terrain, and that might be a high number making them *effectively* impassable. But I haven't checked ...
I looked. In "CIV4TerrainInfos.xml", you get listing of a number of the base territories. You've got a base movement value "<iMovement>1</iMovement>" and an impassable value "<bImpassable>0</bImpassable>." In this file, where you'd logically think controls said values, the value for "<Type>TERRAIN_PEAK</Type>" is essentially the same as "<Type>TERRAIN_GRASS</Type>" with the exception of "Yields."
...Which confuses the crud outta me. Somewhere, the engine is referncing a doc somewhere that's overriding the adjusted values.
What in the world am I missing?
Gatekeeper Jul 15, 2006, 10:38 PM Perhaps the impassable peaks are wired in more deeply than first thought?
ejday Jul 15, 2006, 11:46 PM Perhaps the impassable peaks are wired in more deeply than first thought?
That's what I'm afraid of... but how? Where? Why have those values there if they're just ignored?
I fear I'm missing something blindingly simple.
Gatekeeper Jul 16, 2006, 02:11 AM Hmm. Well, FWIW, I did some reading on XML programming (Civ IV specific, on Wikipedia), but it didn't have anything on impassable peaks. Might want to take a look over there, because the section was rather extensive (and incomplete).
Gatekeeper
Gatekeeper Jul 16, 2006, 02:17 AM (Deleted ... forum cut off over half of the post and I'm not going to retype the damn thing.)
ejday Jul 16, 2006, 02:37 AM Hmm. Well, FWIW, I did some reading on XML programming (Civ IV specific, on Wikipedia), but it didn't have anything on impassable peaks. Might want to take a look over there, because the section was rather extensive (and incomplete).
Gatekeeper
Did.
Check here (http://civ4wiki.com/wiki/index.php/CIV4TerrainInfos). It's the second item down under "Single line Tags (boolean)"
bImpassable = Whether or not the terrain is impassable
Which is why I'm confused. I want it to be:
not2bImpassable :goodjob:
(Sorry, just a little XML humor...)
Dale Jul 16, 2006, 02:38 AM AlanH:
I actually wrote two documents:
- WorldBuilder Manual (I was too slow to get it on the release CD) which instructs how to use the in-game builder
- WorldBuilder Save File Analysis which lists every possible attribute in a WBS file (a scenario save file) and what information can be stored for each value (including where to find that info)
Dale
ejday Jul 16, 2006, 02:42 AM AlanH:
I actually wrote two documents:
- WorldBuilder Manual (I was too slow to get it on the release CD) which instructs how to use the in-game builder
- WorldBuilder Save File Analysis which lists every possible attribute in a WBS file (a scenario save file) and what information can be stored for each value (including where to find that info)
Dale
Wow! A CIV celebrity in our midst!
I'll look for this Save File Analysis (unless you have a link handy...)...
Correct me if I'm wrong, but I was under the impression that terrain values weren't modifiable in the WorldBuilder?
ancestral Jul 16, 2006, 07:44 AM Theoretically it shouldn't be hard to come up with a rudimentary editor that reads and writes Civ IV XML files in a graphical way, for the Mac. It seems most of the utilities on the forums are written in VB, C#, or some .NET framework. (You'd think there'd be some Java programmers playing Civ IV out there…)
I'm picking up my copy of Civ IV today. Pending my spare time I may look into seeing how much work it would be to come up with a basic gui editor for OS X.
AlanH Jul 16, 2006, 07:51 AM If there's a particular PC editor that looks good I can have a crack at a Mac version. Let me know.
AlanH Jul 16, 2006, 07:51 AM @Dale: Welcome! :wavey: How did you find your way to this little Civ4 backwater?
SOrry I didn't find your later epics. I recalled the early version from when I was looking at the structure of the game when it first arrived, but my brief search didn't turn up the sort of information ejday was looking for.
jamexeno Jul 16, 2006, 12:41 PM I'll look for this Save File Analysis (unless you have a link handy...)...
Hi. Just lurking here while waiting for my copy of Civ IV to arrive - so then I have all the time in the world to search the forum...
Links to Dales WB manual and Save File Analysis (http://forums.civfanatics.com/showthread.php?t=132800&highlight=WorldBuilder+Manual)
ejday Jul 16, 2006, 02:11 PM Hi. Just lurking here while waiting for my copy of Civ IV to arrive - so then I have all the time in the world to search the forum...
Links to Dales WB manual and Save File Analysis (http://forums.civfanatics.com/showthread.php?t=132800&highlight=WorldBuilder+Manual)
Thank you!
BTW: Welcome to the boards!
Dale Jul 16, 2006, 07:21 PM ejday:
Terrain values are changable in the xml files. The plot setting in the WBS file just points to the type of terrain at that plot (which is defined in said xml file).
ancestral:
The biggest problem is that a lot of the xml stuff in civ4 is cross-referenced. IE: delete a tech and you affect about 7 files I think.
AlanH:
lol. Yeah I know, what am I doing here? Actually saw a thread title from the main forum list that interested me, so dropped in. To be honest, looks like a mirror image of the PC release. Hardware, graphics, sound issues. Take a look in the tutorials forum. There's heaps of info in there, and a lot I'm sure is still relevant for mac. BTW, does the mac version support python the same as PC's? Obviously DLL mods are out for you, but hopefully you can run the python ones without too much hassles.
Dale
AlanH Jul 16, 2006, 08:56 PM There may be trouble with Python mods as well. Mod makers are apparently using ome Python libraries that deliver the folder paths for specific pieces of Civ4, and they are configured to respond with Windows paths. If this is the case, it probably won't work on a Mac, 'cos the folder names and locations are different. The libraries will have to be adapted to be platform-sensitive.
Dale Jul 16, 2006, 09:04 PM Ahhhh...... hopefully it isn't too much of a timewaster having to change all of them.
I think the python mods in question will be ones using their own config or xml files to define whether an option is turned on or not.
|
|