Creating Custom Quick Battles

Users who are viewing this thread

Arctic

Sergeant
I was wondering if there is anyway to add/place troops through the edit mode for M&B 1.011.

If that is not possible, how do you make a custom quick battle.

Thanks!
 
Try to copy the code from Warband. The only problem is that allow you only to choose faction and troop type, but not troop tier: you have to change every time with python. A menu like the good old custom battle mod of Vanilla should be better.
 
Edit mode is for editing the physical properties of the scene, including the entry points from which troops will spawn. You cannot spawn agents in edit mode unless you code in a mission_template trigger to do so. As for your original question, download the Module System and go into module_game_menus.py and look for custom_battle_2.
The first block of code you'll see resets the player's stats between each battle. The code after (set_visitor, 0, "$g_player_troop"), has to do with equipping the player. This is followed by the list of other troops to spawn - for example (set_visitors, 1, "trp_farmer", 13). The 1 is the entry point - you can see where this is in edit mode. The trp_farmer represents the troop which will spawn there - go in module_troops to see the entire list. The 13 represents the number of troops to spawn there.
vota dc said:
Try to copy the code from Warband. The only problem is that allow you only to choose faction and troop type, but not troop tier: you have to change every time with python. A menu like the good old custom battle mod of Vanilla should be better.
I would not recommend backporting code from Warband - not only is there a layer of abstraction with the presentation, you also run into other issues.
 
Back
Top Bottom