Uniquely identifying PCs.

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

Locked
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Uniquely identifying PCs.

Post by Ronan »

What should the "pimary key" of PCs be? Names can be identical, and GSIDs and public CD keys can change. I've got two ideas,
  • 3-digit server number followed by an incremented integer.
  • An integer incremented on the central DB.
Naturally #1 is more reliable, but breaks if the server's DB gets trashed, lost, whatever. #2 has a single point of failure, but then creating PCs isn't a common event.

I'm leaning strongly between #2, because I don't think local server DBs should be responsible for anything global. We can't maintain them or repair them, after all.
User avatar
Gelcur
Dire Badger
Posts: 141
Joined: Wed Jan 14, 2004 5:37 pm

Post by Gelcur »

I agree after seeing the plights local databases have had in NWN1 I would not want something so critical stored locally.
Image
User avatar
Riotnrrd
DMA's Technical Liaison
Posts: 1682
Joined: Sat Jan 03, 2004 2:04 pm

Post by Riotnrrd »

Agree synthetic integer UID stored on central DB (option 2)
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Concur. #2. A proper database can handle that automatically upon creation.
User avatar
Fionn
Ancient Red Dragon
Posts: 2942
Joined: Sun Jan 04, 2004 7:07 am
Location: Seattle, WA

Post by Fionn »

How do we rehook after a PC remake? e.g. *Bob* needs a remake and comes back as * Bob*.
PC: Bot (WD)

Code: Select all

     -----          -----          -----          -----
    /     \        /     \        /     \        /     \
   /  RIP  \      /  RIP  \      /  RIP  \      /  RIP  \      /
   |       |      |       |      |       |      |       |      |
  *| *  *  |*    *| *  *  |*    *| *  *  |*    *| *  *  |*    *|
_)/\\_//(/|_)(__)/\\_//(/|_)(__)/\\_//(/|_)(__)/\\_//(/|_)(__)/\\_(
User avatar
peterdin
Orc Champion
Posts: 456
Joined: Sat Jul 09, 2005 3:40 pm
Location: GMT+1

Post by peterdin »

Why not using a GUID?

This can be generated(even locally), using standard tooling, upon character creation and, if needed, stored in the database.
IMO this (separate) storage is not needed because a GUID is in its nature unique and can be used as is. Of course it must be attached to the character and stored togehter with the other character information in the vault.
How do we rehook after a PC remake? e.g. *Bob* needs a remake and comes back as * Bob*.
I'd say *Bob* comes back as *Bob* with the same GUID.
So what happens:
- player asks for character remake
- DM deletes *Bob* from vault (retains the GUID)
- player rolls a new *Bob* with a new GUID
- DM changes GUID of *Bob* to old GUID.
- *Bob* is back in business.

So a DM needs provisions to read and write the GUID of a character (preferably from within the game itseld, (DM wand?)

GUID:
Short for Globally Unique Identifier, a unique 128-bit number that is produced by the Windows OS or by some Windows applications to identify a particular component, application, file, database entry, and/or user. For instance, a Web site may generate a GUID and assign it to a user's browser to record and track the session. A GUID is also used in a Windows registry to identify COM DLLs. Knowing where to look in the registry and having the correct GUID yields a lot information about a COM object (i.e., information in the type library, its physical location, etc.). Windows also identifies user accounts by a username (computer/domain and username) and assigns it a GUID. Some database administrators even will use GUIDs as primary key values in databases.
GUIDs can be created in a number of ways, but usually they are a combination of a few unique settings based on specific point in time (e.g., an IP address, network MAC address, clock date/time, etc.).
A.K.A Pee Dee

past PC: Maha Tari, aka. Alinia Mountain curiousity killed the cat

All those moments, lost in time.
Like tears in the rain.
Time to die.
paazin
Fionn In Disguise
Posts: 3544
Joined: Thu Apr 15, 2004 1:07 am
Location: UTC +2
Contact:

Post by paazin »

GUIDs are a pain to deal with, from my experience. It'd be much simplier, imo, to simply have a central DB incremented index.
People talk of bestial cruelty, but that's a great injustice and insult to the beasts; a beast can never be so cruel as man, so artistically cruel.
Locked