Page 4 of 13 FirstFirst 12345678910111213 LastLast
Results 61 to 80 of 248

Thread: Creating a World - Importing units from another mod

  1. #61

    Default Re: Creating a World - Importing units from another mod

    Hey, thanks for the great tutorial - but I'm still having trouble with adding units.

    I'm trying to add 4 units from the Divide and Conquer (Third Age submod) to the MOS submod. But there are several problems:

    1) Adding 3 units (Breeland City Axemen, Longbowmen and Swordsmen) works. The units show up in the game, but they're invisible. I've copied whole _units and attachmentsets folders between the mods, so the all the textures should be there.

    2) Adding 4th unit (Breeland City Elites) ends up with the game crashing instantly.

    3) The battle models (swordsmen, dale_longbowmen and dismounted_huscarls) are already in the MOS modeldb file. Should I add those models to the modeldb again? Breeland City Elites unit isn't in the MOS modeldb.

    4) When I try to raise the model count number the game crashes instantly:

    Code:
    22 serialization::archive 3 0 0 0 0 1463 0 0
    Here's the syntax check log:

    Code:
    ****** Faction count error at line 390, count says 1 but number of entries is 0
    ****** Faction count error at line 447, count says 8 but number of entries is 6
    ****** String count  error at line 992, count says 0 but string has 1 characters 
    ****** String count  error at line 28758, count says 1 but string has 2 characters

    Any help would be greatly appreciated!
    Last edited by Magas of Cyrene; July 11, 2014 at 10:54 AM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    1. invisible or silver surfers? If the latter then the textures may not have been allocated properly in the modeldb, eg the faction isn't there or the path is incorrect
    2. how many units are in the EDU? More then 500 will cause a crash. Do a count of the 'ownership' entries with an editor like Notepad++
    3. if the model exists you obviously don't have to enter it again. You may have to add or edit the faction entries depending on your requirements
    4. without the modeldb it's not possible to check what the problem is regarding the syntax. By the looks of it it may be a problem with a custom faction that hasn't been added to the checker, see my tut.










  3. #63

    Default Re: Creating a World - Importing units from another mod

    1. Completely invisible - but the units are there (I can see the green markers).

    2. It's 499 units (ownership count=499). But if I remove any another unit, it still crashes. MTW works only after I remove the Breeland City Elites, here it is:

    Code:
    type             Breeland City Elites             ;Watchmen Axeguard Regiment MA1
    dictionary       Watchmen_Elite_Regiment      
    category         infantry
    class            missile
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          bree_guards, 60, 0, 1
    officer             eriador_captain_early_flag
    officer          br_dunedain_upg
    officer          br_dunedain_upg
    mount_effect     horse +1, camel +1, elephant -4
    attributes       sea_faring, hide_forest, hardy, can_withdraw, free_upkeep_unit, cannot_skirmish
    formation        1.4, 1.4, 2.8, 2.8, 6, square
    stat_health      1, 3
    stat_pri         10, 6, dwarven_crossbow_bolt, 120, 18, missile, missile_mechanical, piercing, none, 0, 1
    stat_pri_attr     area
    stat_sec         10, 6, no, 0, 0, melee, melee_blade, piercing, axe, 55, 1
    stat_sec_attr     ap, spear_bonus_4
    stat_pri_armour  9, 5, 0, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        8
    stat_ground      0, -1, 0, -2
    stat_mental      17, disciplined, trained
    stat_charge_dist 6
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 1080, 324, 75, 75, 1080, 4, 100
    armour_ug_levels 3, 4
    armour_ug_models bree_guards, bree_guards
    ownership      turks
    era 0            turks
    era 1            turks
    era 2            turks
    recruit_priority_offset    40
    3. You mean the faction entries in the modeldb? Like 5 turks etc?

    4. I've attached the modeldb to the post. The faction names are regular: sicily, denmark etc. It's the regular modeldb from the MOS submod to the Third Age mode.
    Attached Files Attached Files

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    The syntax errors are not fatal - just a matter of numbers in the next line instead of the previous one and the dunland faction wasn't edited into the python file.

    The bree_guards model for the Breeland City Elites unit does not exist in the modeldb and will cause the fatal crash.

    I have no idea why the other units are completely invisible - the only reason I can think off would be a translucent texture (alpha channel). Check that the path and texture name is correct, the remove the textures and try again - if you get silver surfers now then it's the textures themselves. If they stay invisible then I haven't got a clue and asking in the models and animation forum may shed light on this.










  5. #65

    Default Re: Creating a World - Importing units from another mod

    Thanks for the help.

    I've tried adding the bree_guards model to the modeldb, but it crashes when I increase the model count everytime...any idea why? Also, do I need to increase model count if I add unit upgrades as well? They use different models.

    I'll check those textures again and if it won't work I'll ask in the models & animation forum. Maybe it's something caused by the unit upgrades? The upgrades use different models, for example Bree City Swordsmen use swordsmen model and the upgrades use rswordsmen and rswordsmen_upg, here it is:

    Code:
    type             Breeland City Swordsmen        ;Watchmen Sword Regiment AF1
    dictionary                Watchmen_Sword_Regiment            
    category         infantry
    class            light
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          swordsmen, 70, 0, 1
    officer             eriador_captain_early_flag
    officer          br_dunedain_upg
    officer          br_dunedain_upg
    mount_effect     elephant +2
    attributes       sea_faring, hide_forest, can_withdraw, free_upkeep_unit
    formation        1.4, 1.4, 2.8, 2.8, 7, square
    stat_health      1, 3
    stat_pri         6, 3, no, 0, 0, melee, melee_blade, piercing, sword, 45, 1
    stat_pri_attr    no
    stat_sec         0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr    no
    stat_pri_armour  4, 3, 3, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        8
    stat_ground      0, -1, 0, -2
    stat_mental      14, normal, trained
    stat_charge_dist 6
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 630, 210, 125, 125, 630, 4, 100
    armour_ug_levels 2, 3
    armour_ug_models rswordsmen, rswordsmen_upg
    ownership        turks
    era 0            turks
    era 1            turks
    era 2            turks
    recruit_priority_offset    30
    By the way, this is of course copied from the other mod (Divide & Conquer) - the units work perfectly in it.
    Last edited by Magas of Cyrene; July 11, 2014 at 12:56 PM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    The soldier entry in the EDU is merely responsible for the animation of the model. The models used on the battle field are the entries in the armour_ug_models line. You need the correct texture for those models and have the correct faction entries in the modeldb file as well.

    Every model needs an increase in the count, and any ug model is an individual model and needs an increase.










  7. #67

    Default Re: Creating a World - Importing units from another mod

    Ah, I think this might be it - I'll test it and come back with results in a while. Thanks!

  8. #68

    Default Re: Creating a World - Importing units from another mod

    Didn't work again For testing purposes I've added this unit to the EDU:

    Code:
    type             Breeland City Swordsmen        ;Watchmen Sword Regiment AF1
    dictionary                Watchmen_Sword_Regiment            
    category         infantry
    class            light
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          swordsmen, 70, 0, 1
    officer             eriador_captain_early_flag
    officer          br_dunedain_upg
    officer          br_dunedain_upg
    mount_effect     elephant +2
    attributes       sea_faring, hide_forest, can_withdraw, free_upkeep_unit
    formation        1.4, 1.4, 2.8, 2.8, 7, square
    stat_health      1, 3
    stat_pri         6, 3, no, 0, 0, melee, melee_blade, piercing, sword, 45, 1
    stat_pri_attr    no
    stat_sec         0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr    no
    stat_pri_armour  4, 3, 3, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        8
    stat_ground      0, -1, 0, -2
    stat_mental      14, normal, trained
    stat_charge_dist 6
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 630, 210, 125, 125, 630, 4, 100
    armour_ug_levels 2, 3
    armour_ug_models rswordsmen, rswordsmen_upg
    ownership        turks
    era 0            turks
    era 1            turks
    era 2            turks
    recruit_priority_offset    30
    And added rswordsmen and rswordsmen_upg to the modeldb.

    Code:
    10 rswordsmen 
    1 1 
    48 unit_models/_Units/EN_Lmail_Hmail/rhsm_lod0.mesh 6400 
    3 
    5 turks 
    66 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_dale.texture 
    68 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_normal.texture 
    42 unit_sprites/scotland_rhovanion_sprite.spr 
    4 merc 
    66 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_dale.texture 
    68 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_normal.texture 
    42 unit_sprites/scotland_rhovanion_sprite.spr 
    5 slave 
    66 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_dale.texture 
    68 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_normal.texture 
    42 unit_sprites/scotland_rhovanion_sprite.spr 
    3 
    5 turks 
    51 unit_models/AttachmentSets/dale_equip2_diff.texture 
    51 unit_models/AttachmentSets/dale_equip2_norm.texture 0 
    4 merc 
    51 unit_models/AttachmentSets/dale_equip2_diff.texture 
    51 unit_models/AttachmentSets/dale_equip2_norm.texture 0 
    5 slave 
    51 unit_models/AttachmentSets/dale_equip2_diff.texture 
    51 unit_models/AttachmentSets/dale_equip2_norm.texture 0 
    1 
    4 None 
    14 MTW2_Swordsman 0 
    2 
    18 MTW2_Sword_Primary 14 fs_test_shield 
    0 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 
    14 rswordsmen_upg 
    1 1 
    48 unit_models/_Units/EN_Lmail_Hmail/rhsm_lod0.mesh 6400 
    3 
    5 turks 
    66 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_dale.texture 
    68 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_normal.texture 
    42 unit_sprites/scotland_rhovanion_sprite.spr 
    4 merc 
    66 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_dale.texture 
    68 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_normal.texture 
    42 unit_sprites/scotland_rhovanion_sprite.spr 
    5 slave 
    66 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_dale.texture 
    68 unit_models/_Units/EN_Lmail_Hmail/textures/rhovanion3_normal.texture 
    42 unit_sprites/scotland_rhovanion_sprite.spr 
    3 
    5 turks 
    51 unit_models/AttachmentSets/dale_equip2_diff.texture 
    51 unit_models/AttachmentSets/dale_equip2_norm.texture 0 
    4 merc 
    51 unit_models/AttachmentSets/dale_equip2_diff.texture 
    51 unit_models/AttachmentSets/dale_equip2_norm.texture 0 
    5 slave 
    51 unit_models/AttachmentSets/dale_equip2_diff.texture 
    51 unit_models/AttachmentSets/dale_equip2_norm.texture 0 
    1 
    4 None 
    14 MTW2_Swordsman 0 
    2 
    18 MTW2_Sword_Primary 14 fs_test_shield 
    0 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    As well as increased the model count from 1463 to:

    Code:
    22 serialization::archive 3 0 0 0 0 1465 0 0
    The game crashes when I increase the above number. When I leave it at 1463 the game starts, but the units are invisible (check the screenshots I've linked in this post). So I suspect that this is the reason this doesn't work. Maybe if I could increase the number to 1465 without the game crashing it would work properly and the units would visible?

    This is the syntax checker log:

    Code:
    ****** Faction count error at line 390, count says 1 but number of entries is 0
    ****** Faction count error at line 447, count says 8 but number of entries is 6
    ****** String count  error at line 992, count says 0 but string has 1 characters 
    ****** String count  error at line 28758, count says 1 but string has 2 characters
    I'm attaching the modeldb with those 2 new models to the post.

    Also, here's the screenshot of the invisible units:

    Attached Files Attached Files
    Last edited by Magas of Cyrene; July 11, 2014 at 02:57 PM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    By the look of the screenshot all three units are invisible.
    Apart from the model name rswordsmen and rswordsmen_upg are completely identical.

    Weirder things have happened, so try this: move your new entries up in the modeldDB, before the third or forth last, old model entry. Try with and without increasing the model count in the first line.










  10. #70

    Default Re: Creating a World - Importing units from another mod

    Wow, it actually worked - thanks a lot!

    The game didn't crash, but now I'm getting silver surfers:



    But at least there's progress I'll work on that now.

    UPDATE:

    It worked perfectly! I just moved the new entries from the end of the modeldb to the middle of it. And the silver surfers were caused by the wrong faction assignment in the modeldb, here they are in all their glory:



    Thanks Gigantus, you're a gentleman and a scholar

    Now I just need to edit the export_desrb_buildings and it's all done!

    By the way, maybe you should consider adding this tip to the tutorial? Some people might encounter the same problem I had.
    Last edited by Magas of Cyrene; July 12, 2014 at 05:29 AM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    It happens very rarely - most of the time it's a weird formatting issue within the modeldb file\model entry, an end of line FUBAR or something like that.

    Mighty glad it got sorted out. I'll add a recommendation regarding the placement within modeldB.










  12. #72

    Default Re: Creating a World - Importing units from another mod

    I've been trying to import he tomb kings' units from The Sundering mod. I've followed every step through and many times but the units do not spawn with console command - apparently they're not in-game. Help?

  13. #73

    Default Re: Creating a World - Importing units from another mod

    (Wanted to import them into medieval - to help Egypt in rising to defend their sacred resting places against heathen raiding crusaders) just for personal fun - no publishing

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    Are you having a crash? What message does the log give?










  15. #75

    Default Re: Creating a World - Importing units from another mod

    Hi again, I`m trying to add units to my mod, until weel after following all the steps in the tutorial when when I go and try to launch it, the game goes black screen and throw unspecified error. What might be causin` it? Thanks for your help

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    Most of the time you created an error in the modeldb file. What does the log say at the end?










  17. #77

    Default Re: Creating a World - Importing units from another mod

    Last Entry of the Log, not quite helpful ¬¬...

    19:47:10.720 [system.io] [info] exists: found mods/Broken_Crescent_kingdoms/data/unit_models/battle_models.modelDB (from: E:\Program Files (x86)\SEGA\Medieval 2 Total War)
    19:47:10.721 [system.io] [trace] file open,,mods/Broken_Crescent_kingdoms/data/unit_models/battle_models.modelDB,3930797
    19:47:10.721 [system.io] [info] open: found mods/Broken_Crescent_kingdoms/data/unit_models/battle_models.modelDB (from: E:\Program Files (x86)\SEGA\Medieval 2 Total War)
    04:53:27.710 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.
    Last edited by Ryousan; February 24, 2015 at 04:51 PM.

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    It confirms that your problem is in the modeldb file.

    If you have added an entry, did you increase the model count number in the first line?
    If you have copied entries, have you made sure that you included the trailing space at the end of each line?










  19. #79

    Default Re: Creating a World - Importing units from another mod

    This is the entry I made for the modeldb

    Code:
    19 Dismounted_Druzhina 
    1 4 
    63 unit_models/_Units/bulgars/dismounted_druchima_lod0.mesh 121 
    63 unit_models/_Units/bulgars/dismounted_druchima_lod1.mesh 900 
    63 unit_models/_Units/bulgars/dismounted_druchima_lod2.mesh 2500 
    63 unit_models/_Units/bulgars/dismounted_druchima_lod3.mesh 6400 
    1
    6 saxons 
    72 unit_models/_Units/bulgars/textures/EN_omail_omail_kievan.texture 
    72 unit_models/_Units/bulgars/textures/EN_omail_omail_normal.texture
    50 unit_sprites/russia_Dismounted_Druchima_sprite.spr
    1
    6 saxons 
    59 unit_models/AttachmentSets/Final Danish_kievan_diff.texture 
    59 unit_models/AttachmentSets/Final Danish_kievan_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
    This the count entry after I modified it. It was "1089" in the unmodified script

    Code:
    22 serialization::archive 3 0 0 0 0 1090 0 0

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

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Creating a World - Importing units from another mod

    On first glance the line count looks odd: the sprite line has 50 and the line above 72? I haven't got notepad++ with me which would make counting easy, but I guess that's where your problem is.
    The number in front of the line is the length of the entry in that line, disregard numbers at the end like in the mesh line. Check those numbers and then try again. There is a python based checker included in this resource of mine, it may work if the formatting of your modeldb file is correct for it.










Tags for this Thread

Posting Permissions

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