Stats ~ Requirements Doc Draft 1 - uchicago-cs/chiventure GitHub Wiki
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:
-
HP/max HP
- Starting Values
- What things Increase/Decrease HP (eg. items, rooms, actions, level)
-
XP/Level (level is just a function of XP)
- Experience curve (i.e. how much XP per level)
- What/how much things give XP (items, entering rooms, having completed certain actions)
- Effects on other stats? (e.g. leveling up gives ability to increase other stats)
-
Other stats (pending requests from battle/classes teams, and any other teams that have a stat they’d like in the game)
- Starting Values
- What things increase/decrease these stats
- Do these stats have a Max? Or are they depletable
Custom: Dev. Can specify:
-
What are the Stats in the game? what/who has these stats?
-
How starting values are set
- Ex. different classes have different starting values?
-
Things that affect Stat
- Temporary effect vs permanent (*probably through the choice of using some level up mechanism or status effect)
- What/how: Items, Rooms, Statuses
-
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