Modding structure question

ahengle

Chieftain
Joined
May 10, 2016
Messages
36
If I wanted to make some tweaks on my end of this mod, without writing in the original files, would a file structure like this work:

~/civ4/bts/mods/c2c/mods/my mod ?

And if not, what way could I do it, without changing the files in c2c directory?
 
Yes, putting your modifications in a folder inside the my_mod folder will normally work.

The ones in that folder are loaded in alphabetical order so if you are modding one of those you will need your folder to be later in the alphabet.
 
Ok, testing this out, how do I load that new mod under c2c ?

Or does this work differently than I expect it to work?

And I assume, I still need to keep file structure in the new my_mod folder ? (ex. my_mod/assets/xml/units if I want to edit one of those files)
 
No wont work. You can't merge another mod into C2C this way.

I thought you were making some changes to particular units, buildings or the like in C2C.

If that is the case you need only have the file(s) with the changes in it and a copy of the schema file(s) associated with the file(s). In many cases you can get away with just the changed values in the entity also. The only time that does not work is if you are trying to reset them to default values.

For example if you were changing the Barracks building you would have a Barracks_CIV4BuildingInfos.XML which looks like the normal building infos file in C2C but only containing the definition of the barracks. It would have the schema file up the top renamed from C2C_CIV4BuildingsSchema.xml to Barracks_CIV4BuildingsSchema and you would copy the C2C_CIV4BuildingsSchema.xml file from the main buildings folder into yours and rename it Barracks_CIV4BuildingsSchema.xml

Any folder in My__Mods folder will load automatically.
 
Tried it out, can't seem to get it work.

I copied a unitinfos file and renamed it to zAxeman_civ4unitinfo.xml (for the alphabetical order thingy) and the unitschemas and renamed it to zAxeman_Civ4unitschema.xml (and changing nothing inside?). Then changed the shema inside the unitinfo file to match, deleted everything but the axeman info and changed the combat value for testing.

What would be the exact path of the files?

I tried both C2C/My_mod/
and C2C/My_mod/assets/xml/units/

or should it be some other path?
 
The starting path is the one in your Caveman2Cosmos folder Assets/Modules/My_Mods. Your folder goes inside that one. There are other folders inside that folder already and you can look at them for examples.
 
Well, why didn't you start with that ?!

Oh, there's a folder named My_Mods in there. I only meant it as a placeholder name.

Thanks for the help, hopefully I can make it work from here on.

edit: Alright, it worked!
 
Top Bottom