Results 1 to 5 of 5

Thread: [Mount&Blade] Working with the Module System (Tutorial)

  1. #1

    Icon1 [Mount&Blade] Working with the Module System (Tutorial)

    Setting Up the Module System

    Quote Originally Posted by The Module System
    The Module System is a series of .py files that can be opened with a text editor, such as Python's "IDLE" or Notepad, or my favorite, Notepad++
    When compiled, they will create a series of .txt files, identical to the ones found in the "Native" module folder in Warband.

    The reason why the MS is used over direct .txt editing, is that it opens up much more opportunity, and is generally "easier" then .txt editing.
    By editing the Module System, you can add many new features and functions to Warband. However, it can be quite tricky to set up the Module System, so I'm writing a quick guide.

    1. Download Python 2.6.5 from Python.org (Direct link: http://www.python.org/ftp/python/2.6.5/python-2.6.5.msi)
    Please note that any version of Python later then 2.6.5 WILL NOT WORK!
    After it's done downloading, follow the prompts, and install it directly to drive C:\, not any directories!

    2. Download the Module System. Direct link: http://173.192.225.169/mb_warband_mo...ystem_1127.zip
    Extract it to a folder called "Module System" or whatever you want to name it.

    3. Now, go to "Computer" or "My Computer" depending on what version of Windows you have. Right click and select "Properties"
    If you have Vista or higher, follow these instructions: http://www.neuralwiki.org/index.php?..._Windows_Vista

    If you don't have Vista or higher, then do the following:

    Click "Advanced"
    Click "Environmental Variables"
    Click "New"
    Type ";C:\Python26" or whatever your Python directory is.

    4. Now go to your Module System folder. In there, you will find a file called "build_module.bat"
    Right click on it, and select "Edit"
    Now paste the following over what is there, and save:

    @echo off
    set OLDPATH=%PATH%
    set PATH="C:\Python25";%PATH%

    python process_init.py
    python process_global_variables.py
    python process_strings.py
    python process_skills.py
    python process_music.py
    python process_animations.py
    python process_meshes.py
    python process_sounds.py
    python process_skins.py
    python process_map_icons.py
    python process_factions.py
    python process_items.py
    python process_scenes.py
    python process_troops.py
    python process_particle_sys.py
    python process_scene_props.py
    python process_tableau_materials.py
    python process_presentations.py
    python process_party_tmps.py
    python process_parties.py
    python process_quests.py
    python process_scripts.py
    python process_mission_tmps.py
    python process_game_menus.py
    python process_simple_triggers.py
    python process_dialogs.py
    python process_global_variables_unused.py

    set PATH=%OLDPATH%
    @del *.pyc
    echo.
    echo ______________________________
    echo.
    echo Script processing has ended.
    echo Press any key to exit. . .
    pause>nul


    5. Go to your Warband directory. You will find a folder called "Modules" Open it. In it will be a folder called "Native" If that folder isn't there, you aren't in "Modules"
    Create a new folder, and label it whatever you would like the name of your mod to be.

    In the Module System folder, you will also find a file labeled "module_info.py"
    Right click on it and select "Edit With IDLE" or "Edit with Notepad" whatever you choose.
    You will find four lines of text. Only one of them isn't commented (Note: A commented line is one without a "#" in front of it.)
    Edit the one that isn't commented to your Warband directory. It should say something like:

    export_dir = "C:/Program Files (x86)/Mount&Blade Warband/Modules/<name of the folder you created earlier here>/"

    Make sure you use forward slashes, not back slashes. Also make sure that the actual directory is in quotations, like the one above.
    Also make sure that you put a slash after your mod folder.

    6. Run build_module.bat (this can be done by double clicking it.) as an administrator. If everything compiles, then you have set up the module system correctly. I'll write more about actually editing the module system later.

    Important Notes:

    Do not edit any files other then the "module_<something>.py" files.
    Make sure you are logged in as an administrator when running "build_module.bat"
    What "build_module.bat" does is convert the .py files into .txt files that the game reads. It then exports them into your specified module folder.
    Run it any time you make significant changes to your module system.
    A successful run of build_module.bat should look like this:

    Initializing...
    variables.txt not found. Creating new variables.txt file
    Compiling all global variables...
    variables.txt not found. Creating new variables.txt file
    variable_uses.txt not found. Creating new variable_uses.txt file
    Exporting strings...
    Exporting skills...
    Exporting tracks...
    Exporting animations...
    Exporting meshes...
    Exporting sounds...
    Exporting skins...
    Exporting map icons...
    Creating new tag_uses.txt file...
    Creating new quick_strings.txt file...
    Exporting faction data...
    Exporting item data...
    Exporting scene data...
    Exporting troops data
    Exporting particle data...
    Exporting scene props...
    Exporting tableau materials data...
    Exporting presentations...
    Exporting party_template data...
    Exporting parties
    Exporting quest data...
    Exporting scripts...
    Exporting mission_template data...
    Exporting game menus data...
    WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
    _max_renown_3
    WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
    _max_renown_3_troop
    WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
    _max_renown_3
    WARNING: Usage of unassigned global variable: $g_presentation_marshall_selection
    _max_renown_3_troop
    exporting simple triggers...
    exporting triggers...
    exporting dialogs...
    Checking global variable usages...
    WARNING: Global variable never used: g_presentation_lines_to_display_begin
    WARNING: Global variable never used: g_presentation_lines_to_display_end
    WARNING: Global variable never used: tutorial_1_finished
    WARNING: Global variable never used: tutorial_2_finished
    WARNING: Global variable never used: tutorial_3_finished
    WARNING: Global variable never used: tutorial_4_finished
    WARNING: Global variable never used: tutorial_5_finished
    WARNING: Global variable never used: g_election_date
    WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
    wn_3
    WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
    wn_3_troop
    WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
    wn_3
    WARNING: Global variable never used: $g_presentation_marshall_selection_max_reno
    wn_3_troop

    ______________________________

    Script processing has ended.
    Press any key to exit. . .
    If you run into any unexpected errors, then wait for the compiler to compile, right click, click "Select All" press enter, and paste them here, and I will tell you what the problem could be.
    Under the Patronage of Leonidas the Lion|Patron of Imperator of Rome - Dewy - Crazyeyesreaper|American and Proud

  2. #2

    Default Re: [Tutorial]Working with the Module System [Guide to Creating Your Own Mod]

    Reserved
    Last edited by Bolkonsky; September 01, 2011 at 07:24 PM.
    Under the Patronage of Leonidas the Lion|Patron of Imperator of Rome - Dewy - Crazyeyesreaper|American and Proud

  3. #3

    Default Re: [Tutorial]Working with the Module System [Guide to Creating Your Own Mod]

    Reserved.
    Last edited by Bolkonsky; September 01, 2011 at 07:25 PM.
    Under the Patronage of Leonidas the Lion|Patron of Imperator of Rome - Dewy - Crazyeyesreaper|American and Proud

  4. #4

    Default Re: [Mount&Blade] Working with the Module System (Tutorial)

    Quote Originally Posted by Bolkonsky View Post
    Setting Up the Module System



    Important Notes:

    Do not edit any files other then the "module_<something>.py" files.
    Make sure you are logged in as an administrator when running "build_module.bat"
    What "build_module.bat" does is convert the .py files into .txt files that the game reads. It then exports them into your specified module folder.
    Run it any time you make significant changes to your module system.
    A successful run of build_module.bat should look like this:


    If you run into any unexpected errors, then wait for the compiler to compile, right click, click "Select All" press enter, and paste them here, and I will tell you what the problem could be.
    well the page with the instructions about python has changed to another irrelevant page so could you please give a new link because i am using vista and dont know how to do this myself.thank you

  5. #5

    Default Re: [Mount&Blade] Working with the Module System (Tutorial)

    This is what shows up to me: (its Swedish)

    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    python är inte ett internt kommando, externt kommando,
    program eller kommandofil.
    Can't find C:\Users\Ogul\Desktop\Modding Warband\mb_warband_module_s
    ystem_1166\Module_system 1.166\*.pyc.

    ______________________________

    Script processing has ended.
    Press any key to exit. . .

Posting Permissions

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