-
Notifications
You must be signed in to change notification settings - Fork 13
Battles ~ Stat Changes Design Document
As currently defined in battle_structs.h and described in the general battle design document:
typedef struct stat {
int speed; //The combatant's speed. Used to determine who goes first in battle.
int defense; //The defense value of the player. Used in damage calculations.
int strength; //No description given; presumably the offensive value of the player used for damage calculation.
int dexterity; //The dexterity of the player. Not implemented yet.
int hp; //The current HP of the combatant.
int max_hp; //The max HP of the combatant.
int xp; //The current XP of the combatant.
int level; //The current level of the combatant.
} stat_t;
My team had quite a few questions after examining this declaration of player statistics, including
- What is dexterity? How is it used in battles? Does it not include speed?
- What stats are used in damage calculation for magic users? A mage may be strong offensively and defensively in terms of magic but not in terms of physicality, so how would this be represented with singular strength and defense stats?
We also wanted to include features from the wishlist and of our own design, such as
- a limit on move usage by having certain moves expend a resource (e.g. mana)
- critical hit chance or the odds of randomly getting bonus damage
- accuracy or the odds of missing, potentially factored on both the side of the player and move
Thus, we would like to change the stat struct to
typedef struct stat {
int max_hp; //The maximum amount of health this unit can currently have.
int hp; //The current health of the unit; the battle ends when this hits 0.
int max_sp; //The maximum amount of skill/special points this unit can currently have.
int sp; //The current amount of skill/special points of the player; magic and skills deplete this resource.
int phys_atk; //The physical damage capacity of the unit; used in damage calculation against phys_def.
int mag_atk; //The magical damage capacity of the unit; used in damage calculation against mag_def.
int phys_def; //The physical damage resistance of the unit; calculated against phys_atk.
int mag_def; //The magical damage resistance of the unit; calculated against mag_atk;
int speed; //How quickly the unit moves; used to determine turn order, with faster units going first.
int crit; //The default odds of this unit getting bonus damage; the value is out of 100.
int accuracy; //The default odds of any move used by this unit hitting the target; the value is out of 100.
int xp; //The current amount of experience points gained by this unit.
int level; //The current level of the unit.
} stat_t;
For the crit and accuracy fields, the default values would be 0 (no chance of a critical hit) and 100 (all moves always hit) respectively, allowing developers to choose if they want the functionality of either for their game. We can use the randnum function in battle_default_objects.h for implementation.
This is the basic set of stats we foresee needing or wanting to include as basic functionality for battles. For any developers interested in further customization, including perhaps non-battle stats for roleplay (e.g. speech, intelligence, etc.), they should feel free to make modifications and take advantage of the global stat functionality in game-state's stats.h
To implement this change, we need to
- update the NPC, Player Class, and Skill Tree teams on what stats characters will have
- inform the Skill Tree team of the special point system and discuss adding a cost to skills, if necessary
- update stat_t and stat_changes_t in battle_structs.h
- update damage in battle_ai.c
- update get_random_default_weapon, get_random_default_consumable, and get_random_stat in battle_default_objects.c
- update consume_battle_item and stat_changes_add_item_node in battle_logic.c
- update stat_changes_init and stat_changes_undo in battle_state.c
-
Action Management
-
Battles
- Design Document
- Text Based Combat in Other Games
- User Stories
- Wishlist
- Battle Planning 2022
- Battle User Stories Review 2022
- Structs in Other Modules Related to Battles 2022
- Stat Changes Design Document
- Run Function Design Document
- CLI Integration Design Document
- Move Changes Design Document
- Unstubbing Stubs Design Document
- Battle Items and Equipment Design Document
- Battle Item Stats
- Battles Demo Design Document
- Battles Testing Moves, Items, and Equipment Design Document
- Sound integration with battle (design document)
-
Custom Actions
-
Custom Scripts
-
DSL
-
CLI
-
Enhanced CLI
-
Game-State
-
Graphics
- Design Plan
- Design document for integrating split screen graphics with chiventure
- GDL (Graphical Description Language)
- Graphics Sandbox
- Design Document for NPC Graphics and Dialogue
- Feature Wishlist (Spring 2021)
- Installing and Building raylib on a VM
- LibSDL Research
- Module Interactions
- Working with Raylib and SSH
- raylib
- GDL
-
Linking the Libzip and Json C to chiventure on CSIL machines
-
Lua
-
NPC
- Dependencies: Player class, Open world, Battle
- Action Documentation
- Design Document for NPC Generation in Openworld
- Design and Planning
- Establishing Dependencies
- Implementation of Custom Scripts
- Independent Feature: NPC Movement Design Document
- Player Interaction Design and Planning
- Dialogue
- Design Document for NPC Dialogue and Action Implementation
- Loading NPCs from WDL Files
- NPC Battle Integration Design Document
- NPC Battle Integration Changes Design Document
-
Open World
- Autogeneration and Game State
- Deciding an integration approach
- Designing approach for static integration into chiventure
- Feature Wishlist
- Generation Module Design layout
- Potential connections to the rest of chiventure
- Single Room Generation Module Design
- Source Document
- User Stories
- World Generation Algorithm Plan
- Loading OpenWorld Attribute from WDL
-
Player Class
-
Player
-
Quests
-
Rooms
-
Skill Trees
- Avoiding soft locks in skill tree integration
- Components of Exemplary Skill Trees
- Design Document and Interface Guide
- Environment interactions based on skill characteristics
- Integrating complex skill (combined, random, sequential, etc.) implementation
- Integration of a Leveling System
- Potential Integration with existing WDL
- Research on game balancing in regards to skill trees
- Research on skill tree support in modern day game engines
- SkillTree Wiki Summary
- Skilltree "effect" implementation and roadmap
- Summary of md doc file for skilltrees
- Design ideas in connection to other features
- Summary of Skill Tree Integration 2022
- The Difficulty of the Reading the World
- Complex Skills Summary
-
Sound
-
Stats
-
WDL