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 ··· 4 5 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:
Super7700
Member
posted 01-07-12 04:29 PM EDT (US)     126 / 135       
Well the Korean Citizen works, so if you copied and pasted its stats over a CTW unit, changed the typename to whatever you want it to be, give it to the nation that you want to have it and then give it the graph of the normal citizen, it should work. So that is all you need to do.

What do you mean by <y>0</y> anyway?

~ Creator of Kings and Conquerors, a total conversion mod for Rise of Nations: Thrones and Patriots ~
kresekkresek
Member
posted 01-08-12 12:48 PM EDT (US)     127 / 135       
may i copy ur unitrules and try?
<y>0</y>
that koordinat position.
Super7700
Member
posted 01-08-12 03:35 PM EDT (US)     128 / 135       
Why do you need my unitrules? Just follow what I've said using your own unitrules (make sure you back it up) and it should work. I don't think you need to mess around with coordinates.

~ Creator of Kings and Conquerors, a total conversion mod for Rise of Nations: Thrones and Patriots ~
kresekkresek
Member
posted 01-11-12 06:38 PM EDT (US)     129 / 135       
because i was try and still cant.
so i wanna make compare, and correct my false
Super7700
Member
posted 01-11-12 07:21 PM EDT (US)     130 / 135       
Strange. I'll have a go myself and see if I can make it work. If I can get it to work, I'll show you what I did. Maybe it is because you made the citizen take up no population.

Also, does this unit replace the citizen, or does this nation get both?

Okay I've had a go, but I can't get anything to work. It looks like there is no way of having two citizens available at the same time and the only way you can get your citizen to work is to edit the Korean citizen, changing the graph to the normal citizen's and giving it the stats you want it to have. Keep the Korean citizen typename. Then disable the citizen for the nation that receives the free citizen and enable it for the Koreans.

Has anyone else had a go at something like this and succeeded?

~ Creator of Kings and Conquerors, a total conversion mod for Rise of Nations: Thrones and Patriots ~

[This message has been edited by super7700 (edited 01-11-2012 @ 08:20 PM).]

GrandGuardian
Member
posted 06-07-15 09:00 AM EDT (US)     131 / 135       
I did everything as said, like this:

<UNIT>
<NAME>Sepoi</NAME>
<GRAPH>SLINGERS</GRAPH>
<OBJ_MASK>QFR</OBJ_MASK>
<FLAGS>kmy</FLAGS>
<WHERE>Barracks</WHERE>
<ATTACK>20</ATTACK>
<HITS>100</HITS>
<MOVES>30</MOVES>
<SUPPORT>1t/1f support</SUPPORT>
<COST>12m/12g/8k</COST>
<JOB_TIME>300</JOB_TIME>
<PREQ0>Enlightenment Age</PREQ0>
<PREQ1>none</PREQ1>
<FROM>King's Yeomanry</FROM>
<JUMP>Black Watch</JUMP>
<GRAFT>Musketeers</GRAFT>
<RANGE>4-8rng</RANGE>
<LOS>16</LOS>
<SCIENCE_LOS>0</SCIENCE_LOS>
<FLY_HIGH>0</FLY_HIGH>
<FLY_LOW>0</FLY_LOW>
<RECHARGE>60</RECHARGE>
<ARMOR>7</ARMOR>
<DOMAIN>Land</DOMAIN>
<TO_HIT>300</TO_HIT>
<ATTENUATE>90</ATTENUATE>
<CAT>Foot</CAT>
<PROGRESSION>2</PROGRESSION>
<SPLASH>0</SPLASH>
<SPLASH_PERCENT>100</SPLASH_PERCENT>
<AMMO_PER_ATT>2</AMMO_PER_ATT>
<TURN_SPEED>30</TURN_SPEED>
<PROJ_SPEED>150</PROJ_SPEED>
<CARRY_SIZE>1</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>001000000000000000000000</TRIBE_MASK>
<CARRY>0</CARRY>
<GUY_SPACING>10</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>2</GRID_X>
<GRID_Y>0</GRID_Y>
<UPGRADE></UPGRADE>
<PUSH_SIZE>1</PUSH_SIZE>
<PUSH_CIRCLES>1</PUSH_CIRCLES>
<TYPENAME>Sepoi</TYPENAME>
</UNIT>

and then this:

<UNIT name="SLINGERS-DEFAULT-AGE0" model=".\art\rifleman_arab.BH3" texture=".\art\rifleman_arab_asian.tga" cache="1" scale="1" trackdist="10" tracktype="Foot" shadowtype="Biped Shadow" shadowwidth="50" shadowheight="50" skeleton="Biped" scorch="Biped" tex_id="TEX_UNITS_0" tex_col="0" tex_row="0" tex_x="-1" tex_y="-1" tex_clip="1">
<ANIM name="CHAR_DEFAULT" file="Rifleman Default"/>
<ANIM name="CHAR_IDLE1" file="Rifleman Idle1"/>
<ANIM name="CHAR_IDLE2" file="Rifleman Idle2"/>
<ANIM name="CHAR_IDLE3" file="Rifleman Idle3"/>
<ANIM name="CHAR_WALK" file="Rifleman Walk"/>
<ANIM name="CHAR_JOG" file="Rifle Jog"/>
<ANIM name="CHAR_ATTACK1" file="Rifleman Attack1"/>
<ANIM name="CHAR_ATTACK2" file="Rifleman Attack2"/>
<ANIM name="CHAR_ATTACK3" file="Rifleman Attack3"/>
<ANIM name="CHAR_DEATH_STAB1" file="Man Stabbed1"/>
<ANIM name="CHAR_DEATH_STAB2" file="Slinger Death3"/>
<ANIM name="CHAR_DEATH_SHOT1" file="Man Shot1"/>
<ANIM name="CHAR_DEATH_SHOT2" file="Man Shot2"/>
<ANIM name="CHAR_DEATH_SPLODED1" file="Man Sploded1"/>
<ANIM name="CHAR_DEATH_SPLODED2" file="Man Sploded2"/>
<BOUNDINGVOLUMES>
<SPHERE x="0" y="0" z="30" rad="40"/>
</BOUNDINGVOLUMES>
<PARTICLEEVENT starttime="700" endtime="750" anim="CHAR_ATTACK1" type="RIFLE FLASH" node="0" axis="-2"/>
<PARTICLEEVENT starttime="1067" endtime="1117" anim="CHAR_ATTACK2" type="RIFLE FLASH" node="0" axis="-2"/>
<PARTICLEEVENT starttime="1100" endtime="1150" anim="CHAR_ATTACK3" type="RIFLE FLASH" node="0" axis="-2"/>
<RELEASEEVENT starttime="700" anim="CHAR_ATTACK1" type="Bullet" node="0"/>
<RELEASEEVENT starttime="1067" anim="CHAR_ATTACK2" type="Bullet" node="0"/>
<RELEASEEVENT starttime="1100" anim="CHAR_ATTACK3" type="Bullet" node="0"/>
<SOUNDEVENT starttime="700" anim="CHAR_ATTACK1" file="ATTACK"/>
<SOUNDEVENT starttime="1067" anim="CHAR_ATTACK2" file="ATTACK"/>
<SOUNDEVENT starttime="1100" anim="CHAR_ATTACK3" file="ATTACK"/>
</UNIT>

and this:

</STRING>
</ENTRY>
<ENTRY name="SEPOI">
<STRING>
<BULLET/>

British unique Colonial {Light Infantry}, Enlightenment Age, #ICON31 - fast, relatively cheap, and medium-ranged.

<!--Slingers-->



But it didn`t work. Then, I did this:

<UNIT>
<NAME>Sepoi</NAME>
<GRAPH>HIGHLANDERS</GRAPH>
<OBJ_MASK>QFR</OBJ_MASK>
<FLAGS>kmy</FLAGS>
<WHERE>Barracks</WHERE>
<ATTACK>20</ATTACK>
<HITS>100</HITS>
<MOVES>30</MOVES>
<SUPPORT>1t/1f support</SUPPORT>
<COST>12m/12g/8k</COST>
<JOB_TIME>300</JOB_TIME>
<PREQ0>Enlightenment Age</PREQ0>
<PREQ1>none</PREQ1>
<FROM>Arquebusiers</FROM>
<JUMP>Black Watch</JUMP>
<GRAFT>Musketeers</GRAFT>
<RANGE>4-8rng</RANGE>
<LOS>16</LOS>
<SCIENCE_LOS>0</SCIENCE_LOS>
<FLY_HIGH>0</FLY_HIGH>
<FLY_LOW>0</FLY_LOW>
<RECHARGE>60</RECHARGE>
<ARMOR>7</ARMOR>
<DOMAIN>Land</DOMAIN>
<TO_HIT>300</TO_HIT>
<ATTENUATE>90</ATTENUATE>
<CAT>Foot</CAT>
<PROGRESSION>2</PROGRESSION>
<SPLASH>0</SPLASH>
<SPLASH_PERCENT>100</SPLASH_PERCENT>
<AMMO_PER_ATT>2</AMMO_PER_ATT>
<TURN_SPEED>30</TURN_SPEED>
<PROJ_SPEED>150</PROJ_SPEED>
<CARRY_SIZE>1</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>001000000000000000000000</TRIBE_MASK>
<CARRY>0</CARRY>
<GUY_SPACING>10</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>2</GRID_X>
<GRID_Y>0</GRID_Y>
<UPGRADE></UPGRADE>
<PUSH_SIZE>1</PUSH_SIZE>
<PUSH_CIRCLES>1</PUSH_CIRCLES>
<TYPENAME>Sepoi</TYPENAME>
</UNIT>

this:

<UNIT name="HIGHLANDER-DEFAULT-AGE0" model=".\art\rifleman_arab.BH3" texture=".\art\rifleman_arab_asian.tga" cache="1" scale="1" trackdist="10" tracktype="Foot" shadowtype="Biped Shadow" shadowwidth="50" shadowheight="50" skeleton="Biped" scorch="Biped" tex_id="TEX_UNITS_0" tex_col="0" tex_row="0" tex_x="-1" tex_y="-1" tex_clip="1">
<ANIM name="CHAR_DEFAULT" file="Rifleman Default"/>
<ANIM name="CHAR_IDLE1" file="Rifleman Idle1"/>
<ANIM name="CHAR_IDLE2" file="Rifleman Idle2"/>
<ANIM name="CHAR_IDLE3" file="Rifleman Idle3"/>
<ANIM name="CHAR_WALK" file="Rifleman Walk"/>
<ANIM name="CHAR_JOG" file="Rifle Jog"/>
<ANIM name="CHAR_ATTACK1" file="Rifleman Attack1"/>
<ANIM name="CHAR_ATTACK2" file="Rifleman Attack2"/>
<ANIM name="CHAR_ATTACK3" file="Rifleman Attack3"/>
<ANIM name="CHAR_DEATH_STAB1" file="Man Stabbed1"/>
<ANIM name="CHAR_DEATH_STAB2" file="Slinger Death3"/>
<ANIM name="CHAR_DEATH_SHOT1" file="Man Shot1"/>
<ANIM name="CHAR_DEATH_SHOT2" file="Man Shot2"/>
<ANIM name="CHAR_DEATH_SPLODED1" file="Man Sploded1"/>
<ANIM name="CHAR_DEATH_SPLODED2" file="Man Sploded2"/>
<BOUNDINGVOLUMES>
<SPHERE x="0" y="0" z="30" rad="40"/>
</BOUNDINGVOLUMES>
<PARTICLEEVENT starttime="700" endtime="750" anim="CHAR_ATTACK1" type="RIFLE FLASH" node="0" axis="-2"/>
<PARTICLEEVENT starttime="1067" endtime="1117" anim="CHAR_ATTACK2" type="RIFLE FLASH" node="0" axis="-2"/>
<PARTICLEEVENT starttime="1100" endtime="1150" anim="CHAR_ATTACK3" type="RIFLE FLASH" node="0" axis="-2"/>
<RELEASEEVENT starttime="700" anim="CHAR_ATTACK1" type="Bullet" node="0"/>
<RELEASEEVENT starttime="1067" anim="CHAR_ATTACK2" type="Bullet" node="0"/>
<RELEASEEVENT starttime="1100" anim="CHAR_ATTACK3" type="Bullet" node="0"/>
<SOUNDEVENT starttime="700" anim="CHAR_ATTACK1" file="ATTACK"/>
<SOUNDEVENT starttime="1067" anim="CHAR_ATTACK2" file="ATTACK"/>
<SOUNDEVENT starttime="1100" anim="CHAR_ATTACK3" file="ATTACK"/>
</UNIT>

and this:

</STRING>
</ENTRY>
<ENTRY name="SEPOI">
<STRING>
<BULLET/>




British Unique {Light Infantry}, Enlightenment Age #ICON31 - particularly effective against all forms of enemy infantry.






<!--Highlanders-->



(All in same documents)
Still doesn`t work.
Where did I make a mistake?
Super7700
Member
posted 06-08-15 01:22 AM EDT (US)     132 / 135       
I notice that the second time you've tried it, the GRAPH in unitrules.xml is "HIGHLANDERS" but for the unitgraphics.xml entry you've got "HIGHLANDER" (without the 's') and in help.xml it is "SEPOI". For your unit to work, these three entries must be the same.

~ Creator of Kings and Conquerors, a total conversion mod for Rise of Nations: Thrones and Patriots ~
GrandGuardian
Member
posted 06-09-15 08:04 AM EDT (US)     133 / 135       
But in the original, there`s no S after HIGHLANDER in help.xml and unit graphics, and there is an S in unitrules.xml.

Also, when I start the game, a dialog box pops up:
The number of unittypes in unitrules.xml doesn`t equal the NUM_UNITTYPES

What about that?
Or should I just start over?

[This message has been edited by GrandGuardian (edited 06-09-2015 @ 08:14 AM).]

Super7700
Member
posted 06-10-15 01:06 AM EDT (US)     134 / 135       
I've just looked at the original and it uses "HIGHLANDER" without the 'S' for help.xml, unitgraphics.xml and unitrules.xml.

You might be getting that error because you haven't changed the Black Watch unitrules.xml and replaced "Highlanders" with "Sepoi" in the <FROM> field. The number of unittypes error occurs because there is a hardcoded limit of entries in unitrules.xml, so creating an extra entry or referring to a non-existent entry will cause that to mess up and the game will crash.

~ Creator of Kings and Conquerors, a total conversion mod for Rise of Nations: Thrones and Patriots ~
Bipo Hemkes
Member
posted 08-20-17 05:37 AM EDT (US)     135 / 135       
Unit Description will not change I put a new description in help.xml but in the game the old one still exist can anyone help me because I don't really get it.
« Previous Page  1 ··· 4 5 6  Next Page »
You must be logged in to post messages.
Please login or register

Hop to:    

Rise of Nations Heaven | HeavenGames