Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for teams/guilds, and track the player's team as part of each event at the time of the event #3

Open
4Ply opened this issue Dec 23, 2023 · 1 comment

Comments

@4Ply
Copy link
Member

4Ply commented Dec 23, 2023

If a player can only be on one team at a time, then we can just associate that team to the event when the event happens, and aggregate scores later by filtering the events for that team.

For example, if we have three players in the same dungeon, but all on different teams:

  • 4Ply (team Red)
  • Abalua (team Blue)
  • FP (team Green)

4Ply picks up an ember, we write the following event to the DB:

    {
      "name": "ember-picked-up",
      "player": "4Ply",
      "team": "Red",
      "count": 1,
      "server": "do-001",
      "x": 96.67523715613805,
      "y": 166,
      "z": -575.4090619012621
    }

Then if Abalue picks up treasure, we write:

    {
      "name": "treasure-picked-up",
      "player": "Abalue",
      "team": "Blue",
      "count": 1,
      "server": "do-001",
      "x": 96.67523715613805,
      "y": 166,
      "z": -575.4090619012621
    }
@4Ply 4Ply converted this from a draft issue Dec 23, 2023
@thewilloftheshadow
Copy link
Member

There are three ways of categorizing players (names subject to change based on dev thoughts):

  • Parties
    • These are ephemeral, and are used for multiplayer runs.
    • They have one leader who invites the others to the party to run together.
    • When the leader disconnects, the party is disbanded.
  • Clans
    • These are created by players, and have a leader.
    • Players compete against other clans with statistics
    • These clans are permanent, and have their own name and (marking? emblem? banner?)
  • Event Teams
    • These are assigned for limited time events (mostly with Drina)
    • Every player gets randomly assigned a team (likely within Luckperms as mega groups, though that can be changed)
    • These teams do not last more than a phase or two

I suggest not storing the players team/party/guild within the event, and just looking that up on the user table when needed. If we were on a different database a relation might be good there, but as it is we don't need to duplicate the data imo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants