Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-17-2013, 12:33 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default 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?
Reply With Quote
  #2  
Old 01-17-2013, 03:20 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

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;
Reply With Quote
  #3  
Old 01-17-2013, 03:57 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

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.
Reply With Quote
  #4  
Old 01-17-2013, 04:40 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

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?
Reply With Quote
  #5  
Old 01-17-2013, 04:51 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by Drajor View Post
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.
Reply With Quote
  #6  
Old 01-17-2013, 04:53 AM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

Quote:
Originally Posted by Akkadius View Post
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?
Reply With Quote
  #7  
Old 01-17-2013, 05:20 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

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.
Reply With Quote
  #8  
Old 01-17-2013, 05:46 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by Secrets View Post
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
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 01-18-2013 at 12:12 AM.. Reason: Corrected a typo that changed the meaning of a sentence completely!
Reply With Quote
  #9  
Old 01-17-2013, 05:32 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by trevius View Post
I dread of an EQEmu with no blobs.
Auto-incorrect ?
Reply With Quote
  #10  
Old 01-17-2013, 07:18 PM
zippzipp
Fire Beetle
 
Join Date: Dec 2012
Posts: 14
Default

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.
Reply With Quote
  #11  
Old 01-17-2013, 07:53 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by zippzipp View Post
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.
Reply With Quote
  #12  
Old 01-17-2013, 08:12 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

Quote:
Originally Posted by zippzipp View Post
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;
Reply With Quote
  #13  
Old 01-17-2013, 09:36 PM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

Quote:
Originally Posted by Akkadius View Post
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?
Reply With Quote
  #14  
Old 01-17-2013, 09:59 PM
Drajor's Avatar
Drajor
Developer
 
Join Date: Nov 2012
Location: Halas
Posts: 355
Default

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?
Reply With Quote
  #15  
Old 01-17-2013, 10:03 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,743
Default

Yes, changing a qglobal writes to the database, but reads are cached, and it's likely that reads are more common than writes.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:11 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3