[WF-General] Player Database

Tess Snider malkin at Radix.Net
Thu Oct 5 02:19:26 PDT 2000

On Thu, 5 Oct 2000, Richard Wilkins wrote:

> Okay there's the intro...I noticed you had only a bool for the IS_ADMIN element. Given that there will be occupations on an RPG such as world building, which may or may not be coupled with general administration, wouldn't it be wise to have a range of levels of 'superiority', such that someone with a lower level could not delete a character/ban an account, but stick just to their job. I'm not sure what the range of abilities for the admins on WF are (because I'm a naughty boy...no because I only joined the mailing list yesterday), so what I'm saying could be irrelevant. I probably shouldn't bring up Ultima Online, I might get shot, but I will.

What you're looking for is a roles-management system.  I was pondering
this very issue, the other day; thanks for reminding me.  The problem with
assigning a "level" is that it doesn't provide enough flexibility.  You
might want to be able to give someone the power to do A and C, but not B,
and it might not equate to any kind of level, per se.  Instead, you want
to assign "roles" to players.  A given player can have any combination of
roles that the administration chooses to give him/her.

There are three quick-and-dirty ways to implement roles:

1.) Bitvector.  TinyMUSH, for example, uses flags for roles.  These are
	stored as a simple bitvector, to my knowledge.

2.) Table columns.  Each role could be a boolean table column.  This is
	not a good choice, in my opinion, since it's not terribly extensible,
	and takes up a lot of space.

3.) Mapping table.  This is a table which contains two columns:  One for
	playerID, and one for roletype.  To get a player's roles, select
	from the table where playerID is the ID for the player you're
	interested in.

My preference is towards 1 or 3.  Option 1 takes up the least space, and
is the most efficient, by far, but makes it very difficult to edit roles
from external programs (such as a web-based admin tool).


More information about the General mailing list