Results 1 to 7 of 7

Thread: battle_models.modeldb - Research

  1. #1

    Default battle_models.modeldb - Research

    The battle_models.modeldb file is where the various models(units/soldiers) are defined that show up on the battlefield. This is where a Dismounted Feudal Knight is defined as to what textures and models represents it. Understanding this file allows new types of units to be made (or at least new units based on existing textures and model parts).

    I'm hoping others will jump in and provide info as well.

    Here is an example entry from the battle_models.modeldb file along with my comments as to what I think things might mean. These are just guesses on my part.

    I have no idea if CA is planning to release a tool that will aid in creating/modifying this file. If so, great! I would still like to try and understand the file however.

    The file is one long string (no breaks). I broke the file into lines that seemed like the right place. I probably made mistakes somewhere.

    My comments are in ().

    Code:
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 		(End of Last Entry or Beginning of this one?)
    25 dismounted_feudal_knights 1 4 							(Number of characters in the name) (Name of Entry used in EDU) (??Scale??) (Number of Mesh Entries)
    69 unit_models/_Units/EN_Lmail_Hmail/dismounted_feudal_knights_lod0.mesh 121 	(Number of Characters  in mesh path/name)(Mesh)(LOD distance)
    69 unit_models/_Units/EN_Lmail_Hmail/dismounted_feudal_knights_lod1.mesh 900 
    69 unit_models/_Units/EN_Lmail_Hmail/dismounted_feudal_knights_lod2.mesh 2500 
    69 unit_models/_Units/EN_Lmail_Hmail/dismounted_feudal_knights_lod3.mesh 6400 
    (Model Texturing Section)
    11 	(Number of Faction Entries)
    7 england 	(Length of Faction Name) (Faction Name)
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_england.texture 	(Length of Texture Path/Name) (Path to  Faction Texture) 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture (This is the normal map texture)
    57 unit_sprites/england_Dismounted_Feudal_Knights_sprite.spr  (this is the sprite for this faction)
    8 scotland 
    74 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_scotland.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    58 unit_sprites/scotland_Dismounted_Feudal_Knights_sprite.spr 
    6 france 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_france.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    56 unit_sprites/france_Dismounted_Feudal_Knights_sprite.spr 
    3 hre 
    69 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hre.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    53 unit_sprites/hre_Dismounted_Feudal_Knights_sprite.spr 
    7 denmark 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_denmark.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    57 unit_sprites/denmark_Dismounted_Feudal_Knights_sprite.spr 
    5 spain 
    71 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_spain.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    55 unit_sprites/spain_Dismounted_Feudal_Knights_sprite.spr 
    8 portugal 
    74 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_portugal.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    58 unit_sprites/portugal_Dismounted_Feudal_Knights_sprite.spr 
    5 milan 
    71 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_milan.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    55 unit_sprites/milan_Dismounted_Feudal_Knights_sprite.spr 
    6 venice 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_venice.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    56 unit_sprites/venice_Dismounted_Feudal_Knights_sprite.spr 
    12 papal_states 
    78 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_papal_states.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    62 unit_sprites/papal_states_Dismounted_Feudal_Knights_sprite.spr 
    7 hungary 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_hungary.texture 
    72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 
    57 unit_sprites/hungary_Dismounted_Feudal_Knights_sprite.spr 
    (Attachment Texture Section)
    11 	(Number of Faction Entries)
    7 england 		(Length of Faction Name) (Faction Name)
    60 unit_models/AttachmentSets/Final Heater_england_diff.texture (Length of Texture Path/Name) (Texture)
    60 unit_models/AttachmentSets/Final Heater_england_norm.texture (normal map)
    0  	(Declares end of this faction's entries)
    8 scotland 
    61 unit_models/AttachmentSets/Final Heater_scotland_diff.texture 
    61 unit_models/AttachmentSets/Final Heater_scotland_norm.texture 0  
    6 france 
    59 unit_models/AttachmentSets/Final Heater_france_diff.texture 
    59 unit_models/AttachmentSets/Final Heater_france_norm.texture 0  
    3 hre 
    56 unit_models/AttachmentSets/Final Heater_hre_diff.texture 
    56 unit_models/AttachmentSets/Final Heater_hre_norm.texture 0  
    7 denmark 
    60 unit_models/AttachmentSets/Final Heater_denmark_diff.texture 
    60 unit_models/AttachmentSets/Final Heater_denmark_norm.texture 0  
    5 spain 
    58 unit_models/AttachmentSets/Final Heater_spain_diff.texture 
    58 unit_models/AttachmentSets/Final Heater_spain_norm.texture 0  
    8 portugal 
    61 unit_models/AttachmentSets/Final Heater_portugal_diff.texture 
    61 unit_models/AttachmentSets/Final Heater_portugal_norm.texture 0  
    5 milan 
    58 unit_models/AttachmentSets/Final Heater_milan_diff.texture 
    58 unit_models/AttachmentSets/Final Heater_milan_norm.texture 0  
    6 venice 
    59 unit_models/AttachmentSets/Final Heater_venice_diff.texture 
    59 unit_models/AttachmentSets/Final Heater_venice_norm.texture 0  
    12 papal_states 
    65 unit_models/AttachmentSets/Final Heater_papal_states_diff.texture 
    65 unit_models/AttachmentSets/Final Heater_papal_states_norm.texture 0  
    7 hungary 
    60 unit_models/AttachmentSets/Final Heater_hungary_diff.texture 
    60 unit_models/AttachmentSets/Final Heater_hungary_norm.texture 0  
    (Attachments)
    1     (Number of Mount types?)
    4 None 		 (lengh of entry) (Mount Name)
    14 MTW2_Swordsman 
    0  (Number of somethings)
    2 (Number of Attachments?)
    18 MTW2_Sword_Primary 
    14 fs_test_shield 
    0
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 			(??? End of This Entry or Beginning of Next)

    Update: I think the numbers at the begining of a faction line are the number of characters for that factions name.
    3 hre
    5 spain
    7 england

    In the Attachments section, this appears to be true as well.
    14 MTW2_Swordsman
    18 MTW2_Sword_Primary
    14 fs_test_shield

    Textures as well:
    58 unit_models/AttachmentSets/Final Heater_milan_diff.texture
    60 unit_models/AttachmentSets/Final Heater_england_norm.texture
    Last edited by BrandonM; December 15, 2006 at 06:41 PM.
    Under the patronage of General_Sun.

  2. #2

    Default Re: battle_models.modeldb - Research

    do you think this like an equivalent of the desc_models_battle?

  3. #3

    Default Re: battle_models.modeldb - Research

    Dunno, I thought so at first. But I've added some entries for Byzantium Arquebusiers (Using HRE textures for rn_light_lmail since there are no Byzantium texture for the rn_light_lmail) and it still shows up as invisible. Just shadows and smoke when they fire. The game doesn't crash, and i get no log output so I'm not sure what I'm missing yet.

    rn_light_lmail is the model for Arqubusiers.

    I've tried to copy the \unit_models\_units\rn_light_lmail\textures folder to my mod directory. I've tried to make a copy of the rn_light_lmail_hre.texture and name it rn_light_lmail_byzantium.texture (and update the entries in the battle_models file). the battle_models.modeldb file is in my mod\data\unit_models directory.
    Under the patronage of General_Sun.

  4. #4

    Default Re: battle_models.modeldb - Research

    You've counted wrong :p

    The number corresponds to the number of characters after this number (excluding spaces) - so for '58 unit_models/AttachmentSets/Final Heater_milan_diff.texture' it's 58 characters starting at 'u' in unit and ending at 'e' of texture.

    And this could be a very helful to format the file correctly - just write a program that reads the number, and then puts end of line after the specified number of characters

    Abot arquebusiers - maybe make them use different tecture? So just copy/rename the german one?

  5. #5

    Default Re: battle_models.modeldb - Research

    That file looks to contain all mounts and horses.

    I'm confused. This unpacker seems to have unpacked nothing but trouble. Text files are not editable and battle models are....well... hmm.

  6. #6

    Default Re: battle_models.modeldb - Research

    It does contain mounts and horses, but also all the other units as well. The mounts and horses are at the beginning of the file, you have to go down a ways before you get to the soldiers.
    Under the patronage of General_Sun.

  7. #7

    Default Re: battle_models.modeldb - Research

    Well I ran the file through ultra edit and formatted it in RTF. I don't know if it helps in any matter.

    Seems like they didn't put to much thought into the unpacker when they released it. Looks like we will have to wait for someone to develope a tool to edit these files.

Posting Permissions

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