remake20
:)
- Joined
- Apr 21, 2008
- Messages
- 4,901
Okay and welcome. Today I will be showing you edit XML flies for Civ 4. I will show you how to edit units, civs, civilopedia, and other things. Just to let you know the XML files are under Assets/XML of your Civ 4 directory. For editing XML files I suggest using a free program called Notepad++, link is coming.
Table of Contents
1. Units
1. Making sure you have the right spot
2. Simple editing
When making/changing a unit I suggest coping another unit (helps if it has close to the same stats). But before you do that read below and find out where the units starts and ends.
First is where the units start and end. I had trouble with this at first, but you catch on. Where the unit starts is at the <UnitInfo> not either of the other <UnitInfos>. I remember my first mod I wasn't paying attention and I started a few units with the <UnitInfos> and as you probably guesses... the game crashed.
So when copying a unit make sure you start at the <UnitInfo> not <UnitInfos>. Below is what it should look like.
Now where a specific unit ends. Well it's where it says </UnitInfo>, does that look familiar? Anything with "/" means the end of.
Next is a very short paragraph about placing copied units in a place where if you try to start up the game it doesn't crash.
Whenever you copy an existing unit to make a new one select every line of text between and including <UnitInfo> and </UnitInfo>. Now where to place it...
After you have done that there should be NO EMPTY LINES. And if it is the first unit you are adding the space should be on line 23,259. You now should have a duplicate unit.
Okay first I'm gonna take some picture with all the options, and then run through a few of them.
One Red dot = Important
Two Red Dot = Kind of important
Continuous line = Important section
Dotted line = Kind of important section
It is so big so it's in spoilers. I see an error with the pics I'll fix them soon.
First is UNITCLASS this is something like, Melee, Archery, Recon, ect. You need to have one, because some units have bonuses vs. certain classes and promotions only come to certain units.
DOMAIN is next. DOMAIN is where the unit is present there is Land for land units, sea for sea units and, air for air units. This is important because you don't want ship to go on land.
Next is INVISIBLE and SEEIVISIBLE. I cannot tell you much about these, but I can tell you that these are somewhat important. If you are wanting to make a unit with this find the closest unit that would have INVISIBLE and see what to do.
Next is the Civilopedia, Strategy, and Description. This is important, because all must lead to correct locations if not the game will crash.
This is all I have right now, but more is coming. I might get to that stuff later.
PILLAGE is next. If at 0 the unit cannot pillage, if at 1 the unit can pillage. If you do not know what pillaging is, it is the ability to destroy an improvement of a tile (eg. mine, farm).
What do we have next? Oh that's right First Strike immune and no defensive bonus. Immune to first strikes means that there will be no first strike from the opposing unit. No defensive bonus means that it will not get a defensive bonus from tiles of Fortify (It may get from fortify, but I don't think so).
Next is... can you guess? It is Hidden Nationality. It you put it at 1 the unit will not show up as yours. So you can go pillage without them know it was you!
Next is a very important section. The upgrade section. This one scared me a first, but you'll learn. Just make sure you are careful. DO you remember the UNITCLASS from earlier that applies here. Just put the the UNITCLASS that you want the unit to upgrade to. The number under it is the number of units it upgrades to, I think (but I've never tried) if you put the number at 2 then with one warrior you will produce 2 Axeman. See it's just that simple.
Blah, blah. Next... nope... Now it's... nope, you get the idea. It is the UNITAI section.
. I don't know why I did that, but I did and there's nothing you can do about it. The UNITAI section is what the AI does with the unit, in the case of the Warrior the AI will use it for attacking, pillaging and, defending. Wait a minute, okay now this is another I'm not sure, but it may be that the AIs DO NOT use Warrior for defending (look at the tag after pillage). The 1s just ignore them and keep everything at 1.
This is what I have right now, but more is coming.
Table of Contents
1. Units
1. Making sure you have the right spot
2. Simple editing
UNITS
Making sure you have the right spot
The file you want to edit for a common unit is the CIV4UNITINFOS file. Oh and by the way make sure CAPS LOCK is on. The game will not read it if it is not (Actually I'm just guessing, but I've never done it without caps.). When making/changing a unit I suggest coping another unit (helps if it has close to the same stats). But before you do that read below and find out where the units starts and ends.
First is where the units start and end. I had trouble with this at first, but you catch on. Where the unit starts is at the <UnitInfo> not either of the other <UnitInfos>. I remember my first mod I wasn't paying attention and I started a few units with the <UnitInfos> and as you probably guesses... the game crashed.


Now where a specific unit ends. Well it's where it says </UnitInfo>, does that look familiar? Anything with "/" means the end of.

Next is a very short paragraph about placing copied units in a place where if you try to start up the game it doesn't crash.
Whenever you copy an existing unit to make a new one select every line of text between and including <UnitInfo> and </UnitInfo>. Now where to place it...

After you have done that there should be NO EMPTY LINES. And if it is the first unit you are adding the space should be on line 23,259. You now should have a duplicate unit.
2. Simple Editing
Okay first I'm gonna take some picture with all the options, and then run through a few of them.
One Red dot = Important
Two Red Dot = Kind of important
Continuous line = Important section
Dotted line = Kind of important section
It is so big so it's in spoilers. I see an error with the pics I'll fix them soon.
Spoiler :







First is UNITCLASS this is something like, Melee, Archery, Recon, ect. You need to have one, because some units have bonuses vs. certain classes and promotions only come to certain units.
DOMAIN is next. DOMAIN is where the unit is present there is Land for land units, sea for sea units and, air for air units. This is important because you don't want ship to go on land.
Next is INVISIBLE and SEEIVISIBLE. I cannot tell you much about these, but I can tell you that these are somewhat important. If you are wanting to make a unit with this find the closest unit that would have INVISIBLE and see what to do.
Next is the Civilopedia, Strategy, and Description. This is important, because all must lead to correct locations if not the game will crash.
This is all I have right now, but more is coming. I might get to that stuff later.
PILLAGE is next. If at 0 the unit cannot pillage, if at 1 the unit can pillage. If you do not know what pillaging is, it is the ability to destroy an improvement of a tile (eg. mine, farm).
What do we have next? Oh that's right First Strike immune and no defensive bonus. Immune to first strikes means that there will be no first strike from the opposing unit. No defensive bonus means that it will not get a defensive bonus from tiles of Fortify (It may get from fortify, but I don't think so).
Next is... can you guess? It is Hidden Nationality. It you put it at 1 the unit will not show up as yours. So you can go pillage without them know it was you!
Next is a very important section. The upgrade section. This one scared me a first, but you'll learn. Just make sure you are careful. DO you remember the UNITCLASS from earlier that applies here. Just put the the UNITCLASS that you want the unit to upgrade to. The number under it is the number of units it upgrades to, I think (but I've never tried) if you put the number at 2 then with one warrior you will produce 2 Axeman. See it's just that simple.
Blah, blah. Next... nope... Now it's... nope, you get the idea. It is the UNITAI section.


This is what I have right now, but more is coming.