Page 1 of 1
Approval Request: Flagging
Posted: Mon Dec 14, 2009 4:45 am
by bolly
I was talking to scat about this earlier and he recommended a flagging system so I guess i am wondering if you can approve this and get essentially the foundations to a bigger system.
Lua Functions
GetPlayerFlag(Player,ID) -- returns the value of a player flag, null if does not exist
SetPlayerFlag(Player,ID,Value) -- sets the value of a player flag (string)
Tables:
character_details_flags
.id - autonum incremented
.char_id - characters ID int
.flag_id - flag ID int
.value - value of the flag, string
flags
.id -autonum incremented
.name - name of flag
A really simple system that shouldn't take too long to implement if possible. I know later on it could be expanded on for spawns and to add lots of triggers but this would just give us something to work with for now.
Re: Approval Request: Flagging
Posted: Mon Dec 14, 2009 10:19 am
by John Adams
Is this for zone access and stuff? Or something more devious?
bolly wrote:A really simple system that shouldn't take too long to implement if possible.
Right on, then we can expect your code submission by when, Wednesday?

Re: Approval Request: Flagging
Posted: Mon Dec 14, 2009 10:58 am
by Scatman
I was going to implement it but I wanted to make sure the DB guy and LE thought it'd be something worth implementing since I'm not sure what either of you two had in mind with flagging. I also am not familiar with how EQEmu did flagging or any other emulator for that matter. I figure would be useful in assigning global flagging. For example: You need to be flagged to enter Veeshan's Peak. Set a flag to be called "Veeshan Peak Flag" with flag_id 1. After the raiders kill all the dragons required to enter Veeshan's peak you'd run SetFlag(Player, 1, 1) to set the player's Veeshan Peak Flag to true, meaning they have the flag.
Re: Approval Request: Flagging
Posted: Mon Dec 14, 2009 4:18 pm
by Image
There are a lot of flagging types including first kill xp, area discovery, etc. Do we want to have a system that can incorporate all of these?

Re: Approval Request: Flagging
Posted: Mon Dec 14, 2009 4:28 pm
by LethalEncounter
Those are actually really good ideas. Oh DB master, how shall we implement this in your DB? I would like this to be flexible enough that we could add any type to the table. Say in the code, we keep track of a new flag type (ie "num kills") it should automatically replace the value in the table when the player is saved. We could make the LUA functions pass the flag type, and a value to increase/decrease the value associated with the type. Eventually we could also have the login grab the information from the world server for displaying cool server specific stats on the website. I'm LE and I support this feature. (campaign slogan reference)
Re: Approval Request: Flagging
Posted: Mon Dec 14, 2009 5:11 pm
by John Adams
Err, Scat already implemented a Server/Player Stats feature that tracks total/max/highest stats for players or servers (see the CONST in World.h, we've only just begun).
For historical data, another thing Scatman and I discussed at length, considering a character_history table or something similar to what Bolly described, tracking not only monster Type kills (we'd need to identify which monsters were which type by adding a npc_type field, also discussed long ago), tracking where a player last leveled, died, got PvP-raped, etc... who dinged a guild, who discovered an item, blah blah yadda yadda.
When I see "flags", I do not associate them with accomplishments like dying or leveling... I think of them as access "flags" (old school EQ I guess) or specialties on NPCs (DT, CH, Immune to Magic) or zones (cannot SoW here, cannot cast magic, cannot melee, cannot move

)
To answer LE, I think a very simple one-to-many table structure like we have for `statistics` might do the trick. Simply char_id for players, guild_id for guilds, stat_id, stat_date, stat_value, zone_id (where it happened), and maybe a text field for any custom detail - maybe for use in web portals and such.
I know we discussed this before, so maybe between us we can find the posts in the dev forums. We last talked about it when "Achievements" got named to Alt Adv, and the new SOE Achievements system was born, I was harping about wanting this.
Definitely a great addition, now that I understand it fully

Re: Approval Request: Flagging
Posted: Mon Dec 14, 2009 5:14 pm
by John Adams
LethalEncounter wrote:Eventually we could also have the login grab the information from the world server for displaying cool server specific stats on the website.
You must have missed this request in my "Things to have LoginServer do" thread

Re: Approval Request: Flagging
Posted: Tue Dec 15, 2009 5:54 am
by Image
I think there needs to be a post about all the feature request posts

They are scattered.
Re: Approval Request: Flagging
Posted: Tue Dec 15, 2009 4:27 pm
by John Adams
I frequently gather all requests into a single post for Dev. For the "bolly requests", we'd need a whole new website.
Re: Approval Request: Flagging
Posted: Tue Dec 15, 2009 4:47 pm
by bolly
it's almost wednesday!!