Results 1 to 4 of 4

Thread: Editing battle_models.modeldb

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Libertus
    Join Date
    Oct 2004
    Location
    Stoke-on-Trent, England
    Posts
    72

    Default Editing battle_models.modeldb

    Hello there

    Well, its 1370 on my 2 turns per year modded SS6.1 English Campaign, and I'm staring down the barrel, if you pardon the pun, of the next era of warfare. Having realised a while back that England does not have Musketeers or Pikemen (probably down to the fact that during the time period that MTW2/SS is set, we hadn't moved on from Longbows yet) and I have a great love for some of the later cannon units so I set about adding a few things here and there.

    Artillery, I can do. I've added the Grand Bombard and Serpentine (both NE versions) to the English roster for both Custom Battles and Campaign.

    However, Musketeers (for both England and France) and Pikemen (for England) are proving...troublesome.

    I understand the issue, just not the solution. After copying over the sprites and the gui files (unit pics basically) from Kingdoms Retrofit, my Musketeers and Pikemen now have pictures. Hooowever, unless I set my Musketeers to use the Harquebusiers model (pretty much identical anyway) they come out a sort of, pearlescent white. Ditto the pikemen.

    Now, as i've said I can "fix" the Musketeers by using the Harquebusier model, but I don't know if that has any negative effects on other Musketeer using nations (i.e if they have a different texture/model for their Harquebusiers and Musketeers).

    I know the solution lies in the battle_models.modeldb file, which is easily editable with notepad.

    Heres the stock SS6.1 modeldb file

    Code:
    10 musketeers 
    1 4 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod0.mesh 121 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod1.mesh 900 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod2.mesh 2500 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod3.mesh 6400 
    5 
    5 spain 
    71 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_spain.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    40 unit_sprites/spain_Musketeers_sprite.spr 
    6 aragon 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_aragon.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    40 unit_sprites/spain_Musketeers_sprite.spr 
    8 portugal 
    74 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_portugal.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    43 unit_sprites/portugal_Musketeers_sprite.spr 
    5 milan 
    71 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_milan.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    49 unit_sprites/papal_states_Arquebusiers_sprite.spr 
    6 venice 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_venice.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    41 unit_sprites/venice_Musketeers_sprite.spr 
    5 
    5 spain 
    67 unit_models/AttachmentSets/Final European CB Gun_spain_diff.texture 
    67 unit_models/AttachmentSets/Final European CB Gun_spain_norm.texture 0 
    6 aragon 
    67 unit_models/AttachmentSets/Final European CB Gun_spain_diff.texture 
    67 unit_models/AttachmentSets/Final European CB Gun_spain_norm.texture 0  
    8 portugal 
    70 unit_models/AttachmentSets/Final European CB Gun_portugal_diff.texture 
    70 unit_models/AttachmentSets/Final European CB Gun_portugal_norm.texture 0  
    5 milan 
    67 unit_models/AttachmentSets/Final European CB Gun_milan_diff.texture 
    67 unit_models/AttachmentSets/Final European CB Gun_milan_norm.texture 0  
    6 venice 
    68 unit_models/AttachmentSets/Final European CB Gun_venice_diff.texture 
    68 unit_models/AttachmentSets/Final European CB Gun_venice_norm.texture 0  
    1 
    4 None
    That only references Spain (Leon-Castile), Aragon, Portugal, Milan (Genoa) and Venice. So thats obviously why me adding Musketeers to England and France results in my shrinkwrapped looking soldiers. So, I go to the Kingdoms Retrofit Mod file.

    Code:
    10 musketeers 
    1 4 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod0.mesh 121 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod1.mesh 900 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod2.mesh 2500 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod3.mesh 6400 
    6 
    7 england 
    73 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_england.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    42 unit_sprites/england_Musketeers_sprite.spr 
    6 france 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_france.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    41 unit_sprites/france_Musketeers_sprite.spr 
    5 spain 
    71 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_spain.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    40 unit_sprites/spain_Musketeers_sprite.spr 
    8 portugal 
    74 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_portugal.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    43 unit_sprites/portugal_Musketeers_sprite.spr 
    5 milan 
    71 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_milan.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    40 unit_sprites/milan_Musketeers_sprite.spr 
    6 venice 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_venice.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    41 unit_sprites/venice_Musketeers_sprite.spr 
    6 
    7 england 
    69 unit_models/AttachmentSets/Final European CB Gun_england_diff.texture 
    69 unit_models/AttachmentSets/Final European CB Gun_england_norm.texture 0  
    6 france 
    68 unit_models/AttachmentSets/Final European CB Gun_france_diff.texture 
    68 unit_models/AttachmentSets/Final European CB Gun_france_norm.texture 0  
    5 spain 
    67 unit_models/AttachmentSets/Final European CB Gun_spain_diff.texture 
    67 unit_models/AttachmentSets/Final European CB Gun_spain_norm.texture 0  
    8 portugal 
    70 unit_models/AttachmentSets/Final European CB Gun_portugal_diff.texture 
    70 unit_models/AttachmentSets/Final European CB Gun_portugal_norm.texture 0  
    5 milan 
    67 unit_models/AttachmentSets/Final European CB Gun_milan_diff.texture 
    67 unit_models/AttachmentSets/Final European CB Gun_milan_norm.texture 0  
    6 venice 
    68 unit_models/AttachmentSets/Final European CB Gun_venice_diff.texture 
    68 unit_models/AttachmentSets/Final European CB Gun_venice_norm.texture 0  
    1 
    4 None
    See? That references England and France. Therefore they come out looking right.

    So the solution is to somehow add that data to the Stainless Steel Modeldb file and bernards your uncle, English Pikemen and Musketeers. So, I copy and paste the section from
    "7 England"
    to
    "4unit_sprites/france_Musketeers_sprite.spr"

    and the other lines that reference England and France and I insert them in the exact same place in the SS File as they are found in the Retrofit file.

    Game Crashes to the "Unexpected Error" message on loading.

    So, I think hmm the obvious issue is these different numbers. Why does the SS File have 10, 1, 54 54 54, 6 then 7 England, and the Retrofit file has 10, 1, 54 54 54, 5 then 5 Spain? Still haven't figured that one out.

    So basically the short question is "How do I add Pikemen to England and Musketeers to England and France" and the longer, more precise question is "What do these numbers mean and what do I need to change them to in order to sucessfully add the required lines of code into the modeldb file in order for French and English Musketeers and English Pikemen to have textures?"

    Thanks

    Squire James
    Let my Armies be the trees and the rocks, and the birds in the sky -- Charlemagne

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Editing battle_models.modeldb

    Code:
    10 musketeers 
    1 4 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod0.mesh 121 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod1.mesh 900 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod2.mesh 2500 
    54 unit_models/_Units/RN_Light_Lmail/musketeers_lod3.mesh 6400 
    6
    7 england 
    73 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_england.texture 
    72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture 
    42 unit_sprites/england_Musketeers_sprite.spr 
    
    6 
    7 england 
    69 unit_models/AttachmentSets/Final European CB Gun_england_diff.texture 
    69 unit_models/AttachmentSets/Final European CB Gun_england_norm.texture 0
    The modledb entries come basically in three parts: meshes, textures, attachments. The first part (meshes) will most likely not be of interest to you if you want to just add another faction entry.
    Underneath a little explanation for those numbers. If a number is at the beginning of a line it indicates the length of the entry, else
    Blue = number of meshes
    Turquoise = number of faction entries for textures and attachments










  3. #3
    Libertus
    Join Date
    Oct 2004
    Location
    Stoke-on-Trent, England
    Posts
    72

    Default Re: Editing battle_models.modeldb

    Ah I see

    ( 5 minutes later )

    It works Thanks, I figured the numbers might be for that purpose, and when I carefully edited the file and added the entries for England and France, now instead of crashing, we have pikemen and muskets!
    Let my Armies be the trees and the rocks, and the birds in the sky -- Charlemagne

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Editing battle_models.modeldb

    Quote Originally Posted by SquireJames View Post
    Ah I see

    ( 5 minutes later )

    It works Thanks, I figured the numbers might be for that purpose, and when I carefully edited the file and added the entries for England and France, now instead of crashing, we have pikemen and muskets!
    One is glad to be of service










Posting Permissions

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