Results 1 to 9 of 9

Thread: Slave to Faction Question

  1. #1

    Question Slave to Faction Question

    I have read several tutorial threads describing how to add units from one faction to the other but the areas I always foul up on are kind of sketchy in them so please don't refer me to another thread.

    What I am trying to do is add the rebel velite gladiator to the thrace faction, and it is fine if they are grey (dont care about the color) I just want to know:

    A step by step procedure would be great, using specific examples relating to slave velites gladiators and changing it so i can use it thrace imp camps. I understand the ....unit.txt and the ....buildings.txt files pretty well so I just need to know the specific lines to change or add in them. Where to put and name the .tga files, if i need to do something to dds's, and the modelbattletxt, and other texture stuff is what I understand least. If i can learn how to do this for one unit then i will be able to consistenly reproduce this as much as i want.

    One additional simple question, which location that a unit is actually named in, that can be altered to change its screen name but not mess it up?

    Thank you to anyone who helps.

  2. #2

    Default Re: Slave to Faction Question

    OK....first off...I am assuming you are not going to change the look of the model IN ANY WAY...but just want to be able to recruit the unit in a building belonging to Thrace and have the unit work for Thrace. There may be a simpler way of doing this, but this way you can change the skin if you want fairly simply ~:D

    Step 1) Change descr_model_battle.txt

    Open up the file in notepad, and search for roman_velite_gladiator
    This is the basic definition for ALL the velite gladiator units. What you have is the basic definitions of the model file to be used, PLUS the bit that tells the game what texture to use on the model when used by a particular faction. We need to add a new entry for Thrace.

    copy THIS SECTION:
    texture thrace, data/models_unit/textures/unit_roman_velite_gladiator_slave.tga
    and add it in after the entry
    texture slave, data/models_unit/textures/unit_roman_velite_gladiator_slave.tga

    All we have done is to create a new entry which tells the game to use the slave skin on the velite gladiator if this model should be used by Thrace.

    Next, copy THIS SECTION:
    model_sprite thrace, 60.0, data/sprites/slave_roman_velite_gladiator_sprite.spr
    and add it in after the entry
    model_sprite slave, 60.0, data/sprites/slave_roman_velite_gladiator_sprite.spr
    This is telling the game what sprite model to use when the model is viewed from a long way away. Since we used hte slave skin here, we will also use the slave sprite. OTherwise some odd colour changes would happen when you move towards the unit!

    Close this file down now and save your changes. We have finished with this file. ( oh...yes...and I hope you backed up the files first just in case!!)

    Next, we have to actually define the stats that the soldier will have. Each model can be used multiple times, but EVERY unit must have it's own unique set of stats. These are defined in export_descr_unit.txt so..

    Step 2) Change export_descr_unit

    Open up the file, and find the line:
    type roman velite gladiator

    This is where the velite gladiator is defined. Copy the WHOLE section relating to this unit and paste it in underneath. We need to make a few changes to the new section. First, we give it a new roman velite gladiator becomes thracian velite gladiator. Change the name on the line beginning 'type' AND 'dictionary' but LEAVE the model line alone. This is referring to the actual 3D model cas file used and must be the same as the entry in the last file we changed. Then, you change the faction in the line starting 'ownership' to show your new faction. The new entry should look like this:

    type thracian velite gladiator
    dictionary thracian_velite_gladiator ; Velite Gladiators
    category infantry
    class light
    voice_type Heavy_1
    soldier roman_velite_gladiator, 20, 0, 1
    mount_effect elephant +6, chariot +6
    attributes sea_faring, hide_forest, can_sap, very_hardy
    formation 1.2, 1.2, 2.4, 2.4, 2, horde
    stat_health 2, 0
    stat_pri 12, 7, no, 0, 0, melee, simple, piercing, spear, 25 ,0.73
    stat_pri_attr no
    stat_sec 0, 0, no, 0, 0, no, no, no, none, 25 ,1
    stat_sec_attr no
    stat_pri_armour 2, 7, 5, flesh
    stat_sec_armour 0, 0, flesh
    stat_heat 2
    stat_ground 2, 0, 0, 0
    stat_mental 14, impetuous, untrained
    stat_charge_dist 40
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 2, 620, 250, 70, 100, 620
    ownership thrace

    ( if you are feeling lazy, just copy and paste this in right after the roman velite gladiator entry. It can go anywhere actually, but here is a convenient place to keep it! )

    Now you can close this file down and save it.

    Step 3) Change the dictionary entries.

    We need to change 2 files here. The first, like the other 2 lives in the 'data' folder. This is export_descr_unit_enums.txt. Open it up in notepad again, and you will see that each entry has 3 lines. search for 'roman_velite_gladiator' and you will see the format we need for our new unit. The names must match the name we used in the 'dictionary' line on the last file we changed. Our new antry can be added right after the roman_velite_gladiator one, but again, it can be ANYWERE in the file.


    Close this one down and save it. The next file actually resides in the data/text folder. Go there and look for 'export_units.txt'. Again, search for roman_velite_gladiator and you will find the entry for the roman version. Copy this and make any description changes you want. You can leave the text alone if you MUST, however, change the roman_ bit as follows to match the previouos changes...


    {thracian_velite_gladiator} Velite Gladiators

    Beyond Elite!\nImpetuous\nVery Hardy\nSapping Ability\n\nVelite gladiators are more than mere light infantrymen - they are superb individual fighters, unmatched by any ordinary warriors. They fight wearing little armour - their lot in life isn't always to live through a fight, but to die in an entertaining manner. The style of the velite is one that uses only a spear and shield combination, relying on natural agility to avoid injury and death.\n\nGladiators are used in battle as a specialised elite, one that cares little for personal safety - the only way to attain freedom is through victory! Gladiators, after all, are part of the damnati: the disgraced, the condemned, and the untouchables in society. There is nowhere else for them to go.

    Velite gladiators are more than mere light infantrymen - they are superb individual fighters, unmatched by any ordinary warriors.


    Close that down and save it. Now....test your unit in a custom battle. The unit cards will show up as the default grey peasant card, but it should be selectable and should show up in the battle. IF you get and crashes or problems, go back and check CAREFULLY all the above steps.

    Assuming this has worked, you can now make th eunit buildable in a campaign. This is easy enough to do...

    Step 4) Making it buildable

    Go to your data folder and find 'export_descr_buildings.txt'. This defines what units are going to be built by which faction in which building. We don't want to unbalance the game, so the Thracian unit should be built at the same level of building as the original velite gladiator. There is a lot of leeway here for you to change this to suit your own just have to add the line to the right building! The stock velite gladiator is buildable in a level 3 building 'amphitheatre'. Now...I don't know if Thrace can build this make sure you can! Then, add this line:

    recruit "thracian velite gladiator" 0 requires factions { thrace, }

    If you want to make the unit available in, say, an archery range... just find that building and paste th eline in there instead! Easy really!

    Now..I believe in order for this to work, you may need to start a new campaign. I might be wrong....but now is a good time to test it Your unit should not cause any crashes, and should turn up in your Thracian city build choices when you build the building.
    Careless Orc Costs Lives!

  3. #3

    Default Re: Slave to Faction Question

    I didn't cover unit cards, as you will have noticed. This won't stop you using the unit, but needs some additional work to make. You will need to extract stuff from the PAK files using XPAK to get at the unit cards and build the file structure to support it. Once you have done the above and got it working, follow the XPAK tutorial in the tutorials section and post back when you crack it. Then I can show you the next step.
    Careless Orc Costs Lives!

  4. #4

    Default Re: Slave to Faction Question

    big thanks Bwian, this is just what i was hoping for. i did all of the top part stuff and it worked. I have xpak and unpacked the stuff so i am ready for the cards part.

  5. #5

    Default Re: Slave to Faction Question

    Glad it helped! I will sort out a unit card section when I get in from work
    Careless Orc Costs Lives!

  6. #6

    Default Re: Slave to Faction Question

    OK Unit we go!

    First off, we are just going to 'borrow' another set of unit cards from the Roman Velite Gladiator. IF you want to change them afterwards, you can do so in Photoshop or PSP. You will need to watch out for the alpha textures if you do though! Don't know how good you are in Photoshop / PSP but this should get you started!

    Step 1... Find your unit cards!

    If you look in your RTW data folder, yo ushould find a folder called 'UI'
    Inside this folder you will need to find 2 folders

    a) UNIT_INFO

    b) UNITS

    There are unit pictures in both of these folders, and you will need to do both for a 'proper job'

    Starting with UNIT_INFO :

    Find the ROMANS_JULII folder. Inside this folder, you should find a unit card with a file namee of 'ROMAN_VELITE_GLADIATOR_INFO.tga'
    This is the picture that displays when you select the detail of the unit in the build unit. It's coloured 'red' since it's a Julii unit, but you could carefully paint out hte red and put in something more thracian later on! Copy this file, and paste it into the 'THRACIAN' folder, Change the name from 'ROMAN' to THRACIAN. remember in the previous section we named our unit 'thracian_velite_gladiator' ... well,the unit card MUST have the same name for it to link up ( just with _INFO tacked on the end! ). so you get


    Easy :D

    Now for UNITS :

    These are the unit cards that display at the bottom of the screen when you use the unit in combat, and also in the selection screen for a custom battle.

    Go into the UNITS folder, and find the folder for ROMANS_JULII. Again, we are going to copy the Roman one, so it will be in a red uniform. You can change this later.
    Find the file named '#ROMAN_VELITE_GLADIATOR.tga' and copy it. Go to the THRACIAN folder ( in UNITS this time though) and paste it in. Again, change the name to read


    And you are done!
    Last edited by Bwian; 07-25-2005 at 21:23.
    Careless Orc Costs Lives!

  7. #7

    Default Re: Slave to Faction Question

    Don't we have to add something in descreption_unit_battle ? I was trying to change something basically like this but it CTD.

    Thanks. in advance.
    Say: O unbelievers, I serve not what you serve, nor do you serve what I serve, nor shall I serve what you are serving, nor shall you be serving what I serve.
    To you your religion, and to me my religion.

  8. #8

    Default Re: Slave to Faction Question

    Please check the name of the file you're referring to, because they all sound similar but have very different effects. Hard to help unless we know what you're taking about
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  9. #9

    Default Re: Slave to Faction Question

    That would be descr_model_battle.txt, and yes, you need to make an entry there, too, to tell the engine which skin to use for the new faction. One skin can be used many times over, but the line has to be there.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO