GUIDE: Adding new units

Try posting your files or copy them into a spoiler so others can see.

Duh. *Slaps forehead*
well, that would have just made sense.


Now, this file is obviously not complete, and a work in progress - There's no text yet, and all I've modded was the civilizations & leaders - the Unit in question is the "Assault Trooper" for the "Drakkar" Civ. It's the only unit I've added thus far.

Thanks to anyone who wants to take a look at this for me.

~S~
 
Okay, i've looked at it.
Normal way to create an UU is to add a new unit, which replaces an existing unit in a special unitclass.
You've added a complete new unit with a complete new unitclass.
If you replace the assault-troopers unitclass with UNITCLASS_KNIGHT (it replaces the knight, am i right?) in all the files, then it should work.
 
Okay, i've looked at it.
Normal way to create an UU is to add a new unit, which replaces an existing unit in a special unitclass.
You've added a complete new unit with a complete new unitclass.
If you replace the assault-troopers unitclass with UNITCLASS_KNIGHT (it replaces the knight, am i right?) in all the files, then it should work.

Ugh...I cannot believe I did that. <_<.
Thanks a lot, J. I've wasted a whole lot of time trying to figure that out, lol.

~S~
 
hello everyone. i play BTS just against the computer and just would like to have a modern tank with full exp and all promotions. is it possible to do this since it would save tons of manually clicking each tank and each promotion. i have read through some of this thread and see you can add new units, but am lost as to where to start at, can i get a point in the right direction ?

thanks in advance :)
 
To do this, you'll need to learn XML. If you don't know anything about it, don't worry, its super easy. I would (and this is just from what I've seen recommended [I'm not a windows user, obviously]) start by grabbing Notepad++ (Google it).
Copy the files needed into a mod folder (never edit the original files!) and just copy all of the entries for the tank and rename it. (Read through this tutorial to know what to copy.) Find another unit that starts w/ a free promotion and copy it to your new unit. You'll have to copy & paste enough times to get all of the promotions and rename them to each separate promotions. (Check out Civ4Promotioninfos.xml to see all of the names of the promotions.)

I know this is pretty vague, but see how far you can get off of this, and start a new thread in the main creation forum to ask questions in. (you'll get a lot more responses there than here.)
 
Omfg I'm so pissed off at trying to add one simple unit to the game.I've spent the last 2 days trying to just add one unit and nothing has helped me. I tried to do as it said in this guide but my Civ4 wouldn't even start. It complained about the XML files I edited.I'm using BTS but I don't know if that's the problem. Christ am I pissed right now...
 
What XML error are you getting? Usually civ is nice and directs you to the line, or a close aproximation of what the problem is. Also try cloning a unit, giving the clone unit a new type and class first, and see where that get's you.
 
In the civ4gametext_civilopedia_units it said something about an endparagraph not being the same as the beginning paragraph TEXT part.In CIV4ArtDefines_Unit and CIV4UnitClassInfos it says that the elements content does not match with some DTD/Schema.Sorry if some of those words won't ring a bell but I can't translate it well from finnish. I can post the XML if this isn't enough
 
Look at a Unique Unit, and that should give you the answer. Basically you give it the same unit class as whatever it replaces, then set it up in CivilizationsInfos as replacing that unit for whatever civ you want it to be the UU for. If you want it to be it's own unitclass, as well as simply it's own unit (Ie not replace something), that can't be done without SDK work. Well you could hack around it I suppose, and make it so no other civs can build that unitclass, using the same method as a Unique Unit, but instead of filling in a unit to replace it, you use NONE.
 
Very good guide...

Somewhere, I am dropping the ball though. My Pedia page for the Kommando Ruiter is coming up empty. I made the changes the guide said on the "Afrikaan_CIV4UnitInfos.xml" file. I just keep getting nothing. (My Civ and Leader Pedia pages are working fine).

I tried it first using the:
[CODE<Civilopedia>TXT_KEY_UNIT_KOMMANDO_RUITER_PEDIA</Civilopedia>
<Strategy>TXT_KEY_UNIT_KOMMANDO_RUITER_STRATEGY</Strategy>[/CODE]

That didn't work. I figured I could live without the translations, since I was putting it all in English anyhow...
So, this is what I entered:
Code:
<Civilopedia>. .. .. .. .. .The original commandos, 

Boer (original Dutch speaking immigrants of South Africa) farmers took up arms 

against the ever increasing oppression from the British Empire.  In 1658, war 

erupted between the Dutch settlers at Cape Colony and the Khoi-khoi. In order to 

protect the settlement, all able bodied men were conscripted. After the conclusion 

of this war, all men in the colony were liable for military service and were 

expected to be ready on short notice.  By 1700, the size of the colony had 

increased immensely and it was divided into districts. The small military garrison 

stationed at the Castle de Goede Hoop couldn't be counted on to react swiftly in 

the border districts, therefore the commando system was expanded and 

formalized. Each district had a Kommandant who was charged with calling up all 

burghers in times of need. In 1795, with the First British Occupation and again in 

1806 with the Second British Occupation, the commandos were called up to 

defend the Cape Colony. At the Battle of Blaauwberg (6 January 1806), the 

Swellendam Commando held the British off long enough for the rest of the 

Batavian army to retreat to safety.[PARAGRAPH:2]During the Great Trek, a 

Boer retreat further inland away from areas occupied by the British, this system 

was used and remained in use in the Boer Republics. Both Republics issued 

Kommando Laws, making commando service mandatory in times of need for all 

male citizens between the ages of 16 and 60. During the Anglo-Boer War ( 

1899-1902) the Boer commando formed the backbone of the Boer forces.  After 

the declaration of peace in 1902, the commandos were disbanded. They did 

reform themselves in clandestine "shooting clubs". In 1912, the commandos were 

reformed as an Active Citizen Force in the Union Defence Force. This system was 

in operation until 2005, when all commandos were disbanded 

again.</Civilopedia>
			<Strategy>[COLOR_UNIT_TEXT]Kommando 

Ruiter[COLOR_REVERT] replaces 

[COLOR_UNIT_TEXT]Cavalry.[COLOR_REVERT]Kommando Ruiter were 

known for their mobility, ability to live off the land, and hit and run guerrilla war 

tactics.  They have the ability to withdraw from combat, bonuses against seige 

weaponry including flanking attacks, and start with the March and Mobility 

promotions.</Strategy>

And, I still get the same result...

See attachment to see my screenshot in either case.

Do you know what I am doing wrong here?
 

Attachments

  • kommandoruiterpedia.jpg
    kommandoruiterpedia.jpg
    38.6 KB · Views: 114
If that's the Sevopedia (ie you are using the BUG mod) it breaks like that if the KFM doesn't match with the nif used for the unit model. Definatly double check your art defines for this unit. I'd wager a donut your issue is in there.
 
If that's the Sevopedia (ie you are using the BUG mod) it breaks like that if the KFM doesn't match with the nif used for the unit model. Definatly double check your art defines for this unit. I'd wager a donut your issue is in there.

Well, were I to take that bet, I would owe you a donut. That is exactly the issue. There was no KFM file for the Kommando Ruiter.

Know of any good tutorials for making the required KFM? I looked but couldn't find one.
I have the fx.nif and the .nif, but no .kfm
 
Usually you have it point to a similar default unit's KFM. What kind of unit is it?
 
Back
Top Bottom