Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: Error adding unit to M2TW

Hybrid View

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

    Icon4 Error adding unit to M2TW

    Hi dudes, I was trying of modding m2tw and a CTD appears, it wanted that you were checking my entry in DMB and of the EDU and to say to me that it is bad.
    DMB:
    Code:
    19 dismounted_drengjar 
    1 4 
    55 unit_models/_Units/ln_peasant_padded/drengjar_lod0.mesh 121 
    55 unit_models/_Units/ln_peasant_padded/drengjar_lod0.mesh 900 
    55 unit_models/_Units/ln_peasant_padded/drengjar_lod0.mesh 2500 
    55 unit_models/_Units/ln_peasant_padded/drengjar_lod0.mesh 6400 
    1 
    8 scotland 
    62 unit_models/_Units/ln_peasant_padded/textures/drengjar.texture  
    69 unit_models/_Units/ln_peasant_padded/textures/drengjar_normal.texture
    45 unit_sprites/france_Voulge_Militia_sprite.spr
    1 
    8 scotland 
    62 unit_models/_Units/ln_peasant_padded/textures/drengjar.texture
    62 unit_models/_Units/ln_peasant_padded/textures/drengjar_normal.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
    EDU:
    Code:
    type             Dismounted Drengjar
    dictionary       Dismounted_Drengjar      ; Drengjar
    category         infantry
    class            heavy
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          Dismounted_Drengjar, 48, 0, 1.2
    attributes       sea_faring, hide_forest, hardy, can_withdraw
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 0
    stat_pri         13, 3, 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  8, 8, 6, leather
    ;stat_armour_ex   8, 9, 0, 0, 8, 6, 6, leather
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      1, -2, 3, 2
    stat_mental      9, normal, trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 610, 150, 90, 70, 610, 4, 150
    armour_ug_levels 4, 5
    armour_ug_models Armored_Swordsmen, Armored_Swordsmen_ug1
    ownership        scotland
    era 1            scotland
    era 2            scotland
    ;unit_info        13, 0, 22


    Edit: This appears in the error logs
    Code:
    18:06:13.131 [system.rpt] [always] CPU: SSE2
    18:06:13.131 [system.rpt] [always] ==== system log start, build date: Jun 25 2007 version bld-medieval2-update2.1-30 (43169) ===
    18:06:13.146 [system.io] [always] mounted pack packs/data_0.pack
    18:06:13.146 [system.io] [always] mounted pack packs/data_1.pack
    18:06:13.146 [system.io] [always] mounted pack packs/data_2.pack
    18:06:13.146 [system.io] [always] mounted pack packs/data_3.pack
    18:06:13.146 [system.io] [always] mounted pack packs/data_4.pack
    18:06:13.146 [system.io] [always] mounted pack packs/localized.pack
    18:06:17.628 [script.err] [error] Script Error in data/export_descr_unit.txt, at line 14772, column 2
    Could not find soldier battle model for unit type 'Dismounted_Drengjar'.
    18:06:17.628 [data.invalid] [error] DATABASE_TABLE error found : error reading record from file data/export_descr_unit.txt.
    Last edited by Tal-Rham Soldier; January 11, 2011 at 03:06 PM.

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

    Default Re: Error adding unit to M2TW

    At the top of your battle_models.modeldb you find this line:

    22 serialization::archive 3 0 0 0 0 1019 0 0

    The number in red needs raising by 1 every time you make a new entry.

  3. #3

    Default Re: Error adding unit to M2TW

    i'm using formated modeldb in kingdoms gold edition

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

    Default Re: Error adding unit to M2TW

    Quote Originally Posted by Tal-Rham Soldier View Post
    i'm using formated modeldb in kingdoms gold edition
    It makes no difference what you're using, and frankly I don't know why you told me. But if you don't do as I described then it won't work, and you'll get that error message you've got. It's the solution to your problem to add +1 to the serialization number at the top of the file.
    Last edited by Taiji; January 11, 2011 at 06:42 PM.

  5. #5

    Default Re: Error adding unit to M2TW

    Quote Originally Posted by Taiji View Post
    It's the solution to your problem to add +1 to the serialization number at the top of the file.
    No, the game crash and i donīt know whatīs the mistake

  6. #6
    Civis
    Join Date
    Apr 2010
    Location
    France
    Posts
    130

    Default Re: Error adding unit to M2TW

    And this is probably also a cause of CTD :

    Code:
    soldier          Dismounted_Drengjar, 48, 0, 1.2
    .........
    armour_ug_models Armored_Swordsmen, Armored_Swordsmen_ug1
    soldier and armour ug_models different, try this :
    Code:
    soldier          Dismounted_Drengjar, 48, 0, 1.2
    .........
    armour_ug_models Dismounted_Drengjar, Dismounted_Drengjar
    And did you raise the number that Taiji pointed ?

  7. #7

    Default Re: Error adding unit to M2TW

    Quote Originally Posted by Dwaine View Post
    And this is probably also a cause of CTD :

    Code:
    soldier          Dismounted_Drengjar, 48, 0, 1.2
    .........
    armour_ug_models Armored_Swordsmen, Armored_Swordsmen_ug1
    soldier and armour ug_models different, try this :
    Code:
    soldier          Dismounted_Drengjar, 48, 0, 1.2
    .........
    armour_ug_models Dismounted_Drengjar, Dismounted_Drengjar
    No, nothing changes. I think that the EDU file doesn't recognize DMB's model for a reason, since says that the entry in DMB does not exist
    Last edited by Tal-Rham Soldier; January 11, 2011 at 05:01 PM.

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

    Default Re: Error adding unit to M2TW

    The log tells you the mistake:

    Quote Originally Posted by Tal-Rham Soldier View Post
    Code:
    18:06:17.628 [script.err] [error] Script Error in data/export_descr_unit.txt, at line 14772, column 2
    Could not find soldier battle model for unit type 'Dismounted_Drengjar'.
    18:06:17.628 [data.invalid] [error] DATABASE_TABLE error found : error reading record from file data/export_descr_unit.txt.
    It says the game cannot find your battle_model entry.

    You have to increase this number by 1:
    Code:
    22 serialization::archive 3 0 0 0 0 XXX 0 0
    You will find it at the top of the list of entries in battle_models.modeldb.
    Last edited by Taiji; January 11, 2011 at 09:46 PM.

  9. #9

    Default Re: Error adding unit to M2TW

    Quote Originally Posted by Taiji View Post
    You have to increase this number by 1:
    Code:
    22 serialization::archive 3 0 0 0 0 XXX 0 0
    You will find it at the top of the list of entries in battle_models.modeldb.
    Thatīs i trying to tell you, when i do that the game crashes. It will be that the game is the kingdoms or not?

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

    Default Re: Error adding unit to M2TW

    So when you say 'no' you mean 'I tried what you suggested'? .... Wow that is confusing for me, it's why I've had to repeat myself twice.

    Back to the problem you have: It must be a faulty battle_models entry, that's what causes a crash when you raise that number.

    Code:
    8 scotland 
    62 unit_models/_Units/ln_peasant_padded/textures/drengjar.texture
    62 unit_models/_Units/ln_peasant_padded/textures/drengjar_normal.texture 0
    That number above is supposed to count the characters in the line, but there are 69 characters in that line.

    So that's one mistake which will cause a CTD, and perhaps that's it, but check the other character-counts to make sure.
    Last edited by Taiji; January 12, 2011 at 09:39 AM.

  11. #11

    Default Re: Error adding unit to M2TW

    1st: Sorry for my bad english i'm spanish

    2nd:I tried all that and not works

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

    Default Re: Error adding unit to M2TW

    Code:
    19 dismounted_drengjar 
    1 4 
    55 unit_models/_Units/ln_peasant_padded/drengjar_lod0.mesh 121 
    55 unit_models/_Units/ln_peasant_padded/drengjar_lod0.mesh 900 
    55 unit_models/_Units/ln_peasant_padded/drengjar_lod0.mesh 2500 
    55 unit_models/_Units/ln_peasant_padded/drengjar_lod0.mesh 6400 
    1 
    8 scotland 
    62 unit_models/_Units/ln_peasant_padded/textures/drengjar.texture 
    69 unit_models/_Units/ln_peasant_padded/textures/drengjar_normal.texture 
    45 unit_sprites/france_Voulge_Militia_sprite.spr 
    1 
    8 scotland 
    62 unit_models/_Units/ln_peasant_padded/textures/drengjar.texture 
    69 unit_models/_Units/ln_peasant_padded/textures/drengjar_normal.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
    Try that. You had spaces missing.

  13. #13

    Default Re: Error adding unit to M2TW

    You tried that code? I tried but don't work

  14. #14

    Default Re: Error adding unit to M2TW

    Okay i use the original DMB i put the code as like in vanilla i add the serialization archive to 702 and....
    WORKS!!!



    But why the sheen?

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

    Default Re: Error adding unit to M2TW

    Quote Originally Posted by Tal-Rham Soldier View Post
    You tried that code? I tried but don't work
    I corrected the mistakes I found for you, I don't need to try it. Maybe you missed the space off this line:

    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 <<<<<

    Quote Originally Posted by Tal-Rham Soldier View Post
    But why the sheen?
    Did you remember it's 69 characters and not 62?:

    8 scotland
    62 unit_models/_Units/ln_peasant_padded/textures/drengjar.texture
    69 unit_models/_Units/ln_peasant_padded/textures/drengjar_normal.texture 0
    Last edited by Taiji; January 12, 2011 at 11:57 AM.

  16. #16

    Default Re: Error adding unit to M2TW

    Quote Originally Posted by Taiji View Post
    Did you remember it's 69 characters and not 62?:

    8 scotland
    62 unit_models/_Units/ln_peasant_padded/textures/drengjar.texture
    69 unit_models/_Units/ln_peasant_padded/textures/drengjar_normal.texture 0
    I change that before the DMB entry works, The normalmap form it's the problem?

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

    Default Re: Error adding unit to M2TW

    You have entered 69 for the character count and there are 2 spaces after the 0?

    Are there spaces at the end of every line as well?

    Are you sure it's the correct attachment set texture?

    It is strange that it is the same texture for attachment and body, but if you are importing a model from another mod then perhaps some modder does this.

  18. #18

    Default Re: Error adding unit to M2TW

    Thanks friend, i fixed the DMB entry and works perfectly, i edited the alpha channel of the normalmap

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

    Default Re: Error adding unit to M2TW

    Well done, glad to hear it

  20. #20

    Default Re: Error adding unit to M2TW

    Hey i have another trouble, all units in game have as name Unlocalised Placement Text
    (I try not to create any more unnecessary topics posting here)

Page 1 of 2 12 LastLast

Posting Permissions

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