Results 1 to 30 of 652

Thread: A start on the .MESH file format

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: A start on the .MESH file format

    Yeah, 16 is index of the bone_lhand in the bone strings section of
    the mesh file. Good spot on the squares of the distance values
    for the mesh section of the modeldb.

  2. #2
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: A start on the .MESH file format

    This part

    <BoneMap>unit_models\BoneMaps\soldier_bone_map_new.xml</BoneMap>
    must reference a file that looks something like

    Code:
    bone_pelvis                  ,    none               
    bone_rthigh                  ,    bone_pelvis        
    bone_rlowerleg               ,    bone_rthigh        
    bone_rfoot                   ,    bone_rlowerleg     
    bone_abs                     ,    bone_pelvis        
    bone_torso                   ,    bone_abs           
    bone_head                    ,    bone_torso         
    bone_jaw                     ,    bone_head          
    bone_eyebrow                 ,    bone_head          
    bone_rclavical               ,    bone_torso         
    bone_rupperarm               ,    bone_rclavical     
    bone_relbow                  ,    bone_rupperarm     
    bone_rhand                   ,    bone_relbow        
    bone_lclavical               ,    bone_torso         
    bone_lupperarm               ,    bone_lclavical     
    bone_lelbow                  ,    bone_lupperarm     
    bone_lhand                   ,    bone_lelbow        
    bone_lthigh                  ,    bone_pelvis        
    bone_llowerleg               ,    bone_lthigh        
    bone_lfoot                   ,    bone_llowerleg     
    bone_weapon_weapon01         ,    bone_rhand         
    bone_weapon                  ,    bone_rhand         
    bone_weapon02                ,    bone_rhand         
    bone_weapon03                ,    bone_rhand         
    bone_shield01                ,    bone_lhand         
    bone_shield                  ,    bone_lhand
    for standard units, first column is child, second column parent.

    Must have separate files for horses, camels, elephants,
    and artillery. My external file for doing elephants looks
    like

    Code:
    bone_E_platform              ,    none                          
    bone_E_back                  ,    bone_E_platform               
    bone_E_right back thigh      ,    bone_E_back                   
    bone_E_right back lower leg  ,    bone_E_right back thigh       
    bone_E_right back foot       ,    bone_E_right back lower leg   
    bone_E_left back thigh       ,    bone_E_back                   
    bone_E_left back lower leg   ,    bone_E_left back thigh        
    bone_E_left back foot        ,    bone_E_left back lower leg    
    bone_E_head                  ,    bone_E_back                   
    bone_E_trunk 1               ,    bone_E_head                   
    bone_E_trunk 2               ,    bone_E_trunk 1                
    bone_E_trunk 3               ,    bone_E_trunk 2                
    bone_E_trunk 4               ,    bone_E_trunk 3                
    bone_E_right ear main        ,    bone_E_head                   
    bone_E_right ear tip         ,    bone_E_right ear main         
    bone_E_left ear main         ,    bone_E_head                   
    bone_E_left ear tip          ,    bone_E_left ear main          
    bone_E_right front thigh     ,    bone_back                     
    bone_E_right front lower leg ,    bone_right front thigh        
    bone_E_right front foot      ,    bone_right front lower leg    
    bone_E_left front thigh      ,    bone_back                     
    bone_E_left front lower leg  ,    bone_left front thigh         
    bone_E_left front foot       ,    bone_left front lower leg
    Haven't had time to get the trebuchet debugged so I haven't pulled
    out anymore skeletons than horses, camels, and elephants.

  3. #3

    Default Re: A start on the .MESH file format

    @GOM

    Happy to test it again and again Just one question, should the dismounted quapukulu actually be named dismounted late general's bodyguard? I think they two are more similar


  4. #4

    Default Re: A start on the .MESH file format

    Hi all

    @Zxiang (The Hospitaller meshes should be in your mailbox)

    Quote Originally Posted by zxiang1983
    @GOM

    Happy to test it again and again Just one question, should the dismounted quapukulu actually be named dismounted late general's bodyguard? I think they two are more similar
    I was working off the picture AD1 posted, the figure shown used one of the variations of quakupulu_ug1 so that's what I used.

    @All - I've been busy testing trying to find a bug I found only once and haven't been able to recreate, so I've been using it to make more figures while I wait for the bug to resurface. I've used the basic figure of the main Quakupulu this time rather than the ug1 variant and taken out the lance and maces and given him a spear and scimitars. The zip (I just went and checked for the third time and it does contain meshes this time) is at http://rapidshare.com/files/22965997...spear.zip.html.

    Cheers

    GrumpyOldMan

  5. #5

    Default Re: A start on the .MESH file format

    The hospitaller is really, really awesome and works perfect in game!! Grumpyoldman you are definitely a genius!
    Let's see the first living dismounted knights hospitaller in M2TW:





    Edit: I forgot to paste the codes:

    in battle_models.modeldb:
    Code:
    30 dismounted_knights_hospitaller 
    1 4 
    74 unit_models/_Units/EN_Lmail_Hmail/dismounted_knights_hospitaller_lod0.mesh 121 
    74 unit_models/_Units/EN_Lmail_Hmail/dismounted_knights_hospitaller_lod1.mesh 900 
    74 unit_models/_Units/EN_Lmail_Hmail/dismounted_knights_hospitaller_lod2.mesh 2500 
    74 unit_models/_Units/EN_Lmail_Hmail/dismounted_knights_hospitaller_lod3.mesh 6400 
    10 
    7 england 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    51 unit_sprites/england_Knights_Hospitaller_sprite.spr 
    8 scotland 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    52 unit_sprites/scotland_Knights_Hospitaller_sprite.spr 
    6 france 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    50 unit_sprites/france_Knights_Hospitaller_sprite.spr 
    7 denmark 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    51 unit_sprites/denmark_Knights_Hospitaller_sprite.spr 
    5 milan 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    49 unit_sprites/milan_Knights_Hospitaller_sprite.spr 
    6 venice 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    50 unit_sprites/venice_Knights_Hospitaller_sprite.spr 
    12 papal_states 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    56 unit_sprites/papal_states_Knights_Hospitaller_sprite.spr 
    6 sicily 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    50 unit_sprites/sicily_Knights_Hospitaller_sprite.spr 
    6 poland 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    50 unit_sprites/poland_Knights_Hospitaller_sprite.spr 
    7 hungary 
    77 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hospitaller.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    51 unit_sprites/hungary_Knights_Hospitaller_sprite.spr 
    10 
    7 england 
    68 unit_models/AttachmentSets/Final Heater Special_england_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_england_norm.texture 0  
    8 scotland 
    69 unit_models/AttachmentSets/Final Heater Special_scotland_diff.texture 
    69 unit_models/AttachmentSets/Final Heater Special_scotland_norm.texture 0  
    6 france 
    67 unit_models/AttachmentSets/Final Heater Special_france_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_france_norm.texture 0  
    7 denmark 
    68 unit_models/AttachmentSets/Final Heater Special_denmark_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_denmark_norm.texture 0  
    5 milan 
    66 unit_models/AttachmentSets/Final Heater Special_milan_diff.texture 
    66 unit_models/AttachmentSets/Final Heater Special_milan_norm.texture 0  
    6 venice 
    67 unit_models/AttachmentSets/Final Heater Special_venice_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_venice_norm.texture 0  
    12 papal_states 
    73 unit_models/AttachmentSets/Final Heater Special_papal_states_diff.texture 
    73 unit_models/AttachmentSets/Final Heater Special_papal_states_norm.texture 0  
    6 sicily 
    67 unit_models/AttachmentSets/Final Heater Special_sicily_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_sicily_norm.texture 0  
    6 poland 
    67 unit_models/AttachmentSets/Final Heater Special_poland_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_poland_norm.texture 0  
    7 hungary 
    68 unit_models/AttachmentSets/Final Heater Special_hungary_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_hungary_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
    in EDU:
    Code:
    type             dismounted knights hospitaller
    dictionary       dismounted_knights_hospitaller      ; dismounted knights hospitaller
    category         infantry
    class            heavy
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          dismounted_knights_hospitaller, 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         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  7, 8, 6, metal
    ;stat_armour_ex   7, 8, 0, 0, 8, 6, 6, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        5
    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, 570, 225, 90, 70, 570, 4, 140
    armour_ug_levels 3
    armour_ug_models dismounted_knights_hospitaller
    ownership        england, scotland, france, denmark, milan, venice, papal_states, sicily, poland, hungary
    ;unit_info        13, 0, 21
    Last edited by zxiang1983; 03-27-2007 at 05:30.

  6. #6
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: A start on the .MESH file format

    @GOM
    Don't know if this is related, but I've updated my Python
    script to include the 4 -> 2 int change for higher lods after
    the vertex vectors. Game still crashed after loading until
    I realized I had "characterlod0" hard-coded in my Python script.
    Changed this to characterlod# where # followed the input lod number
    of the file. Still crashed. Finally looked at my debugging output and
    realized that lod3 still wants to be called characterlod2, at least
    for armored_sergeants. Are you seeing this in your code
    and is it related to your transient error?

  7. #7

    Default Re: A start on the .MESH file format

    Hi KE

    Quote Originally Posted by KnightErrant
    @GOM
    Don't know if this is related, but I've updated my Python
    script to include the 4 -> 2 int change for higher lods after
    the vertex vectors. Game still crashed after loading until
    I realized I had "characterlod0" hard-coded in my Python script.
    Changed this to characterlod# where # followed the input lod number
    of the file. Still crashed. Finally looked at my debugging output and
    realized that lod3 still wants to be called characterlod2, at least
    for armored_sergeants. Are you seeing this in your code
    and is it related to your transient error?
    Sorry this is something that I should have let you know about, I was still crashing until I modified a lod2 to lod3 (I thought that the lod3 was the problem) and forgot to change the characterlod2 and voila, everything ran. Apologies again, I was very remiss in not letting you know. So yes, lod3 is listed as characterlod2 in the mesh file. I'm not sure why these entries are there, but if we know where they go, and place them in new files and it works.......ignorance is bliss!

    Cheers

    GrumpyOldMan

  8. #8

    Default Re: A start on the .MESH file format

    Quote Originally Posted by zxiang1983
    The hospitaller is really, really awesome and works perfect in game!! Grumpyoldman you are definitely a genius!
    Let's see the first living dismounted knights hospitaller in M2TW:





    Edit: I forgot to paste the codes:

    in battle_models.modeldb:
    Hi, i add this unit to my game (mod) and game just crash

  9. #9

    Default Re: A start on the .MESH file format

    @GOM
    With the power of the convert tool(though it's alpha version) I'm able to create a real dismounted knight templar. I'm so happy~~Thank you!


    BTW, in case anyone likes them, you can download these mesh file at:
    http://files.filefront.com//;7046710;;/
    The entries:
    in battle_models.modeldb:
    Code:
    26 dismounted_knights_templar 
    1 4 
    70 unit_models/_Units/EN_Lmail_Hmail/dismounted_knights_templar_lod0.mesh 121 
    70 unit_models/_Units/EN_Lmail_Hmail/dismounted_knights_templar_lod1.mesh 900 
    70 unit_models/_Units/EN_Lmail_Hmail/dismounted_knights_templar_lod2.mesh 2500 
    70 unit_models/_Units/EN_Lmail_Hmail/dismounted_knights_templar_lod3.mesh 6400 
    10 
    7 england 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    47 unit_sprites/england_Knights_Templar_sprite.spr 
    8 scotland 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    48 unit_sprites/scotland_Knights_Templar_sprite.spr 
    6 france 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    46 unit_sprites/france_Knights_Templar_sprite.spr 
    7 denmark 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    47 unit_sprites/denmark_Knights_Templar_sprite.spr 
    5 milan 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    45 unit_sprites/milan_Knights_Templar_sprite.spr 
    6 venice 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    46 unit_sprites/venice_Knights_Templar_sprite.spr 
    12 papal_states 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    52 unit_sprites/papal_states_Knights_Templar_sprite.spr 
    6 sicily 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    46 unit_sprites/sicily_Knights_Templar_sprite.spr 
    6 poland 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    46 unit_sprites/poland_Knights_Templar_sprite.spr 
    7 hungary 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    47 unit_sprites/hungary_Knights_Templar_sprite.spr 
    10 
    7 england 
    68 unit_models/AttachmentSets/Final Heater Special_england_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_england_norm.texture 0  
    8 scotland 
    69 unit_models/AttachmentSets/Final Heater Special_scotland_diff.texture 
    69 unit_models/AttachmentSets/Final Heater Special_scotland_norm.texture 0  
    6 france 
    67 unit_models/AttachmentSets/Final Heater Special_france_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_france_norm.texture 0  
    7 denmark 
    68 unit_models/AttachmentSets/Final Heater Special_denmark_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_denmark_norm.texture 0  
    5 milan 
    66 unit_models/AttachmentSets/Final Heater Special_milan_diff.texture 
    66 unit_models/AttachmentSets/Final Heater Special_milan_norm.texture 0  
    6 venice 
    67 unit_models/AttachmentSets/Final Heater Special_venice_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_venice_norm.texture 0  
    12 papal_states 
    73 unit_models/AttachmentSets/Final Heater Special_papal_states_diff.texture 
    73 unit_models/AttachmentSets/Final Heater Special_papal_states_norm.texture 0  
    6 sicily 
    67 unit_models/AttachmentSets/Final Heater Special_sicily_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_sicily_norm.texture 0  
    6 poland 
    67 unit_models/AttachmentSets/Final Heater Special_poland_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_poland_norm.texture 0  
    7 hungary 
    68 unit_models/AttachmentSets/Final Heater Special_hungary_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_hungary_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
    In EDU:
    Code:
    type             dismounted knights templar
    dictionary       dismounted_knights_templar      ; dismounted knights templar
    category         infantry
    class            heavy
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          dismounted_knights_templar, 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         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  7, 8, 6, metal
    ;stat_armour_ex   7, 8, 0, 0, 8, 6, 6, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        5
    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, 570, 225, 90, 70, 570, 4, 140
    armour_ug_levels 3
    armour_ug_models dismounted_knights_templar
    ownership        england, scotland, france, denmark, milan, venice, papal_states, sicily, poland, hungary
    ;unit_info        13, 0, 21

    @Methoz
    I experienced crash,too. My suggestion is do NOT add those codes at the end of modeldb or EDU file. Just INSERT them in it, eg. insert these codes before the unit of dismounted feudal knight in battle_models.modeldb and EDU. Hope this help


    Edit: Excuse my excitement A highland nobles arquebusiers (just for fun)
    Last edited by zxiang1983; 03-27-2007 at 19:20.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO