Make My Character a GM

From DSP Wiki
Jump to: navigation, search

This guide is a quick reference to help people make their character on their own test server into a GM

Starting Out

Create a character and login to your character for the first time. After you have logged in successfully, log out (or /shutdown).

Now you can continue either using HeidiSQL or the mysql command-line tool.

Using HeidiSQL

Open HeidiSQL and connect to your database (if you don't know how to do that, head back over to the Building the Server page to refamiliarize yourself)

Expand out the database

Go to char table and open it (double-click)

Find your character's entry, and change the gmlevel field from 0 to 5 or more for owners. !togglegm can be used in-game to turn your GM icon on/off.

After you set the value, press the down arrow to go to the next line (this will save the table) or click the checkmark at the bottom of the tables window.

Re-open the table to ensure the value has been set.

Log into the game and use !togglegm, then check that the GM icon is in place and that your name is red.

Using mysql

Open a command prompt (Win+R->cmd)

type in

mysql -u root -ppassword

where password is the password you set in the Building the Server tutorial.


at the prompt type in:

USE dspdb;
SELECT charid, charname FROM dspdb.chars;

to get a list of character names and ID.

Replace 21828 below with the charid of the character you want to modify and use these queries:

UPDATE chars
   SET gmlevel = 4
   WHERE charid = 21828;

Log into the game and check that the GM icon is in place and that your name is red.

GM Levels Explanation

In the file scripts/commands/togglegm.lua there are 4 configurable options:

MINLVL_GM          = 1; -- For "whitelisting" players to have some commands, but not GM tier commands.
MINLVL_GM_SENIOR   = 2; -- These are configurable so that commands may be restricted
MINLVL_GM_LEAD     = 3; -- between different levels of GM's with the same icon.
MINLVL_GM_PRODUCER = 4;

These levels correspond to the gmlevel field in the chars table for the appropriate character. gmlevel and these options will determine which GM icon you will receive when using !togglegm

I recommend that the owner (perhaps you) has a gmlevel of 5 or greater, or at least the highest level of a non-owner GM +1. This will ensure that the owner can use !promote to promote anyone to a new GM level without needing to modify the SQL manually.