Modding help (Units)

jaymanser1999

Chieftain
Joined
Jul 17, 2014
Messages
8
Location
Middle Earth
I know java, lua, c#, php,css,html and a few other programing langs... BUT FOR SOME REASON the civ4 modding is strange it might be that little things like adding a leader is a few hundred lines -.-(Ik you just copy and paste but still).. anyways every tutorial ive seen to make a unit it wants me to make 3d models and all these other crazy things.. all i want to do is take a unit like mechanized infantry and make like american mechanized infantry british mechanized infantry etc.. for the simple reason of maybe USA's infantry well be stronger then russias
 
Using a guide would probably be helpful, but if you're only looking to edit stats and not appearance or anything like that, you can jump to the part about XML editing. I'll assume from your post that you have a reasonable handle on XML. What you're talking about is essentially adding a new unique unit of the same unit class for every civilization. To do that, you'll need to edit CIV4UnitInfos.xml and CIV4CivilizationInfos.xml. As a note, it's best not to edit the files directly. You should copy the files into your custom assets folder or a mod and edit that copy, so you can just delete them if something goes horribly wrong.

This site has a good explanation of all the tags in CIV4UnitInfos.xml. It should also be helpful to compare a unit and unique unit (worker and fast worker come first in the file) to see how they have the same CLASS but different TYPEs. So you copy and paste a few versions of the unit you want and change the TYPE name and stats as you see fit. Then you just need to add your new units as unique units to their corresponding civilizations. This can be best done by looking at a civ's existing unique unit under the UNITS tag and just mimic the structure. There's not cap to the number of unique units allowed, so feel free to add more instead of replacing the one that's there.

Let me know if this clarifies things. And as Juju pointed out, you'll get a better class of help (far more expert than me) if you direct your future questions to the appropriate sub-forum.
 
The moniker beneath your username is based on your number of posts, not the difficulty level you play.
 
Top Bottom