Gamebuster19901/Roll

Add Sessions

Opened this issue · 0 comments

  • A Session for a Campaign shall be started by a Dungeon Master inside of a discord channel.

  • A session is used to store active characters in memory so they don't have to be pulled form the database every time a roll is made or a stat is accessed. It is also used to store the state of Combat if the session ends while combat is ongoing.

  • A session shall expire 1 hour after the last interaction with the session, or when the session is ended by a dungeon master.

  • Players of the campaign shall be notified when a dungeon master has started a session, and when the session ends.

  • Players of the campaign shall be able to freely join the session with or without an active character.

  • Players who are not part of the campaign can only join if a dungeon master adds them to the session manually and the player accepts.

  • All persistant Statteds (player characters, special NPCS, etc) shall be periodically saved to disk, and saved to disk when the session ends.

  • All transient Statteds (common monsters) shall not be periodically saved. They should be removed from memory and deleted when Combat ends. (See #3)

  • If there is an active Combat when the session ends, the combat shall be saved to disk, along with ALL Statted characters. This is so combat can be broken up between sessions if necessary.

  • Implementation detail: If a user is not in an active session, then they will be in a default session with just themselves. This will allow them to have an active character so they can roll checks even if they are not in a campaign.