-
Notifications
You must be signed in to change notification settings - Fork 13
Items ~ Equipment ~ Design Document
The goal of this implementation is to align our battle items with the current stats. This would allow battle items to modify stats beyond hp, attack, and defense. We would also like to implement equipment. Equipment enhances a combatants stats. We would like to have a combatant to have three pieces of equipment: a weapon, armor, and an accessory.
typedef struct battle_item {
int id;
bool is_weapon;
int effectiveness_decrement;
int quantity;
int durability;
char* name;
char* description;
bool battle;
int attack;
int defense;
int hp;
struct battle_item *next;
struct battle_item *prev;
} battle_item_t;
Here are the changes we would like to make to this data type, as well as adding an equipment data type.
Here is the definition for the equipment_type enum, which will be used for the battle_equipment struct:
//An ENUM that labels the type of equipment.
enum equipment_type{
ACCESSORY,
ARMOR,
WEAPON
};
Here is the definition for the battle equipment struct:
//A data structure of a piece of equipment
typedef struct battle_equipment{
int id; // the id of the equipment, should be unique for each individual type of equipment.
char *name; // the name of the equipment
char *description; // the description of the equipment
stat_changes_t *attributes; // the stats that are changed by the equipment
equipment_type type; // determines the type of equipment (armor, weapon, accessory)
} battle_equipment_t;
Here is the definition for the new combatant struct. It allows a combatant to have three types equipment:
typedef struct combatant
{
char *name;
bool is_friendly;
class_t *class_type;
stat_t *stats;
move_t *moves;
battle_item_t *items;
difficulty_t ai;
battle_equipment_t *weapon;
battle_equipment_t *accessory;
battle_equipment_t *armor;
struct combatant *next;
struct combatant *prev;
} combatant_t;
We will also have to update battle_player_t to accommodate for the new equipment struct.
/* Stub for the player struct in game-state */
typedef struct battle_player {
// Other fields: hash handle, inventory, other stats
char *player_id;
class_t *class_type;
stat_t *stats;
move_t *moves;
battle_item_t *items;
battle_equipment_t *weapon;
battle_equipment_t *accessory;
battle_equipment_t *armor;
} battle_player_t;
Here is the definition for the new battle item struct (a consumable):
typedef struct battle_item{
int id; // the id of the item, should be unique for each individual type of item.
char *name; // the name of the item
char *description; // the description of the item
stat_changes_t *attributes; // the stats that are changed by the item
bool attack; // determines whether the item is used as an attack against the enemy, or as a defensive item for player
struct battle_item *next; // the next battle item
struct battle_item *prev; // the previous battle item
} battle_item_t;
We will need to change the following functions:
- get_random_default_weapon() //needs to account for new fields
- get_random_default_consumable() //needs to account for new fields
Additionally, we will need to add a function:
- get_random_equipment_set() //gives random equipment set
- set_battle_player() //needs to account for equipment stat changes.
- set_enemy() //needs to account for equipment stat changes.
- battle_flow_item() //needs to account for new fields
- new_ctx_player() //needs to account for equipment
- consume_battle_item() // needs to account for new fields
- use_battle_item() // needs to account for new fields
- stat_changes_add_item_node // needs to account for new fields
Things to be moved to this file:
- apply_stat_changes() //move from battle_flow.c
- print_battle_items() // needs to account for new fields
- print_battle_action_menu() // needs to account for new fields
- combatant_new() // needs to account for new fields
- combatant_init() // needs to account for new fields
- combatant_free() //needs to account for new fields
-
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