User Info
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 02, 2010, 08:22:25 PM

Login with username, password and session length
Search:     Advanced search
News Box
New M&B Version

1.010 is out, and so is the module system. Get modding!

Key Stats
51617 Posts in 2003 Topics by 4425 Members
Latest Member: lovely13
Home Help Search Login Register
M&B Mod Community  |  About Modding  |  User Tutorials  |  Porting a mod to a new M&B version: by the numbers
Pages: [1] Print
Author Topic: Porting a mod to a new M&B version: by the numbers  (Read 1848 times)
Fisheye
Blues Brother
Guildsman
****
Offline Offline

Posts: 428


My scalp's so bright, I gotta wear shades.


View Profile Email
« on: November 24, 2007, 01:22:34 PM »

A simple guide in point form.

WRONG way: Copy over everything, use winmerge to mash the code together, cross fingers / pray / make sacrifice to gods, try to compile and run, cry when the error message appears. Yes, I did it this way before I learnt better. Without the crying.

RIGHT way:

Do a full test of the execution of the mod at each numbered step. That means compile if needed. Use Winmerge to do the merge for files you're unsure about. Note: in some steps you may need to edit module_constants (comment out some stuff temporarily) to get things to compile.

0. Start with a copy of Native.
1. Resources, Textures, sounds, music: BRFs, DDS, MP3, etc... copy them over and update module.ini
2. module_items.py (recommend putting some of your new items in the Zendar chest to check them out quickly)
3. Basic files: module_animations, module_factions, module_map_icons, module_meshes, module_music, module_particle_systems, module_quests, module_scenes, module_scene_props, module_skills, module_skins, module_sounds, module_strings.
4. module_troops.py
5. module_parties, module_party_templates, map.txt (also copy over the Sceneobj/*.sco files)
6. Scripts I: recommend breaking this up and compiling in parts if possible: module_constants, module_scripts, module_game_menus, module_mission_templates, module_presentations
7. Scripts II: module_triggers, module_simple_triggers, module_dialogs

Now you're done! :)
« Last Edit: November 24, 2007, 07:10:10 PM by Fisheye » Logged
Winter
I am Tek Jansen!
Administrator
*****
Offline Offline

Posts: 448


MBX Forum owner


View Profile WWW Email
« Reply #1 on: November 24, 2007, 04:48:19 PM »

A simple guide in point form.

What Fisheye said. That's how I port when I have to.

A slight modification for when you're running modified Native code: Try to keep all modified code in custom module files separate from the Native files (via Scion's method, documented in the Modding Knowledge Base) and document all your changes. Use WinMerge to look for any changes between the new Native and old Native, then incorporate changes/bugfixes into your modified code where appropriate. Lastly, replace/delete the Native scripts in order to allow your modified scripts to run.
Logged


STREET: Losing your mind has never been so much fun . . .
grailknighthero
Craftsman
**
Offline Offline

Posts: 141


View Profile Email
« Reply #2 on: November 29, 2007, 09:07:44 PM »

*hitting head on wall*
Why didnt I know about winmerge before?....
This is very useful for me since I didnt know a good way to port.
Logged
nema
Journeyman
***
Offline Offline

Posts: 271



View Profile WWW Email
« Reply #3 on: December 21, 2007, 10:39:21 AM »

Fisheye, winmerge rules.

Thank you for this tip. :D :D :D
Logged

Pages: [1] Print 
Jump to:  

Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Arcane Magic based on BlackDay by TechnoDragon.net | Buttons by Andrea