Soldat 2 has no workshop and no mod package format. Instead, practically everything that makes up the game exists as an individual file inside the server directory – maps, game modes, modifiers, map cycles and scripts. You upload them via SFTP and hook them up through the configuration or the console.
The folder structure
All folders are located in the main directory of your server:
| Folder | Contents |
|---|---|
Levels/ |
Maps as JSON files, each inside its own subfolder |
Modifiers/Custom/ |
Modifiers – change objects, weapon values and gameplay parameters |
Rules/Custom/ |
Game modes and round rules |
Scripts/Custom/ |
Custom C# scripts |
Cycles/Custom/ |
Map cycles |
Add custom maps
-
Download the map
Download the map you want. A large collection can be found attms2.jrgp.org. -
Stop the server
Stop your server via the dashboard. -
Upload the map
Upload the map into a subfolder ofLevels/via SFTP, keeping the structure it ships with:Levels/<folder>/<mapname>.json -
Start the server
Start your server. -
Load the map
Open the console in the game and load the map with a game mode – the game mode is named exactly like the matching file inRules/:rcon loadmap dm_epitaph Deathmatch
Add modifiers
Modifiers are the quickest way to change the gameplay: they override the values of objects, weapons and gameplay parameters.
-
Stop the server
Stop your server via the dashboard. -
Look at the reference file
Open the fileModifiers/_default.jsonvia SFTP. It contains all default values and serves as a reference – do not edit it. -
Create your own modifier
Create a new file:Modifiers/Custom/MyModifier.json -
Enter your values
Only enter the values you want to change. The parameters live in the"Objects"section. Everything you leave out keeps its default value. -
Start the server
Save the file and start your server. -
Enable the modifier
Open the console and enable the modifier by its file name without.json:rcon addmodifier MyModifier rcon restart
Custom game modes through rule files
Game modes and round rules are JSON files inside Rules/Custom/. They control, for example, how long a round lasts and how many points are needed to win:
| Key | Meaning |
|---|---|
Match.MatchSecs |
Round duration in seconds |
Match.ScoreLimit |
Score limit at which the round ends |
GameScript |
Name of the C# script loaded for this game mode |
-
Stop the server
Stop your server via the dashboard. -
Create a rule file
Copy an existing file fromRules/as a template and save it under a new name:Rules/Custom/MyMode.json -
Adjust the values
Change the values you want. -
Reference the mode
For your mode to be played, enter its file name without.jsonunder"Rules"in your map rotation – see Set up a map rotation. -
Start the server
Save the file and start your server.
Add custom scripts
For custom game logic, Soldat 2 ships a C# scripting system.
-
Stop the server
Stop your server via the dashboard. -
Upload the script
Upload your.csfile via SFTP:Scripts/Custom/MyScript.cs -
Hook up the script
Reference the script through theGameScriptkey in a rule file insideRules/Custom/. Alternatively you can load it through a modifier. -
Start the server
Start your server and check the server console in the dashboard to see whether the script compiled without errors.
Set up a map rotation
A map rotation is defined in a cycle file. The server works through the rounds listed in it one after another.
-
Stop the server
Stop your server via the dashboard. -
Create a cycle file
Copy an existing file fromCycles/as a template and save it under a new name:Cycles/Custom/MyRotation.json -
Add the rounds
Every round consists of a game mode ("Rules") and a map ("Level") – both without a file extension:[{ "Rules": "Deathmatch", "Level": "dm_epitaph" }] -
Enable the rotation
Enter the following values into theautoconfig.ini:GamesCycleFile=Cycles/Custom/MyRotation.json UseLobby=False AllowVoting=False -
Start the server
Save the file and start your server.
Commands while the server is running
| Command | Description |
|---|---|
rcon listmaps |
Show available maps |
rcon loadmap <mapname> <gamemode> |
Load a map with a game mode |
rcon nextmap |
Switch to the next map |
rcon addmodifier <name> |
Enable a modifier |
rcon removemodifier <name> |
Disable a modifier |
rcon restart |
Restart the round – required for a modifier to take effect |
rcon loadcycle <file> |
Load a map cycle |
rcon reload |
Recompile the scripts |
