Modding multiplayer

Users who are viewing this thread

Hermodr

Squire
Ok so I have just compiled my first module. Now I look through the little tutorial section on the top of this forum. But in there you only ge to know how to mod the single player. I don't want to touch the single player, in fact if it's possible I would like the player not to be able to acess it.

I want to make a multiplayer mod only. Basically I want to add these factions to multiplayer:

Hojo clan
Imagawa clan
Mori clan
Oda clan
Shimazu clan
Takeda clan
Uesugi clan
---
Rebels/Ronins

These are the factions, the names of the stuff you choose when you start multiplayer. Each clan I want to have different armors and equipments. But when I read through that tutorial at the top, I learn how to edit flags and replace icons at the world map etc. Troops and bandit nests and stuff.

I want to remove single player from my mod. If someone could point to the py. files that is used to edit multiplayer only that would be great! Like where the list of multiplayer armors and equipment is, something like:

Sword          4jl.obj (or whatever the model format is.                dds file: sword.dds    clan; ODA
Axe              4jl.obj                                                                    dds file: axe.dds        clan;HOJO
Shield          4jl.obj                                                                    dds file: shield.dds    clan;TOKUGAWA

Is there something like that in any of those py files?
 
Multiplayer tutorial: http://forums.taleworlds.com/index.php/topic,94854.0.html

Items aren't defined at one place. I think the models are associated with the texture in the resource file (brf). The item stats are in module_items and that's where you give the item a model too. As for giving them to multiplayer factions, I haven't look into this yet. Try digging in the server and client events (see above tutorial).

Disabling single player is easy. In module_game_menus go to the very first menu
("start_game_0",menu_text_color(0xFF000000)|mnf_disable_all_keys,
    "Welcome, adventurer, to Mount and Blade: Warband. Before beginning the game you must create your character. Remember that in the traditional medieval society depicted in the game, war and politics are usually dominated by male members of the nobility. That does not however mean that you should not choose to play a female character, or one who is not of noble birth. Male nobles may have a somewhat easier start, but women and commoners can attain all of the same goals -- and in fact may have a much more interesting if more challenging early game.",
    "none",
    [],
    [
    ("continue",[],"Continue...",
      [(jump_to_menu, "mnu_start_game_1"),
        ]
      ),

      ("go_back",[],"Go back",
      [
        (change_screen_quit),
      ]),
    ]
  ),
Comment out the red part and change the green part into an explanation that your module is mp only.
 
Ahhh this is too much :shock: Let's take on step at a time...ok single player disabled, but it would be better if you could remove the "start a new game" all together. And put multiplayer at the top of the main menu. You happen to know where to edit the order of the main menu. Or make "start a new game" not appear in it. I can't find it anywhere...
 
Ok that is too bad, the main menu stays the same then. Ok where in this wall of text do I add new factions. Like how do I remove all factions except one. Then copy it until I got all the factions in the first post? Sorry if I'm asking something that is obvious...to me this is chinese :razz:
 
You call that a wall of text? You're going to be terrified when you have to edit module_scripts to add items to your multiplayer troops :razz:

"kingdom_1" to "kingdom_6" are the ones you want to edit. To add a new faction simply add a "kingdom_7" after that (just copy an existing one and rename it) :smile:
 
Thanks you, slowly I'm completing this mod. So far this mod has:

New factions
No single player

Now how do I edit the music, I found out what the main menu music file is called. And I found that line in the module_music. I left it as it was, and then I put a waw file in module music folder. With the same name as it had in the module music text file.

I compiled and tried it, but same old music still. Must the music file be in OGG to be able to play? Or have I forgot some line somewhere?
 
What files contain the factions info? I want to make 2 factions that are exactly the same and have all the classes from each original MP faction.

I have a question about this though: Would people need to download anything if I do make custom factions? I'm pretty sure people wouldn't, but I just wanted to be sure.
 
Yes, people would need to download your mod to play it.

Files that contain the faction info you need for multiplayer is module_factions, module_troops, module_scripts and to some extent also module_presentations (and module_meshes). Those two last are for UI stuff only. I might've forgot something too. In module_factions you do as mentioned earlier in the thread. In module_troops you find the multiplayer troops and copy the ones you want. Make sure to change their factions to the correct ones. In your case you just change all of them to the same faction, copy them and change the rest. You're likely to get too many units per faction though, so you may have to mess around in module_presentations... Anyhow, in module_scripts, find game_quick_start and scroll down to the items section.

I'm afraid I'm too tired to explain it more thoroughly, sorry.
 
Ok now this mod got:

New factions
New music
No single player

Now where are these things located?

-Replacing main menu backgrounds, options backgrounds, multiplayer configuration screens etc, all window textures.
-Video file that plays before the game starts.

And where do I place in the module folder all the new backgrounds, in the texture folder?

Also if someone could redirect me to a more thoroughly explanation on how to replace/add equipment. Or better yet, join me and help me complete this mod. That would be great! Because I'm mainly a modeller, I hate this stuff. :razz:

Also, have someone looked into how to edit the harcoded stuff. Like changing the order of the main menu options? Or how to remove an option at the main menu? Is it hardcoded into the .exe? And if that is the case, would it be illegal to edit the .exe and change the order of the items?

Thanks for you help  :wink:

Ps:
Btw anyone who is trying to change the music in the game. Go to the module_music .py file. Find whatever track you want to replace with search. You can find all the tracks in the main game music folder. When you find it, replace it with whatever your .ogg file is called. Very important that it's a ogg music file. Like if you want to replace the main menu music it should look like this.

("mainmenu", "mainmenu.ogg",mtf_sit_main_title|mtf_start_immediately|mtf_module_track, 0),

You will have to add the line "|mtf_module_track," after all the other mtf commands. Now you can compile and start the module. And you will have new music on the main menu!
 
All the backgrounds and stuff are in /Mount&Blade Warband/Textures. loadscreen.dds, loadscreen2.dds and main_menu_nord.dds are examples of the files you're looking for. Put them in the Textures folder in your modules folder and make sure that scan_module_textures is set to 1 in module.ini (should be default setting).

As for editing equipment and troops, here's how. It's not that detailed though... I might post something a bit more clear, we'll see.

Open module_troops and get down to the section called "Multiplayer troops". To add new troops just add them to this section (keep the "swadian_crossbowman_multiplayer" troop ID for the first troop though, it acts as multiplayer_troops_begin; You could change that in module_constants however). The most important thing here is what factions they are set to, this is where it is defined. The items is their free starting equipment.

Above that section is the bots section. To add a new bot, just add it to that section and it's done.

Now, open module_scripts. The script you want to edit is game_quick_start. Scrolling down just a bit gets you to a huge section with items. It is here that the items are sorted into different types. If you wish to give a troop an item that isn't already listed here, you have to add it. When you get to the armours section, you'll notice that everything is set to "light". It seems TW originally planned to divided different types of armour into different categories too (which is actually possible to do). Anyhow, it's all fairly obvious.

The next sections is just below that, and it's equally obvious. It defines items available to different classes. Rather simple really. To add or remove something from a troop, find the troop you need, and add a line with the relevant troop and item ID's.

The last related part is the script "multiplayer_get_troop_class" (just search for it). Here the troops are divided into classes. I haven't actually looked into what this part does :razz:
Note: It is not necessary to add the troops here for them to work. However, should you change a troops ID, you'd need to change/remove it here too.

Hope it helped somewhat in any case...
 

Maybe I can make it a bit more clear.

go to module_scripts. find the area with:


Code:
   #arrows
      (item_set_slot, "itm_arrows", slot_item_multiplayer_item_class, multi_item_class_type_arrow),      
      (item_set_slot, "itm_barbed_arrows", slot_item_multiplayer_item_class, multi_item_class_type_arrow),      
      (item_set_slot, "itm_bodkin_arrows", slot_item_multiplayer_item_class, multi_item_class_type_arrow),
It has one of those for each item in multiplayer, create your own ones at the bottom of the list, eg I have:


Code:
   (item_set_slot, "itm_ig_armour3", slot_item_multiplayer_item_class, multi_item_class_type_light_armor),
      (item_set_slot, "itm_tau_helmet", slot_item_multiplayer_item_class, multi_item_class_type_light_helm),
      (item_set_slot, "itm_tau_pulse_rifle", slot_item_multiplayer_item_class, multi_item_class_type_bow),

make sure it is the right class type.

then just below this list is a list which assigns possible items to the troops:


Code:
(call_script, "script_multiplayer_set_item_available_for_troop", "itm_concentrated_pulse_charge", "trp_swadian_crossbowman_multiplayer"),
      (call_script, "script_multiplayer_set_item_available_for_troop", "itm_tau_pulse_rifle", "trp_swadian_crossbowman_multiplayer"),
so you see this adds the items 'tau_pulse_rifle' and 'concentrated_pulse_charge' (which i also added to the said list above) to the available list of the troop 'swadian_crossbowman_multiplayer'.
 
God I feel sorry for the modders being bombarded with questions but I've actually found this thread really useful, thanks guys.
 
Back
Top Bottom