Skip to content

Stats ~ Requirements Doc Draft 1

Borja Sotomayor edited this page May 15, 2021 · 3 revisions

What are Stats?

Stats are a specific set of variables (like hp) associated with objects in the game like players and NPCs. The value of these variables can affect gameplay through combat, and possible actions (and perhaps other ways). All Stats have a current value, and some of a maximum value (like hp), both of which can be changed throughout the game. As of now, some Stats will come with chiventure built games no matter what, though we hope to later implement Developer-specified stats in addition to the prepackaged stats.

Basic Stats vs Custom

Basic Stats (hardcoded) Developer can specify the following things:

  1. HP/max HP

    1. Starting Values
    2. What things Increase/Decrease HP (eg. items, rooms, actions, level)
  2. XP/Level (level is just a function of XP)

    1. Experience curve (i.e. how much XP per level)
    2. What/how much things give XP (items, entering rooms, having completed certain actions)
    3. Effects on other stats? (e.g. leveling up gives ability to increase other stats)
  3. Other stats (pending requests from battle/classes teams, and any other teams that have a stat they’d like in the game)

    1. Starting Values
    2. What things increase/decrease these stats
    3. Do these stats have a Max? Or are they depletable

Custom: Dev. Can specify:

  1. What are the Stats in the game? what/who has these stats?

  2. How starting values are set

    1. Ex. different classes have different starting values?
  3. Things that affect Stat

    1. Temporary effect vs permanent (*probably through the choice of using some level up mechanism or status effect)
    2. What/how: Items, Rooms, Statuses
  4. Things that Stats affect 1.Whether certain actions are possible (Ex. can only push rock if strength>15) 2.Other stats (ex. Hunger at 0 causes health to slowly deplete)

Some internal requirements/to does:

  • Need to figure out data structure we’re using to store stats
  • One possibility: storing the stats in a stats struct that would also be included in the player struct in player.h?
  • Need to store current value of stat and MAX value

Some early interface requirements (for other teams that use stats)

  • Modify_stat(Player* p, Stat s, int i) (need to distinguish max vs current somehow)
  • Get_Stat(Player* p, Stat s)

Other

Players should be able to look at Stats somehow

A message should print whenever a Stat (Max or current) is changed

After meeting with battle/class team, they told us they would provide us with a list of basic stats they would like in the game

Clone this wiki locally