Server Configuration: Difference between revisions
m (layout) |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Config Files = | |||
== autoconfig.ini == | |||
Contains basic settings like server name, password, player limit, bot count, lobby mode. | |||
Most relevant options are fairly self-explanatory. | |||
You should *change at least the following options*: | |||
* <code>Name</code> - sets the server name | |||
* <code>MaxPlayers</code> - set the maximum of players on the server | |||
* <code>VisibleInGamesList</code> - set to false, if you host in LAN only, to not confuse external players with your server in the server listing | |||
'''''Note''''': only ever write changes to autoconfig.ini after the server has stopped - your changes will be lost as the file is rewritten when the server stops. | |||
All options in autoconfig.ini can be defined via CLI arguments (eg <code>./soldat2 ServerPassword=foobar</code>), as well as dynamically in-game via rcon commands (eg <code>rcon set ServerPassword foobar</code>). | |||
== Rules/*/*.json == | |||
Each JSON file defines a game mode (eg CTF, DM, etc). | |||
In these files match duration, score limit, teams, default weapon selection, medkits, etcpp are defined. | |||
== Levels/*/*.json == | |||
Contains custom maps. Get some maps from [https://tms2.jrgp.org/ TMS2]. See also [[Mapping | Mapping Guide]]. | |||
== Modifiers/*/*.json == | |||
Contains modifiers that customize some parameters of the game (and can be voted for by players in the lobby for each match). See [[Custom Modifiers]] for details. | |||
= | == Scripts/*/*.cs == | ||
C# scripts that define custom behaviour. See [[:Category:Modding]]. | |||
== Cycles/*/*.json == | |||
Map rotations (for when lobby is disabled). | |||
== greet.txt == | |||
Server info message showing in the popup before each match. Supports [TODO custom formatting] | |||
= | = Examples = | ||
You can use the following public server configurations as examples, or a baseline for your own configuration: | |||
* [https://codeberg.org/norwin/soldat2-custom/src/branch/server/nolobby @noerws Vote Fast server] (among others) | |||
= How to... = | |||
== customize match duration, score limit == | |||
Edit each file in <code>Rules/Standard/</code> and set: | |||
* <code>Match.MatchSecs</code> | |||
* <code>Match.ScoreLimit</code> | |||
== Manage bots == | |||
In autoconfig.ini, set: | |||
* FillBotsCount - the amount of bots added to an empty server. they will be replaced by human players. | * FillBotsCount - the amount of bots added to an empty server. they will be replaced by human players. | ||
* FillBotsDifficulty - 0 is stupid, 3 is butcher | * FillBotsDifficulty - 0 is stupid, 3 is butcher | ||
== Set up admin commands == | |||
In autoconfig.ini, set: | |||
* AdminPlayfabID - your Playfab ID to be admin automatically (To find your Playfab ID, start the server and join with your client. Your Playfab ID will show up in the server logs as <code>1 YOUR_NAME joined the server [YOUR_PLAYFAB_ID]</code>) | * AdminPlayfabID - your Playfab ID to be admin automatically (To find your Playfab ID, start the server and join with your client. Your Playfab ID will show up in the server logs as <code>1 YOUR_NAME joined the server [YOUR_PLAYFAB_ID]</code>) | ||
* RconPassword - if set, more than one player can send admin commands. | * RconPassword - if set, more than one player can send admin commands. | ||
== Play pre-selected maps & game modes only == | |||
In autoconfig.ini, set: | |||
* UseLobby = False | * UseLobby = False | ||
Line 56: | Line 79: | ||
}] | }] | ||
</pre> | </pre> | ||
[[Category:Dedicated Server]] | [[Category:Dedicated Server]] |
Latest revision as of 17:46, 10 June 2023
Config Files
autoconfig.ini
Contains basic settings like server name, password, player limit, bot count, lobby mode.
Most relevant options are fairly self-explanatory. You should *change at least the following options*:
Name
- sets the server nameMaxPlayers
- set the maximum of players on the serverVisibleInGamesList
- set to false, if you host in LAN only, to not confuse external players with your server in the server listing
Note: only ever write changes to autoconfig.ini after the server has stopped - your changes will be lost as the file is rewritten when the server stops.
All options in autoconfig.ini can be defined via CLI arguments (eg ./soldat2 ServerPassword=foobar
), as well as dynamically in-game via rcon commands (eg rcon set ServerPassword foobar
).
Rules/*/*.json
Each JSON file defines a game mode (eg CTF, DM, etc). In these files match duration, score limit, teams, default weapon selection, medkits, etcpp are defined.
Levels/*/*.json
Contains custom maps. Get some maps from TMS2. See also Mapping Guide.
Modifiers/*/*.json
Contains modifiers that customize some parameters of the game (and can be voted for by players in the lobby for each match). See Custom Modifiers for details.
Scripts/*/*.cs
C# scripts that define custom behaviour. See Category:Modding.
Cycles/*/*.json
Map rotations (for when lobby is disabled).
greet.txt
Server info message showing in the popup before each match. Supports [TODO custom formatting]
Examples
You can use the following public server configurations as examples, or a baseline for your own configuration:
- @noerws Vote Fast server (among others)
How to...
customize match duration, score limit
Edit each file in Rules/Standard/
and set:
Match.MatchSecs
Match.ScoreLimit
Manage bots
In autoconfig.ini, set:
- FillBotsCount - the amount of bots added to an empty server. they will be replaced by human players.
- FillBotsDifficulty - 0 is stupid, 3 is butcher
Set up admin commands
In autoconfig.ini, set:
- AdminPlayfabID - your Playfab ID to be admin automatically (To find your Playfab ID, start the server and join with your client. Your Playfab ID will show up in the server logs as
1 YOUR_NAME joined the server [YOUR_PLAYFAB_ID]
) - RconPassword - if set, more than one player can send admin commands.
Play pre-selected maps & game modes only
In autoconfig.ini, set:
- UseLobby = False
- AllowVoting = False
- GamesCycleFile = Cycles/Custom/selected-maps.json
Having this, list the maps you want in your game cycle:
nano Cycles/Custom/selected-maps.json
[{ "Rules": "Deathmatch", "Level": "dm_epitaph" }]