Results 1 to 1 of 1

Thread: [Modding] M2TW: Formatted campaign modeldb files for all campaigns - Kingdoms & Vanilla 1.5

  1. #1

    Default [Modding] M2TW: Formatted campaign modeldb files for all campaigns - Kingdoms & Vanilla 1.5



    Author: Gigantus
    Original Thread: [Resource] Formatted campaign modeldb files for all campaigns - Kingdoms & Vanilla 1.5

    Formatted campaign modeldb files for all campaigns - Kingdoms & Vanilla 1.5
    The download includes the formatted modeldb files for all 4 Kingdoms campaigns as well as the basic (Vanilla) campaign. I have included the modeldb checker, adapted by me for these campaigns. The credit for the checker goes to Knight Errand, taken from here.

    The modeldb files are taken from the latest versions.

    ModelDB file names:
    The modelDB files need to be renamed once they are placed in their respective unit_model directory. Example:
    battle_models - Americas.modeldb ---> battle_models.modeldb

    Modifying the 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

    Download Link

    Note: requires installation of Python, not higher then version 2.6.9. - last binary installation version is 2.6.6:



    Version History

    • 16th July 2015 - fixed the americas modelDB file and included version 0.55a of Hex35's tools
    • 11th June 2015 - included the alternative formatter and checker as per Hex35's post

    Last edited by Maximus IV; August 25, 2017 at 02:42 PM. Reason: updated

Posting Permissions

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