-
Notifications
You must be signed in to change notification settings - Fork 12
NPC ~ NPC Dialogue Provocation Design Document
typedef enum {
POSITIVE,
NEGATIVE,
NEUTRAL;
} tone_t;
Note: we added tone_t
to the node
struct so that NPC dialogue options can be coded by tone as well, facilitating the 2nd case of the two listed below (NPC provokes player).
HOSTILE
nodes will always have the START_BATTLE
action within their actions
struct.
typedef struct node {
tone_t tone;
char *node_id;
char *npc_dialogue;
int num_edges;
int num_available_edges;
edge_list_t *edges;
node_action_t *actions;
} node_t;
typedef struct edge {
tone_t tone;
char *quip;
node_t *from, *to;
condition_t *conditions;
} edge_t;
typedef struct npc {
/* hh is used for hashtable, as provided in uthash.h */
/* Second hash handle is for storing npcs in specific rooms */
UT_hash_handle hh, hh_room;
/* NPC identifier */
char *npc_id;
/* short description of the NPC, <51 chars */
char *short_desc;
/* long description of the NPC, <301 chars */
char *long_desc;
/* pointer to an existing convo struct */
convo_t *dialogue;
/* pointer to inventory hashtable */
item_hash_t *inventory;
/* pointer to an existing class struct */
class_t *class;
/* pointer to an existing npc_move struct */
npc_mov_t *movement;
/* enum indicating hostility level of the npc */
hostility_t hostility_level;
/* either NULL or a pointer to an existing npc_battle struct */
npc_battle_t *npc_battle;
} npc_t;
void convert_hostility(npc_t *npc, node_action_t *actions)
{
assert(npc != NULL);
assert(actions != NULL);
if (actions->action == START_BATTLE &&
npc->hostility_level == CONDITIONAL_FRIENDLY) {
npc->hostility_level = HOSTILE;
}
return;
}
In this case, a FRIENDLY
NPC is provoked through NEGATIVE
-tone player dialogue and turned HOSTILE
. A HOSTILE
NPC will immediately initiate a battle.
When the player selects a NEGATIVE
dialogue option (represented through the edge
struct), convert_hostility
will be called, which will update the NPC's hostility_level
to HOSTILE
. The convo_t
will progress to the corresponding NPC node,
now coded with a HOSTILE
tone. convert_hostility
will take the associated node_action_t actions
from that node
and check to ensure that START_BATTLE
is present.
Then a battle will be initiated with (start battle function).
In this case, the NPC will say a NEGATIVE
-tone dialogue, which will trigger the player to automatically join a battle.
This is left as a future task as we are currently focused more on implementing a player's provocation of a CONDITIONAL_FRIENDLY NPC.
-
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