View previous topic :: View next topic |
Author |
Message |
Grim
Joined: 04 Jan 2005 Posts: 12
|
Posted: Tue Jan 11, 2005 18:57 Post subject: Field lengths for Player Account and Character Name? |
|
|
I've been working on modifying Knat's Persistent Quests & Journals to use NWNX and a MySQL table I've defined. I've got all the code working and basically preserved the basic design but rewrote the functions to use NWNX. As I finalize and begin heavier testing of my code, I wanted to find out what the appropriate field lengths should be for storing the player account and the character name. Here is what I have so far:
Code: | CREATE TABLE tbl_questdata(
ID int auto_increment,
player_acct varchar(64) NOT NULL DEFAULT '',
player_character varchar(200) NOT NULL DEFAULT '',
szPlotID varchar(32) NOT NULL DEFAULT '',
szPlotState varchar(4) NOT NULL DEFAULT ''
)
GO |
Here is how I am reading the values for the account and character names:
Code: | if(GetIsPC(oCreature))
{
string sPlayerAcct = SQLEncodeSpecialChars(GetPCPlayerName(oCreature));
string sPlayerChar = SQLEncodeSpecialChars(GetName(oCreature)); |
So my question is, what should I use for field lengths of the Player Account and Character Name?
Any comments on any of this would be most welcomed. _________________ Grim Havoc
Systems guy for Mists of the Mordri
(now private) |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Wed Jan 12, 2005 10:06 Post subject: |
|
|
I would say that 200 for a character name is pretty much. I would make that also 64 or if you want to be save around 128 (which is I think to much already). You could have a look in your servervault and see what the most lengthy name is. Probably a lengthy name is 40 characters, but I don't think people want to type in more.
If you are using numerical plot ID's then you could drop the 32 also a bit. A number of 32 digit's is very very large and I think you will not reach such a big number
Hope this helps you a bit! |
|
Back to top |
|
|
Grim
Joined: 04 Jan 2005 Posts: 12
|
Posted: Wed Jan 12, 2005 19:02 Post subject: |
|
|
JeroenB wrote: | I would say that 200 for a character name is pretty much. I would make that also 64 or if you want to be save around 128 (which is I think to much already). You could have a look in your servervault and see what the most lengthy name is. Probably a lengthy name is 40 characters, but I don't think people want to type in more.
If you are using numerical plot ID's then you could drop the 32 also a bit. A number of 32 digit's is very very large and I think you will not reach such a big number
Hope this helps you a bit! |
I think I may go with 128 and then monitor that length. Down the road I can do a table alter to reduce that based on what we see. Since we're trying to be as descriptive as we can in our tags I think I may keep the 32 since it's the maximum length allowed in the dialog box. Thanks for taking the time to respond. Appreciate the suggestions. _________________ Grim Havoc
Systems guy for Mists of the Mordri
(now private) |
|
Back to top |
|
|
Lokey
Joined: 02 Jan 2005 Posts: 158
|
Posted: Wed Jan 12, 2005 21:45 Post subject: |
|
|
We limit player names and accounts to 32 characters each because of crash bugs, run like 40 character fields for these data in the db. _________________ Neversummer PW NWNx powered mayhem |
|
Back to top |
|
|
|