Results 1 to 16 of 16

Thread: help please ... something wrong in the new unit !!!

Hybrid View

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

    Default help please ... something wrong in the new unit !!!

    hello
    i am trying to make a new unit like the urban militia unit .
    but when i try to start the game i got a ctd
    i use m2 v1.3 and kingdoms v1.05 .

    i hope someone tell me what is wrong ....


    _____________________________________________________________________________________

    type sokar Militia
    dictionary sokar_Militia ; sokar Militia
    category infantry
    class heavy
    voice_type Heavy
    banner faction main_infantry
    banner holy crusade
    soldier sokar_Militia, 48, 0, 1.2
    attributes sea_faring, hide_forest, can_withdraw, free_upkeep_unit
    formation 1.2, 1.2, 2.4, 2.4, 4, square
    stat_health 1, 0
    stat_pri 11, 2, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    ;stat_pri_ex 0, 0, 0
    stat_pri_attr no
    stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
    ;stat_sec_ex 0, 0, 0
    stat_sec_attr no
    stat_pri_armour 5, 7, 6, metal
    ;stat_armour_ex 5, 7, 0, 0, 7, 6, 6, metal
    stat_sec_armour 0, 0, flesh
    stat_heat 1
    stat_ground 1, 1, 0, -1
    stat_mental 5, normal, trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 400, 125, 75, 55, 400, 4, 100
    armour_ug_levels 2, 3
    armour_ug_models sokar_Militia, sokar_Militia_ug1
    ownership moors
    era 1 moors
    era 2 moors
    ;unit_info 11, 0, 18

    _____________________________________________________________________________________

    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    13 sokar_militia
    1 3
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod0.mesh 121
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod1.mesh 1225
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod2.mesh 6400
    1
    5 moors
    85 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_moors.texture
    86 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_normal.texture
    43 unit_sprites/moors_Urban_Militia_sprite.spr
    1
    5 moors
    60 unit_models/AttachmentSets/Final ME Heavy_moors_diff.texture
    60 unit_models/AttachmentSets/Final ME Heavy_moors_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
    17 sokar_militia_ug1
    1 4
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod0.mesh 121
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod1.mesh 900
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod2.mesh 2500
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod3.mesh 6400
    1
    5 moors
    62 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_moors.texture
    63 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_normal.texture
    47 unit_sprites/moors_Urban_Militia_ug1_sprite.spr
    1
    5 moors
    60 unit_models/AttachmentSets/Final ME Heavy_moors_diff.texture
    60 unit_models/AttachmentSets/Final ME Heavy_moors_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


    _____________________________________________________________________________________

    {Sokar_Militia}Sokar Militia
    {Sokar_Militia_descr}These Urban Militia are well armoured and trained troops, far superior to most militias who are little more than levied peasants. Used widely by the Alohas to garrison and defend settlements in Moorish occupied Spain and Portugal, these troops are equipped with a sword and are a useful addition to any army.
    {Sokar_Militia_descr_short}Equipped with a sword, well trained and protected by heavy armour these troops are far superior to most militias.

    _____________________________________________________________________________________

  2. #2
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: help please ... something wrong in the new unit !!!

    what does the log says?
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  3. #3

    Default Re: help please ... something wrong in the new unit !!!

    Hi sokar2sokar,

    For starters, you made an error in your battle_models.model.db.
    Please delete the red shown below.
    - There are 3 entries for the sokar_militia model, hence 3.
    - There are 4 entries for the sokar_militia_ug1 model, hence 4.
    ------------

    13 sokar_militia
    1 3
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod0.mesh 121
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod1.mesh 1225
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod2.mesh 6400
    1
    5 moors
    85 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_moors.texture
    86 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_normal.texture
    43 unit_sprites/moors_Urban_Militia_sprite.spr
    1
    5 moors
    60 unit_models/AttachmentSets/Final ME Heavy_moors_diff.texture
    60 unit_models/AttachmentSets/Final ME Heavy_moors_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
    17 sokar_militia_ug1
    1 4
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod0.mesh 121
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod1.mesh 900
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod2.mesh 2500
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod3.mesh 6400
    1
    5 moors
    62 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_moors.texture
    63 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_normal.texture
    47 unit_sprites/moors_Urban_Militia_ug1_sprite.spr
    1
    5 moors
    60 unit_models/AttachmentSets/Final ME Heavy_moors_diff.texture
    60 unit_models/AttachmentSets/Final ME Heavy_moors_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


    Last edited by brandybarrel; September 06, 2009 at 02:42 PM.
    brandybarrel's BattleAxe and Unit Guide Links:





  4. #4

    Default Re: help please ... something wrong in the new unit !!!

    Quote Originally Posted by brandybarrel View Post
    Hi sokar2sokar,

    For starters, you made an error in your battle_models.model.db.
    Please delete the red shown below.
    - There are 3 entries for the sokar_militia model, hence 3.
    - There are 4 entries for the sokar_militia_ug1 model, hence 4.
    ------------

    13 sokar_militia
    1 3
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod0.mesh 121
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod1.mesh 1225
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod2.mesh 6400
    1
    5 moors
    85 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_moors.texture
    86 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_normal.texture
    43 unit_sprites/moors_Urban_Militia_sprite.spr
    1
    5 moors
    60 unit_models/AttachmentSets/Final ME Heavy_moors_diff.texture
    60 unit_models/AttachmentSets/Final ME Heavy_moors_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
    17 sokar_militia_ug1
    1 4
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod0.mesh 121
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod1.mesh 900
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod2.mesh 2500
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod3.mesh 6400
    1
    5 moors
    62 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_moors.texture
    63 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_normal.texture
    47 unit_sprites/moors_Urban_Militia_ug1_sprite.spr
    1
    5 moors
    60 unit_models/AttachmentSets/Final ME Heavy_moors_diff.texture
    60 unit_models/AttachmentSets/Final ME Heavy_moors_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



    i did it but i still got a ctd

  5. #5

    Default Re: help please ... something wrong in the new unit !!!

    nothing ... there is no message just the crash

  6. #6

    Default Re: help please ... something wrong in the new unit !!!

    thank you very much brandybarrel ...

    but can you tell me what that number is ?

    thank you ?

  7. #7
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: help please ... something wrong in the new unit !!!

    That would make it crash, Brandybarrel.

    Sokar, did you add 2 to the number at the top of the list?

    e.g. this line: 22 serialization::archive 3 0 0 0 0 994 0 0 <- and the number to increase is in bold there.

    If you add entries in battle_models you have to increase it accordingly.
    Last edited by Taiji; September 06, 2009 at 02:47 PM.

  8. #8

    Default Re: help please ... something wrong in the new unit !!!

    Your quite right, I didn't notice he had a space in between.
    My model file is parsed differently and would look like this.
    I have to look at his problem more.

    13 sokar_militia
    1
    3
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod0.mesh 121
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod1.mesh 1225
    67 unit_models/_Units/ME_Light_Mail_Heavy_Mail/urban_militia_lod2.mesh 6400
    1
    5 moors
    85 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_moors.texture
    86 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_normal.texture
    43 unit_sprites/moors_Urban_Militia_sprite.spr
    1
    5 moors
    60 unit_models/AttachmentSets/Final ME Heavy_moors_diff.texture
    60 unit_models/AttachmentSets/Final ME Heavy_moors_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
    17 sokar_militia_ug1
    1
    4
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod0.mesh 121
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod1.mesh 900
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod2.mesh 2500
    54 unit_models/_Units/ES_Mail/urban_militia_ug1_lod3.mesh 6400
    1
    5 moors
    62 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_moors.texture
    63 unit_models/_Units/ES_Mail/textures/mtw2_ES_Mail_normal.texture
    47 unit_sprites/moors_Urban_Militia_ug1_sprite.spr
    1
    5 moors
    60 unit_models/AttachmentSets/Final ME Heavy_moors_diff.texture
    60 unit_models/AttachmentSets/Final ME Heavy_moors_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


    EDIT: Good point Taiji

    in this case he would have to increase the count by 2
    Last edited by brandybarrel; September 06, 2009 at 02:57 PM.
    brandybarrel's BattleAxe and Unit Guide Links:





  9. #9

    Default Re: help please ... something wrong in the new unit !!!

    Quote Originally Posted by Taiji View Post
    That would make it crash, Brandybarrel.

    Sokar, did you add 2 to the number at the top of the list?

    e.g. this line: 22 serialization::archive 3 0 0 0 0 994 0 0 <- and the number to increase is in bold there.

    If you add entries in battle_models you have to increase it accordingly.

    i am sorry i can not understand you
    my english is weak ...

  10. #10

    Default Re: help please ... something wrong in the new unit !!!

    At the very top of the battle_models.model.db file you will see this line:

    22 serialization::archive 3 0 0 0 0 8340 0

    You have to increase the count of the line by 2 because you added two models.

    So, in the above example, you would now have:

    22 serialization::archive 3 0 0 0 0 836 0 0
    brandybarrel's BattleAxe and Unit Guide Links:





  11. #11
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: help please ... something wrong in the new unit !!!

    Also in the EDU:

    dictionary sokar_Militia ; sokar Militia

    Should be:

    dictionary Sokar_Militia

    To match the export_units.txt entry.

    Both of the issues I've mentioned so far would cause the error to be logged, so perhaps they are not causing the issue at hand but they will be a problem.

  12. #12

    Default Re: help please ... something wrong in the new unit !!!

    thanks all of you
    i finally did it ...




  13. #13

    Default Re: help please ... something wrong in the new unit !!!

    i am so grateful ...

  14. #14

    Default Re: help please ... something wrong in the new unit !!!

    Congratulations!!!

    Enjoy your new unit.
    brandybarrel's BattleAxe and Unit Guide Links:





  15. #15
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: help please ... something wrong in the new unit !!!

    Well done, Sokar

  16. #16
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: help please ... something wrong in the new unit !!!

    Congrats.



    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

Posting Permissions

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