The Modder's Guide to Civ4

LAnkou said:
When you want to create a mod, you add a new folder in the Civilization4/mods folder, right?
Right.

LAnkou said:
and then, if you want to modify some files, you just have to copy the one to be modified in the created folder, right?
Right. Except that you need to keep the path the same. So if the file is in assets\xml\units it'll need to be placed in mods\YOURMOD\assets\xml\units.
 
I have read the XML modding intro at the beginning but I have further questions.

Let's say that I would like to make a Klingon language version of the game.

1. Where the game stores the accessible language tags? I mean if I made the Klingon version how will the game know that there is a new language and most important, how will it offer to me to use it?

I have seen a line in the CivilizationIV.ini file which defines that which is the default language from the five ones which are included in the game. Does it mean that it is enough to put a Klingon(5) addendum here, set the Language=5 and than I put all the Klingon texts in the sixth row of the XML data, after the Spanish instance? (Of course in between the <Klingon></Klingon> tags.)

2. I copy all the original XML files to the CustomAssets / XML / Text folder and modify them there, am I right? Does it mean that the game check the CustomAssets first?

3. What if I am impatient and want to see my beautiful Klingon texts at least at some instances of the game? I mean what happens if not all the text XML files are edited with the new language tags, or if a file is partially edited? Which language will be used in this case?

4. There are several exotic characters (glyphs) in the Klingon language. Did I see well that these should be inserted in the &#decimalcode; format? E.g &#233; for "é"? Where can I check the decimalcode of specific glyphs? The Windows Charactermap shows the Unicode value not the decimal any more.
 
Sorry, in the 4. question I should have marked somehow the code to show it for the &#233;, do not interpret it.
 
I must be blind or stupid, but i can't find other folders in assets/art/... than movies i check the size of folder and searched if it is hiden but nothing. Where are all the other folders and *.dds files? I searched them
D:/progam Files/Firaxis Games/Civ... IV/assets/art/
What i'm doing wrong?

I looked the xml file, and it shows me that these things must be thare...

I want to create new religion and change the buttons and images
 
They are in Art0.FPK. You will need to unpack it to be able to mod the existing graphics (but not add new I think... but since I don't do graphics I don't really know)
 
snarko said:
They are in Art0.FPK. You will need to unpack it to be able to mod the existing graphics (but not add new I think... but since I don't do graphics I don't really know)

I know some people create flags, they replace .dds files. Why not to add new ones. As it seems to me you just have to tie things together in code.

Thanks for helping
 
I'm adding more links to helpful tutorials as they spring up. Civ4Wiki is the biggest news atm. It should make navigating the XML and Python a LOT easier. Isak is adding all of his information, so it's already becoming a substantial source of information.

btw CK (and whoever else asked me about the XML files), I never got around to looking through the XML myself, but Max_x_fire posted a great quick ref with a summary of each file. There's a link in the XML post.
 
Weasel Op said:
I'm adding more links to helpful tutorials as they spring up. Civ4Wiki is the biggest news atm. It should make navigating the XML and Python a LOT easier. Isak is adding all of his information, so it's already becoming a substantial source of information.

Awesome! Just what I need! :thumbsup:
 
Under "CvPythonExtensions" on http://civ4wiki.com/wiki/index.php/Python_files:

"This is actually implemented in C++, and CvPythonExtensions is an interface between the Python and C++. There is no CvPythonExtensions.py file, however a lot of important functions are in the module."

Does that mean, in my Python code, I can simply use "from CvPythonExtensions import *" and it will work fine just like in other "official mods" (i.e. American Revolution, Desert War)?

Just making sure. Thanks.
 
ADDIT: to clarify/answer my own question in my original post, user-built "cusom" mods have to be placed in the My Games/ directory not in the Program Files/ directory. I moved a mod folder over to the My Games version, and now the starting turn durations are properly shortened. You might want to clarify this in your first couple posts in the thread Weasel. I read the entire thread, and I did not see this point clarified. It might be a fairly obvious point to modders, but to those who are simply interested in USING mods, it might be important :)

Thus the path for this mod that I'm trying out must be:

Desktop/My Documents/My Games/Sid Meier's Civilization4/MODS/Derelict's Truly Epic


It WILL NOT work if it is in the following path:


(C: )/Program Files/Firaxis Games/Sid Meier's Civilization4/Mods/Derelict's Truly Epic

Even though it DID give me the option to load it in the "Load a Mod" tab, and when I went to "About this Build" it listed the mod as being in effect.

Also, note that the custom version has "MODS" as all-caps verses the original in Title Case "Mods".


ORIGINAL POST:

Hey guys, great thread!

I have a fairly simple question. At this point I'm just trying to understand how it all works, without even aspiring to my long-term aspirations to mod!

Why do I have copies of Sid Meier's Civ4/etc., etc . . . in BOTH

(C: )/Program Files/Firaxis Games/Sid Meier's . . . and in:

Desktop/My Documents/My Games/Sid Meier's . . . .

My reason for asking is, I've dled a little mod by Derelict that simply makes the game play a bit slower. When I try to run it going to the Advanced Tab/Load a Mod in the main game window, it warns me that it is restarting, and it does. When I check out the "About this Build" it now lists "Derelict's Truly Epic" as the mod that is in effect, but then when I start up a new SP game, it still have the 40 year turn times at start instead of the 28 which Derelict's mod is supposed to cause.

I suspect this is not working because I've installed the Derelict's Truly Epic mod folder in the Program Files/ directory instead of in the My Games/ directory?

I notice that the list of folders and files in the My Games directory seem to be the ones that refer to customized assets and such, so I'm guessing that it is in this area that user made mods need to reside?
 
I don't know how the MODS folder works, but I've used both Custom Assets and the Civilization 4\Mods folder successfully. The Custom Assets directory is for files that you want to use all the time. Civ4 will always load these files first. The Civilization 4\Mods folder is for custom mods that you can choose to play. When you load a mod, the game will restart and use all of the files in the folder for that mod, but the Custom Assets folder will still be used. It goes like this:

Custom Assets>>Mods\MODNAME>>Assets

Any Custom Assets files are loaded, then if a mod is being run all of the files in the mod folder are loaded (but not files that have already been loaded from Custom Assets), and finally all remaining files are loaded from the main Assets folder.

If you are making a change that you want to apply to ALL games, you put it in Custom Assets. If you are making a change for a specific mod, you put it in Civilization 4\Mods. If you want a mod to load by default, you can specify it in the ini file with "Mod = Mods\MODNAME"

If it's not working this way, you may need to clear your cache. Civ4 saves a lot of files in a cache folder and uses them instead of reloading the files, so sometimes changes don't appear as they should. Go to C:\Documents and Settings\USERNAME\Application Data\My Games\Civilization 4, show hidden files and folders, and delete the cache folder. You may need to do this periodically as you make changes.
 
This mod is a very slight alteration in the game, only changing the relative time requirements for techs, and all buildable things (units, but not buildings I think) as well as making it 750 instead of 650 turns max, the overall goal being to slow it down even more than in the out of the box Epic version.

Instead of 40 years per turn at outset, it is set to 28. When I initially had the it in the My Programs/ . . ./Mods directory, it was not working, even when I loaded it from the Advanced/Load a Mod tab.

Once I put it in My Documents/ . . ./MODS instead, it loaded just fine.
 
Anthropoid said:
ADDIT: to clarify/answer my own question in my original post, user-built "cusom" mods have to be placed in the My Games/ directory not in the Program Files/ directory. ...

...

This is wrong. Most likely your problem was not clearing the cache (see two posts above). You should not put the mods in my documents/my games/*/mods as this will make you unable to load games saved when using the mod.
 
ADDIT: clearing the cache has made the mod work properly from the Mod/ folder! Yeahh!

snarko said:
This is wrong. Most likely your problem was not clearing the cache (see two posts above). You should not put the mods in my documents/my games/*/mods as this will make you unable to load games saved when using the mod.

Yes that is exactly what I have happening now! :blush:

Snarko seems to be exactly right. Putting them in the My Games/ directory causes them to be unable to load. Will check the clear cache issue in the posts above, and see if that makes the mod run properly once I move it to the other directory.

What was it Edison said "Genius is 99% perspiration, and 1% inspiration!?"
 
This question may be simple, but I can't find the answer myself:
What do I need to do to let a custom unit appear in the game?

I did everything that is described in unit modding threads.
1-I unpacked art0.fpk
2-I created a mod file with the good folder names
3-I moved all the xml files to the mod folder
4-I made a copy of the "worker" unit in UnitInfo.xml
5-I changed the references (class, type, description, strategy, civilopedia) from (...)_WORKER_(...) to (...)_modernWORKER_(...)
6-I did step 4 and 5 in UnitClassInfos.xml, GameTextInfos_Objects.xml, GameText_Civilopedia_Units.xml, ArtDefines_Unit.xml
7-I changed the name of the unit in GameTextInfos_Objects.xml to modern worker
8-I started civ4 and loaded my mod
9-The unit could not be found anywhere

Did I forget something?

I also destroyed every other unit (in the mod xml file) and they are still there. Is it normal?
 
Top Bottom