GUIDE: Adding new units

No, changing the projectile will need some work with a 3D program.
The program "Blender" is open source, so you can download it for free, and with the niftools you can change the files.

But it's maybe easier to ask Zerver, if he can transplant it.
 
so im trying to make a uu for a civilazation. all i want to do is change the stats and make it look like a spearman. i know how to do the second part, but could someone please point me to a place where i could find out what all the tags mean for the first part?

btw is the link for civ4wiki not working for anyone else?
 
No, it's working for me, http://modiki.civfanatics.com/index.php/Civ4UnitInfos.

For the tags: Most just need common sense ;).
If you really don't know, what a tag means, then your next step could be to search in the UnitInfos.xml, where it's just. After that, it should be clear in most times.
 
Hi everyone,

I finally got a computer fast enough to play this game and after spending so much time adding units and other stuff to Civ 3, I really want to try putting new units into Civ 4. I mostly want to put in some of the tanks and naval craft that you can download from these forums such as the WW1 tanks, the Centurion Tank and Essex Carriers. I don't care if they are put in as unique units or are available to all civilizations, I just want to pick the simplest method to get them in a traditional 6000 year game. I've been spending many hours going through the tutorial and I'm still having trouble understanding exactly what I need to do. Here is what I have done so far:

I created a mod and have copied over some of the folders and xml files.

1) I copied CIV4FormationInfos, CIV4UnitClassInfos and CIV4UnitInfos to the <Mod Title>/Assets/XML/Units folder

2) I copied CIV4ArtDefines_Unit to the <Mod Title>/Assets/XML/Art folder

3) I copied CIV4GameText_Civilopedia_BTS and CIV4GameText_Objects_BTS to the <Mod Title>/Assets/XML/text folder (I'm not sure if I need the latter)


Now if I wanted to add a Centurion Tank as a unit, I started by looking at Rabbit's 6 steps to add a unit

1. I opened up the UnitInfos file and found the entry for "Tank" and copied and pasted it at the end and changed the entry to "Centurion Tank". It looks like I can alter the stats for the tank here and also what technology is required for it.

2. I opened up the UnitClassInfo file and copied the entry for Tank and pasted it at the end and changed the name to "Centurion Tank"

3. I next opened up the FormationInfo file and this is where my first problem occurs. I have no idea what to alter. I'm not sure what Rabbit's tutorial wants me to do. I can't find any mention of the unit "Tank."

4. With the ArtDefines_Unit file, after I copy the "Tank" unit, from what I understand I just need to keep track of whether the downloaded Centurion Tank unit has its own KFM or NIF file or if it uses the effects from a unit already in the game (probably the tank) and then make sure I type out where the Centurion tank is supposed to get those effects. Please correct whatever I'm getting wrong :sad:

5. I'm not sure if I have to edit the CIV4GameText_Civilopedia_BTS in the Text folder. I searched the file and I don't see where I would add an entry to the Civilopedia for the Centurion Tank. It seems like most of the XML file is for describing civilizations and improvements. I read that some thought it did not have to be edited to play the game if you did not access the Civilopedia but I would rather just add a short entry. Can someone point me in the right direction.


So I'm kind of stuck with Step 3 and 5 and from all the reading I did, I think there are more steps before you can actually get downloaded units like the Centurion tank into the traditional 6000 year game. Any help would be greatly appreciated, I would just like to get 10-20 new units into the game so that at least my civilization (the British) could use it.
 
3. I next opened up the FormationInfo file and this is where my first problem occurs. I have no idea what to alter. I'm not sure what Rabbit's tutorial wants me to do. I can't find any mention of the unit "Tank."

Changing the formations is not necessary.
Just let the formation infos in the unitInfos.xml stay.

4. With the ArtDefines_Unit file, after I copy the "Tank" unit, from what I understand I just need to keep track of whether the downloaded Centurion Tank unit has its own KFM or NIF file or if it uses the effects from a unit already in the game (probably the tank) and then make sure I type out where the Centurion tank is supposed to get those effects. Please correct whatever I'm getting wrong :sad:

That's completly right :).

5. I'm not sure if I have to edit the CIV4GameText_Civilopedia_BTS in the Text folder. I searched the file and I don't see where I would add an entry to the Civilopedia for the Centurion Tank. It seems like most of the XML file is for describing civilizations and improvements. I read that some thought it did not have to be edited to play the game if you did not access the Civilopedia but I would rather just add a short entry. Can someone point me in the right direction.

The text files are not equal to the other files.
In the text files, you can put every entry everywhere.
So you can copy any entry, change the TXT_KEY_whatever, and paste your text in.
 
Thanks for the quick reply,

If I don't change the formationinfo file, will that affect or limit how the units can be used in the games?

And hopefully for the Civpedia, it will be alright to just leave it in English.

And then with all those steps I mentioned above, would that be enough to get the units into a full single player game? Its just hard to keep of all the things I have read on these tutorials.
 
If I don't change the formationinfo file, will that affect or limit how the units can be used in the games?

No. The formations are just an optical thing.

And hopefully for the Civpedia, it will be alright to just leave it in English.

That's only a problem, if you'll create a public mod, and gamers try to play it in another language.
For a personal mod, it's ok.

And then with all those steps I mentioned above, would that be enough to get the units into a full single player game? Its just hard to keep of all the things I have read on these tutorials.

Yes, that's enough.
 
Thanks again, I got the Centurion Tank to show up in the world builder, it will take me a bit before I can see if it works in the real game because of the tech and resource requirements, but I guess I could always fix it when I get into the game further. Now I have to do this same process with another dozen or so units :eek:


I'm assuming there are rules against double posting so hopefully someone will see this question if the thread is not bumped. Here is where I am at, I got most of the units I wanted to work in an actual game but when I am on the production thread for a city, it shows these new units with the phrase something like KEY_UNIT_TEXT_Centurion_Tank instead of just saying "Centurion Tank." What do I need to change to get rid of it?
 
I hope its ok to bump this, when I am on the production thread for a city, it shows all of the new units I put in with a phrase something like KEY_UNIT_TEXT_Centurion_Tank instead of just saying "Centurion Tank." What do I need to change to get rid of it? It actually makes it hard to read certain things on the screen, especially for the domestic advisor.
 
Hi, everyone this is my first public post. :)
Have been a CiV player since the first release of CIV1. Yes I'm Sid Meyers age, OLD.
I have just found this Forum in the last month and wanting always to change certain things in the game began to learn how to Mod with CIV4 that I had. Learned to read and edit xml and understand how to tweak the units. Then followed Soran's and Rabbit White's Tuts I learned how to introduce a couple of units in Vanilla, also to make them UU's and various other "soft" changes even including introducing Capo's Alexander as a working LH.
Then I got enthusiastic and went and got a combined CIV4, Warlords and BtS combo disc.BtS is a 313 version. Reading all the problems with the latest patches I'm weary to upgrade at this stage.
Installed and thought it would be easy to begin moding BtS with better graphics and less file entries as well as new abilities. Alas it is not. Where previously I made all my changes in the CustomAssets it now seems that I cannot change units there anymore. I tried and for a week have battled only to have a Medieval Workers shadow with a totally pink old worker working. How does one insert a unit with only .nif and reportedly vanilla worker movements that are not included with the file in BtS?
Thanks if u can help at all!!:(
 
Welcome to CFC :).

BtS is a 313 version. Reading all the problems with the latest patches I'm weary to upgrade at this stage.

3.13 has a lot more bugs than 3.17/3.19. You really should patch your game!

I tried and for a week have battled only to have a Medieval Workers shadow with a totally pink old worker working. How does one insert a unit with only .nif and reportedly vanilla worker movements that are not included with the file in BtS?

What .kfm file did you mention in the ArtDefines_unit.xml? The .kfm from the normal worker should be there.
When did the worker show up as normal worker? Did he change the appearance, when you selected it?
The pink: Pink always means, that someting is missing/can't be found. In this case: Have there been texture files (.dds) in the download? If no: these are missing. What files are needed, is normaly mentioned in the dowload page, so do you have the link from the unit?
 
Hullo "The_J". :)
The unit is Bekuel's "Hungarian Middle Age Worker".
The download contained only a .nif file and & a number of Truevision Targa images covering the tools, dirt, tools gloss etc. The accompanying instructions were that the unit requires the vanilla worker movements.

I take it that means that _fx.nif and kfm must come from the vanilla worker. When I vectored that path within my customAssets folder, I got a pink blob. Ok that means wrong vectoring, can't read the Art.

To cut a long story short, I unpacked the vanilla art folders and copied all the vanilla workers .kf and .kfm files into the Hungarian units folder. Then re-vectored the ArtDefines to the new worker.kfm and _fx.nif destination and retained the .nif to the Hungarian's position. Also to check whether I was correctly vectoring I also changed the unit_shadow to the Hungarians .nif.

The result was a totally animated pink "early art" woker, with two black shadows of the Hungarian worker holding all his tools extending from the same foot positioning. Quite interestiing I must say.

Sorry I am not a programmer, just one year of (Fortran back in 1973 at University) so I really don't know how to take a picture and upload it for you to see. If you send me instructions I'll try to do this tomorrow.

I also downloaded some other worker units, but they also came with just Targa images and a .nif file. When I redefined the Unit and ArtDefines.xml files, this time I got no changes at all.

That's when I gave up and decided to look in the forum to find somewhere appropriate to ask for help or find answers. After two days of searching I found this, the end of Sovarns tut threat that I had last accessed and learned how to introduce a unit into my CIV4 succesfully about a month and half ago still currently operating and I asked my question.

Thank you very much for your prompt reply and all the work you're all doing for us the CIV addicts and for putting up with my verbosity.

- You advise me to patch upwards should I patch directly to 319? and if so should I then patch with BUG 1.1? I think that's what I read in the 319 thread about solving the problems that this upgrade has brought with it.:confused:

-And you're right
"If you're paranoid does not mean that you're wrong.
just that you know more than the rest of us." :goodjob:
 
The download contained only a .nif file and & a number of Truevision Targa images covering the tools, dirt, tools gloss etc. The accompanying instructions were that the unit requires the vanilla worker movements.

I take it that means that _fx.nif and kfm must come from the vanilla worker. When I vectored that path within my customAssets folder, I got a pink blob. Ok that means wrong vectoring, can't read the Art.

pink blob: You're right :yup:.
The _fx.nif: No, that was wrong. If there's no _fx.nif, then just write in the ArtDefines_units.xml
PHP:
<SHADERNIF/>

The normal nif and the _fx.nif are the same models, but with different graphical effects (if you have a better graphics card). If you add another _fx.nif, i guess that will screw something up.

And there are some .dds in it. If you don't have the file extensions activated in the explorer, they'll maybe appear as .tga to you.

To cut a long story short, I unpacked the vanilla art folders and copied all the vanilla workers .kf and .kfm files into the Hungarian units folder.

Did you also copy the .dds? If no: good :).

The result was a totally animated pink "early art" woker, with two black shadows of the Hungarian worker holding all his tools extending from the same foot positioning. Quite interestiing I must say.

I guess the black shadow workers come from what i've said above.


Sorry I am not a programmer, just one year of (Fortran back in 1973 at University) so I really don't know how to take a picture and upload it for you to see. If you send me instructions I'll try to do this tomorrow.

:lol:
It's not so difficult ;).
Take the picture: Hit the "print" key on your keybord (somewhere right upper edge). This will produce a .jpg picture in your "My Documents\My Games\BtS\Screenshots" folder.
Load it up: At the bottom of the answering page is a button "manage attachments". Click on it, search your picture, load it up.

You advise me to patch upwards should I patch directly to 319? and if so should I then patch with BUG 1.1? I think that's what I read in the 319 thread about solving the problems that this upgrade has brought with it.:confused:

Patching: Yes, directly to 3.19.
BUG: No idea, sorry :dunno:. You should ask in the BUG-subforum.
 
THANK YOU I UNDERSTAND!!!!!!!!

<SHADERNIF/>

The switch is off! So ... if none is supplied by the author, switch the damn thing off. Very logical.

Did you also copy the .dds? If no: good .
No, I first copied everything and then took out all Targa and DirectDraw duplications as well as everything whose extensions were the same (==) to extensions in the provided file.

THANK YOU ONCE AGAIN. I'll try to execute these changes late on and will revert with results .
also I'll try to upload the amusing results I was able to obtain. Thanks.
 
EDIT: IT WORKS! THANKS FOR THE HELP.
Now to figure out the Screen shot.
 
Hi, so I was able to add new units without too much problem (thanks for the tutorial btw). Could somebody tell me what to modify in order to make a unit type not show up in triplicate (e.g., one swordsman as a unit instead of a group of three)?

thanks
 
Top Bottom