character_history discussion

EQ2Emulator Development forum.

Moderator: Team Members

Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

character_history discussion

Post by John Adams » Fri Jun 19, 2009 7:09 am

As another side-job for perhaps Scatman or myself (or anyone else interested in coding this up ;)), I have been rolling around the idea of how to best track player historical data. SOE EQ2Players has record of when you dinged, where you were, etc... and I was thinking of implementing something similar to this "tracking" of what accomplishments players achieve.

Tying into the Server Stats functionality we recently implemented, this could also help feed data into Stats by sifting through histories and finding when specific things occurred, like harvesting rares (what/when/where), or when a player joins a guild, goes up in Adv level, TS level, how many of a specific mob TYPE the player has slain (Gnoll Hunter)*, and the list goes on.

This table will likely be large, so data storage should be as lean as possible.

Code: Select all

CREATE TABLE `character_history` (
                     `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                     `char_id` INT(10) UNSIGNED NOT NULL DEFAULT '0',
                     `event_type` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
                     `event_value` INT(10) UNSIGNED NOT NULL DEFAULT '0',
                     `event_date` INT(10) UNSIGNED NOT NULL DEFAULT '0',
                     `zone_name` VARCHAR(64) NOT NULL DEFAULT '',
                     PRIMARY KEY  (`id`),
                     UNIQUE KEY `CharEventIDX` (`char_id`,`event_type`,`event_value`)
                   ) ENGINE=INNODB
In game, there are sign posts that display player statuses around the world, this is just one example:
view_status.jpg
While "guild events" may require it's own set of tables once guilds are implemented, we could theoretically store "character" data in one place, and just link to it if that player happens to be in a guild, when building the Guild Events display:
guild_events.jpg
Collecting this data will allow admins to build fancy web pages tapping into their game data:
level_history.jpg
Lastly, we can use this table to help us build our "Most" and "Highest" Server Stats for population into the `statistics` table for quicker lookup (I hate multi-joins!!)


* Note: We will need to modify our `spawn` data storage to include a spawn "type". We already need this anyway for the fact that certain spells/abilities only work on certain NPC types (is that a correct statement? Ie., only hit undead)


This is probably very easy to implement for someone who knows anything more about C++ than me :) So, any other ideas?


PS: LE, don't faint... I am only thinking of storing "zone_name" (instead of ID) because if the event occurs in an Instance, like player housing, we cannot just use the zone ID. Yes?
You do not have the required permissions to view the files attached to this post.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: character_history discussion

Post by Scatman » Fri Jun 19, 2009 10:31 am

I can do this if no one else wants to. Let's just get together cause I'm sure there are about a trillion things to consider.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: character_history discussion

Post by John Adams » Fri Jun 19, 2009 11:19 am

If you were ever actually on IRC instead of AFK, we could discuss this. HAHA.

thought maybe you fell off your roof! ;) :p

I MISS YOU MAN!

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: character_history discussion

Post by Scatman » Fri Jun 19, 2009 12:29 pm

Sorry, I went to the last 3 philies games the last 3 days =) I don't even like baseball but we were given tickets in the 11th row right down first baseline.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: character_history discussion

Post by John Adams » Mon Oct 22, 2012 11:02 am

Zcoretri, here was the first discussion about this... over 3 years ago :oops:

Here was another discussion thread, specific to Discovery/POIs, which will now be solved by Achievements.

Let's talk about these if you want, or I can steamroll out a continuation of this idea myself when I get some free time.

Locked

Who is online

Users browsing this forum: No registered users and 0 guests