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

Thread: Updated formatted modeldb file and associated syntax checker

  1. #1
    KnightErrant's Avatar Decanus
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    578

    Default Updated formatted modeldb file and associated syntax checker

    I've released an updated formatted battle_models.modeldb file and
    a syntax checker for it. These can be downloaded from here:

    http://www.twcenter.net/forums/downl...o=file&id=1180

    The original formatted modeldb file didn't break all that regularly which
    made writing a syntax checker for it difficult. My apologies, still learning
    regular expressions.

    A longer discussion is in this thread:

    http://forums.totalwar.org/vb/showthread.php?t=79455

    The checker is available in both MatLab or Python. Right now all it checks
    are string counts, faction counts, and unit model counts. It might also do
    file existance verification but I don't have a way of checking this part of the code (see discussion in thread above).

  2. #2

    Default Re: Updated formatted modeldb file and associated syntax checker

    Knight could you update the formatted modeldb file to MTW2 1.3?
    Would be nice to have the 4 same files from the 4 Kingdoms mods updated to 1.5 of course...

  3. #3
    KnightErrant's Avatar Decanus
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    578

    Default Re: Updated formatted modeldb file and associated syntax checker

    Hi Hospitalier Grand Master,

    Sorry, I've never updated beyond the 1.2 patch. I bought Kingdoms
    but never installed it because of too many commitments to risk being
    down for awhile. But all of these files are probably already formatted
    with the carriage return/linefeeds inserted and available somewhere.
    If not, PM me and I'll send you an e-mail address. If you attach the
    unformatted .modeldb's I can run the formatter script on them.
    Shouldn't take any time to do that since the script is so short.

  4. #4
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Updated formatted modeldb file and associated syntax checker

    There is no need to create a new version of the Formatter. I'm editing Kingdoms modeldb just fine. KE thanks again!


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  5. #5

    Default Re: Updated formatted modeldb file and associated syntax checker

    Thx Knight. If I open the modeldb files of the 4 kingdoms camps with otepad, they are like the unformatted M2TW one.
    Signifer how you mod them?Which text program?
    BTW Knight i would really appreciate if you could format the 5 files for me and for the community. I will send you a Pm with my mail.

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Updated formatted modeldb file and associated syntax checker

    Formatted the original Kingdom campaign files, check here:
    Formatted Campaign ModelDB files
    Last edited by Gigantus; August 19, 2009 at 06:35 AM. Reason: Updated Link to point to correct thread with download










  7. #7

    Default Re: Updated formatted modeldb file and associated syntax checker

    Quote Originally Posted by gigantus View Post
    Formatted the original Kingdom campaign files, check here:
    http://files.filefront.com/Formatted.../fileinfo.html
    Are those updated the latest patches?

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Updated formatted modeldb file and associated syntax checker

    Wrong link:
    Formatted Campaign ModelDB files

    Not sure if the 1.5 patch changed the modeldb. Only way to find out: make a backup of the file you got and put this one in.










  9. #9

    Default Re: Updated formatted modeldb file and associated syntax checker

    Quote Originally Posted by gigantus View Post
    Wrong link:
    Formatted Campaign ModelDB files

    Not sure if the 1.5 patch changed the modeldb. Only way to find out: make a backup of the file you got and put this one in.
    Why wrong link?
    Where to find the right ones?
    What can you tell me about the one for M2TW 1.3??

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Updated formatted modeldb file and associated syntax checker

    1. The download link still works actually, just a matter of time until it gets deleted - I didn't maintain my account with filefront after the April scare.
    2. No idea
    3. The modeldb files there certainly work for 1.3










  11. #11

    Default Re: Updated formatted modeldb file and associated syntax checker

    Thx Gigantus.
    Just another question.
    If I would like to format the modeldb files myself, where can I find a tool to do it easy and fast?

  12. #12
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Updated formatted modeldb file and associated syntax checker

    You are posting in the thread for this tool. Check the first post.










  13. #13

    Default Re: Updated formatted modeldb file and associated syntax checker

    If I Use the Checker into a Modeldb of SS 6.3,It Could work?
    Cuz I don't get it how to use it !
    I Readed the Readme,but No

    Help & Thanks
    Chile, fértil provincia y señalada
    en la región Antártica famosa
    ,de remotas naciones respetada
    por fuerte, principal y poderosa;
    la gente que produce es tan granada
    ,tan soberbia, gallarda y belicosa,
    que no ha sido por rey jamás regida
    ni a extranjero dominio sometida.






  14. #14
    irishron's Avatar Cura Palatii
    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,023

    Default Re: Updated formatted modeldb file and associated syntax checker

    The script is for vanilla. You have to add SS's factions to it to get it toread all of it.

    You have to have Python to get it to work. Edit the file in it. The format is straightforward.

  15. #15

    Default Re: Updated formatted modeldb file and associated syntax checker

    I Did It,But nothing Happened!
    I Changed Everything Right(It show's NO error)
    Here's My ModelDB:
    Spoiler Alert, click show to read: 
    4 None
    16 MTW2_Fast_Bowman
    20 MTW2_Non_Shield_Fast 1
    19 MTW2_Bowman_Primary 1
    18 MTW2_Sword_Primary
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    16 venetian_archers
    1 3
    66 unit_models/_Units/LN_3QPlate_HalfPlate/venetian_archers_lod0.mesh 121
    66 unit_models/_Units/LN_3QPlate_HalfPlate/venetian_archers_lod1.mesh 1225
    66 unit_models/_Units/LN_3QPlate_HalfPlate/venetian_archers_lod2.mesh 6400
    2
    6 venice
    81 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_venice.texture
    81 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_normal.texture
    47 unit_sprites/venice_Venetian_Archers_sprite.spr
    7 hungary
    81 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_venice.texture
    81 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_normal.texture
    47 unit_sprites/venice_Venetian_Archers_sprite.spr
    2
    6 venice
    68 unit_models/AttachmentSets/Final European Archer_venice_diff.texture
    68 unit_models/AttachmentSets/Final European Archer_venice_norm.texture 0
    7 hungary
    68 unit_models/AttachmentSets/Final European Archer_venice_diff.texture
    68 unit_models/AttachmentSets/Final European Archer_venice_norm.texture 0
    2
    4 None
    16 MTW2_Mass_Bowman
    15 MTW2_Non_Shield 1
    19 MTW2_Bowman_Primary 1
    18 MTW2_Sword_Primary
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    20 venetian_archers_ug1
    1 4
    69 unit_models/_Units/LN_Brigandine_heavy/venetian_archers_ug1_lod0.mesh 121
    69 unit_models/_Units/LN_Brigandine_heavy/venetian_archers_ug1_lod1.mesh 900
    69 unit_models/_Units/LN_Brigandine_heavy/venetian_archers_ug1_lod2.mesh 2500
    69 unit_models/_Units/LN_Brigandine_heavy/venetian_archers_ug1_lod3.mesh 6400
    2
    6 venice
    77 unit_models/_Units/LN_Brigandine_heavy/textures/LN_ Brigandine_venice.texture
    77 unit_models/_Units/LN_Brigandine_heavy/textures/LN_ Brigandine_normal.texture
    51 unit_sprites/venice_Venetian_Archers_ug1_sprite.spr
    7 hungary
    77 unit_models/_Units/LN_Brigandine_heavy/textures/LN_ Brigandine_venice.texture
    77 unit_models/_Units/LN_Brigandine_heavy/textures/LN_ Brigandine_normal.texture
    51 unit_sprites/venice_Venetian_Archers_ug1_sprite.spr
    2
    6 venice
    68 unit_models/AttachmentSets/Final European Archer_venice_diff.texture
    68 unit_models/AttachmentSets/Final European Archer_venice_norm.texture 0
    7 hungary
    68 unit_models/AttachmentSets/Final European Archer_venice_diff.texture
    68 unit_models/AttachmentSets/Final European Archer_venice_norm.texture 0
    2
    Chile, fértil provincia y señalada
    en la región Antártica famosa
    ,de remotas naciones respetada
    por fuerte, principal y poderosa;
    la gente que produce es tan granada
    ,tan soberbia, gallarda y belicosa,
    que no ha sido por rey jamás regida
    ni a extranjero dominio sometida.






  16. #16
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Updated formatted modeldb file and associated syntax checker

    It works if it gives you a summary like this:

    Unit count at top of file = 834
    Number of processed unit models = 834
    It is advisable that these two numbers should match.
    Total errors: 0
    String count errors: 0
    Faction count errors: 0










  17. #17
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: Updated formatted modeldb file and associated syntax checker

    I'm trying to add some factions to my Retrofit mod, w/ GUAMv6, the original battle_models from the mod doesn't run through the syntax checker. I have gone trough the battle_models and fixed some of the coding that I have seen. I'm sure you are aware this, it is very time consuming and tedious. Would it be possible for the syntax checker to report which line it last checked before closing?

    Thanks,
    Vegas_Bear

  18. #18
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Updated formatted modeldb file and associated syntax checker

    If you add factions not originally present then you will have to modify the checker to recognize them.
    - Right click the file, choose 'Edit with IDLE'
    - two files will open, close 'python shell
    - in the other file scroll down until this section:
    Code:
    def isfactionname( string ) :
        if string == 'england' :
            return True
    This is the section for the faction names. The end of this section should look similar to this (my version is already modified):
    Code:
        elif string == 'georgia' :
            return True        
        elif string == 'seljuks' :
            return True        
        else :
            return False
    
        return False
    Now simply copy two lines: the one starting with 'elif', and the one underneath it. Paste it under the last 'return True' line. Substitute the faction name with your new faction. It should now look like this:
    Code:
        elif string == 'georgia' :
            return True        
        elif string == 'seljuks' :
            return True        
        elif string == 'my_new_faction_name' :
            return True        
        else :
            return False
    
        return False
    Save and use










  19. #19

    Default Re: Updated formatted modeldb file and associated syntax checker

    I need some help with your model_db tool. I have used it in the past and its worked great but for some reason its not working now with this modded SS6.4 model_db I working on. First it only brought up faction count errors so I edited the python file to find the new factions and now it just produces a blank file with no errors or summary or anything. What do I need to do to fix it?

  20. #20
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: Updated formatted modeldb file and associated syntax checker

    Thisusually happens when formatting is used that the tool is not designed to handle - example would be the trailing zero in the next line instead of the end of the line.










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
  •