Difference between revisions of "Make My Character a GM"

From DSP Wiki
Jump to: navigation, search
(Using mysql)
Line 16: Line 16:
 
Find your character's id (You can find your character id by opening the "chars" table, and viewing the id column by the name of your character, but if this is your first and only character the id will be 21828)
 
Find your character's id (You can find your character id by opening the "chars" table, and viewing the id column by the name of your character, but if this is your first and only character the id will be 21828)
  
Change the name_flags field from 0 to 83886080
+
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.  
 
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.  
Line 22: Line 22:
 
Re-open the table to ensure the value has been set.
 
Re-open the table to ensure the value has been set.
  
Additionally, it is now required to also open the "chars" table, and set the gmlevel field to something other than zero.  GM Levels range from zero (no permissions) to 4 (all commands available).
+
Log into the game and use @togglegm, then check that the GM icon is in place and that your name is red.
 
+
Log into the game and check that the GM icon is in place and that your name is red.
+
  
  
Line 46: Line 44:
  
 
Replace 21828 below with the charid of the character you want to modify and use these queries:
 
Replace 21828 below with the charid of the character you want to modify and use these queries:
<pre>
 
UPDATE char_stats
 
  SET nameflags = '83886080'
 
  WHERE charid = 21828;
 
</pre>
 
  
 
<pre>
 
<pre>
Line 60: Line 53:
 
Log into the game and check that the GM icon is in place and that your name is red.
 
Log into the game and check that the GM icon is in place and that your name is red.
  
== Alternative Values ==
+
== GM Levels Explanation ==
These are all of the possible GM level values. Replace the nameflags value with one of these to get a different GM level.
+
In the file scripts/commands/togglegm.lua there are 4 configurable options:
{|
+
<pre>
|Flag|| GM Level
+
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
|67108864||GM
+
MINLVL_GM_LEAD    = 3; -- between different levels of GM's with the same icon.
|-
+
MINLVL_GM_PRODUCER = 4;
|83886080||GM Senior
+
</pre>
|-
+
 
|100663296||GM Leader
+
 
|-
+
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.
|117440512||SE Producer
+

Revision as of 09:02, 5 July 2013

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 Navicat or the mysql command-line tool.


Using Navicat

Open navicat 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)

Go to Tables

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

Find your character's id (You can find your character id by opening the "chars" table, and viewing the id column by the name of your character, but if this is your first and only character the id will be 21828)

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;


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.