|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
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, 05:20 AM
|
 |
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,449
|
|
What's wrong with the extended player profile for more static variables or as Akkadius mentioned, perl DBI for dynamic variables?
They aren't going to realistically impact the database nor zone performance.
Only reason I would advise against perl DBI is because if the connection hangs, the script has to execute before anything else can go on.
|

01-17-2013, 05:46 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Quote:
Originally Posted by Secrets
What's wrong with the extended player profile for more static variables
|
It is just one more blob which I think we can all agree should be removed. Those blobs are a real pain and very limiting due to their nature. I dream of an EQEmu with no blobs. Now, if only it wasn't going to be so much work to get rid of them :P
Last edited by trevius; 01-18-2013 at 12:12 AM..
Reason: Corrected a typo that changed the meaning of a sentence completely!
|

01-17-2013, 05:32 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
Quote:
Originally Posted by trevius
I dread of an EQEmu with no blobs.
|
Auto-incorrect ? 
|

01-17-2013, 07:18 PM
|
Fire Beetle
|
|
Join Date: Dec 2012
Posts: 14
|
|
Why are you all hating on him? He was just trying to contribute. I personally could see this being useful for a feature I just implemented on my server that doesn't work very well through the qglobal system. Sure there are other ways to accomplish the same thing but he made an effort to help. I am fairly new here and have a few things I would like to contribute to the community soon and hope I do not get blasted like this the first time I share something.
|
 |
|
 |

01-17-2013, 07:53 PM
|
 |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by zippzipp
Why are you all hating on him? He was just trying to contribute. I personally could see this being useful for a feature I just implemented on my server that doesn't work very well through the qglobal system. Sure there are other ways to accomplish the same thing but he made an effort to help. I am fairly new here and have a few things I would like to contribute to the community soon and hope I do not get blasted like this the first time I share something.
|
He's not getting blasted, I've built plugins on the Qglobal system to do this exact thing and trust me it makes much more sense to use the qglobal system to store and get values like this for players because they become completely static in memory until they are called to change.
So for example, let's say you want to have the play check their credits for whatever, they're lagging out or just being assholes and they hail the NPC many times.
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
So for each of those NPC hails you're telling me it makes more sense to hit the DB rather than having their balance stored into memory?
No one is trying to 'blast' him, it just doesn't make sense to use when there is already a better system out there for it.
I would like to know what is not suitable in qglobals that this is trying to replace. Plus, this system that is proposed only allows for one type of virtual 'value' that can be used for only one thing.
|
 |
|
 |

01-17-2013, 08:12 PM
|
 |
Dragon
|
|
Join Date: Dec 2009
Posts: 719
|
|
Quote:
Originally Posted by zippzipp
Why are you all hating on him? He was just trying to contribute. I personally could see this being useful for a feature I just implemented on my server that doesn't work very well through the qglobal system. Sure there are other ways to accomplish the same thing but he made an effort to help. I am fairly new here and have a few things I would like to contribute to the community soon and hope I do not get blasted like this the first time I share something.
|
i think you've mistaken constructive criticism for blasting. in either case, welcome to the internet.
the other fellows you've seen posting here have been around and involved for a while and they have some idea what they are talking about.
__________________
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, 09:36 PM
|
 |
Developer
|
|
Join Date: Nov 2012
Location: Halas
Posts: 355
|
|
Quote:
Originally Posted by Akkadius
He's not getting blasted, I've built plugins on the Qglobal system to do this exact thing and trust me it makes much more sense to use the qglobal system to store and get values like this for players because they become completely static in memory until they are called to change.
So for example, let's say you want to have the play check their credits for whatever, they're lagging out or just being assholes and they hail the NPC many times.
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
Hail, NPC - DB Select
So for each of those NPC hails you're telling me it makes more sense to hit the DB rather than having their balance stored into memory?
No one is trying to 'blast' him, it just doesn't make sense to use when there is already a better system out there for it.
I would like to know what is not suitable in qglobals that this is trying to replace. Plus, this system that is proposed only allows for one type of virtual 'value' that can be used for only one thing.
|
I am not entirely sure about this - If you see Parser::Event (parser.cpp) you will notice that any NPC that has qtglobals enabled, the database is hit each time.
__________________
Drajor regards you indifferently -- what would you like your tombstone to say?
|
 |
|
 |

01-17-2013, 09:59 PM
|
 |
Developer
|
|
Join Date: Nov 2012
Location: Halas
Posts: 355
|
|
The perl function setglobal calls QuestManager::setglobal which calls QuestManager::InsertQuestGlobal which inserts directly into the DB. I can't see any caching here at all.
__________________
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.
|
Thread Tools |
|
Display Modes |
Linear Mode
|
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 06:06 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |