Page 1 of 1
Uniquely identifying PCs.
Posted: Tue Jun 20, 2006 9:31 pm
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.
Posted: Tue Jun 20, 2006 10:33 pm
by Gelcur
I agree after seeing the plights local databases have had in NWN1 I would not want something so critical stored locally.
Posted: Tue Jun 20, 2006 10:39 pm
by Riotnrrd
Agree synthetic integer UID stored on central DB (option 2)
Posted: Wed Jun 21, 2006 12:00 am
by ç i p h é r
Concur. #2. A proper database can handle that automatically upon creation.
Posted: Wed Jun 21, 2006 3:00 am
by Fionn
How do we rehook after a PC remake? e.g. *Bob* needs a remake and comes back as * Bob*.
Posted: Wed Jun 21, 2006 7:24 am
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.).
Posted: Fri Aug 18, 2006 1:15 am
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.