Well first off, I''ll start using the Inca as an example:
I modded the Inca and made them the Venezuelan, they get various brand
new UUs, so I'll just explain what I did to acheive this:
First off, you need to backup four files in case you mess up:
-unitrules.xml
-unit_graphics.xml
-help.xml
-soundtypes.xml.
All of them are located in your T&P "data" folder. Or, if you have RoN only, the data folder in side Rise of Nations. C:\Rise of Nations\Data.
Now first you should think of what you want to do, for the Inca, I first made Info Age L. Infantry called "Guardia Nacional". After you got your ideas set up, you should open up the unitrules.xml file with a text editor (I use Notepad), find a unit that's not used in the game or you don't care about, I replaced the
Inca Inti Macemen. Now, find the entry for that unit (simply hit search and type the
unit's name) and replace it's stats with the ones you want it to have, for instance, I changed the Inti's attack to 27 from around 14, specify the requirements
for the unit (they are pretty obvious, in a field named "PREQ" and "PREQ1").
I recommend you find another unit from the same age and copy it's specs, but DON'T
change the "GRAPH" field, it'll just use the other unit's art, portrait and sound, and that's not what you want, aye?
After your done tinkering with the stats (make
sure you type the correct age name in "PREQ", in my case Information Age) save up the new file.
Also, if you want to make your new unit "Unique", just type in a "y" in the "FLAGS" field.
Now you need to go to unit_graphics.xml, specifying the art and animation for all units, find the unit you changed (ex. search=INTIMACEMEN) and change the destination Now, go to soundtypes.xml, the document which specifies the sounds of: attack, selection, creation, etc. Go to help.xml, once again search up your unit's ORIGINAL name (INTIMACEMEN) you should find some text saying: Ah yes, important, at the top of the unitrules.xml file is a little "glossasy" which explains what does what, it's very handy for starters. (And experts as well, never forget a good manual). You can asign cultural-art-set-related skins to units (think difference between European and Asian units), all you need to do is create another entry in the unit_graphics.xml file, right after the original entry, but replace the "DEFAULT" part of the unit's name to whatever art set you want it to be, like "ASIAN" for example. So, if you want to give China the US Assault Marines, but with a different skin, all you need to do is: The cultural-related entries would be: ------------------------- 100000000000000000000000 Persians Another update, when modding units, you can determine where they show up their building, for instance, you can add a third unit at the fort or even the barracks (before the Industrial Age, remember Machine Guns and Flamethrowers), to do this, simply look for "< montero91@gmail.com [This message has been edited by montero (edited 10-28-2005 @ 06:16 PM).]
from which it reads the art files, so, the Inti Macemen's original was
"model=".\art\Macemen.bh3" texture=".\art\Macemen.tga", BH3 is the 3D model and TGA
is the skin for the unit, I replaced those to "model=".\art\modern_shockinfantry.bh3" texture=".\art\modern_shockinfantry.tga"
Make sure you put in the correct name in, this should give your unit that art. Now for the animations, just find a same type of unit (Info Age L. Inf.) and copy/paste it's info in place of the existing ones, they're just below the unit name, after this your unit will look and move correctly, you will also want to change the unit's portrait or asign another unit's one to it,
to do this find 'tex_id="TEX_UNITS_2" tex_col="0" tex_row="4" tex_x="-1" tex_y="-1" tex_clip="0">
it over your unit's if you're gonna edit the existing portrait...well that's a bit more comlpicated, leave the current TEX_UNITS,
and go to your art folder, find the Iface_units 01, 02 and 03, open them ALL up with an image editing program (not sure if Paint works, I don't think so, I use Photoshop) there you will find ALL unit's in-game portrait, now find the replaced unit's one, and paste in the one you made, downloaded or whatever, save the file as Targa, and that's it, now save up unit_graphics and on to step 3.
Pretty simple here, just find (again) a unit from the same type and age and paste in their info (for instance, I looked up
the Shock Infantry, on which I had based my entire unit, and pasted it's sounds on top of the former Inti sounds) after that...
you're done with soundtypes.xml! That's it for the complex part, now we go to aesthetics.
Inca Unique {Heavy Infantry} and a short description which is the one you see in the game
(Inca Unique {Light Infantry}, Medieval Age #ICON29 - fast, cheap melee troops effective against enemy mounted troops.)
Now replace the nation's name to the one you asigned the new unit, and type in a little description about it, it should look like this:
(Venezuelan Unique {Modern Infantry}, Information Age #ICON34 - fast, rapid-firing soldiers used for Patriotic Defense.)
Or whatever you decide to put in, now lastly see the #ICON34 or #ICON29? That's the Age portrait (Enlightenment: the little
buildings with the V symbol) to change it simply find a unit from that Age and put it's "ICON" (INFO: 34, ENLIGHT: 29, etc)
Afer that, save up and enter RoN, select the nation you added or changed the unit for, start a game and check if it worked, if
not, retrace your steps and make sure everything is in order, hope I was able to help all of you.
-------------------------
Some interesting things.
-Copy the ASSAULTMARINES-DEFAULT-AGE0
-Paste it just below.
-Now, change ...-DEFAULT... to ASIAN, and asign it a new skin and/or model, just like explained above.
-DEFAULT (European)
-ASIAN
-ARAB (African)
-AMERICAN
-NA (Native North Americans)
Nations' tribe masks are:
010000000000000000000000 Dutch
001000000000000000000000 Indians
000100000000000000000000 American
000010000000000000000000 Lakota
000001000000000000000000 Iroquois
000000100000000000000000 Mongols
000000010000000000000000 Koreans
000000001000000000000000 Japanesse
000000000100000000000000 Chinese
000000000010000000000000 Russians
000000000001000000000000 Germans
000000000000100000000000 British
000000000000010000000000 French
000000000000001000000000 Spanish
000000000000000100000000 Turks
000000000000000010000000 Egyptians
000000000000000001000000 Romans
000000000000000000100000 Greeks
000000000000000000010000 Nubians
000000000000000000001000 Bantu
000000000000000000000100 Inca
000000000000000000000010 Maya
000000000000000000000001 Aztecs
Thanks to jesus123 for posting the expack tribe mask.
And thanks to ODA for posting jesus123's numbers in his "unnoficial modding FAQ" topic. I added this here to save you the trouble of having to go to ODA's topic to find the masks.
______0___________1____________2________________3_________
This article was made on Feb. 4th, 2005 and edited on September 19th, October 1st and October 28th 2005 by Luis M. Montero.
Author of Modern Civilization for RoN: T&P.