Page 3 of 30 FirstFirst 1234567891011121328 ... LastLast
Results 41 to 60 of 692

Thread: How-To: Add other faction units for new factions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hans Kloss's Avatar J-23
    Join Date
    Oct 2004
    Location
    Richmond upon Thames
    Posts
    1,616

    Default Re: How-To: Add other faction units for new factions

    Quote Originally Posted by Septus View Post
    i am having major problems
    1. I can't locate the units_models folder.
    2. my ui folder is practically empty, i assume hidden files.
    3. there is no mymod folder, am i supposed to make it?, what do i put in it?
    Sounds like you have not unpacked MTW2 files

    @ Spartan Commander

    have a look at pages 6 and 7 of this thread
    Last edited by Hans Kloss; July 25, 2007 at 11:47 PM.

  2. #2

    Default Re: How-To: Add other faction units for new factions

    I made everthing tou said except instead of using a io.file_first I used a mod folder. Everything works fine including the unit cards but somehow the units are still invisible!!! I tried everything and I know its not because of battle_model file.

    Code:
    10 MTW2_Spear 0  
    2 
    18 MTW2_Spear_primary 
    14 fs_test_shield 0 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 
    18 kurdish_javelinmen 
    1 4 
    63 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_lod0.mesh 121 
    63 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_lod1.mesh 900 
    63 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_lod2.mesh 2500 
    63 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_lod3.mesh 6400 
    2 
    5 egypt 
    76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_egypt.texture 
    77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 
    48 unit_sprites/egypt_Kurdish_Javelinmen_sprite.spr 
    6 horhor
    76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_egypt.texture 
    77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 
    48 unit_sprites/egypt_Kurdish_Javelinmen_sprite.spr 
    2 
    5 egypt 
    60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture 
    60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture 0  
    6 horhor
    60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture 
    60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture 0  
    2 
    4 None 
    17 MTW2_Fast_Javelin 
    19 MTW2_Fast_Swordsman 2 
    20 MTW2_Javelin_primary 
    14 fs_test_shield 2 
    18 MTW2_Sword_Primary 
    14 fs_test_shield 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 
    22 kurdish_javelinmen_ug1 
    1 4 
    67 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_ug1_lod0.mesh 121 
    67 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_ug1_lod1.mesh 900 
    67 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_ug1_lod2.mesh 2500 
    67 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_ug1_lod3.mesh 6400 
    2 
    5 egypt 
    76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_egypt.texture 
    77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 
    52 unit_sprites/egypt_Kurdish_Javelinmen_ug1_sprite.spr 
    6 horhor
    76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_egypt.texture 
    77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 
    52 unit_sprites/egypt_Kurdish_Javelinmen_ug1_sprite.spr 
    2 
    5 egypt 
    60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture 
    60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture 0  
    6 horhor
    60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture 
    60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture 0  
    2 
    4 None 
    17 MTW2_Fast_Javelin 
    19 MTW2_Fast_Swordsman 2 
    20 MTW2_Javelin_primary 
    14 fs_test_shield 2 
    18 MTW2_Sword_Primary 
    14 fs_test_shield
    Any reason why it does not work?

  3. #3
    Hans Kloss's Avatar J-23
    Join Date
    Oct 2004
    Location
    Richmond upon Thames
    Posts
    1,616

    Default Re: How-To: Add other faction units for new factions

    You will need to post your entry from export_descr_unit

  4. #4

    Default Re: How-To: Add other faction units for new factions

    plssss help... i added new unit for moors faction and made all necessary entries. then when i played the game the unit i made doesnt show up in the custom battle.

    but when i played the moor with orig unit, got ctd and this is the what it say in the system log.:hmmm:

    [06:22:10.171 [script.err] [error] Script Error in data/export_descr_unit.txt, at line 14772, column 3
    Could not find soldier battle model for unit type 'Me_andalusian_infantry'.
    06:22:10.171 [data.invalid] [error] DATABASE_TABLE error found : error reading record from file data/export_descr_unit.txt.]

  5. #5

    Default Re: How-To: Add other faction units for new factions

    What exactly is a bat file? I did everything except this. Still getting invisible units.

    Also what is this mymod folder?

  6. #6

    Default Re: How-To: Add other faction units for new factions

    Help!!! I can't find an answer to this question online. I have M2TW Gold, I unpacked all. I downloaded missing Gold files and unpacked them. Yet I still can't find units_models folder in my data. I have Windows 7. Where did I go wrong?

  7. #7

    Default Re: Tutorial to add new units for factions

    Quote Originally Posted by Mr_Breeze View Post
    Ahh theres seems to be a problem... When I post the text it removes the double spacing after the zero's.
    Just take the text I posted and go through it and make sure there are two spaces after every zero
    Damn these forums are buggy... sorry for the double post
    I've checked and there are two spaces after every zero and it still doesn't work.

  8. #8
    M3rcury15's Avatar Libertus
    Join Date
    Dec 2006
    Location
    Estonia
    Posts
    97

    Default Re: Tutorial to add new units for factions

    To Endomatic: I will add this to my tutorial upgrade(I will upgrade the tutorial as soon as i get home!!!)

    To Time Commander Bob: The thing is try to test them in custom battle against hre(so many units as is armors)(i test units like this: My faction against the unit owner, first unit has no armor UG second has lvl1 third lvl2)(maybe a texture file is missing) And no it's not the double spacing(the game should crash when there isn't double space after zero) I will try to test it when i get home...

    To Mr_Breeze: Thanks for helping other people when i am away... And yes the normal texting doesen't allow more but one space after each word that's why you should talk with the coding if you add a file's text so that copy and paste works...

    To Everybody!!!: PM(Private message) me if anyone gets problems adding units (CTD/Units still invisible/units look strange)
    Last edited by M3rcury15; January 02, 2007 at 06:54 AM. Reason: Grammar

  9. #9

    Default Re: Tut: To add other faction units for new factions

    To Time Commander Bob: The thing is try to test them in custom battle against hre(so many units as is armors)(i test units like this: My faction against the unit owner, first unit has no armor UG second has lvl1 third lvl2)(maybe a texture file is missing) And no it's not the double spacing(the game should crash when there isn't double space after zero) I will try to test it when i get home...
    I did this test and all my three units of different armoured sergeant spearmen were transparent (even though I had edited all the three levels) but all the three levels of HRE sergeant spearmen were fine and had no problems whatsoever.

  10. #10

    Default Re: Tut: To add other faction units for new factions

    I have problems to add cavalry units, because in the battle the horses are invisible.

  11. #11

    Default Re: Tut: To add other faction units for new factions

    Here is a screenshot of the silver-translucent sergeant spearmen:


  12. #12
    cudakite's Avatar Centenarius
    Join Date
    Sep 2003
    Location
    SO. CALIFORNIA
    Posts
    829

    Default Re: Tut: To add other faction units for new factions

    wow... this was easier in Rome...

    CLICKY

  13. #13
    M3rcury15's Avatar Libertus
    Join Date
    Dec 2006
    Location
    Estonia
    Posts
    97

    Default Re: Tut: To add other faction units for new factions

    It's VERY easy if you get to know the file from up to down - I don't know if i keep track but i think i already have added more than 40 units

  14. #14

    Default Re: Tut: To add other faction units for new factions

    Quote Originally Posted by M3rcury15 View Post
    It's VERY easy if you get to know the file from up to down - I don't know if i keep track but i think i already have added more than 40 units
    would it be possible for you to set up a download for your adjusted file, along with a list of units changed M3rcury?

    (could include your EDU if you cant remember all yer changes)

    would be much obliged, if even just to see what's what.

  15. #15
    cudakite's Avatar Centenarius
    Join Date
    Sep 2003
    Location
    SO. CALIFORNIA
    Posts
    829

    Default Re: Tut: To add other faction units for new factions

    Quote Originally Posted by M3rcury15 View Post
    It's VERY easy if you get to know the file from up to down - I don't know if i keep track but i think i already have added more than 40 units

    you are right. at first it made my eyes go cross, but i was able to add musketeers to HRE. textures, unit cards and all. by the end of the process it was getting much easier. I still think the txt file that assigned battlefield unit models was in a MUCH more user friendly format in Rome.

    CLICKY

  16. #16

    Default Re: Tut: To add other faction units for new factions

    My battle_models.modelsdb is a giant block of text. is this supposed to be that way or did i srew up this file? if the file is normally like this is there any way to make it more friendly to mod?
    Last edited by larry; January 07, 2007 at 07:25 PM.

  17. #17
    kleemann's Avatar Libertus
    Join Date
    Jan 2006
    Location
    In EU (Estonia)
    Posts
    74

    Default Re: Tut: To add other faction units for new factions

    Nice to see another estonian

    By the way as i study the code. The buildup is number(string lenght) and string. 0 (null) and double space means empty string and marks end of the block.

    20(stringlenght of that ->) teutonic_knights_ug1

    1 (stringlenght of 3) 3(number of mesh or strings to come? not sure, I saw 4 vhere was 4 strings.)
    65(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/teutonic_knights_ug1_lod0.mesh 121 (<- what is this? Don't know)
    65(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/teutonic_knights_ug1_lod1.mesh 1225
    65(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/teutonic_knights_ug1_lod2.mesh 6400

    2 (number of factions)
    3(stringlenght of hre) hre
    70(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_hre.texture
    73(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
    44(stringlenght of that ->) unit_sprites/hre_NE_Bodyguard_ug1_sprite.spr

    6(stringlenght of sicily) sicily
    73(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_hre.texture
    73(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
    44(stringlenght of that ->) unit_sprites/hre_NE_Bodyguard_ug1_sprite.spr

    2 (number of factions)
    3(stringlenght of that ->) hre
    64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_diff.texture
    64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_norm.texture 0 (has double space, i quess it marks the end?)

    6(stringlenght of that ->) sicily
    64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_diff.texture
    64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_norm.texture 0

    Weapons section v1?
    1(stringlenght of that ->) 5(stringlenght of that ->) Horse (or the 1 means 1 horse?)
    13(stringlenght of that ->) MTW2_HR_Lance 12(stringlenght of that ->) MTW2_HR_Mace
    2(stringlenght of that ->) 21(stringlenght of that ->) MTW2_HR_Lance_Primary
    14(stringlenght of that ->) fs_test_shield
    2(stringlenght of that ->) 17(stringlenght of that ->) MTW2_Mace_Primary 14(stringlenght of that ->) fs_test_shield 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002

    All numbers and string lenghts must equal. This way is more readable. Mercury try to testit out. Can the medieval parse this form of code? Does it ignore "Enter" or next line tag? (Ühesõnaga, kas programm oskab sellises vormis koodi lugeda? Saad järgi testida?)

    EDIT: 19:06 8. jan 2007

    Yes: I tested it out! medieval2 can read the code if you write it that kind This is original copy-paste frome my file battle_models.db Now my viking faction has danish skins on battlefield.

    14 viking_raiders
    1 4
    61 unit_models/_Units/EN_Peasant_Padded/viking_raiders_lod0.mesh 121
    61 unit_models/_Units/EN_Peasant_Padded/viking_raiders_lod1.mesh 900
    61 unit_models/_Units/EN_Peasant_Padded/viking_raiders_lod2.mesh 2500
    61 unit_models/_Units/EN_Peasant_Padded/viking_raiders_lod3.mesh 6400
    3
    7 denmark
    79 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_denmark.texture
    78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
    46 unit_sprites/denmark_Viking_Raiders_sprite.spr
    7 normans
    79 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_denmark.texture
    78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
    46 unit_sprites/denmark_Viking_Raiders_sprite.spr
    5 slave
    78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_rebels.texture
    78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
    44 unit_sprites/slave_Viking_Raiders_sprite.spr
    3
    7 denmark
    60 unit_models/AttachmentSets/Final Danish_denmark_diff.texture
    60 unit_models/AttachmentSets/Final Danish_denmark_norm.texture 0
    7 normans
    60 unit_models/AttachmentSets/Final Danish_denmark_diff.texture
    60 unit_models/AttachmentSets/Final Danish_denmark_norm.texture 0
    5 slave
    58 unit_models/AttachmentSets/Final Danish_slave_diff.texture
    58 unit_models/AttachmentSets/Final Danish_slave_norm.texture 0
    1 4 None 9 MTW2_Mace 0 2 17 MTW2_Mace_Primary 14 fs_test_shield 0
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002

    Now it is more readable! "Enter" or key stroke will not disturb your code! Have nice modding!
    Last edited by kleemann; January 09, 2007 at 01:19 AM.

  18. #18
    M3rcury15's Avatar Libertus
    Join Date
    Dec 2006
    Location
    Estonia
    Posts
    97

    Default Re: Tut: To add other faction units for new factions

    To Larry: Yes the file must be ugly

    To Kleemann: Thanks

  19. #19

    Default Re: Tut: To add other faction units for new factions

    Quote Originally Posted by kleemann View Post
    Nice to see another estonian

    By the way as i study the code. The buildup is number(string lenght) and string. 0 (null) and double space means empty string and marks end of the block.

    -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 20(stringlenght of that ->) teutonic_knights_ug1

    1 (stringlenght of 3) 3(equal to the number of mesh.)
    65(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/teutonic_knights_ug1_lod0.mesh 121 (<- has to do with LoD i believe(shouldnt change it enless your adding a diffrent number of meshes, if you have 4 meshes the numbers ar diffrent like this:27 mongol_monster_bombard_crew 1 4 65 unit_models/_Units/AS_Light/mongol_monster_bombard_crew_lod0.mesh 121 65 unit_models/_Units/AS_Light/mongol_monster_bombard_crew_lod1.mesh 900 65 unit_models/_Units/AS_Light/mongol_monster_bombard_crew_lod2.mesh 2500 65 unit_models/_Units/AS_Light/mongol_monster_bombard_crew_lod3.mesh 6400))
    65(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/teutonic_knights_ug1_lod1.mesh 1225
    65(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/teutonic_knights_ug1_lod2.mesh 6400

    2 (number of factions)
    3(stringlenght of hre) hre
    70(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_hre.texture
    73(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
    44(stringlenght of that ->) unit_sprites/hre_NE_Bodyguard_ug1_sprite.spr

    6(stringlenght of sicily) sicily
    73(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_hre.texture
    73(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
    44(stringlenght of that ->) unit_sprites/hre_NE_Bodyguard_ug1_sprite.spr

    2 (number of factions)
    3(stringlenght of that ->) hre
    64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_diff.texture
    64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_norm.texture 0 (this i'am not completely sure about but i believ it has to do with thae fact that hre is first so u only include the 2 infront of it?)

    6(stringlenght of that ->) sicily
    64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_diff.texture
    64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_norm.texture 0
    (i havent looked at the stuff after this^)
    i have some answers kleeman
    note not sure if this really changes it but if you look at the last unit entry, you'll notice this section is at the end of the unit not beginning
    -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    e.g:
    16 baltest_hr_lance 1 4 60 unit_models/_Units/EN_Lmail_Hmail/baltest_hr_lance_lod0.mesh 121 60 unit_models/_Units/EN_Lmail_Hmail/baltest_hr_lance_lod1.mesh 900 60 unit_models/_Units/EN_Lmail_Hmail/baltest_hr_lance_lod2.mesh 2500 60 unit_models/_Units/EN_Lmail_Hmail/baltest_hr_lance_lod3.mesh 6400 2 7 england 73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_england.texture 72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 0 6 france 72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_france.texture 72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 0 2 7 england 60 unit_models/AttachmentSets/Final Heater_england_diff.texture 60 unit_models/AttachmentSets/Final Heater_england_norm.texture 0 6 france 59 unit_models/AttachmentSets/Final Heater_france_diff.texture 59 unit_models/AttachmentSets/Final Heater_france_norm.texture 0 1 5 Horse 13 MTW2_HR_Lance 0 2 21 MTW2_HR_Lance_Primary 14 fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    that is the last entry in fact
    Last edited by Zorgrath; January 08, 2007 at 06:56 PM.

  20. #20
    kleemann's Avatar Libertus
    Join Date
    Jan 2006
    Location
    In EU (Estonia)
    Posts
    74

    Default Re: Tut: To add other faction units for new factions

    Good point Zorgrath - i made corrections.
    Last edited by kleemann; January 09, 2007 at 01:20 AM.
    Trading tip: Load your mercants on your (crapy, cheap upkeep) unit and place that crapy unit on the valuable trade ressource. All will earn money on that single ressourec AND other merchants can't do anything! ha:ha

    BUT it has bad side efect, if the unit rebel you will lose your merchants :hmmm:

    How-to: edit battle_model.modeldb to add new animations and skins.

Posting Permissions

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