Skip to content

Server Setup

Robert A Fraser edited this page Nov 21, 2020 · 5 revisions

Downloading from Github

It's recommended to get the current gamemodes from the master branch. From the main Github page, click the green code button, and then download as zip. You can also just click here.

Example of downloading the gamemodes from the Github

For a different branch (for upcoming content), select the branch from the dropdown on the top left, and then download as above.

Occasionally, we release a stable build of Minigames. You can find and download these from the releases page here.

Installing

Copy the minigames_v2 folder into steamapps/common/GarrysMod/garrysmod/addons.

Your folder structure should be something like garrysmod/addons/minigames_v2/gamemodes/...

For releases before 1.3.10, you may need to copy the files into gamemodes directly, or setup the addon structure yourself.

Starting a Server

Please note that these gamemodes won't show up in the menu (there's a lot of them - we're saving your sanity). To select a gamemode, you'll need to use the console command gamemode, eg:

gamemode fluffy_suicidebarrels

You can then start a game as normal. If you don't have human players to test with, type bot to add a dumb bot to the game.

Proxy Gamemode

If you're running a proper server, you might like to keep your server in the Minigames category in the server browser. To do this, Minigames comes with a "proxy" gamemode. To use the proxy, use gamemode minigames when selecting a gamemode.

Once you're using the proxy, you'll need to set mg_proxy_gamemode fluffy_suicidebarrels to pick the specific gamemode you want to use.

If you're using the proxy gamemode, the default map rotation will automatically keep using the proxy gamemode. If you're not running a proper server, it's more than fine to not use the proxy gamemode.

Database Setup

If you're not setting up a proper server, you can safely skip this step. To disable the database completely, type mg_db_enabled 0 in the server console.

For storing data, Minigames uses MySQLOO to connect to a MySQL database. Please ensure that you have MySQLOO installed if you want to use a database.

To configure the database connection, create a db_config.lua inside fluffy_mg_base/gamemodes. This file should look like the following:

GM.DB_IP = (ip address)
GM.DB_USERNAME = (username)
GM.DB_PASSWORD = (password)
GM.DB_DATABASE = (database)

To create the database tables, type lua_run GAMEMODE:CreateDBTables() in your server console. (concommand coming soon!)