• Moderator recruitment has begun!
  • Patreon Donations! patreon.com/swordmusket
SwordMusket Logo Png

Sword & Musket Server Hosting Guide (Windows) + General Info

DarthKiller454

Developer
develp
Messages
9
Country
Austrian Empire
Warning Post is separated into two separate Comments!

Dear Players,

it is finally time to open up the floodgates for Private Server hosting in Sword & Musket.
We appreciate all the time you helped us testing out the most important basic features in the module and are proud as a Team to finally have come to this step.

Foreword & Important Informations

It should be said in forefront that anyone reading this guide should have taken the time before to thoroughly check through the official documentation by TaleWorlds about Dedicated Server Hosting:
TaleWorlds Documentation - Hosting a Custom Server
The most important getaways from that Guide is how to generate a token, where to find it and all the different server settings that you can find out/modify for your own custom dedicated server and lastly, how to install/use custom maps for your own events/servers. We will need to understand these things, for the guide to function moving forward.

Currently, we have additional settings that will also be editable via an internal config (subject to change) that is stored inside the "swordmusketmptest" folder after successfully starting a server (this file will be generated after the first successful server launch). There you can change additional settings related to bleeding, bandages, RLB GameMode Settings and much more. Those will be explained later in the guide.

In Bannerlord there are two types of Servers: The default server type, and the now more accustomed automatic battle mode servers:
- The first is a server that will close and end after the "mission" ends. Which is usually after a server has finished a map. This was originally the intended hosting method for skirmish modes (the 6v6 competitive round mode).
- The latter is a more dynamic hosting option and preferred in almost any way, by instead having the option to continue for a set amount or infinite (-1 = forever) until the amount of missions has been played, the server ends or it crashes.

For optimal server hosting, we included a batch file in the dedicated server package that is automatically restarting a server if such a case happens, no matter which option from the above you have chosen. You can also opt to recreate your own method of hosting it, but it is advised to stick to this guide first, before trying your own methods.

The Hosting Part

Linux:
It is recommended that you follow the steps described by Nettelbeck and ask for Linux support in his thread.

Windows:
Step by step tutorial on setting up the dedicated server.

Steps before installing the Dedicated-Server-Files (repeat this every time you face issues with starting your server if it worked fine before)
1. Make sure your Token has been recently updated (especially if you cannot get past the starting of the server)
2. Make sure that your dedicated server runs on the LATEST OFFICIAL NON-beta Bannerlord Version. Not doing so will result in your server being inaccessible under ALL circumstances.
3. It is recommended that you copy your dedicated server to a separate folder since we have to modify/cluster the core /bin folder of the dedicated server and it might hurt other mods/native servers hosting under the same folder. Doing so can help avoid a lot of issues that you might face later. As long as the files are updated, you can copy the folder anywhere you want. Make sure to replace everything, whenever a new update for Bannerlord comes out.


Some additional notes by W1ndStrik3 for Server Hosts
a note about increasing available ports on Windows. The instructions are as follows:
  1. Open regedit
  2. Open the directory

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  3. Create a new DWORD value named MaxUserPort
  4. Set the value of MaxUserPort to 65534 and set the base to Decimal

Downloading and Installing the Sword & Musket Dedicated Server Files

Sword & Musket Dedicated Server Files

1. Download the above link.
2. Make sure the .rar you downloaded has been OPENED. By that I mean that you see the Folder name: "Mount & Blade II Dedicated Server" in your window that is open and NOT anything close to "Sword & Musket Dedicated Server Files Version x"
3. Extract the .rar towards the space where your Bannerlord Dedicated Server is located. The easiest method is to Drag & Drop the "Mount & Blade II Dedicated Server" next to the same named folder but NOT onto it. Move it on an empty space of the folder so it asks you to replace any content and then press "Yes".
4. Go into "Mount & Blade II Dedicated Server\bin\Win64_Shipping_Server" and see if you can see the sam_server.bat (included in the S&M Download)
5. Open "sam_server.bat" in your editor by choice (notepad++ recommended)
6. Check and Edit all paths to match up with the location where your current Dedicated Server folder is. So the server finds all relevant .exe files.
Example:
SET MyPath="C:\Mount & Blade II Dedicated Server\bin\Win64_Shipping_Server"
7. Search and Edit to your likings:
SET MyConfig=YOURCONFIG.txt
SET /A MyPort= YOURPORT (Number, Default 7210)
The Config HAS to be in your "...\Mount & Blade II Dedicated Server\Modules\Native\" Folder
And remember to save your changes
8. Finally start the Server once to see if it runs with the default config.
9. Check if your Server has generated a config.xml inside "...\Mount & Blade II Dedicated Server\Modules\swordmusketmptest\"
If Yes, then edit the config to your likings. Explaination to the things will be given at the end of the guide.
10. Edit your config in the Native folder and also change it to your likings. Additional Details related to S&M will be given at the end of the guide.
11. You should now have a simple bootable server. Have fun with your Server!

Custom Maps Guide (Serverside)

This part is for adding custom maps to your Sword & Musket Server. While making custom maps with S&M Content is currently not supported (also subject to be changed eventually), all Native maps work without any issues. Please refer again to the TaleWorlds Guide how and where to install those maps. Therefore referring to these two points quoted from the Guide itself.

- Make sure ANY map you try to use is COMPATIBLE with the GameModes you are trying to use them with! Refer to the Guide below for more information.
TaleWorlds Documentation - What makes a Multiplayer Scene
If you experience crashes when joining only on certain maps, only with certain gamemodes or when warmup is ending, battle is starting, then you'll likely have an incompatible map/gamemode combination and should either choose a different map and if the map was supposed to be compatible report it to the map-creator or our team (if it is an official map from our mod).
- The maps to be served must be located within ONLY the Multiplayer module’s SceneObj directory, in the same way a typical module contains scenes. You can create the directory by hand if it is missing.
- The maps to be served must be “registered” through either the Map configuration option, the add_map_to_automated_battle_pool or add_map_to_usable_maps commands. In other words, only maps playable on the server are served.
- Keep in mind that the "Multiplayer" Module exists ITSELF and is NOT the "swordmusketmptest" folder. This is why it is recommended that Sword & Musket Dedicated Servers are copied separately from other Native modules, so the custom maps don't interfere with other mods' custom maps.
- Make sure to keep note of every existing custom map and make sure that any custom maps created are having a unique name that are by any means not something another individual can come up with. Names like: "mp_training, train_map, mp_big_fort, mp_small_fort, mp_island, mp_city_001" or anything similar is NOT a good map name. Try and be more creative like: "sam_ir59_train", which includes the module "sam", a regiment which is linked to a server "ir59" and a function of the map "train". It is still not perfect as there could be multiple of those but it is a lot better than the examples before.

Config Settings (exclusive S&M Features)

Make sure that you never remove the <> </> signs from any of the config, or you might crash the server upon loading. Check the syntax thoroughly if you believe this might be the case or delete it and let it generate new if you cannot find it. Using Notepad++ and setting the language to xml is very helpful in identifying this issue.
 
Last edited:

DarthKiller454

Developer
develp
Messages
9
Country
Austrian Empire
config.xml:
<UseSMAdmin>true</UseSMAdmin> #Use our Sword&Musket Admin system instead of the Native one. Currently WIP.
<Bleeding>false</Bleeding> #Should Players start bleeding if they take more than 50% health damage after being hit? Curable by Bandages.
<Healing>false</Healing> # Are Medics allowed to heal? Default false, make sure this and Friendly Fire are enabled for Medics to work.
<MaxHealing>0</MaxHealing> # The Maximum amount of HP a Medic can heal per player.
<GfMode>false</GfMode> # Deprecated but it makes players only use the melee weapons instead of ranged weapons. Replace with GfMode as a separate GameMode
<UseNicknames>true</UseNicknames> # Allows the usage of our Nicknames system which allows custom non-steam related names. If Off it uses the Steam Name.
<RLBTickets>300</RLBTickets> # The maximum amount of points a team starts with in the RLB GameMode.
<RLBTicketLossSlay>10</RLBTicketLossSlay> # Tickets a Team loses if an admin decides to slay a player in that team.
<RLBAllyCount>5</RLBAllyCount> # Minimum amount of allied players needed near a flag to allow respawning.
<RLBAllyRange>10</RLBAllyRange> # Minimum range in approx. metres that all allies have to be next to the flag for spawning to work.
<RLBEnemyRange>10</RLBEnemyRange> # Minimum range enemies have to be away from the flag to allow flagspawning for the opposite team.
<RLBSpawnRangeMin>0</RLBSpawnRangeMin> # Minimum Range that allies will spawn from the flag. Spread between this and Max Range.
<RLBSpawnRangeMax>500</RLBSpawnRangeMax> # Maximum Range that allies will spawn from the flag. Spread between this and Min Range.
<RLBCapturePoints>20</RLBCapturePoints> # Default amount of tokens a team loses if the flag has been captured by the enemy.
<RLBDynamicCapturePoints>true</RLBDynamicCapturePoints> # Calculates the CapturePoints from a Flag by the number of players that are part of the Flag.
<RLBDynCapturePointsMin>5</RLBDynCapturePointsMin> # Minimum amount of tokens a Flag can be worth if Dynamic Capture Points are on.
<RLBDynCapturePointsMax>20</RLBDynCapturePointsMax> # Maximum amount of tokens a Flag can be worth if Dynamic Capture Points are on.
<RLBDynCapturePointsPerSoldier>1</RLBDynCapturePointsPerSoldier> # Default Token Count per Soldier that is being calculated when using Dynamic Capture Points.
<RLBCaptureTime>30</RLBCaptureTime> # Time in Seconds it takes for a captured flag to be counted as captured and removed.
<RLBDespawnTime>50</RLBDespawnTime> # Time after which a flag has been lost where it will be removed to avoid starving a regiment by deciding not to capture it.
<RLBSpawnTime>20</RLBSpawnTime> # Spawn Timer for Soldiers to respawn in RLB.
<RLBBlockFlagTK>true</RLBBlockFlagTK> # Disables Teamkilling of friendly Flaggers to avoid toxic behaviours to escalate during events.
<RLBAntiFiC>false</RLBAntiFiC> # Use an Anti Fire in Charge system that prevents dealing damage with shooting while your regiment is in melee combat.
<AntiFooF>true</AntiFooF> # Use an Anti Fire out of Formation system that prevents dealing damage with shooting while you are too far spaced out of formation.
<ClassLimitsOn>false</ClassLimitsOn> # Enables/Disables ClassLimits
<CavOnly>false</CavOnly> # For Cavalry-Groupfighting Servers or Fun-Rounds. To disable Infantry.
<LightsTotal>999</LightsTotal> # Maximum Alive people playing as Lights between 0-999.
<LightsPercent>100</LightsPercent> # Percentage of people in a team able to pick Lights between 0-100. (in percent)
<SkirmsTotal>999</SkirmsTotal> # Maximum Alive people playing as Skirmishers between 0-999.
<SkirmsPercent>100</SkirmsPercent> # Percentage of people in a team able to pick Skirmishers between 0-100. (in percent)
<ArtilleryTotal>999</ArtilleryTotal> # Maximum Alive people playing as Artillery between 0-999.
<ArtilleryPercent>100</ArtilleryPercent> # Percentage of people in a team able to pick Artillery between 0-100. (in percent)
<CavalryTotal>999</CavalryTotal> # Maximum Alive people playing as Cavalry between 0-999.
<CavalryPercent>100</CavalryPercent> # Percentage of people in a team able to pick Cavalry between 0-100. (in percent)
<SpecialistTotal>999</SpecialistTotal> # Maximum Alive people playing as Specialists between 0-999.
<SpecialistPercent>100</SpecialistPercent> # Percentage of people in a team able to pick Specialists between 0-100. (in percent)
<GuardTotal>999</GuardTotal> # Maximum Alive people playing as Guards between 0-999.
<GuardPercent>100</GuardPercent> # Percentage of people in a team able to pick Guards between 0-100. (in percent)

serverconfig.txt:
Again, refer to the first guide from TaleWorlds in the Foreword for most important stuff of what you can change in the serverconfig.txt
Here is a small list of things to consider when hosting a S&M Dedicated Server.
All GameModes:
Battle, BattleNoFlags, Captain, Duel, GfMode, RLB, Skirmish, Siege, TeamDeathmatch, DeathMatch (BEWARE OF CAPITALIZATION)
- Generally we recommend avoiding Skirmish.
- Captain only supports up to 6 players per team (12 max)
- The Balance of Captain settings also hasn't been properly adjusted yet.
- There are currently no maps officially supported for Captain, Duel or Skirmish Gameplay.
- Battle uses a 3 Flag system with one Flag disappearing, we removed this "Native" Style Battle feature by recreating the default Battle Last-Team-Standing under BattleNoFlags. GfMode is a Clone of BattleNoFlags but it instead uses a different EquipmentSet for all Units to only wield melee weapons. Use it with CavOnly and ClassLimits for setting up your own Groupfight/Cav-Groupfight Server.

Factions:
sturgia - France
vlandia - United Kingdom
khuzait - Austria
battania - Russia
Don't use the factions below! They only have Placeholder units and are not properly set up yet!
empire
aserai

ChatCommands:
These are commands you can type in as admin when you are ingame via chat.

!a: Type in admin chat. !a <string text>
!bring: Brings another player to you. Usage !bring <Target User>
!endmap: Ends the current mission. !endmap
!endwarmup: Ends warmup mode <optional int time>
!godmode: Makes you immune to all damage.
!goto: Teleport yourself to another. Usage !tp <Target User>
!heal: Heals a player. Use * to heal all.
!help: Help message. Returns all the avaliable commands.
!kick: Kicks a player. First username that contains the provided input will be kicked. Usage !kick <player name>
!kill: Kills a provided username. Usage !kill <player name>
!mute: Temporarily mutes a player. Usage !tempmute <player name>
!reset: Resets the current mission. !reset
!unmute: Unmutes a player. Usage !unmute <Player Name>
!warmuptime: Changes warmuptime time. !warmuptime <new round time in minutes>

- The !a command gives a personalized chat message with your name that only other admins can see (for internal communication)
- For Broadcasting commands to players or responding to players without a broadcast use:
/ab
/ac
from the Native Admin Commands. Those however will not display the name of the admin responding and will be only displayed as "Admin".

Final words

- Updating the Servers won't be as easy as it was with Napoleonic Wars. We are looking to improving the Installation-Frame so you don't have to set up the module each time anew whenever we are doing updates. This cannot be guaranteed to always be the case whenever bigger changes to the module framework happen (like removal of .xmls or maps) happen. We will try our best to avoid this after this stage.
- The Server structure as we have it currently is still not final and still is in it's testing stages. We have narrowed down any big issues related to our own features as much as possible. If there are any remaining issues you face don't fear to comment down below.
- We hope we have established enough features to make customized event hosting easy and as accessible as it can be right now. We continue to thrive perfection in that direction, but that will take a lot of time.
- If there are any bigger issues with the server setup, I hope we can establish and maintain a helpful community that is able to help out each other.

This Thread will be subject to change whenever any changes occur, so keep yourselves updated.
 
Last edited:

DarthKiller454

Developer
develp
Messages
9
Country
Austrian Empire
* As of 27.03.2024 this has been updated to Sword & Musket v2.0.3
Serverhosters keep yourself up-to-date!
 
Last edited:

DarthKiller454

Developer
develp
Messages
9
Country
Austrian Empire
* as of 23.01.2025 this has been updated to Sword & Musket v2.0.5 (0.2.3)
Serverhosters keep yourself up-to-date!
 

DarthKiller454

Developer
develp
Messages
9
Country
Austrian Empire
* As of 01.04.2025 (yes today) an additional note has been added
a note about increasing available ports on Windows. The instructions are as follows:
  1. Open regedit
  2. Open the directory

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  3. Create a new DWORD value named MaxUserPort
  4. Set the value of MaxUserPort to 65534 and set the base to Decimal


    Can also be found in the first description under the Windows Installation part
 

74thPGC_Asuka

New member
Messages
2
Country
Prussia
Hello, may I ask if there is still a way to download the dedicated server files now? The link in the post has expired.
 
Top