|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics. Do not post support topics here. |

01-17-2013, 12:33 AM
|
 |
Developer
|
|
Join Date: Nov 2012
Location: Halas
Posts: 355
|
|
Custom Character Data
This post is directed at current or future server developers. I have added a wiki page showing an example of how to store custom character data on your server.
You can find it here!
My reasoning for creating this is that nearly every server seems to require this and yet I have not been able to find any related how-to information. Maybe this will give new folks a good starting point for making custom systems.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
|

01-17-2013, 03:20 AM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
most, if not all, servers that use character-specific data likely use the qglobal system.
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
|

01-17-2013, 03:57 AM
|
 |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Yeah and qglobal system is going to be far more appropriate for this kind of use because the values are stored in Zone memory and accessed through Perl hash values which obviously won't require database hits every single time.
|

01-17-2013, 04:40 AM
|
 |
Developer
|
|
Join Date: Nov 2012
Location: Halas
Posts: 355
|
|
Actually the purpose is to not use the quest globals :p
In regards to zone memory / hashed values - unless you are using this thing every second on every mob then neither of those are much of an optimisation.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
|

01-17-2013, 04:51 AM
|
 |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by Drajor
Actually the purpose is to not use the quest globals :p
In regards to zone memory / hashed values - unless you are using this thing every second on every mob then neither of those are much of an optimisation.
|
It might work, but it's definitely not very scalable and performance conscious.
Might as well use Perl DBI to do the same thing.
|

01-17-2013, 04:53 AM
|
 |
Developer
|
|
Join Date: Nov 2012
Location: Halas
Posts: 355
|
|
Quote:
Originally Posted by Akkadius
It might work, but it's definitely not very scalable and performance conscious.
Might as well use Perl DBI to do the same thing.
|
It works, I have tested it. I am not sure how it is not scalable? If you need to add new data, ALTER character_vars ADD new_field int DEFAULT 0.
Lol I actually considered using perl DBI to allow people to integrate it without touching the source.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
|

01-17-2013, 10:03 PM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
Yes, changing a qglobal writes to the database, but reads are cached, and it's likely that reads are more common than writes.
|

01-17-2013, 10:22 PM
|
 |
Developer
|
|
Join Date: Nov 2012
Location: Halas
Posts: 355
|
|
Quote:
Originally Posted by lerxst2112
Yes, changing a qglobal writes to the database, but reads are cached, and it's likely that reads are more common than writes.
|
Reads are not cached if I understand the code correctly. They are read out of the DB every single time. See Parser::Event.
Also see any references to QGlobalCache::GetBucket - That is never used for anything other than 'combining'.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
|

01-17-2013, 10:52 PM
|
Demi-God
|
|
Join Date: Aug 2010
Posts: 1,742
|
|
You're right, Parser::Event accesses the database. Parser::Event is also never called.
|

01-17-2013, 10:57 PM
|
 |
Developer
|
|
Join Date: Nov 2012
Location: Halas
Posts: 355
|
|
Quote:
Originally Posted by lerxst2112
You're right, Parser::Event accesses the database. Parser::Event is also never called.
|
Yep when I realised I had a good laugh :p
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
|

01-17-2013, 10:59 PM
|
 |
Developer
|
|
Join Date: Nov 2012
Location: Halas
Posts: 355
|
|
Honestly after reading through all this code - It has become to clear to me that I will probably never use qglobals (until now I had nothing against it). I would feel much more confident in using what I have made. It may not be as fast (I can not even determine that for sure) but it is simple, has few moving parts. If something breaks I do not need to dig through thousands of lines of code.
Each to there own.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
|

01-17-2013, 11:47 PM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
If you find a way to break qglobals I'll give you a gold star.
|

02-28-2015, 01:50 AM
|
 |
Dragon
|
|
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
|
|
Necro'ing post, yeah, I know.
No need for the gold star, I'd rather have a fix please.
https://github.com/EQEmu/Server/issues/339
I do wish I could extend a hand, however, in my limited C++ knowledge (pales in comparison), I cannot find the source of the issue. Sorry.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 08:11 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |