Results 1 to 12 of 12

Thread: CTD in battle load with custom unit

  1. #1

    Default CTD in battle load with custom unit

    Hello guys, can anyone help me? I find some posts related to this but none solved, soo i start this thread.
    I'm trying to add a Vanilla unit to a mod and I followed all the steps as if it were a new unit but something is going wrong when I try to use that unit in some battle as a test, the game crashes on the loading screen and a message appears of "Total War encountered an unspecified error and will now exit." is the second unit that I try to add to the mod and the first one worked well, but this one I don't know what I did wrong. I have checked all the meshs, texture and sprites and its apparently all ok

    this is my log.txt
    Code:
    01:03:11.105 [system.rpt] [always] CPU: SSE2
    01:03:11.105 [system.rpt] [always] ==== system log start, build date: Sep  5 2014 version development ===
    01:03:11.120 [system.io] [always] mounted pack packs/data_0.pack
    01:03:11.120 [system.io] [always] mounted pack packs/data_1.pack
    01:03:11.120 [system.io] [always] mounted pack packs/data_2.pack
    01:03:11.120 [system.io] [always] mounted pack packs/data_3.pack
    01:03:11.120 [system.io] [always] mounted pack packs/data_4.pack
    01:03:11.120 [system.io] [always] mounted pack packs/localized.pack
    01:03:49.882 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.
    export_descr_unit.txt i have changed the type and dictionary of the original unit and change in the UI/units and units_info too
    Code:
    type             Dismounted Golden Knights
    dictionary       Dismounted_Golden_Knights      ; Dismounted Golden Knights
    category         infantry
    class            heavy
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          Dismounted_English_Knights, 48, 0, 1.2
    attributes       sea_faring, hide_forest, hardy, can_withdraw
    formation        1.2, 1.2, 2.4, 2.4, 3, square
    stat_health      1, 0
    stat_pri         21, 6, no, 0, 0, melee, melee_blade, slashing, axe, 25, 1.33
    ;stat_pri_ex      0, 0, 0
    stat_pri_attr    ap
    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, 5, 0, metal
    ;stat_armour_ex   8, 9, 0, 0, 5, 0, 0, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      1, -2, 3, 2
    stat_mental      11, normal, trained
    stat_charge_dist 30
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 530, 225, 100, 75, 530, 4, 130
    armour_ug_levels 4, 5
    armour_ug_models Dismounted_English_Knights, Dismounted_English_Knights_ug1
    ownership        england
    era 1            england
    era 2            england
    ;unit_info        21, 0, 13
    recruit_priority_offset    25
    this is the battle_models.modeldb entry of this unit:
    Code:
    26 dismounted_english_knights 
    1 3 
    71 unit_models/_Units/EN_Pplate_Plate/dismounted_english_knights_lod0.mesh 121 
    71 unit_models/_Units/EN_Pplate_Plate/dismounted_english_knights_lod1.mesh 1225 
    71 unit_models/_Units/EN_Pplate_Plate/dismounted_english_knights_lod2.mesh 6400 
    1 
    7 england 
    74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_england.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    58 unit_sprites/england_Dismounted_English_Knights_sprite.spr 
    1 
    7 england 
    67 unit_models/AttachmentSets/Final Special Heads_england_diff.texture 
    67 unit_models/AttachmentSets/Final Special Heads_england_norm.texture 0  
    1 
    4 None 
    16 MTW2_Slow_2H_Axe 0  
    1 
    19 MTW2_2H_Axe_primary 0 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 
    30 dismounted_english_knights_ug1 
    1 3 
    75 unit_models/_Units/EN_Pplate_Plate/dismounted_english_knights_ug1_lod0.mesh 121 
    75 unit_models/_Units/EN_Pplate_Plate/dismounted_english_knights_ug1_lod1.mesh 1225 
    75 unit_models/_Units/EN_Pplate_Plate/dismounted_english_knights_ug1_lod2.mesh 6400 
    1 
    7 england 
    74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_england.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    62 unit_sprites/england_Dismounted_English_Knights_ug1_sprite.spr 
    1 
    7 england 
    67 unit_models/AttachmentSets/Final Special Heads_england_diff.texture 
    67 unit_models/AttachmentSets/Final Special Heads_england_norm.texture 0  
    1 
    4 None 
    16 MTW2_Slow_2H_Axe 0  
    1 
    19 MTW2_2H_Axe_primary 0 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002

  2. #2
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,265
    Blog Entries
    24

    Default Re: CTD in battle load with custom unit

    Seeing that it crashes when loading the battle I would assume that a supporting file is either faulty to not present. Only custom files need to be present but the path to default files needs to be correct.
    It could also be that you might have added the entry to the bottom of the modeldb file and not increased the model count number in the top line.




  3. #3

    Default Re: CTD in battle load with custom unit

    Quote Originally Posted by Gigantus View Post
    Seeing that it crashes when loading the battle I would assume that a supporting file is either faulty to not present. Only custom files need to be present but the path to default files needs to be correct.
    It could also be that you might have added the entry to the bottom of the modeldb file and not increased the model count number in the top line.
    I don't understand man, I checked all the files in
    >_units >> textures
    >attachmentsets
    >unit_sprites


    and they are all there, i have checked the modeldb count number too and add 2 for each unit because each unit have 2 entryes in modeldb, the game starts normal, go to menu and when a try to see if the units is working in a custom battle if i chose this unit the game crashes and a error mesage pops up. I will try to copy all the files of the vanilla game again of this unit.

  4. #4
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,265
    Blog Entries
    24

    Default Re: CTD in battle load with custom unit

    To see if it is indeed model related simply replace the three instances of Dismounted_English_Knights in the unit's EDU entry with a default infantry model. I would suggest to use Dismounted_Lithuanian_Cavalry

    Then test if it still crashes in custom battle, if it doesn't then you might end up with 'silversurfers' which is nothing to worry about, it's simply missing faction textures for the faction you are using.

    Did you create the little unit info pic for your custom unit? Asking because using the wrong format and size will cause a crash. For testing purpose remove that picture before you do the stuff above, you should then get the default peasant pic in custom battle.




  5. #5

    Default Re: CTD in battle load with custom unit

    Quote Originally Posted by Gigantus View Post
    To see if it is indeed model related simply replace the three instances of Dismounted_English_Knights in the unit's EDU entry with a default infantry model. I would suggest to use Dismounted_Lithuanian_Cavalry

    Then test if it still crashes in custom battle, if it doesn't then you might end up with 'silversurfers' which is nothing to worry about, it's simply missing faction textures for the faction you are using.
    I don't have "Dismounted_Lithuanian_Cavalry" in this mod I think, could it be another unit of the mod ?? What lines do I need to change besides "Soldier" ??

    Did you create the little unit info pic for your custom unit? Asking because using the wrong format and size will cause a crash. For testing purpose remove that picture before you do the stuff above, you should then get the default peasant pic in custom battle.
    I used the original vanilla game files for the unit info and the picture. but i will see if this is the problem.

  6. #6

    Default Re: CTD in battle load with custom unit

    A strange thing happened here, I deleted the TGA files from this specific unit, but the image of the peasant did not appear, the unit remained with its original image. And the error when selec the unit to enter in battles persists.

  7. #7

    Default Re: CTD in battle load with custom unit

    Quote Originally Posted by Gigantus View Post
    To see if it is indeed model related simply replace the three instances of Dismounted_English_Knights in the unit's EDU entry with a default infantry model. I would suggest to use Dismounted_Lithuanian_Cavalry

    Then test if it still crashes in custom battle, if it doesn't then you might end up with 'silversurfers' which is nothing to worry about, it's simply missing faction textures for the faction you are using.
    Yes, this worked, the silversurfers have appeared but i can enter in battle with the unit.

  8. #8
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,265
    Blog Entries
    24

    Default Re: CTD in battle load with custom unit

    Reappearing picture: I was under the impression this was a custom unit but the reappearance suggests that it is either a default unit (certainly not) or that you have issues with the virtual store. The latter you can check here. Just confirming: you removed the unit pictures from the 'england' sub directories?

    Working but with silver surfers: this confirms that something is wrong with the file references in modeldb or the files themselves. If the references (path and name) are correct then it will come down to faulty files. The files are actually default files, for example the mesh files (unit_models/_Units/EN_Pplate_Plate/dismounted_english_knights_lod0.mesh) are in the packed files. Please check if the same files are present in your mod, if so then they will most likely be faulty and need to be removed so that they can be automatically replaced by the packed default files.

    As far as I could see all the files in the dismounted_english_knights and dismounted_english_knights_ug1 entry in the modeldb are present in the packed files and therefore do not need to be present in the mod.




  9. #9

    Default Re: CTD in battle load with custom unit

    Quote Originally Posted by Gigantus View Post
    Reappearing picture: I was under the impression this was a custom unit but the reappearance suggests that it is either a default unit (certainly not) or that you have issues with the virtual store. The latter you can check here. Just confirming: you removed the unit pictures from the 'england' sub directories?
    Yes, it's a default unit of the Medieval 2 base game. and i have removed the pictures from 'england' folder in the mod's data folder, which had the same faction folder as in the vanilla game. I had added these base game files of this unit to this mod folder earlier.

    As far as I could see all the files in the dismounted_english_knights and dismounted_english_knights_ug1 entry in the modeldb are present in the packed files and therefore do not need to be present in the mod.
    Yes, I didn't know that, so I ended up unpacking the files from the original medieval 2 pack files and added the files from this default unit to the _units folder(as well as the files in unit_sprites and AttachmentSets folder etc.)

    sorry for the late reply, i haven't had much time to be on the PC lately :/

  10. #10
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,265
    Blog Entries
    24

    Default Re: CTD in battle load with custom unit

    Rule of thumb: you do not need to add unedited unpacked files to your mod. As you can see with the unit picture the game automatically uses the packed files if the files are not present in the mod.




  11. #11

    Default Re: CTD in battle load with custom unit

    Quote Originally Posted by Gigantus View Post
    Rule of thumb: you do not need to add unedited unpacked files to your mod. As you can see with the unit picture the game automatically uses the packed files if the files are not present in the mod.
    ok, i will try to reinstall the whole thing, the game and the mods and retry add these units to the mod without unpacking nothing, and see if this works.

  12. #12
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    48,265
    Blog Entries
    24

    Default Re: CTD in battle load with custom unit

    If you ever need to unpack files use this method - it will unpack the files outside the game directory making it easy to remove them if you need space. It will also serve as a back up of those files in case you need an original again.




Posting Permissions

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