Documentation Tutorial How to Setup a Bannerlord Server

Users who are viewing this thread

How to Setup a Bannerlord Server
Video Tutorial


Helpful Links:
Files from the Video
Original Documentation Page for Server Hosting
Server Stability Patches
Server Chat Commands (Server Only)

C#:
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.String, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Changes the name of the server in the server list", 0, 0, null, false, null)]
            ServerName,
            // Token: 0x04002053 RID: 8275
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.String, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Welcome messages which is shown to all players when they enter the server.", 0, 0, null, false, null)]
            WelcomeMessage,
            // Token: 0x04002054 RID: 8276
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.String, MultiplayerOptionsProperty.ReplicationOccurrence.Never, "Sets a password that clients have to enter before connecting to the server.", 0, 0, null, false, null)]
            GamePassword,
            // Token: 0x04002055 RID: 8277
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.String, MultiplayerOptionsProperty.ReplicationOccurrence.Never, "Sets a password that allows players access to admin tools during the game.", 0, 0, null, false, null)]
            AdminPassword,
            // Token: 0x04002056 RID: 8278
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Never, "Sets ID of the private game definition.", -2147483648, 2147483647, null, false, null)]
            GameDefinitionId,
            // Token: 0x04002057 RID: 8279
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Bool, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Allow players to start polls to kick other players.", 0, 0, null, false, null)]
            AllowPollsToKickPlayers,
            // Token: 0x04002058 RID: 8280
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Bool, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Allow players to start polls to ban other players.", 0, 0, null, false, null)]
            AllowPollsToBanPlayers,
            // Token: 0x04002059 RID: 8281
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Bool, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Allow players to start polls to change the current map.", 0, 0, null, false, null)]
            AllowPollsToChangeMaps,
            // Token: 0x0400205A RID: 8282
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Bool, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Allow players to use their custom banner.", 0, 0, null, false, null)]
            AllowIndividualBanners,
            // Token: 0x0400205B RID: 8283
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Bool, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Use animation progress dependent blocking.", 0, 0, null, false, null)]
            UseRealisticBlocking,
            // Token: 0x0400205C RID: 8284
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.String, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Changes the game type.", 0, 0, null, true, null)]
            PremadeMatchGameMode,
            // Token: 0x0400205D RID: 8285
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.String, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Changes the game type.", 0, 0, null, true, null)]
            GameType,
            // Token: 0x0400205E RID: 8286
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Enum, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Type of the premade game.", 0, 1, null, true, typeof(PremadeGameType))]
            PremadeGameType,
            // Token: 0x0400205F RID: 8287
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.String, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Map of the game.", 0, 0, null, true, null)]
            Map,
            // Token: 0x04002060 RID: 8288
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.String, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Sets culture for team 1", 0, 0, null, true, null)]
            CultureTeam1,
            // Token: 0x04002061 RID: 8289
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.String, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Sets culture for team 2", 0, 0, null, true, null)]
            CultureTeam2,
            // Token: 0x04002062 RID: 8290
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Set the maximum amount of player allowed on the server.", 1, 1023, null, false, null)]
            MaxNumberOfPlayers,
            // Token: 0x04002063 RID: 8291
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Set the amount of players that are needed to start the first round. If not met, players will just wait.", 0, 20, null, false, null)]
            MinNumberOfPlayersForMatchStart,
            // Token: 0x04002064 RID: 8292
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Amount of bots on team 1", 0, 100, null, false, null)]
            NumberOfBotsTeam1,
            // Token: 0x04002065 RID: 8293
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Amount of bots on team 2", 0, 100, new string[]
            {
                "Battle",
                "NewBattle",
                "ClassicBattle",
                "Captain",
                "Skirmish",
                "Siege",
                "TeamDeathmatch"
            }, false, null)]
            NumberOfBotsTeam2,
            // Token: 0x04002066 RID: 8294
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Amount of bots per formation", 0, 100, new string[]
            {
                "Captain"
            }, false, null)]
            NumberOfBotsPerFormation,
            // Token: 0x04002067 RID: 8295
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "A percentage of how much melee damage inflicted upon a friend is dealt back to the inflictor.", 0, 100, new string[]
            {
                "Battle",
                "NewBattle",
                "ClassicBattle",
                "Captain",
                "Skirmish",
                "Siege",
                "TeamDeathmatch"
            }, false, null)]
            FriendlyFireDamageMeleeSelfPercent,
            // Token: 0x04002068 RID: 8296
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "A percentage of how much melee damage inflicted upon a friend is actually dealt.", 0, 100, new string[]
            {
                "Battle",
                "NewBattle",
                "ClassicBattle",
                "Captain",
                "Skirmish",
                "Siege",
                "TeamDeathmatch"
            }, false, null)]
            FriendlyFireDamageMeleeFriendPercent,
            // Token: 0x04002069 RID: 8297
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "A percentage of how much ranged damage inflicted upon a friend is dealt back to the inflictor.", 0, 100, new string[]
            {
                "Battle",
                "NewBattle",
                "ClassicBattle",
                "Captain",
                "Skirmish",
                "Siege",
                "TeamDeathmatch"
            }, false, null)]
            FriendlyFireDamageRangedSelfPercent,
            // Token: 0x0400206A RID: 8298
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "A percentage of how much ranged damage inflicted upon a friend is actually dealt.", 0, 100, new string[]
            {
                "Battle",
                "NewBattle",
                "ClassicBattle",
                "Captain",
                "Skirmish",
                "Siege",
                "TeamDeathmatch"
            }, false, null)]
            FriendlyFireDamageRangedFriendPercent,
            // Token: 0x0400206B RID: 8299
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Enum, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Who can spectators look at, and how.", 0, 7, null, true, typeof(SpectatorCameraTypes))]
            SpectatorCamera,
            // Token: 0x0400206C RID: 8300
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Maximum duration for the warmup. In minutes.", 1, 60, null, false, null)]
            WarmupTimeLimit,
            // Token: 0x0400206D RID: 8301
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Maximum duration for the map. In minutes.", 1, 60, null, false, null)]
            MapTimeLimit,
            // Token: 0x0400206E RID: 8302
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Maximum duration for each round. In seconds.", 120, 960, new string[]
            {
                "Battle",
                "NewBattle",
                "ClassicBattle",
                "Captain",
                "Skirmish",
                "Siege"
            }, false, null)]
            RoundTimeLimit,
            // Token: 0x0400206F RID: 8303
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Time available to select class/equipment. In seconds.", 2, 60, new string[]
            {
                "Battle",
                "NewBattle",
                "ClassicBattle",
                "Captain",
                "Skirmish",
                "Siege"
            }, false, null)]
            RoundPreparationTimeLimit,
            // Token: 0x04002070 RID: 8304
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Maximum amount of rounds before the game ends.", 1, 20, new string[]
            {
                "Battle",
                "NewBattle",
                "ClassicBattle",
                "Captain",
                "Skirmish",
                "Siege"
            }, false, null)]
            RoundTotal,
            // Token: 0x04002071 RID: 8305
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Wait time after death, before respawning again. In seconds.", 1, 60, new string[]
            {
                "Siege"
            }, false, null)]
            RespawnPeriodTeam1,
            // Token: 0x04002072 RID: 8306
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Wait time after death, before respawning again. In seconds.", 1, 60, new string[]
            {
                "Siege"
            }, false, null)]
            RespawnPeriodTeam2,
            // Token: 0x04002073 RID: 8307
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Bool, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Unlimited gold option.", 0, 0, new string[]
            {
                "Battle",
                "Skirmish",
                "Siege",
                "TeamDeathmatch"
            }, false, null)]
            UnlimitedGold,
            // Token: 0x04002074 RID: 8308
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Gold gain multiplier from agent deaths.", -100, 100, new string[]
            {
                "Siege",
                "TeamDeathmatch"
            }, false, null)]
            GoldGainChangePercentageTeam1,
            // Token: 0x04002075 RID: 8309
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Gold gain multiplier from agent deaths.", -100, 100, new string[]
            {
                "Siege",
                "TeamDeathmatch"
            }, false, null)]
            GoldGainChangePercentageTeam2,
            // Token: 0x04002076 RID: 8310
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Min score to win match.", 0, 1023000, new string[]
            {
                "TeamDeathmatch"
            }, false, null)]
            MinScoreToWinMatch,
            // Token: 0x04002077 RID: 8311
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Min score to win duel.", 0, 7, new string[]
            {
                "Duel"
            }, false, null)]
            MinScoreToWinDuel,
            // Token: 0x04002078 RID: 8312
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Integer, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Minimum needed difference in poll results before it is accepted.", 0, 10, null, false, null)]
            PollAcceptThreshold,
            // Token: 0x04002079 RID: 8313
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Enum, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Maximum player imbalance between team 1 and team 2.", 0, 5, null, true, typeof(AutoTeamBalanceLimits))]
            AutoTeamBalanceThreshold,
            // Token: 0x0400207A RID: 8314
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Bool, MultiplayerOptionsProperty.ReplicationOccurrence.Immediately, "Enables anti-cheat.", 0, 0, null, false, null)]
            EnableAntiCheat,
            // Token: 0x0400207B RID: 8315
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Bool, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Enables mission recording.", 0, 0, null, false, null)]
            EnableMissionRecording,
            // Token: 0x0400207C RID: 8316
            [MultiplayerOptionsProperty(MultiplayerOptions.OptionValueType.Bool, MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad, "Sets if the game mode uses single spawning.", 0, 0, null, false, null)]
            SingleSpawn,
            // Token: 0x0400207D RID: 8317
            NumOfSlots

Troubleshooting
V1.0.0
  • With the v1.0.0 release of server files, TW forgot a directory that needed to be included in Modules/Native. Either copy "MultiplayerForcedAvatars" from your Bannerlord client Modules/Native directory or create an empty folder called "MultiplayerForcedAvatars" in Modules/Native

Known Config Issues:
- Setting AdminPassword does not work at the moment! Instead when the console opens, you will need to enter the password manually
- 12v12 captain mode has had issues due to max number of agents that can be spawned. Recommended to stay at 8v8
- Battle will show the wrong prices for items if "SingleSpawn true" is not present in the config file
- When using "enable_automated_battle_switching", do not add a start mission command (start_game_and_mission or start_mission) to the config. It is handled for you

Known Command Line Issues:
- Do not add command line options after the _MODULES_ section of your command line, it will cause problems or the option will be ignored

General Issues:
- Your Firewall or Antivirus could potentially be interfering with the server. If all else fails, try turning them both off and see if it works

Helpful Info
Notes:
  • Commands are case sensitive
  • Even though you cannot see the command you type, it is being entered
How to Change Maps using the Console
  1. Make sure the current mission is ended: end_mission
  2. Change the map. Here is an example command using mp_tdm_map_001: Map mp_tdm_map_001
  3. Start the mission: start_mission
  4. NOTE: enable_automated_battle_switching will make it difficult to accurately set the map. The mission does not end until polling is closed and it will change the value of Map, as well as the two factions, before you hit start_mission. There is a way programatically to get around this, but at the moment both the Web UI and Console do not have the capability to change maps easily while this feature is active.
Map Name and Image in Vote Screen
  1. As it sits, both the map name and image that is presented during voting are stored on the client and the current map downloader does not download that to the client
  2. In order to get a map name on the client, you would need to add your maps name to native_string.xml under Modules/Native/ModuleData
  3. The images are stored as sprites and you can find them with the other sprites in the resource manager by searching for "ui_mploading"
Final Note:
If something isn't working, for now I would recommend starting a support ticket rather than starting a discussion here. Chances are there are a lot of things that Taleworlds will need to address early on, and burying the issues here will hurt us more in the long run. Thanks!
 
Last edited:
Thanks for your efforts. I didnt see your tutorial after I got it running using the original documentation.
I've never read such a badly written documentation (the offical one) It does not even give a proper example. It only allowes for trial and error. Thats not what a documentation should be there for.
I have got the server up and running with all of the settings I want.
I revived the original Duel server :cool:

But, now I am stuck in the "Awaiting Server View" or the server stops entirely after the round ends.
with these lines added to my config:
set_automated_battle_count -1 start_game_and_mission

When I add:
enable_automated_battle_switching
Config looks like this. I switched the order around aswell. In the doc it says "you can add set_automated_battle_count -1 before the enable_automated_battle_switching command", so thats why put them in this order.
But nothing helps:
set_automated_battle_count -1 enable_automated_battle_switching start_game_and_mission

I get this exception when starting the server:
Y9MDlV3.jpg
 
"start_game_and_mission" and "enable_automated_battle_switching" conflict with each other. "enable_automated_battle_switching" will handle starting the mission, so just use "start_game" instead. Also, try setting "set_automated_battle_count" to 100 just to see if it works. Then switch it back to -1

However, that exception look like it can't find your config. Is ds_config.txt under the native folder? That is where the configs need to appear.
 
Hello,
I can not run dedicated server on my steam, it's not working. when i click it its starting running but after then closing. What should i do?
It is very possible this is an issue with a missing folder in server files for v1.0.0. Check v1.0.0 troubleshooting section above for how to fix it and let me know if it works or not.
 
It is very possible this is an issue with a missing folder in server files for v1.0.0. Check v1.0.0 troubleshooting section above for how to fix it and let me know if it works or not.
thank you very much, it's working now, i have another question tho; could we use these files you shared at first page, for v1.0?

and another one, in your video you saying; "if you are running a dedicated server, add "/dedicatedcustomserverauthtoken <token from file>" before the _MODULES_ section in start.bat"

but you are not showing how to do so, i didn't understand that part, could you help please?
 
thank you very much, it's working now, i have another question tho; could we use these files you shared at first page, for v1.0?

and another one, in your video you saying; "if you are running a dedicated server, add "/dedicatedcustomserverauthtoken <token from file>" before the _MODULES_ section in start.bat"

but you are not showing how to do so, i didn't understand that part, could you help please?
Those files should work.

For the token argument, your bat file would like this:
Code:
.\DedicatedCustomServer.Starter.exe /dedicatedcustomserverconfigfile cc_battle_config.txt /dedicatedcustomserverauthtoken <token from file> _MODULES_*Native*Multiplayer*_MODULES_

You get the token from Documents\Mount and Blade II Bannerlord\Tokens\DedicatedCustomServerAuthToken.txt
 
Last edited:
"start_game_and_mission" and "enable_automated_battle_switching" conflict with each other. "enable_automated_battle_switching" will handle starting the mission, so just use "start_game" instead. Also, try setting "set_automated_battle_count" to 100 just to see if it works. Then switch it back to -1

However, that exception look like it can't find your config. Is ds_config.txt under the native folder? That is where the configs need to appear.
Oh you are right, I think I sent the wrong screenshot. The actual exception was having an error in a specific line, if I remember correctly because of a missing parameter. So it sounds more like conflicting parameters.

My path configuration is correct, thats not the issue.,

But thanks, I will try to replace start_game_and_mission with start_game
 
Afternoon gamers,

So I noticed that when I take a look at my steam and try to find the server tools on my account I couldn't find them. I did restart steam and still couldn't see it, might just be a bug on my end or some caching issue. Work around, use SteamCMD if you intend to run the server on a dedicated machine.

app_update 1863440 validate

-----

Although I've yet to successfully get my own server working just yet. The docs leave a lot to be desired.
 
Last edited:
Those files should work.

For the token argument, your bat file would like this:
Code:
.\DedicatedCustomServer.Starter.exe /dedicatedcustomserverconfigfile cc_battle_config.txt /dedicatedcustomserverauthtoken <token from file> _MODULES_*Native*Multiplayer*CCModuleDev*_MODULES_

You get the token from Documents\Mount and Blade II Bannerlord\Tokens\DedicatedCustomServerAuthToken.txt

Thanks but now start.bat is not working at all :grin: i don't know what i am doing wrong, not sure :sad:
 
Thanks but now start.bat is not working at all :grin: i don't know what i am doing wrong, not sure :sad:
Good lord, my brain must have been addled when I replied. I had a mod I was working on in _MODULES_ sections of the bat file I posted. Try this instead:
Code:
.\DedicatedCustomServer.Starter.exe /dedicatedcustomserverconfigfile cc_battle_config.txt /dedicatedcustomserverauthtoken <token from file> _MODULES_*Native*Multiplayer*_MODULES_
 
Good lord, my brain must have been addled when I replied. I had a mod I was working on in _MODULES_ sections of the bat file I posted. Try this instead:
Code:
.\DedicatedCustomServer.Starter.exe /dedicatedcustomserverconfigfile cc_battle_config.txt /dedicatedcustomserverauthtoken <token from file> _MODULES_*Native*Multiplayer*_MODULES_
My start.bat file is like this: ".\DedicatedCustomServer.Starter.exe /dedicatedcustomserverconfigfile tdm_config.txt /dedicatedcustomserverauthtoken <token from file> _MODULES_*Native*Multiplayer*_MODULES_"

but when i click it, nothing happens, it's not running.

btw i am trying to create a server on my pc, so i think i don't need to do that token thing, sorry english is not my mother language, its not well,

if i try to create a server on my pc, do i need to open port 7210?
 
Hello,
Im struggling with console i think it goes crazy.
All time it spams of 3 different lines and i dont know why and how to fix it.
[09:51:39.049] Http Post Request to bannerlord-even-custombattleservermanager.bannerlord-services-2:80/Data/ProcessMessage
[09:51:39.158] ClientRestSessionTask::SetFinishedAsSuccessful::TaleWorlds.Diamond.Rest.AliveMessage
[09:51:39.158] ClientRestSessionTask::SetFinishedAsSuccessful::TaleWorlds.Diamond.Rest.AliveMessage done
It spams all time 3 messages per second.
Can someone tell me what is the cause of this issue?
I was trying to connect to server but when i connect i just got info on console that remove peer (me) and in game i have "Your Connection with the server timed out"
My account is too new to give links so but still it would not show much only spam.
 
Back
Top Bottom