Approval Request: Flagging

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
bolly
Retired
Posts: 389
Joined: Mon Sep 21, 2009 3:03 pm
Location: Leeds, UK

Approval Request: Flagging

Post by bolly » Mon Dec 14, 2009 4:45 am

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.

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: Approval Request: Flagging

Post by John Adams » Mon Dec 14, 2009 10:19 am

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? ;)

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: Approval Request: Flagging

Post by Scatman » Mon Dec 14, 2009 10:58 am

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.

Image
Retired
Posts: 251
Joined: Sun Oct 26, 2008 10:07 am

Re: Approval Request: Flagging

Post by Image » Mon Dec 14, 2009 4:18 pm

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? :)

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Approval Request: Flagging

Post by LethalEncounter » Mon Dec 14, 2009 4:28 pm

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)

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: Approval Request: Flagging

Post by John Adams » Mon Dec 14, 2009 5:11 pm

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 ;)

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: Approval Request: Flagging

Post by John Adams » Mon Dec 14, 2009 5:14 pm

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 ;)

Image
Retired
Posts: 251
Joined: Sun Oct 26, 2008 10:07 am

Re: Approval Request: Flagging

Post by Image » Tue Dec 15, 2009 5:54 am

I think there needs to be a post about all the feature request posts :) They are scattered.

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: Approval Request: Flagging

Post by John Adams » Tue Dec 15, 2009 4:27 pm

I frequently gather all requests into a single post for Dev. For the "bolly requests", we'd need a whole new website.

bolly
Retired
Posts: 389
Joined: Mon Sep 21, 2009 3:03 pm
Location: Leeds, UK

Re: Approval Request: Flagging

Post by bolly » Tue Dec 15, 2009 4:47 pm

it's almost wednesday!!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests