B Info Other Modding Tools and Files

Users who are viewing this thread

Pyrate

Decided to change the thread title to something more specific.

Modding Tools Setup
Now before we can begin, there are a few things you should download.  Here are the links.
Install everything using the default settings.  For the GIMP plugins and Blender addon, consult the Readme text document that came with your download.  For the rest, extract to anywhere you can easily get to.  After that, do the following.
[list type=decimal]
[*]Open Blender
[*]Press CTRL+ALT+U to open the User Preferences
[*]Click on the Addons tab
[*]Scroll down to where you see Import-Export: SMD\DMX Tools
[*]To the far right of that, click on the small box to check it
[*]Close out of the User Preferences window
[*]Press CTRL+U to save this setting
[*]Close out of Blender
[/list]
Then you'll want to complete these instructions.
[list type=decimal]
[*]Click Start
[*]Right click on Computer
[*]Select Properties
[*]Click on Advanced system settings
[*]After that, Environment Variables...
[*]Under System variables, scroll down to Path
[*]Click on it
[*]Click Edit...
[*]To the right of Variable value, click at the very end and type in ;C:\Python27
[*]Click OK, click OK, click OK
[/list]
Good, now you have your basic modding toolkit.

Localization and Modularity
Usually, mods have their own folders with their own files as will learn soon, but files for Native are nowhere to be found.  Try looking a level or two up, directly in the game folder.  CommonRes (a Resource folder), languages, music, Sounds, and Textures are identical to their mod folder counterparts, but are common to every mod.  This however, doesn't mean they'll be fully used in every mod (pretty much only in Native).  To make a mod fully independent, you've got to modulize it.  This includes localizing the files by copying files from the common folders to the mod specific folders.  Next, you must get the module to read from the right directory.  More information on this below.

Mod Folders and Files
What exactly constitutes a mod?  A mod essentially is a bunch of files in a bunch of folders.  If you change the files, you create a new mod.  Therefore, it makes sense to learn about what file types go in each folder and which software to use for what.  This is covered below.

All of these files and folders can be found here, where Mod is the name of the mod.

C:\Program Files\Mount&Blade (Warband/With Fire and Sword)\Modules\Mod

languages
For CSV files.  Use Notepad.  Simply localize to modulize, otherwise it reads from the common languages folder.
Contains various text found in-game such as hints.  You may only edit the text after the | in each line.  To add a new hint, add a new line starting with hint_#| in hints.csv.  See module.ini for more information.
Music
For OGG, WAV, and MP3 files.  Use Audacity.  To modulize, use the music track flag "mtf_module_track" for all applicable tracks in module_music.py within the module system.
Contains audio specifically for background music.
CommonRes/Resource
For BRF files.  Use OpenBRF in conjunction with Blender.  To modulize, use load_mod_resource or load_module_resource instead of load_resource for each applicable BRF in module.ini.
Contains graphics such as skeletons, animations, and meshes.  Skeletons provide the animations for rigged meshes.  Meshes give objects in the game their three-dimensional form.  These are what materials are uv mapped to, or wrapped around.  Also has data for materials, textures, and shaders.  To rework skeletons, animations, or meshes, simply export then import them into Blender.
SceneObj
For SCO files.  Use the in-game editor.  Always local and modulized.
Contains scene data such as terrain and props.  Access the editor by opening the game, clicking Configure, clicking the Advanced tab, clicking the box left to Enable Edit Mode so it is checked, clicking Play, going in-game to the scene you want to edit, pressing ALT+ENTER, and finally CRTL+E to enter and exit Edit Mode.
Sounds
For OGG, WAV, and MP3 files.  Use Audacity.  To modulize, simply change scan_module_sounds = 0 to scan_module_sounds = 1 in module.ini if it isn't already.
Contains audio specifically for sound effects.
Textures
For DDS, TGA, and JPEG files.  Use GIMP.  To modulize, simply change scan_module_textures = 0 to scan_module_textures = 1 in module.ini if it isn't already.
Contains image files used for different kinds of files used in materials such as diffuse textures, bump maps, environment maps, and speculars.  Diffuse textures are used to color materials.  Bump maps look blue or green and provide some depth to your material with lighter areas being raised up and darker areas being sunken in.  Environment maps are reflections that show up on your material.  Speculars use a similar technique as bump maps, but are black and white and determine how reflective a material is instead.
main.bmp
A BMP file.  Use GIMP.  Simply localize to modulize, otherwise reads from the common main.bmp file.
This is the image that appears on the splash screen when the mod is selected.  Just remember before exporting, click the + to the left of Compatibility Options, then click on the box left of Do not write color space information to check it.
module.ini
An INI file.  Use Notepad.  Always local and modulized.
Contains various mod configuration settings such as the number of hints to display at num_hints and tells the game which BRFs to load.
map.txt
A TXT file.  As of yet, there are no recently updated tools to easily edit this.  Always local and modulized.
As Lumos (use his map manager!) pointed out, Thorgrim's map editor may be old, but still works.  There are also two new map editors being worked on, Bioxx and Bloodpass, I will add them once they are more feature complete.
*.txt
The many other TXT files I haven't mentioned.  Use the appropriate Module System.  Always local and modulized.
Contains data on which files of every other type to use in the mod and pretty much all the inner workings of the mod.  To use the Module System, go to its folder.  Within are PY or Python files.  To edit these, right click and click Edit with IDLE.  The first PY file you'll want to change is module_info.py.  Inside, change the export_dir to the path of your mod.  As the comment says, use / and not \.  Also be sure to put a / at the end. Changing these do not immediately change the mod, you'll have to compile to do that.  In other words, convert PY files to TXT so the game can read them.  That's what build_module.bat is for.  This Windows Batch File should be above all the PY files, at the very top.  Double click it.
 
hmmm i think this can be a good idea, if done well possibly sticky? But I think the admins will have a better discretion than me on that topic.

To make this work, the organization of the topic must be better, something like:

The Game
Mount and Blade - http://www.mbrepository.com/download.php?id=2595&f=mountandblade_1011_setup_enhanced.exe
Warband - http://download.taleworlds.com/mb_warband_setup_1153.exe
With Fire and Sword - http://download.taleworlds.com/mb_wfas_setup_1143.exe

Module system

M&B Module System - http://www.mbrepository.com/download.php?id=1716&f=mb_module_system_1010_0.zip
Warband Module System - http://download2.taleworlds.com/mb_warband_module_system_1153.zip
F&S Module System - http://download2.taleworlds.com/mb_wfas_module_system_1143.zip

Prerequisites
Python - http://python.org/ftp/python/2.7.3/python-2.7.3.msi

Graphics

OpenBRF - http://www.mbrepository.com/download.php?id=1466&f=openBrf.zip

Textures/materials
GIMP - http://sourceforge.net/projects/gimp-win/files/GIMP%20%2B%20GTK%2B%20%28stable%20release%29/GIMP%202.8.0/gimp-2.8.0-setup.exe/download
DDS Plugin (GIMP) - http://gimp-dds.googlecode.com/files/gimp-dds-win32-2.0.9.zip
Normal Map Plugin (GIMP) - http://gimp-normalmap.googlecode.com/files/gimp-normalmap-win32-1.2.2.zip

Animations
Blender - http://www.blender.org/dl/http://download.blender.org/release/Blender2.63/blender-2.63a-release-windows32.exe
SMD Importer/Exporter Add-on (Blender) - http://blender-smd.googlecode.com/files/io_smd_tools-123.zip

etc...
 
Thank you for your input!  I'll work on the organization right now.  I feel I'm on the verge of recovery from this cold so I might be able to do even more sometime later today or tomorrow.
 
Yea this seems like a good idea so good work on this, it will help those new to modding M&B.
 
Thanks for the support. :smile:  I would like this to be as comprehensive as possible so I probably will need the community's help again with corrections and additions.
 
I would suggest adding a text editor:

Notepad++  http://notepad-plus-plus.org/download/


Moreover, to be comprehensive, I would suggest you discussing the difference between text files and python files.

And for text files, we have morghs editing tools.
 
Q: how to change the BG in-game pics of a mod ((such as the main menu where it says restore game-multiplayer-exit to windows) ??
 
Try looking in the Textures folder for main_menu_nord.dds or something like that.
 
This looks fantastic. Following along with your steps now.

Hoping to start a bit of modding slow and easy so I learn and don't get disocuraged. Got Python 273 insalled and I (think) properly configured. Eventual goal is to make a few general purpose town scenes:
Burgher House, Peasant Hut is what I'll start with I think but might eventually have a variety like, Old Soldier's House, Madwoman's Hut, Village Idiot's Hut, etc. The intent being that each of these interior scenes provide additional small quests, NPCs, etc.
 
Replies are always welcome and encouraging.  Feedback also helps.  Good luck with your mod!
 
Nice guide.
I want to draw attention to the map.txt section - there are at least two map editors that are in the works, and Thorgrim's old Map Editor also works perfectly, even with WB and on Win 7. Also, let me shamelessy advertise my own Warband MapManager, which closes the gap between Thorgrim's and Warband. This doesn't man that you can't jump over the gap if you want... the Manager only builds you a bridge, so it's easier for you. :razz:)
 
Yuck, outdated download links.  Here are the links to the now newest versions of software.  Also added links to Napoleonic Wars and its source code! :mrgreen:
 
Back
Top Bottom