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. |
most, if not all, servers that use character-specific data likely use the qglobal system.
|
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.
|
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. |
Quote:
Might as well use Perl DBI to do the same thing. |
Quote:
Lol I actually considered using perl DBI to allow people to integrate it without touching the source. |
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. |
Quote:
|
Quote:
|
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.
|
Quote:
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. |
Quote:
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. |
Quote:
|
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.
|
Yes, changing a qglobal writes to the database, but reads are cached, and it's likely that reads are more common than writes.
|
All times are GMT -4. The time now is 05:01 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.