You must be logged in to post messages.
Please login or register

Game Modifications
Moderated by alincarpetman

Hop to:    
Welcome! You are not logged in. Please Login or Register.135 replies, Sticky
Rise of Nations Heaven » Forums » Game Modifications » How to mod units - Answered.
Bottom
Topic Subject:How to mod units - Answered.
« Previous Page  1 2 3 ··· 6  Next Page »
montero
Member
posted 09-19-05 07:10 PM EDT (US)         
HOW TO MOD UNITS:
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
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"> or something like that, it depends on the unit. Now if you're gonna asign another unit's portrait, find that unit's tex_id="TEX_UNITS" entry and paste
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.

Now, go to soundtypes.xml, the document which specifies the sounds of: attack, selection, creation, etc.
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.

Go to help.xml, once again search up your unit's ORIGINAL name (INTIMACEMEN) you should find some text saying:
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.

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).
-------------------------
Some interesting things.

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:
-Copy the ASSAULTMARINES-DEFAULT-AGE0 [...] entry in it's entirity.
-Paste it just below.
-Now, change ...-DEFAULT... to ASIAN, and asign it a new skin and/or model, just like explained above.

The cultural-related entries would be:
-DEFAULT (European)
-ASIAN
-ARAB (African)
-AMERICAN
-NA (Native North Americans)

-------------------------
Nations' tribe masks are:

100000000000000000000000 Persians
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.

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 "<GRID_X>" in any unit entry in the unitrules.xml file, and change it to the position you want the unit to be in, this allows you to "add" a new unit while still being able to build a similar unit, for example, you could have two kinds of Musketeers at the Barracks, simultaneously, and so on, the count on the "X Grid" starts at zero, with this format:

[MUSKETEERS] [FUSILIERS] [YOUR NEW UNIT] [ANOTHER NEW UNIT]
______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.

montero91@gmail.com

[This message has been edited by montero (edited 10-28-2005 @ 06:16 PM).]

AuthorReplies:
Big Boss
Member
posted 09-21-05 05:13 PM EDT (US)     1 / 135       
I read it, but im still lost at a few things

1.How do u make back-up files
2.All i want do is change unit stats like make tanks stronger do i have to go to unit_graphics also

Do i have to do this to make sure the stats change:

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
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"


America will never be destroyed from the outside. If we falter and lose our freedoms, it will be because we destroyed ourselves.
--Abraham Lincoln
montero
Member
posted 09-22-05 04:11 PM EDT (US)     2 / 135       
1. Just copy the desired file and paste it somewhere else, so if you mess up the original you can replace it and get the original files running.

2. No.

You should start with reading the top of the unitrules.xml file, it describes everything's (or most things') function(s).

To change around stats you should only change unitrules.xml. Let's take Assault Infantry as an example.

<UNIT>
<NAME>Assault Infantry</NAME>
<GRAPH>ASSAULTINFANTRY</GRAPH>
<OBJ_MASK>IFG</OBJ_MASK>
<FLAGS>lmji</FLAGS>
<WHERE>Barracks</WHERE>
<ATTACK>25</ATTACK>
<HITS>180</HITS>
<MOVES>34</MOVES>
<SUPPORT>1t/1f support</SUPPORT>
<COST>8f/7t</COST>
<JOB_TIME>169</JOB_TIME>
<PREQ0>Information Age</PREQ0>
<PREQ1>none</PREQ1>
<FROM>Infantry</FROM>
<JUMP>disable</JUMP>
<GRAFT>none</GRAFT>
<RANGE>0-14rng</RANGE>
<LOS>15</LOS>
<SCIENCE_LOS>0</SCIENCE_LOS>
<FLY_HIGH>0</FLY_HIGH>
<FLY_LOW>33%</FLY_LOW>
<RECHARGE>32</RECHARGE>
<ARMOR>4</ARMOR>
<DOMAIN>Land</DOMAIN>
<TO_HIT>300</TO_HIT>
<ATTENUATE>-4</ATTENUATE>
<CAT>Foot</CAT>
<PROGRESSION>3</PROGRESSION>
<SPLASH>0</SPLASH>
<SPLASH_PERCENT>100</SPLASH_PERCENT>
<AMMO_PER_ATT>1</AMMO_PER_ATT>
<TURN_SPEED>30</TURN_SPEED>
<PROJ_SPEED>450</PROJ_SPEED>
<CARRY_SIZE>2</CARRY_SIZE>
<POP>1</POP>
<RESEARCH_PREMIUM_TIME>2</RESEARCH_PREMIUM_TIME>
<RESEARCH_PREMIUM_COST>2</RESEARCH_PREMIUM_COST>
<JOB_EXTRA_TIME>1/10tsx</JOB_EXTRA_TIME>
<MANA>0</MANA>
<TRIBE_MASK>011001110101111111001010</TRIBE_MASK> ;
<CARRY>0</CARRY>
<GUY_SPACING>12</GUY_SPACING>
<X_SPACING>12</X_SPACING>
<Y_SPACING>12</Y_SPACING>
<CIRCLE_RADIUS>1</CIRCLE_RADIUS>
<BLOCK_RADIUS>1</BLOCK_RADIUS>
<TARGET_SIZE>3</TARGET_SIZE>
<UBER_SIZE>3</UBER_SIZE>
<CREW_SIZE>0</CREW_SIZE>
<GRID_X>0</GRID_X>
<GRID_Y>0</GRID_Y>
<UPGRADE></UPGRADE>
<PUSH_SIZE>1</PUSH_SIZE>
<PUSH_CIRCLES>1</PUSH_CIRCLES>
<TYPENAME>Assault Infantry</TYPENAME>
</UNIT>

Let's say you want to change ALL of the unit's stats, you just have to change around numbers, like this:

<UNIT>
<NAME>Assault Infantry</NAME>
<GRAPH>ASSAULTINFANTRY</GRAPH>
<OBJ_MASK>IFG</OBJ_MASK>
<FLAGS>lmji</FLAGS>
<WHERE>Barracks</WHERE>
<ATTACK>7000</ATTACK>
<HITS>435000</HITS>
<MOVES>27000</MOVES>
<SUPPORT>40t/50f support</SUPPORT>
<COST>700f/340t</COST>
<JOB_TIME>380000</JOB_TIME>
<PREQ0>Information Age</PREQ0>
<PREQ1>none</PREQ1>
<FROM>Infantry</FROM>
<JUMP>disable</JUMP>
<GRAFT>none</GRAFT>
<RANGE>0-400rng</RANGE>
<LOS>401</LOS>
<SCIENCE_LOS>0</SCIENCE_LOS>
<FLY_HIGH>0</FLY_HIGH>
<FLY_LOW>33%</FLY_LOW>
<RECHARGE>32</RECHARGE>
<ARMOR>40</ARMOR>
<DOMAIN>Land</DOMAIN>
<TO_HIT>300</TO_HIT>
<ATTENUATE>-4</ATTENUATE>
<CAT>Foot</CAT>
<PROGRESSION>3</PROGRESSION>
<SPLASH>0</SPLASH>
<SPLASH_PERCENT>100</SPLASH_PERCENT>
<AMMO_PER_ATT>1</AMMO_PER_ATT>
<TURN_SPEED>30</TURN_SPEED>
<PROJ_SPEED>450</PROJ_SPEED>
<CARRY_SIZE>2</CARRY_SIZE>
<POP>1</POP>
<RESEARCH_PREMIUM_TIME>2</RESEARCH_PREMIUM_TIME>
<RESEARCH_PREMIUM_COST>2</RESEARCH_PREMIUM_COST>
<JOB_EXTRA_TIME>1/10tsx</JOB_EXTRA_TIME>
<MANA>0</MANA>
<TRIBE_MASK>011001110101111111001010</TRIBE_MASK> ;
<CARRY>0</CARRY>
<GUY_SPACING>12</GUY_SPACING>
<X_SPACING>12</X_SPACING>
<Y_SPACING>12</Y_SPACING>
<CIRCLE_RADIUS>1</CIRCLE_RADIUS>
<BLOCK_RADIUS>1</BLOCK_RADIUS>
<TARGET_SIZE>3</TARGET_SIZE>
<UBER_SIZE>3</UBER_SIZE>
<CREW_SIZE>0</CREW_SIZE>
<GRID_X>0</GRID_X>
<GRID_Y>0</GRID_Y>
<UPGRADE></UPGRADE>
<PUSH_SIZE>1</PUSH_SIZE>
<PUSH_CIRCLES>1</PUSH_CIRCLES>
<TYPENAME>Assault Infantry</TYPENAME>
</UNIT>

Please note, all of the changed stats are very exagerated numbers. Those are the core stats, and probably the ones you want to change. It's pretty straightforward, just make sure to read the beggining of the unitrules files carefully, it will explain.


Author of Modern Civilization for RoN: T&P.

montero91@gmail.com

Big Boss
Member
posted 09-22-05 05:14 PM EDT (US)     3 / 135       
I did read the explaination on top of the unitrules. I also did change the stats & SAVED. But wen i went on RoN the stats didnt change. Do i have to do anything with the script editor?

America will never be destroyed from the outside. If we falter and lose our freedoms, it will be because we destroyed ourselves.
--Abraham Lincoln
montero
Member
posted 09-22-05 07:40 PM EDT (US)     4 / 135       
No. You should just access unitrules.xml in your T&P data folder, change it around and save it as a .xml file...

Author of Modern Civilization for RoN: T&P.

montero91@gmail.com

Big Boss
Member
posted 09-23-05 05:14 PM EDT (US)     5 / 135       
I DID IT!!!! I understand now
Thanks alot montero

Now there is still other things. To make a unit an UU u need to put a "y" in the <FLAGS>y</FLAGS>
How do u make it unique only for one nation say America

How do u download mods, is it the same way as scenarios
I dont have a mod folder so i made one wut do i do with it


America will never be destroyed from the outside. If we falter and lose our freedoms, it will be because we destroyed ourselves.
--Abraham Lincoln
One_Dead_Angel
Seraph in Absentia
(id: One_Dead_Villy)
posted 09-23-05 08:08 PM EDT (US)     6 / 135       
yes nice article
Cassius Allanus
Member
posted 09-23-05 08:45 PM EDT (US)     7 / 135       

Quoted from Big Boss:

How do u make it unique only for one nation say America


Change the tribe mask entry

AIM: CassiusAllanus | MSN: Brendon.Allan@shaw.ca | XFire: enlighteneddespot | E-MAIL: Brendon.Allan@shaw.ca | ESO2: HG_CassiusA
  • View My Special Ops Brigade Page
  • "In Cassiusland, whips cure disease!"
  • [This message has been edited by Cassius Allanus (edited 09-23-2005 @ 08:46 PM).]

    Big Boss
    Member
    posted 09-24-05 06:50 PM EDT (US)     8 / 135       
    Ok thx Cassius Allanus

    How do u download mods, is it the same as scenarios?
    How do u create a new nation like Canada?


    America will never be destroyed from the outside. If we falter and lose our freedoms, it will be because we destroyed ourselves.
    --Abraham Lincoln
    montero
    Member
    posted 09-24-05 11:42 PM EDT (US)     9 / 135       
    1. It's the same to DOWNLOAD a mod than to DOWNLOAD a scenario, however, to INSTALL it, it's another issue. Check the modding FAQ.

    2. You can't create a new nation in the biblical sense of the word, you can only replace existing nations for other ones. Check LordCirone's guide, somewhere in this site.


    Author of Modern Civilization for RoN: T&P.

    montero91@gmail.com

    Big Boss
    Member
    posted 09-25-05 09:21 AM EDT (US)     10 / 135       
    Thx i'll go looking for that guide

    America will never be destroyed from the outside. If we falter and lose our freedoms, it will be because we destroyed ourselves.
    --Abraham Lincoln
    crapper head44
    Member
    posted 11-22-05 06:30 PM EDT (US)     11 / 135       
    Really all im looking to do is say change a Royal Sacurity you know the spanish heavy infantry that you can make in the classical or ancient age. Any way so like what i want to do is just change skins. For example..... like have a different symbol on a guys shield or have a mod where you can have civil war union soldiers instead of continental soldiers(this would use the americans, o and i have RoN gold so i have the expansion)
    So im not really looking to change a guy totally just to make a different skin for a guy. O and what mod do you think i should make, a Civil war one or a spartan roman one, or maby you could request one. So if you could montero can you tell me how to change skins and their names. Thanks in advance.( I no i no i keep saying that but that way i wont have to thank you after. )
    montero
    Member
    posted 11-22-05 07:15 PM EDT (US)     12 / 135       
    To change a unit's name simply access unitrules.xml, find the desired unit (Type it's name until you find the entry and change it to what you want).

    If you want to change a skin (and replace it) open the unit's skin (find it by looking at said unit's entry in unit_graphics.xml) and change it with some image editing program, then save, if not, do the same, but save with a different files name, and follow the guide's instruction starting from the graphics part.


    Author of Modern Civilization for RoN: T&P.

    montero91@gmail.com

    crapper head44
    Member
    posted 11-23-05 01:47 PM EDT (US)     13 / 135       
    thanks for the tips motero they helped alot. Thanks to you im starting to make some orcs you no from the lord of the rings movies there not looking to good tho cuz its a little hard to make it so when they're running(yes the run not walk) and i want them to attack some enimy guys i want them to lounge forward and deliver a slashing attack the rest would just be like simple attacks.Thanks agian for your help.
    randomidiot
    Member
    posted 11-23-05 09:21 PM EDT (US)     14 / 135       
    well this is really helpful....

    but what do the following things mean in the comments?

    flag "a"

    what is the difference between "shoots sideways" and "broadside attack" ?

    what do fly high and fly low do?

    thanks

    montero
    Member
    posted 11-24-05 02:43 PM EDT (US)     15 / 135       
    Flag "a"? That would be "Lessen movement effects of terrain", right? It eliminates the movement penalty for rivers and such.

    Never really tried those "g" and "q" flags...if you want to make ships, g is the way to go, it seems...

    I think the "Fly"'s are a means of calculating the chance of a plane being hit by AA fire, as well as AA guns chance of hitting it.


    Author of Modern Civilization for RoN: T&P.

    montero91@gmail.com

    randomidiot
    Member
    posted 11-24-05 06:54 PM EDT (US)     16 / 135       
    ok thanks
    Wakain
    Member
    posted 11-29-05 02:51 PM EDT (US)     17 / 135       
    excellent topic,
    could you say a few things about
    the building rules as well?

    -=Wakain=-
    montero
    Member
    posted 12-05-05 11:32 AM EDT (US)     18 / 135       
    ' Affraid not, wakain, I have not modded buildings yet, all I did was give the U.S. their same colonial temples in the Industrial Age up...nothing more.

    Author of Modern Civilization for RoN: T&P.

    montero91@gmail.com

    Kevs_Empire
    Member
    posted 12-08-05 08:28 AM EDT (US)     19 / 135       
    I didnt understand it can you tell how to do it again
    Simple
    montero
    Member
    posted 12-08-05 06:50 PM EDT (US)     20 / 135       
    What didn't you understand? Please be more specific.

    Author of Modern Civilization for RoN: T&P.

    montero91@gmail.com

    Wakain
    Member
    posted 12-25-05 12:49 PM EDT (US)     21 / 135       
    what about making a mod show up(and work when selected)on the mods dropdown menu?
    could you explain it,and what is the info.xml?
    I know it's needed for letting a mod be selected from the dropdown menu.but how does it works?
    thank you in advance.

    -=Wakain=-
    panzerjager1943
    Member
    posted 01-20-06 05:13 PM EDT (US)     22 / 135       
    hey, id like to know how to edit BH3 files.If it needs a 3D art program could you give me a link to a free version? Thanks.
    Wakain
    Member
    posted 02-05-06 06:19 AM EDT (US)     23 / 135       
    I've got a question,how to make an .info-file?
    I know you have to scribe it,but how and what?
    thanks in advance

    -=Wakain=-
    montero
    Member
    posted 02-05-06 10:48 AM EDT (US)     24 / 135       
    Well I've never actually made an info.xml file, but there are two ways (that I know of) to get one.
    -First way, use ODA's mod utility thing, it has a way of doing it on its own. Or something like that.
    -Secondly, download another mod that features an info.xml file (aka, mine) and copy ITS file to your own mod folder, after that, edit it, delete everything after the title, EXCEPT the ROOT thing:
    http://img480.imageshack.us/my.php?image=010bg.jpg

    Author of Modern Civilization for RoN: T&P.

    montero91@gmail.com

    [This message has been edited by montero (edited 02-05-2006 @ 10:49 AM).]

    Wakain
    Member
    posted 02-05-06 11:44 AM EDT (US)     25 / 135       
    ah right,and for every file you have,you describe the directory and such?and is that with numbers?
    or will it automatically generate the directory and the numbers?
    (for example:what is directory "0"?)

    well,thanks,I don't get it completely,but I'm much further now.
    ps.I've used the mod utility,but I don't really get used to it.

    edit:now that I'm questioning already,here comes another question:
    how to give a new unit(allright,an edited unit)proper sounds?

    thanks in advance part 2


    -=Wakain=-

    [This message has been edited by wakain (edited 02-05-2006 @ 01:56 PM).]

    « Previous Page  1 2 3 ··· 6  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Rise of Nations Heaven | HeavenGames