-
Notifications
You must be signed in to change notification settings - Fork 13
NPC ~ NPC Battle Integration Design Document
This document will cover how NPCs can be integrated with battle modules. While the Battles team is responsible for the design of the battle, the NPC-Battle Integration team will make certain design choices for what types of NPCs can engage in battle and in what setting. The following document basically covers:
- npc_battle module
- Class type
- Player Class Integration
- Skill Trees Integration
- Open World Integration
Note: please take a look at the NPC Battle Changes Design Document for details on changes made to NPC-Battle Integration modules.
- Battle
- battle_structs.h
- battle_common.h
- battle_ai.h
- NPC
- npc.h
- npc_battle.h
- npc_move.h
typedef struct npc {
UT_hash_handle hh, hh_room;
char *npc_id;
char *short_desc;
char *long_desc;
convo_t *dialogue;
item_hash_t *inventory;
class_t *class;
npc_mov_t *movement;
bool will_fight;
npc_battle_t *npc_battle;
} npc_t;
typedef enum hostility {
FRIENDLY = 0,
CONDITIONAL_FRIENDLY = 1,
HOSTILE = 2
} hostility_t;
typedef struct npc_battle {
int health;
stat_t *stats;
move_t *moves;
difficulty_t ai;
hostility_t hostility_level;
int surrender_level;
} npc_battle_t;
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;
struct combatant *next;
struct combatant *prev;
} combatant_t;
typedef struct battle
{
combatant_t *player;
combatant_t *enemy;
environment_t environment;
turn_t turn;
} battle_t;
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;
typedef struct move {
battle_item_t *item;
int id;
// NOTE: functions to create move_new do not take into account a name
char* name;
char* info;
bool attack;
int damage;
int defense;
struct move *next;
struct move *prev;
} move_t;
typedef struct stat {
int speed;
int defense;
int strength;
int dexterity;
int hp;
int max_hp;
int xp;
int level;
} stat_t;
Comparing the structs in the NPC and battle modules respectively, we’re interested in including class_type and battle_item_t *items into the npc_battle_t in order to increase compatibility with combatant_t in the battle_structs module. In terms of compatibility issues between NPC and battle structs, we find none, but we see the potential for improvement in the stat_changes_t struct to implement the temporary stat change feature. For example, stat_changes_t could be incorporated into stat_t such that the temp_stat struct contains temporary stats implemented only during battle. However, this implementation is highly dependent on the battles team’s design choices. Please see Battle's design document for stat changes for more information.
Some changes can be made to the npc_t and npc_battle_t struct:
- Incorporating
class_t
anditem_hash_t *inventory
into thenpc_battle_t
struct - What NPC classes can engage in battle?
- Have a separate
battle_items_t *items
struct innpc_battle_t
? - Instead of
bool will_fight
, incorporatehostility_t
struct intonpc_t
?
Considerations to make:
- Class development with
skill_tree
for each class type in mind - Different classes of NPCs have different skills / stats / battle items (categories that need details planned out for future sprint)
- Different types of battles fought for combatant_t structs with different
class_t
Considerations to make:
- Where hostile, conditional friendly, and friendly NPCs will be located
- How a battle_ai with an NPC will start
- What level of provocation will get a conditional friendly NPC to fight?
- Will
surrender_level
be higher for a hostile NPC as opposed to a conditional_friendly NPC? - How will hostile NPCs approach players?
-
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