Announcement

Collapse

Welcome to the New Server!

Apolyton.net is now pointing to the new server. Please let us know if you spot any oddities or have any suggestions for what to add to the site!
See more
See less

How can I -ADD- units?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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, 15:59. Reason: typo error

    Comment


    • #3
      Let me know if this helps

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

      Comment


      • #4
        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

        Comment


        • #5
          Originally posted by Alinestra Covelia View Post
          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.

          Comment


          • #6
            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

            Comment


            • #7
              Originally posted by mark1416 View Post
              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

              Comment


              • #8
                thanks ill try that

                Comment


                • #9
                  motter i did what you said but it didnt work

                  Comment


                  • #10
                    Post the section of the Imperial Guards on here. Let's take a look at your xml text.
                    "lol internet" ~ AAHZ

                    Comment


                    • #11
                      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

                      Comment


                      • #12
                        Originally posted by mark1416 View Post
                        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.

                        Comment


                        • #13
                          motter i aprecciate your help but i dont know why it didnt work thanks

                          Comment


                          • #14
                            Originally posted by mark1416 View Post
                            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
                            Last edited by motter28218; January 25, 2009, 15:20. Reason: New Info

                            Comment


                            • #15
                              thanks for your help motter now it works maybe i was doint sumthin wrong

                              Comment

                              Working...
                              X