-
Notifications
You must be signed in to change notification settings - Fork 13
NPC ~ Implementation of Custom Scripts
Following a meeting with the custom scripts team, who approached us with what they have been implementing with the lua framework that they have created, our team wants to see what opportunities may exist for custom scripts to work on features that our team has created. For now there are two key features and possible room for involvement, they are: npc room management and quests.
For now we only feature one key struct in this feature which is:
/* A non-playable character in game */
typedef struct npc {
/* hh is used for hashtable, as provided in uthash.h */
UT_hash_handle hh;
char *npc_id;
int health;
convo_t *dialogue; // placeholder for incoming dialogue module
item_hash_t *inventory;
} npc_t;
typedef struct npc npc_hash_t;
With the implementation of npc movement between rooms, we have included the addition of several more structs as mentioned in this wiki. With these new structs, this offers many more opportunities for the custom scripts team to amend the types specified in the structs, such as char* and int to allow the author to create their own custom functions that do certain actions when npcs move from room to room. For example, the npc team can take our following struct:
typedef struct time_in_room {
UT_hash_handle hh;
char *room_id;
int sec;
} time_in_room_t;
And change the int into their own int_t type which allows for example the author to make an npc perform a certain action after a certain interval in a room. Specific actions such as these is what will be able to be implemented once custom scripts can engage with this struct, and create a get_time
function.
This is further explained in the following feature design wiki: https://github.com/uchicago-cs/chiventure/wiki/RPG-NPC:-Independent-Feature:-NPC-Movement-Design-Document
For quests there are many more structs that are required for the feature of which many seem to be potentially implementable with Lua. A full description of each struct can be found on the following wiki: https://github.com/uchicago-cs/chiventure/wiki/RPG-NPC:-Independent-Feature:-Quests-Design-Document.
With these structs this offers much more opportunity for flexibility with the custom scripts team given that there are many more types for the custom scripts to apply functions which in turn allow many more possibilities for the end user to create custom functions that can specify how the quests should work. These examples may range from changing the bool
type of bool completed
to the custom scripts team bool_t
which would then allow the author to customize what may happen when an achievement is created, for example it may trigger a certain animation or a sudden encounter with a boss battle. These possibilities are opened by adjusting the types and implementing custom script specific functions that would allow for this.
-
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