Results 1 to 9 of 9

Thread: Adding other faction units [TUTORIAL]

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Adding other faction units [TUTORIAL]

    This is not much of a sub mod, but it involves messing with files, so its good here.


    OK now
    Thanks to Baron Samedi for providing the link to this tutorial http://www.twcenter.net/forums/showt...ighlight=units and thanks to m3rcury15 for his tutorial.

    So i will add Eldar Cavalry to the Silvan Elves rooster, in campaing map.

    I will start from hardest to easiest.

    Go to: \...\Medieval II Total War\mods\Third_Age\data\unit_models and open
    battle_models (right-click and open it with Notepad)

    MAKE BACKUP OF battle_models !!!

    Press Ctrl+F and search for Mamluks.

    Spoiler Alert, click show to read: 

    1 3
    66 unit_models/_Units/ME_Leather_Lamallae_Brigadine/mamluks_lod0.mesh 121
    66 unit_models/_Units/ME_Leather_Lamallae_Brigadine/mamluks_lod1.mesh 1225
    66 unit_models/_Units/ME_Leather_Lamallae_Brigadine/mamluks_lod2.mesh 6400
    2---> change to 3
    5 egypt
    91 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_egypt.texture
    92 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_normal.texture
    37 unit_sprites/egypt_Mamluks_sprite.spr
    7 mongols
    91 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_egypt.texture
    92 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_normal.texture
    37 unit_sprites/egypt_Mamluks_sprite.spr

    5 slave
    91 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_turks.texture
    92 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_normal.texture
    37 unit_sprites/slave_Mamluks_sprite.spr
    2----> change to 3
    5 egypt
    66 unit_models/AttachmentSets/Final Middle Eastern_egypt_diff.texture
    66 unit_models/AttachmentSets/Final Middle Eastern_egypt_norm.texture 0
    7 mongols
    66 unit_models/AttachmentSets/Final Middle Eastern_egypt_diff.texture
    66 unit_models/AttachmentSets/Final Middle Eastern_egypt_norm.texture 0

    5 slave
    66 unit_models/AttachmentSets/Final Middle Eastern_slave_diff.texture
    66 unit_models/AttachmentSets/Final Middle Eastern_slave_norm.texture 0

    this is the hard part here fellows.
    - Change the two 2's to 3's.
    - If you notice i simply copied the first part that starts with 5 egypt(and the 91, 92, 37 lines) and changed it to 7* mongols (the 91, 92 and 37 lines, remain exactly the same)
    - Now i copy again the "AttachmentSets" just like we did in the step above, i again copied the line that starts with 5 egypt (and the 2 66 lines) and change it to 7 mongols (and the 2 66 lines, are exactly the same).

    And we're done with model database, i supose most problems you will have will come from here, i will try to improve it with time.


    Ok now the easy last 2 parts of this.

    Go to: \Third_Age\data and open export_descr_unit.

    MAKE BACKUP OF export_descr_unit !!!

    Spoiler Alert, click show to read: 

    Ctrl+F and search for Eldar Cavalry

    Once you find it look at this part

    ownership egypt
    era 0 egypt
    era 1 egypt
    era 2 egypt
    recruit_priority_offset 5


    simply add , mongols
    so it looks like this

    ownership egypt, mongols
    era 0 egypt, mongols
    era 1 egypt, mongols
    era 2 egypt, mongols
    recruit_priority_offset 5

    NOTICE THE COMMA (",")

    Close and save it



    Now we want to be able to recruit these guys in the campaing map, right?
    Well here's the last step

    Spoiler Alert, click show to read: 
    Go to: \Third_Age\data and open export_descr_buildings.

    Ctrl+F and search for Eldar Cavalry.

    You should look for the stables and change this line to ALL level of stables


    recruit_pool "Eldar Cavalry" 0 0.05 1 0 requires factions { egypt, } and region_religion orthodox 60

    to

    recruit_pool "Eldar Cavalry" 0 0.05 1 0 requires factions { egypt, mongols, } and region_religion orthodox 60

    Notice the space after the first comma, and VERY IMPORTANT the comma AFTER mongols AND the space as well!

    Also remember to apply this for ALL stables levels and for both CITY and CASTLE!!


    Also a little "bonus" here, notice the 0.05 1? Well 0.05 represents the refresh rate (increase it to wait less for it to be recruitable, i have mine on 0.15 at this level, takes 7 turns to get 1 unit. The "1" after the 0.05, represents the max number available to recruit, i got mine to 2.



    Ok you probably remember in the first step where i changed a line to 7 mongols, well i want to explain what this is, as best as I can.

    Spoiler Alert, click show to read: 

    The number 7 represnts how many letters the faction name has, if you add any other faction count how many letters the faction name has, remember is the medieval 2 faction name wich you can find below.

    For example, if you want to add a unit to gondor from rohan

    you look for the unit then use the steps above and replace the 5 milan with 6 sicily


    Thanks to Baron Samedi.


    Faction names:
    Spoiler Alert, click show to read: 

    Sicily - Gondor
    Milan - Rohan
    Scotland - Dale
    Moors - Dwarves
    Turks - Eriador
    Egypt - High Elves
    Mongols - Silvan Elves
    England - Mordor
    France - Isengard
    HRE - OotMM
    Spain - Harad
    Venice - Rhûn

    Thanks to Seleukos_I.



    Thanks for help:

    Baron Samedi
    koultouras
    m3rcury15


    "Critical edit": You probably noticed that in modeldb (battle_models file) i searched for Mamluks and not Eldar Cavalry, it was sheer luck that i found out the correct name, with a little imagination

    I noticed that elf_archer remained the same, but i have not checked the other units, so i do no know if they have Medieval II total war vanilla names or not...

    I need to make a list of all the units, so its easier, but this requires A LOT of time, so i will to so on weekend.

    Until then, try to add unique units, like i did with eldar cavalry, then think on the vanilla med2 faction, and see if you remember any. Not the best way, but it will have to do until i manage to make the list with all the units.



    NOTE: For some reason the game doesn't load the textures, but the unit works and should not cause any problems. This may be due to textures being "allowed" to a specific faction, don't know for sure. I will try to find out, but i doubt it will be any time soon, I have a lot going on in RL.
    Last edited by HolyDevil; February 04, 2010 at 03:34 PM.

  2. #2

    Default Re: Adding other faction units [TUTORIAL]

    Nice tutorial. +rep
    Faction names:
    Spoiler Alert, click show to read: 
    Sicily - Gondor
    Milan - Rohan
    Scotland - Dale
    Moors - Dwarves
    Turks - Eriador
    Egypt - High Elves
    Mongols - Silvan Elves
    England - Mordor
    France - Isengard
    HRE - OotMM
    Spain - Harad
    Venice - Rhûn

  3. #3
    Baron Samedi's Avatar Citizen
    Join Date
    Apr 2009
    Location
    The Netherlands
    Posts
    1,414

    Default Re: Adding other faction units [TUTORIAL]

    Very good of you to write a tutorial on this matter. I am sure it will be helpfull for lots a people, who don't have much experience in modding! (well earned +rep)


    I have some suggestions to further improve this tutorial:
    1. Quote Originally Posted by HolyDevil View Post
      2---> change to 3
      This represents the number of factions that can use the texture. Thats why its changed to 3 (so you add +1, because you make it available to another faction)
    2. Quote Originally Posted by HolyDevil View Post
      Ok you probably remember in the first step where i changed a line to 7 mongols, well i want to explain what this is, as best as I can.

      the number 7, this is the one i do not know what it actually represents, but i SUPOSE its the faction number or something

      so far i know that 5 is High Elves and that 7 is Silvan Elves, could use help to know the other numbers, but it should be easy to spot
      You can remove this part; this number represents the string length. So you use 7 for mongols, because the word ''mongols'' consists of 7 letters. That why you see for instance ''6'' for ''sicily'' and ''7'' before ''england''. Further you can also add that you always need to use the vanilla names (as provided by Seleukos)
    3. There should be an easier way to spot which section you have to modify in battle_models.modeldb according to the units in EDU. Providing all the correct names might be to much work, but I don't know the right solution just yet. Maybe I'll come back to this issue if someone else doesn't provide the right solution to tackle this.
    Under the patronage of MasterBigAb

  4. #4

    Default Re: Adding other faction units [TUTORIAL]

    Thanks a lot guys.

    I would rep ya baron, but i already did, it says i need to rep others

  5. #5

    Default Re: Adding other faction units [TUTORIAL]

    I think i've found why the unit texture didn't work ingame, I think you have to do this same process for the elf_lance.But for some reason it CTD when i alter it this way.

  6. #6
    koultouras's Avatar Πέος
    Join Date
    Nov 2008
    Location
    Greece / Thessaloniki
    Posts
    3,711

    Default Re: Adding other faction units [TUTORIAL]

    keep going lad....!


  7. #7
    Ayyubid's Avatar Tiro
    Join Date
    Aug 2012
    Location
    Seattle, WA
    Posts
    234

    Default Re: Adding other faction units [TUTORIAL]

    Quote Originally Posted by HolyDevil View Post
    This is not much of a sub mod, but it involves messing with files, so its good here.


    OK now
    Thanks to Baron Samedi for providing the link to this tutorial http://www.twcenter.net/forums/showt...ighlight=units and thanks to m3rcury15 for his tutorial.

    So i will add Eldar Cavalry to the Silvan Elves rooster, in campaing map.

    I will start from hardest to easiest.

    Go to: \...\Medieval II Total War\mods\Third_Age\data\unit_models and open
    battle_models (right-click and open it with Notepad)

    MAKE BACKUP OF battle_models !!!

    Press Ctrl+F and search for Mamluks.

    Spoiler Alert, click show to read: 

    1 3
    66 unit_models/_Units/ME_Leather_Lamallae_Brigadine/mamluks_lod0.mesh 121
    66 unit_models/_Units/ME_Leather_Lamallae_Brigadine/mamluks_lod1.mesh 1225
    66 unit_models/_Units/ME_Leather_Lamallae_Brigadine/mamluks_lod2.mesh 6400
    2---> change to 3
    5 egypt
    91 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_egypt.texture
    92 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_normal.texture
    37 unit_sprites/egypt_Mamluks_sprite.spr
    7 mongols
    91 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_egypt.texture
    92 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_normal.texture
    37 unit_sprites/egypt_Mamluks_sprite.spr

    5 slave
    91 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_turks.texture
    92 unit_models/_Units/ME_Leather_Lamallae_Brigadine/textures/me_leather_lamallea_normal.texture
    37 unit_sprites/slave_Mamluks_sprite.spr
    2----> change to 3
    5 egypt
    66 unit_models/AttachmentSets/Final Middle Eastern_egypt_diff.texture
    66 unit_models/AttachmentSets/Final Middle Eastern_egypt_norm.texture 0
    7 mongols
    66 unit_models/AttachmentSets/Final Middle Eastern_egypt_diff.texture
    66 unit_models/AttachmentSets/Final Middle Eastern_egypt_norm.texture 0

    5 slave
    66 unit_models/AttachmentSets/Final Middle Eastern_slave_diff.texture
    66 unit_models/AttachmentSets/Final Middle Eastern_slave_norm.texture 0

    this is the hard part here fellows.
    - Change the two 2's to 3's.
    - If you notice i simply copied the first part that starts with 5 egypt(and the 91, 92, 37 lines) and changed it to 7* mongols (the 91, 92 and 37 lines, remain exactly the same)
    - Now i copy again the "AttachmentSets" just like we did in the step above, i again copied the line that starts with 5 egypt (and the 2 66 lines) and change it to 7 mongols (and the 2 66 lines, are exactly the same).

    And we're done with model database, i supose most problems you will have will come from here, i will try to improve it with time.


    Ok now the easy last 2 parts of this.

    Go to: \Third_Age\data and open export_descr_unit.

    MAKE BACKUP OF export_descr_unit !!!

    Spoiler Alert, click show to read: 

    Ctrl+F and search for Eldar Cavalry

    Once you find it look at this part

    ownership egypt
    era 0 egypt
    era 1 egypt
    era 2 egypt
    recruit_priority_offset 5


    simply add , mongols
    so it looks like this

    ownership egypt, mongols
    era 0 egypt, mongols
    era 1 egypt, mongols
    era 2 egypt, mongols
    recruit_priority_offset 5

    NOTICE THE COMMA (",")

    Close and save it



    Now we want to be able to recruit these guys in the campaing map, right?
    Well here's the last step

    Spoiler Alert, click show to read: 
    Go to: \Third_Age\data and open export_descr_buildings.

    Ctrl+F and search for Eldar Cavalry.

    You should look for the stables and change this line to ALL level of stables


    recruit_pool "Eldar Cavalry" 0 0.05 1 0 requires factions { egypt, } and region_religion orthodox 60

    to

    recruit_pool "Eldar Cavalry" 0 0.05 1 0 requires factions { egypt, mongols, } and region_religion orthodox 60

    Notice the space after the first comma, and VERY IMPORTANT the comma AFTER mongols AND the space as well!

    Also remember to apply this for ALL stables levels and for both CITY and CASTLE!!


    Also a little "bonus" here, notice the 0.05 1? Well 0.05 represents the refresh rate (increase it to wait less for it to be recruitable, i have mine on 0.15 at this level, takes 7 turns to get 1 unit. The "1" after the 0.05, represents the max number available to recruit, i got mine to 2.



    Ok you probably remember in the first step where i changed a line to 7 mongols, well i want to explain what this is, as best as I can.

    Spoiler Alert, click show to read: 

    The number 7 represnts how many letters the faction name has, if you add any other faction count how many letters the faction name has, remember is the medieval 2 faction name wich you can find below.

    For example, if you want to add a unit to gondor from rohan

    you look for the unit then use the steps above and replace the 5 milan with 6 sicily


    Thanks to Baron Samedi.


    Faction names:
    Spoiler Alert, click show to read: 

    Sicily - Gondor
    Milan - Rohan
    Scotland - Dale
    Moors - Dwarves
    Turks - Eriador
    Egypt - High Elves
    Mongols - Silvan Elves
    England - Mordor
    France - Isengard
    HRE - OotMM
    Spain - Harad
    Venice - Rhûn

    Thanks to Seleukos_I.



    Thanks for help:

    Baron Samedi
    koultouras
    m3rcury15


    "Critical edit": You probably noticed that in modeldb (battle_models file) i searched for Mamluks and not Eldar Cavalry, it was sheer luck that i found out the correct name, with a little imagination

    I noticed that elf_archer remained the same, but i have not checked the other units, so i do no know if they have Medieval II total war vanilla names or not...

    I need to make a list of all the units, so its easier, but this requires A LOT of time, so i will to so on weekend.

    Until then, try to add unique units, like i did with eldar cavalry, then think on the vanilla med2 faction, and see if you remember any. Not the best way, but it will have to do until i manage to make the list with all the units.



    NOTE: For some reason the game doesn't load the textures, but the unit works and should not cause any problems. This may be due to textures being "allowed" to a specific faction, don't know for sure. I will try to find out, but i doubt it will be any time soon, I have a lot going on in RL.

    Best explanation i've seen. I'm going to try this for BC. I'll come back here if I need help. Thanks.

  8. #8
    Ayyubid's Avatar Tiro
    Join Date
    Aug 2012
    Location
    Seattle, WA
    Posts
    234

    Default Re: Adding other faction units [TUTORIAL]

    A few questions. Do you switch the "5" with "7" in every change? For example, i'm trying to add the Tabardariyya to the Moors and Turks, the Janissary heavy infantry to the Egyptians and moors, and the Granadine Crossbows to the Egyptians and Turks. In BC, i'm trying to make the Ghorid units and Sultanate of Rum units, available to all Muslim Factions. Any help or advice to offer?

    Thanks

  9. #9

    Default Re: Adding other faction units [TUTORIAL]

    Hi, I've tried adding the Eldar Cavalry to the Silvan Elves - I followed the instructions above, and it didn't work. I started the game, made a Silvan Elf town in to a large city to see if the changes worked, and the Eldar Cavalry aren't in the Silvan's roster. Could this be because I'm editing TATW 3.2? Some help with this would be much appreciated!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •