character_history discussion
Posted: 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.
In game, there are sign posts that display player statuses around the world, this is just one example:
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:
Collecting this data will allow admins to build fancy web pages tapping into their game data:
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?
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* 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
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?