Results 1 to 24 of 24

Thread: How can I -ADD- units?

  1. #1
    Shamanical
    Settler
    Join Date
    15 Oct 2007
    Posts
    1
    Country
    This is Shamanical's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    16:36

    How can I -ADD- units?

    Hello! I'm a new member to the forums and I mainly joined in order to ask about something that's been troubling me for a few days now ;

    I'm interested in knowing how to add NEW units into RON and RON T&P ? I'm not looking to make anything fancy for the first time but I've been fiddling around with the basic .xml files for some while now. The first time I tried to create a new unit (basically just clone the CATAPULT unit, change the stats for it and make it constructable from villages and/or towns at an early stage of the game) the game would start with an error of some sorts.

    Apparently the number of units defined in unitrules.xml does not comply with NUM_UNITTYPES (don't remember if this was the EXACT value), and thus the game would not start without an error and would eventually crash in-game. I then tried to search EVERY file contained in the RON folders, searching for the NUM_UNITTYPES string within them. The search yielded 0 results.

    Is there a way to ADD new unit entries into the .xml files and make things work? I just want to make a new catapult CLONE. It uses all the same old graphic files and help strings than the basic catapult but it just acts differently and doesn't belong to the normal tech-tree.


    Can I add new units?
    How?
    If I can't, why not and is there a way to go round this?

    Thanks in advance, and please note that I still am, a 100% newbie

  2. #2
    motter28218
    Settler motter28218's Avatar
    Join Date
    12 Jan 2009
    Posts
    15
    Country
    This is motter28218's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Unless you have a deep programming background you can't add units in the manner you are trying to do, BUT, don't give up hope, what you can do is mod a pre-existing unit that is not important. For example look for CTW units, just do a search in unitrules.xml and type CTW, you will see there are alot of them, now I'll use your attempt as an example.

    Highlight all info of the cataput EXCEPT the very last line that says TYPENAME, you must not change this, select copy, now go to whatever CTW unit you've chosen, highlight all of it again except for the type name, and paste, I would suggest giving the catapult a unique name (this is the first line that says NAME, not the TYPNAME) as I have found that having two units with the same Name can sometimes cause a crash. Now you can do as you please, upgrade the catapults stats, change which nations have it, what age it's available, where it's built etc, etc. The same will work with other units, just be sure you leave the typename alone. Hope this helps.

    Otter
    Last edited by motter28218; January 14, 2009 at 15:59. Reason: typo error

  3. #3
    motter28218
    Settler motter28218's Avatar
    Join Date
    12 Jan 2009
    Posts
    15
    Country
    This is motter28218's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Let me know if this helps

    Otter
    Last edited by motter28218; January 13, 2009 at 11:09. Reason: Accidentally posted twice

  4. #4
    Alinestra Covelia
    Queen Alinestra Covelia's Avatar
    Join Date
    12 Feb 2000
    Posts
    5,848
    Country
    This is Alinestra Covelia's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    12:36
    So TYPENAME is the internal lookup name then?

    I've been changing that with no problems (although I suspect it's because I changed all other internal references to that as well...).

    But it's a pain in the butt to have to do that, and if TYPENAME can be left as normal, it would prevent me having to hunt for the name across all the other xmls too.
    "lol internet" ~ AAHZ

  5. #5
    motter28218
    Settler motter28218's Avatar
    Join Date
    12 Jan 2009
    Posts
    15
    Country
    This is motter28218's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Quote Originally Posted by Alinestra Covelia View Post
    This quote is hidden because you are ignoring this member. Show Quote
    So TYPENAME is the internal lookup name then?

    I've been changing that with no problems (although I suspect it's because I changed all other internal references to that as well...).

    But it's a pain in the butt to have to do that, and if TYPENAME can be left as normal, it would prevent me having to hunt for the name across all the other xmls too.
    Actually, it's a complicated question, I do know I have had far more crashes when I've changed the typename, however, there are times for example when I've tried to create a new heavy cavalry and I used the Camel Archer slot, I pasted all the H.Cavalry info and left the typename and when I played the game the new unit would appear but it would be in C.Archer X,Y spot when you clicked on the stable, this stayed the same no matter what I changed the x,y of the created unit to, so in creating new units I always try to copy over something that was as similar as possible as the typename has in some cases forced the unit to retain some of the old properties. I try not to change units to much anymore as major unit modding seems to cause crashes no matter how "neat and clean" I try to do it.

  6. #6
    mark1416
    Settler
    Join Date
    22 Jan 2009
    Posts
    6
    Country
    This is mark1416's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36

    help

    hello people i just have one question is there any way i can make the imperial guard playable for french ??? or maybe make it a unique unit of the french please if anyone knows

  7. #7
    motter28218
    Settler motter28218's Avatar
    Join Date
    12 Jan 2009
    Posts
    15
    Country
    This is motter28218's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Quote Originally Posted by mark1416 View Post
    This quote is hidden because you are ignoring this member. Show Quote
    hello people i just have one question is there any way i can make the imperial guard playable for french ??? or maybe make it a unique unit of the french please if anyone knows
    Yes, go to unitrules.xml

    Search for Imperial Guard

    Go to the section that says WHERE and put Barracks instead of none


    Enable the unit for the French in the Tribe Mask (if you don't know how I'll explain further) Hope this helps.

    Otter

  8. #8
    mark1416
    Settler
    Join Date
    22 Jan 2009
    Posts
    6
    Country
    This is mark1416's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    thanks ill try that

  9. #9
    mark1416
    Settler
    Join Date
    22 Jan 2009
    Posts
    6
    Country
    This is mark1416's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    motter i did what you said but it didnt work

  10. #10
    Alinestra Covelia
    Queen Alinestra Covelia's Avatar
    Join Date
    12 Feb 2000
    Posts
    5,848
    Country
    This is Alinestra Covelia's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    12:36
    Post the section of the Imperial Guards on here. Let's take a look at your xml text.

  11. #11
    mark1416
    Settler
    Join Date
    22 Jan 2009
    Posts
    6
    Country
    This is mark1416's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    ok hope u can help me

    Imperial Guard
    ROYALGUARD
    DFG
    lmjiy
    Barracks
    20
    160
    24
    1f/1g support
    7f/6g
    169
    Enlightenment Age
    none
    Arquebusiers
    Riflemen
    Musketeers
    0-10rng
    11
    0
    0
    25%
    44
    3
    Land
    300
    0
    Foot
    3
    0
    100
    1
    21
    350
    2
    1
    2
    2
    1/10tsx
    0
    000000000000010000000000
    0
    12
    12
    12
    1
    1
    3
    3
    0
    0
    0

    1
    1
    Royal Guard

  12. #12
    motter28218
    Settler motter28218's Avatar
    Join Date
    12 Jan 2009
    Posts
    15
    Country
    This is motter28218's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Quote Originally Posted by mark1416 View Post
    This quote is hidden because you are ignoring this member. Show Quote
    motter i did what you said but it didnt work
    My fault, you also have to disable Musketeers for the French in the Tribe Mask.

  13. #13
    mark1416
    Settler
    Join Date
    22 Jan 2009
    Posts
    6
    Country
    This is mark1416's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    motter i aprecciate your help but i dont know why it didnt work thanks

  14. #14
    motter28218
    Settler motter28218's Avatar
    Join Date
    12 Jan 2009
    Posts
    15
    Country
    This is motter28218's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Quote Originally Posted by mark1416 View Post
    This quote is hidden because you are ignoring this member. Show Quote
    motter i aprecciate your help but i dont know why it didnt work thanks
    I have attached a copy of unitrules.xml, just paste it over yours, I just played it and it worked.

    Otter
    Attached Files Attached Files
    Last edited by motter28218; January 25, 2009 at 15:20. Reason: New Info

  15. #15
    mark1416
    Settler
    Join Date
    22 Jan 2009
    Posts
    6
    Country
    This is mark1416's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    thanks for your help motter now it works maybe i was doint sumthin wrong

  16. #16
    motter28218
    Settler motter28218's Avatar
    Join Date
    12 Jan 2009
    Posts
    15
    Country
    This is motter28218's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Quote Originally Posted by mark1416 View Post
    This quote is hidden because you are ignoring this member. Show Quote
    thanks for your help motter now it works maybe i was doint sumthin wrong
    No problem. If you want I can enable the other campaign units with their nations:

    British: Red Coats, Ship of the Line, Siegeship
    Greeks: Greek Mercenaries
    Romans and Greeks: Catapult Ship
    Persians: War Chariot
    Spanish: Conquistadors/EliteCon., Bandeirantes/E.Band., Galleon
    Americans: Ironclad, Humvee, Harrier Jet
    Russians: Barbarian Archers, Javelineers, and Phalanx, Junkers, Nuclear Sub
    Dutch: Fur Trapper
    Asian, Arab, African, S.American Guerilla Fighters
    I think that's all of them, let me know, it only takes about 5 min.

    Otter

  17. #17
    Alinestra Covelia
    Queen Alinestra Covelia's Avatar
    Join Date
    12 Feb 2000
    Posts
    5,848
    Country
    This is Alinestra Covelia's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    12:36
    I'm interested in the Humvee, Harrier Jet, and the Nuclear Sub.

    Can you walk me through them generally, just so I know how to activate them myself?

    Also, how do I place them in scenarios?
    "lol internet" ~ AAHZ

  18. #18
    motter28218
    Settler motter28218's Avatar
    Join Date
    12 Jan 2009
    Posts
    15
    Country
    This is motter28218's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Quote Originally Posted by Alinestra Covelia View Post
    This quote is hidden because you are ignoring this member. Show Quote
    I'm interested in the Humvee, Harrier Jet, and the Nuclear Sub.

    Can you walk me through them generally, just so I know how to activate them myself?

    Also, how do I place them in scenarios?
    OK, to change it for the game overall in unitrules, go to unitrules, first find the unit that the Nation is using by default, for Americans I think it's Armored Cavalry and Advanced Fighter, for the Russians it's Attack Submarine. Disable those units for those nations in the tribe mask.

    Next do a search for the campaign units - Humvee, Harrier Jet, Nuclear Sub. Most of the information should already be filled in, generally the only thing you have to change is the WHERE section and then the tribe mask, also put a "y" in the FLAGS section so it will show up as a unique unit. Also, you can create units at buildings other than the one's they normally are created at, I mention that because you said you enjoyed those Coldwar Battles where you only had Redoubts, so you could put Town Center in the WHERE section if you wanted and you could create Humvee's at your town center, just make sure you don't put 2 units in the same x, y slot.

    On to your second question, to script them is actually pretty easy, in the RUN ONCE section just do this:

    disable_type_by_tribe("Armored Cavalry", "Americans");
    enable_type_by_tribe("Humvee", "Americans", "Auto Plant", 0, 1);

    Here again you could put the Humvee at another building, just replace Auto Plant with whatever you want, Redoubt, Senate, whatever, once again make sure you don't use a x, y slot that's already being used by another unit or tech.

    If you need me to go more into detail let me know, but you seem to understand how to mod pretty well so I didn't want to write to much.

    Otter
    Last edited by motter28218; January 27, 2009 at 09:54. Reason: spelling

  19. #19
    Alpha Zeke
    Settler
    Join Date
    06 Mar 2009
    Posts
    3
    Country
    This is Alpha Zeke's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Just wondering is this game still alive for multiplayer? I know this is the wrong area but Im posting here to avoid two topics.

    Does anybody have any recommended mods or a tutorial on them? Im trying to re-create German WW2 super weapons like the Bismark

  20. #20
    Alinestra Covelia
    Queen Alinestra Covelia's Avatar
    Join Date
    12 Feb 2000
    Posts
    5,848
    Country
    This is Alinestra Covelia's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    12:36
    I still play the game a lot and if you're up for MP, give me an email at

    amazonian_mage(at)yahoo(dot)com

    I can give some advice on how to mod the game. Very basic. But it should help you get started.
    "lol internet" ~ AAHZ

  21. #21
    Alinestra Covelia
    Queen Alinestra Covelia's Avatar
    Join Date
    12 Feb 2000
    Posts
    5,848
    Country
    This is Alinestra Covelia's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    12:36
    Bing already asked the question elsewhere.

    ...

    And apparently he's making some pretty good progress on the Jiefangjun unit.

    Apparently he's altering the "Imperial Guard" unit (from the Napoleon campaign) and making that work like a Shock Infantry unit. I'm going to watch closely how he does it and see how it all shakes out. Booyah!
    Last edited by Alinestra Covelia; March 24, 2009 at 13:40.

  22. #22
    Alinestra Covelia
    Queen Alinestra Covelia's Avatar
    Join Date
    12 Feb 2000
    Posts
    5,848
    Country
    This is Alinestra Covelia's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    12:36
    Okay, so Bing has made some good progress on the Jiefangjun Infantry. I helped him rustle up some artwork for it, and it's looking pretty fun.

    It's basically a recolored Shock Infantry, from brown to green coat.

    Bing showed me the files, and it seems like there are two problems.

    1. He can only get it to work by replacing Shock Infantry. There should be a way to replace a different unit, but that's beyond us right now.

    2. He can only get it to work by putting the re-skinned unit tga into the game's root art directory. The game refuses to recognize the mod/JFJ/art directory at all.

    Some pictures to show what's cracking off.
    Attached Images Attached Images
    "lol internet" ~ AAHZ

  23. #23
    yankeefreak127
    Settler
    Join Date
    19 Jun 2009
    Posts
    8
    Country
    This is yankeefreak127's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 21, 2014
    Local Time
    11:36
    Go register on RoN Heaven you're bound to get an answer. Rise of Nations Heaven is the last surviving thriving RoN community so its probably the only way that you can get an answer to your question.
    Last edited by yankeefreak127; September 24, 2009 at 23:27.

  24. #24
    Franks
    Settler
    Join Date
    23 Sep 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    December 22, 2014
    Local Time
    00:36
    Please do. Can you enable everything else as well? Like the SAS for the British and Barbarian units for Germany? What do you mean by enabling or disabling on the Tribe Mask? What do you have to modify to allow a 'locked' unit become usable in the Scenario Editor?

Similar Threads

  1. UNITS : Inca Units Pack - Llama Lovers
    By The Slayer in forum Civilization III
    Replies: 2
    Last Post: March 28, 2004, 04:09
  2. Replies: 14
    Last Post: December 29, 2003, 18:47
  3. Replies: 11
    Last Post: August 14, 2002, 00:02
  4. Naming Units, Upgrading Units, and Battle Honours
    By Rakki in forum Civ3-General-Archive
    Replies: 33
    Last Post: September 29, 2001, 05:07
  5. Question on the importance of air units and armor on assualt units
    By icevic in forum AC-General/Help/Strategy-Archive
    Replies: 12
    Last Post: May 22, 2001, 21:29

Bookmarks

Posting Permissions