Most of the time when you are at your leisure, it’s a great fun to play some interesting game such as Gmod which is a really fascinating game in which you never get bored at any stage as it is awash with incessant features every time you sit down to enjoy it. You can have fun while you are off work. If you are new to Garry’s Mod, you can simply click on any Free Download button to start downloading. Gmod is one of the most played online sandbox games in which you can create any game mode and share it with scores of servers.

Step by step guideline

  1. Game Mode Content

You need to place game mode content such as models, maps and sounds in game mode folder as the first thing.

  1. New Folder

You must build a new folder in order to create your new desired game mode. The new folder is needed to be created in the game mode folder with the game-mode name. You are free to imagine and type nay name for your folder.

  1. Text File

You will find a text file inside the folder with the newly created name. If you name your game mode “Ultimate Fun”, you need to build a folder somewhat like this: “garrysmod/gamemodes/”Ultimatefun”, here you require creating a text file named “ultimatfun.txt”. Remember, the created file should have a keyvalues file.

“Ultimatefun”

{

“base”                  “base”

“title”                   “Ultimate Fun”

“maps”                 “^sk_”

“menusystem”    “1”

“workshopid”     “15895”

 

“settings”

{

1

{

“name”                “sk_maxfrags”

“text”                   “Max Frags”

“help”                   “The maxiumum number of frags before a map change”

“type”                   “Numeric”

“default”              “20”

}

 

 

2

{

“name”                “sk_grenades”

“text”                   “Allow Grenades”

“help”                   “If enabled then grenades are enabled”

“type”                   “CheckBox”

“default”              “1”

}

 

}

 

}

Key Description

Base:     Driving game mode mostly base or sandbox.

Title:      It may include capitals and spaces.

Maps:   Gamemode map filter used to accurately classify maps in map selector. You only need to set it provided that maps are exclusive to your game mode.

Menu system:   Insert and put to 1 if this game mode able to be selected from the main menu

Workshopid:      If the game mode in about Workshop then it may be the workshopid. (You have to upload it)

Settings:              It is explained below.

Server Configuration Convars

You can use the setting table for the creation of server configuration for the game mode hence, it is an optional phenomenon. It is a new feature and previously this section had its respective file <gamemode>/content/setting/server_setting/. In order to bring abatement in loading times, it was shifted to root folder. The following are the settings that can be configured using the main menu of Gmod. Look at that.

Key Description

Name: The convar name

Text: The convar describer text

Help: The text for help shown on convar

Type: Numeric, check box or text

Default: The default convar value

Image setting for your new game mode

You can only add jpg images as a background to your game mode gamemodes/<yourgamemode>/background/. However, you are allowed to use png for menu log setting gamemodes/<yourgamemode>/logo.png. Added to this, you can also use png file as a menu icon.

The most needed files for new game mode creation

Init.lua: During the loading process, this file is required by the server.

Shared.lua: It is responsible for the setting and initiating variables and proper functioning. Please, note that it is the only one that you need to define during the course of action. The rest of all are summoned from the base game mode.

Cl_init.lua: While the game mode is being loaded, the file is summoned to set client specific things. The files that are ‘ADDCSLuaFile’d on the server only be added here.

Expected Errors during the course

Info.Valid: Your Gamemode text file was not found or invalid

Cl-init.lua: The game could not find cl_init.lua