Page 4 of 34 FirstFirst 123456789101112131429 ... LastLast
Results 61 to 80 of 689

Thread: How to add a new unit into game

Hybrid View

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

    Default Re: How to add a new unit into game

    Im having a problem here, im trying to add a unit to the DAC submod and not succedding any help would be appreciated.

  2. #2
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: How to add a new unit into game

    I am having the same problem as uurnammu had. The game starts the loading screen and then exits. The M2TW log gives me this message:
    09:39:43.106 [script.err] [error] Script Error in mods/Bare_Kingdoms/data/export_descr_unit.txt, at line 2284, column 1
    Could not find soldier battle model for unit type 'johanite_hospitallers'.

    09:39:43.106 [data.invalid] [error] DATABASE_TABLE error found : error reading record from file mods/Bare_Kingdoms/data/export_descr_unit.txt.
    Here is my unit:

    modeldb:
    1
    5 Horse
    13 MTW2_HR_Lance
    13 MTW2_HR_Sword 2
    21 MTW2_HR_Lance_Primary
    14 fs_test_shield 2
    17 MTW2_Mace_Primary
    14 fs_test_shield
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    21 johanite_hospitallers
    1 3
    58 unit_models/_Units/johanites/knights_hospitaller_lod0.mesh 121
    58 unit_models/_Units/johanites/knights_hospitaller_lod1.mesh 900
    58 unit_models/_Units/johanites/knights_hospitaller_lod2.mesh 1225
    1
    7 denmark
    72 unit_models/_Units/johanites/textures/en_lmail_hmail_hospitaller.texture
    76 unit_models/_Units/johanites/textures/en_lmail_hmail_crusader_normal.texture
    54 unit_sprites/denmark_Dummy_EN_Plate_Knights_sprite.spr
    1
    7 denmark
    67 unit_models/AttachmentSets/Final Special Heads_denmark_diff.texture
    67 unit_models/AttachmentSets/Final Special Heads_denmark_norm.texture 0
    1
    5 Horse
    13 MTW2_HR_Lance
    13 MTW2_HR_Sword 2
    21 MTW2_HR_Lance_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
    25 johanite_hospitallers_ug1
    1 3
    62 unit_models/_Units/johanites/knights_hospitaller_ug1_lod0.mesh 121
    62 unit_models/_Units/johanites/knights_hospitaller_ug1_lod1.mesh 1225
    62 unit_models/_Units/johanites/knights_hospitaller_ug1_lod2.mesh 6400
    1
    7 denmark
    74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_denmark.texture
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
    58 unit_sprites/denmark_Dummy_EN_Plate_Knights_ug1_sprite.spr
    1
    7 denmark
    67 unit_models/AttachmentSets/Final Special Heads_denmark_diff.texture
    67 unit_models/AttachmentSets/Final Special Heads_denmark_norm.texture 0
    export_descr_unit:
    type johanite hospitallers
    dictionary johanite_hospitallers ; Johanite Hospitallers
    category cavalry
    class heavy
    voice_type Heavy
    banner faction main_cavalry
    soldier johanite_hospitallers, 32, 0, 1
    mount heavy horse
    mount_effect elephant -4, camel -4
    attributes sea_faring, hide_forest, hardy, can_withdraw, can_formed_charge, knight
    formation 2, 4.4, 3, 6, 2, square, wedge
    stat_health 1, 0
    stat_pri 13, 8, no, 0, 0, melee, melee_blade, piercing, spear, 25, 1
    ;stat_pri_ex 0, 0, 0
    stat_pri_attr no
    stat_sec 14, 4, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    ;stat_sec_ex 0, 0, 0
    stat_sec_attr no
    stat_pri_armour 7, 5, 4, metal
    ;stat_armour_ex 7, 8, 9, 0, 5, 4, 4, metal
    stat_sec_armour 0, 0, flesh
    stat_heat 5
    stat_ground 0, -2, -4, 0
    stat_mental 11, normal, highly_trained
    stat_charge_dist 45
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 880, 250, 130, 100, 880, 4, 220
    armour_ug_levels 3, 4, 5
    armour_ug_models johanite_hospitallers, johanite_hospitallers_ug1
    ownership denmark
    era 1 denmark
    era 2 denmark
    ;unit_info 13, 0, 16
    Is there anything about this that looks wrong?
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: How to add a new unit into game

    @BobaHat
    If you have added the model in modeldb at the bottom, have you increased the number on top by two? (one for each entry)

    @radcan
    It will help if you let us know the units name
    Last edited by Gigantus; May 06, 2010 at 03:11 AM.










  4. #4
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: How to add a new unit into game

    @gigantus
    Yes but when I change the number at the top the game doesn't even go to the loading screen. It just crashes.
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: How to add a new unit into game

    Then you have some error in the entries. Underneath is one section of your modelDB entry, does the second one look the same? There are possibly some line count errors.

    21 johanite_hospitallers
    1 3
    58 unit_models/_Units/johanites/knights_hospitaller_lod0.mesh 121
    58 unit_models/_Units/johanites/knights_hospitaller_lod1.mesh 900
    58 unit_models/_Units/johanites/knights_hospitaller_lod2.mesh 1225
    1
    7 denmark
    72 unit_models/_Units/johanites/textures/en_lmail_hmail_hospitaller.texture
    76 unit_models/_Units/johanites/textures/en_lmail_hmail_crusader_normal.texture
    54 unit_sprites/denmark_Dummy_EN_Plate_Knights_sprite.spr
    1
    7 denmark
    67 unit_models/AttachmentSets/Final Special Heads_denmark_diff.texture
    67 unit_models/AttachmentSets/Final Special Heads_denmark_norm.texture 0
    1
    5 Horse
    13 MTW2_HR_Lance
    13 MTW2_HR_Sword 2
    21 MTW2_HR_Lance_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
    Maybe try the modelDB checker as well.
    Last edited by Gigantus; May 06, 2010 at 05:46 AM.










  6. #6

    Default Re: How to add a new unit into game

    I need you to take a look at my unit files to see if something is wrong. I added a new unit to the vanilla game and it won't show up. Then I tried adding it to the retrofit/guam mod version and the game just crashes.

  7. #7
    BobaHat's Avatar Tiro
    Join Date
    Feb 2010
    Location
    Aarhus, Denmark
    Posts
    256

    Default Re: How to add a new unit into game

    Right... Now it's really weird...

    This is what my log says now (after the game simply doesn't start):

    (...)
    13:01:59.274 [system.io] [trace] file open,,data/shaders/new/mesh_fire_mt.vsh,594
    13:01:59.274 [system.io] [info] open: found data/shaders/new/mesh_fire_mt.vsh (from: C:\Program Files\SEGA\Medieval II Total War)
    13:01:59.274 [system.io] [info] exists: missing mods/Bare_Kingdoms/data/shaders/new/fleximesh0_fire_mt.vsh
    13:01:59.275 [system.io] [trace] file open,,data/shaders/new/fleximesh0_fire_mt.vsh,517
    13:01:59.275 [system.io] [info] open: found data/shaders/new/fleximesh0_fire_mt.vsh (from: C:\Program Files\SEGA\Medieval II Total War)
    13:01:59.276 [system.io] [info] exists: missing mods/Bare_Kingdoms/data/shaders/new/fleximesh0_fire_mt.vsh
    13:01:59.276 [system.io] [trace] file open,,data/shaders/new/fleximesh0_fire_mt.vsh,517
    13:01:59.276 [system.io] [info] open: found data/shaders/new/fleximesh0_fire_mt.vsh (from: C:\Program Files\SEGA\Medieval II Total War)
    13:01:59.280 [system.io] [trace] exists: 10: caching directory: mods/bare_kingdoms/data/unit_models
    13:01:59.280 [system.io] [trace] exists: 88: caching file: mods/bare_kingdoms/data/unit_models/battle_models.modeldb (1273143687)
    13:01:59.280 [system.io] [trace] exists: 89: caching file: mods/bare_kingdoms/data/unit_models/_units (1273125592)
    13:01:59.280 [system.io] [info] exists: found mods/Bare_Kingdoms/data/unit_models/battle_models.modelDB (from: C:\Program Files\SEGA\Medieval II Total War)
    13:01:59.284 [system.io] [trace] file open,,mods/Bare_Kingdoms/data/unit_models/battle_models.modelDB,1124979
    13:01:59.284 [system.io] [info] open: found mods/Bare_Kingdoms/data/unit_models/battle_models.modelDB (from: C:\Program Files\SEGA\Medieval II Total War)
    13:01:59.395 [system.rpt] [error] Uh oh. This isn't good. No idea why, but exiting now. Sorry pal.
    "I have learned how to be a man.
    And so I shall become the King of Men."
    - Canute the Great, king of Denmark, Norway and England

  8. #8
    Beorn's Avatar Praepositus
    Join Date
    Jan 2009
    Location
    Athens
    Posts
    5,325

    Default Re: How to add a new unit into game

    This is the models_db
    card_longspear
    1 1
    52 unit_models/_Units/cardolan/card_longspear_lod0.mesh 6400
    1
    5 turks
    59 unit_models/_Units/cardolan/textures/card_longspear.texture
    66 unit_models/_Units/cardolan/textures/card_longspear_normal.texture
    42 unit_sprites/turks_greenwood_tg_sprite.spr
    1
    5 turks
    58 unit_models/AttachmentSets/card_longspear_att_diff.texture
    58 unit_models/AttachmentSets/card_longspear_att_norm.texture 0
    1
    4 None
    20 MTW2_Halberd_Primary
    22 MTW2_Halberd_Secondary 1
    17 MTW2_Pike_primary 1
    17 MTW2_Pike_primary
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    and this is the EDU entry:
    type Cardolan LongSpearmen
    dictionary Cardolan_LongSpearmen
    category infantry
    class heavy
    voice_type Heavy
    banner faction main_infantry
    banner holy crusade
    soldier card_longspear, 60, 0, 1.2
    officer eriador_captain_early_flag
    mount_effect horse +6, camel +6, elephant -4
    attributes sea_faring, hide_forest, can_withdraw, free_upkeep_unit
    formation 1.2, 0, 2.4, 2.4, 4, square, phalanx
    stat_health 1, 3
    stat_pri 7, 4, no, 0, 0, melee, melee_blade, piercing, axe, 100, 1
    stat_pri_attr ap, spear, spear_bonus_4
    stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr no
    stat_pri_armour 6, 5, 0, metal
    stat_sec_armour 0, 0, flesh
    stat_heat 4
    stat_ground 0, -1, -1, -2
    stat_mental 14, normal, trained
    stat_charge_dist 15
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 620, 240, 75, 75, 620, 4, 100
    armour_ug_levels 2
    armour_ug_models card_longspear
    ownership turks
    era 0 turks
    era 1 turks
    era 2 turks
    recruit_priority_offset 5
    I have placed the attachments, .mesh files, and textures in the right folders, and after that I get a CTD in the splash screen.

    here's my log :
    http://www.sendspace.com/file/o4s3yn

  9. #9
    Stephan's Avatar Campidoctor
    Join Date
    Jun 2008
    Location
    Wien
    Posts
    1,575

    Default Re: How to add a new unit into game

    you forgot the number before
    card_longspear
    it should be
    14 card_longspear

    Yes, I know that Ishtar is spelled wrong

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: How to add a new unit into game

    Next time please compress your log before you upload it.

    My guess (haven't downloaded the 7MB log): count on top of modeldb doesn't agree with numbers of models.
    Did you add to that number (see below as sample)?

    22 serialization::archive 3 0 0 0 0 132 0 0










  11. #11
    Beorn's Avatar Praepositus
    Join Date
    Jan 2009
    Location
    Athens
    Posts
    5,325

    Default Re: How to add a new unit into game

    Ιτ's the problem Gigantus mentioned; solved now

  12. #12
    emotion_name's Avatar Protector Domesticus
    Join Date
    Jun 2008
    Location
    Wales
    Posts
    4,376

    Default Re: How to add a new unit into game

    open the "_units" folder which is locaded in the "unit_models" folder and create a new folder and call it "new_folder" and in this folder you create another one and call it "textures"

    instead of "new_folder" you can use any other name but just remember it has to be the same as the green marked one in the battle_models file
    I cant find the units or the unit models folder anywhere? Please help me!

    I really want to add Ireland/Wales and others from Kingdoms to main M2TW Campaign map, and adding there unit rosters im told is the first step!

    I have a mod folder for everything im doing, could this be why i cannot find the units folder? I have checked everywhere in main M2TW root folder as well!

    (the mod folder im using is Bare_Geomod, if it helps at all)

    I'll be grateful for any replies that can help me, i know its going to be a big task to do what i want, im kinda looking forwards to it, but have fallen at the first step!

    (well, first step of text editing! I also failed at first step of mapping but have that sorted now!)

  13. #13
    emotion_name's Avatar Protector Domesticus
    Join Date
    Jun 2008
    Location
    Wales
    Posts
    4,376

    Default Re: How to add a new unit into game

    I used the unpacker again, just to see, and again i do not have the -units folder for main m2tw, nor this battle_models.modeldb.

    When i view Kingdoms folders, the unit_models folder and -units folder within it are there exactly as you said it would be, along with a battle_models.model.db for each one.

    Using gigantus New Faction Tool i noticed there is a battle_models.modeldb in that, but i am unable to edit it in any way.

    Its still a modeldb file, and nothing i have will work with it. How do i convert it or what program must i use to work with it?

  14. #14
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: How to add a new unit into game

    @emotion_name, Vista or 7, default directotory with UAC enabled? If si you only got about 26, 000 of the 36,000 that unpacked.

  15. #15
    emotion_name's Avatar Protector Domesticus
    Join Date
    Jun 2008
    Location
    Wales
    Posts
    4,376

    Default Re: How to add a new unit into game

    Vista is my OS, and i dont have UAC activated!

    in regards to default directory you ask me, im guessing you mean did i install M2TW into default location, to which answer is yes!

    the unpacker, following Alpaca "How to Mod Folder" guide, is pointing to unpack everything into backup folder within main M2TW folder.

  16. #16
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: How to add a new unit into game

    When the 1.02 patch was released and the same time Vista was released, the only way I could get all the packs to unpack was editing the unpack_all. bat four times and unpack them one at a time.

    That was also default directory, with and without UAC.

  17. #17
    emotion_name's Avatar Protector Domesticus
    Join Date
    Jun 2008
    Location
    Wales
    Posts
    4,376

    Default Re: How to add a new unit into game

    Hmmm, my M2TW is on 1.3 patch, could this be another reason why?

    How did you edit the unpack all bat, to make it do what? I mean, i know you right click and open to edit it, but what did you actually put and what was its purpose?


    So far i have tried:

    unpack_americas.bat --(worked fine)
    unpack_britannia.bat --(worked fine)
    unpack_crusades.bat --(worked fine)
    unpack_teutonic.bat --(worked fine)

    unpacker application --(some files missing)
    unpack_all --(got same results as if i did all the above one by one again)

    Heck, i even run the list_contents.bat to see if it would help, and nothing.

  18. #18
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: How to add a new unit into game

    Try the attached bat file: it will unpack vanilla into c:\extract










  19. #19
    emotion_name's Avatar Protector Domesticus
    Join Date
    Jun 2008
    Location
    Wales
    Posts
    4,376

    Default Re: How to add a new unit into game

    Quote Originally Posted by gigantus View Post
    Try the attached bat file: it will unpack vanilla into c:\extract

    I placed the bat file into tools/unpacker and then run it!

    When it finished i went into Crive/Extract/Data and the only files it unpacked are

    animations folder
    banners folder
    battlefield folder
    blockset folder
    battle_config
    battle_event_subtitles_lookup
    battlecameras

    Am i doing some thing wrong with it for it to not show the units folder still?

    Quote Originally Posted by irishron View Post
    unpacker.exe --source=..\..\packs\*.pack --destination=..\..\ --verbosity=1 is what the unpack_all.bat looks like in edit form.

    An old DOS trick when not enough ram.

    *.pack--destination can be edited to data0.pack--destination, data1.pack--destination, data2.pack--destination, data3.pack--destination, data4.pack--destinaion, localized.pack. Edit for the first one, run it, edit for the second one, run it, etc. You do that for all six of them, you will have your files and floders unpacked.

    1.3 is the multiplayer fix for 1.2. It has nothing to do with these files.
    I also tried doing this, and still i cannot see the files i need. When i edited it for data0, data1, data2, data3 and data4 and run it, after putting "y" to the three questions it asks the unpacker simply closed.

    For localised.pack it seemed to unpack a few files, but it lasted less than 10 seconds.

    I have the models folder, but within it is just textures folder and a load of CAS files. I also have models_effects, models_engine, models_landscape and a few more, but none of them units!

    What else can i try guys?

    My unpack all bat file is edited to this

    unpacker.exe --source=..\..\packs\*.pack --destination=..\..\backup --verbosity=1

    so i can see no errors there! Im beginning to think im doomed to never get this done!
    Last edited by emotion_name; May 25, 2010 at 04:32 AM.

  20. #20
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: How to add a new unit into game

    unpacker.exe --source=..\..\packs\*.pack --destination=..\..\ --verbosity=1 is what the unpack_all.bat looks like in edit form.

    An old DOS trick when not enough ram.

    *.pack--destination can be edited to data0.pack--destination, data1.pack--destination, data2.pack--destination, data3.pack--destination, data4.pack--destinaion, localized.pack. Edit for the first one, run it, edit for the second one, run it, etc. You do that for all six of them, you will have your files and floders unpacked.

    1.3 is the multiplayer fix for 1.2. It has nothing to do with these files.

Posting Permissions

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