Setup Server
Prerequisites
- Git installed and properly configured on your dev environement.
- VS Code or similar IDE.
- GLuaFixer needs to be used with an IDE extension.
- Garry's Mod dedicated server will be installed on your dev environement.
Step -1: Properly configure your dev environment
Make sure your IDE will verify your Lua by having GLuaFixer or other tools in place.
Make sure Git is properly configured.
Make sure to enable automatic rebase on pull:
git config --global pull.rebase true
Step 0: Install the Garry's Mod dedicated server
steamcmd +force_install_dir ../monolithds +login anonymous +app_update 4020 -beta x86-64 validate +quit
Step 1: Download Monolith Gamemode
- Navigate to your Garry's Mod
gamemodesdirectory - Clone the Monolith repository with your prefered protocol
- HTTPS
git clone --recursive -b staging https://github.com/Monolith-FR/Monolith-Gamemode.git monolithrp - SSH
git clone --recursive -b staging git@github.com:Monolith-FR/Monolith-Gamemode.git monolithrp
- HTTPS
- Ensure the folder structure is correct:
garrysmod/gamemodes/monolithrp
Step 2: Download Monolith Addons
- If existing, remove the old addons folder
rm -rf addons - Clone the Monolith Addons repository with your prefered protocol
- HTTPS
git clone --recursive -b staging https://github.com/Monolith-FR/Monolith-Addons.git addons - SSH
git clone --recursive -b staging git@github.com:Monolith-FR/Monolith-Addons.git addons
- HTTPS
- Ensure the folder structure is correct:
garrysmod/addons
Step 3: Install Dependencies
- Navigate to your Garry's Mod
luadirectory. - If not existing, create a
binfoldermkdir bin. - Navigate to the
binfoldercd bin. - Download and place the required dependencies (x64 ones):
- gmsv_reqwest
- gmod-chttp
- GWSockets
- MySQLOO
- gm_tmysql4
- gm_luaerror
- TODO: Add missing depedencies.
Step 4: Add your Monolith API Key
You'll be given an mrp.json file which should be placed like this: garrysmod/gamemodes/monolithrp/mrp.json.
If you're only given the Monolith API token, you can create the file yourself like this:
{
"AuthKey": "YOURKEYHERE",
"APIUrl": "https://monolith-apidev.monolithservers.fr",
"Community": "monolithfr",
"SegmentAPIKey": null
}
If you haven't been provided with anything, ping VickyFrenzy.
The only thing you should need to change is the AuthKey value. The rest can be left as is.
If the server was running reload the map or the server to reload the gamemode.
Step 5: Add your MonoSuite API key
This step is actually optionnal since the MonoSuite key will be automatically provided by the Monolith API.
You'll be given an monosuite.auth file which should be placed like this: garrysmod/addons/monosuite/monosuite.auth.
If you haven't been provided with this file, ping VickyFrenzy.
If the server was running you can restart MonoSuite with mns_reboot.
Step 6: Start Your Server
At this point you can start your Garry's Mod server and ensure everything is functioning correctly. Some Lua errors are expected and not actual issues.
Here is a command template to start:
srcds_win64 -console -nomaster +maxplayers 128 +host_workshop_collection 3220655069 +gamemode monolithrp +map rp_monoford_v1l
Supported maps for development purposes:
rp_monoford_v1lrp_monoford_v1l_spookfestrp_monoford_v1k_flatrp_rockford_mrp_v1brp_truenorth_v1a_mrprp_riverden_v1a_mrprp_southsidegm_construct
If you need the rp_monoford_v1l.bsp map, ping VickyFrenzy/Max.
Step 7: Give Yourself Admin Rights
Type the following command in the server console to give yourself admin rights: mns addrole <name/steamid> <role>.
- Replace
<name/steamid>with your in-game name (if you're connected) or your SteamID. - Replace
<role>withfounder.
Step 8: Disable the Anti-Exploit (recommended for development servers only)
When in-game, use the mrp_admin command to open the admin menu.
You can then disable the anti-exploit in the admin menu.
If you have been banned by anti exploit:
mns unban <steamid> <reason>
Step 9: Adding yourself into the developers table
In gamemode/plugins/admin/sh_admin.lua you should find a table at the top called Monolith.admin.developers.
Add your SteamID32 into the Development part of this table. This will allow you to use developer commands on your dev server.