-
Notifications
You must be signed in to change notification settings - Fork 13
Quests ~ Redesign Missions
Note: This Wiki is outdated, as we actually redesigned missions twice this quarter! The first time (documented here) was to fix the substantial flaws with the previous system to get it to actually function while the second redesign was to improve the modularity of the system to make adding new mission types and parsing mission types much easier.
The current design for missions in the quest module is flawed. The missions struct is a union of 2 different structs, representing active and passive missions respectively, and thus holds one of the two values. However, as the two elements of a union have the same pointer, there is no way to tell which option is currently active, resulting in potentially incorrect output. For this reason, we needed to come up with an effective new design for missions within the rest of the quest module's framework.
For reference, here is the current completely-broken implementation:
typedef struct active_mission {
item_t *item_to_collect;
npc_t *npc_to_meet;
npc_t *npc_to_kill;
room_t *room_to_visit;
} active_mission_t;
typedef struct passive_mission{
int xp;
int levels;
int health;
} passive_mission_t;
typedef union mission {
active_mission_t *a_mission;
passive_mission_t *p_mission;
} mission_t;
The changes we plan to make are as follows: Firstly, we plan to remove the idea of passive missions. Since these involve ideas of xp, health, and levels, they are redundant when placed aside the prerequisite system that we have already developed. Without passive missions as an element of missions, the mission union is no longer necessary, and thus can be replaced entirely by the active mission struct, which will accordingly be named the mission struct. Secondly, we plan to more rigorously enforce certain restrictions on initializing missions. Although the active mission struct (soon to be repurposed as simply the mission struct) has 4 elements, the mission itself is not meant to involve all of these, due to the difficulty of the long-term storage of information regarding completion. To ensure that this is not an issue, we plan to impose testing restrictions, with documentation, preventing multiple of the elements from having non-NULL values. If a task needs to have multiple such elements, it should rather be split into multiple tasks which are all prerequisites for the next step.
These changes should increase the effectiveness of the quests module and its ability to be integrated properly into the rest of Chiventure.
The passive mission struct should be deleted and the active mission struct should now become the new mission struct. Thus, the mission struct should now look as follows:
typedef struct mission {
item_t *item_to_collect;
npc_t *npc_to_meet;
npc_t *npc_to_kill;
room_t *room_to_visit;
} mission_t;
Function changes are extremely simple for this redesign, as all functions that begin with passive_mission
need to be removed, and all functions that begin with active_mission
need to be renamed to only begin with mission
. After this is implemented, mission_init()
needs to be reworked to include a check that only a single field in the mission struct is set and task_init
similarly needs to add a check to make sure that a task with a mission doesn't have any other requirements. Other than that, the is_task_complete()
function needs to be updated to actually check if tasks are complete now that that is possible. Similarly, the complete_task()
function needs to complete the task no matter what (without checking if conditions are met) so it can be called by other modules (NPC, Battles, etc.) as a means of interacting with our quest system.
Lastly, new tests need to be added to test mission functionality and the test need to be comprehensive enough to make sure missions actually work (unlike before, where each mission test happened to set the mission pointer to NULL
due to a misunderstanding about how unions work which caused every mission to pass). This includes explicitly testing each altered function for all possible outcomes and also whether mission_init()
and task_init()
fail when there are multiple missions inputted or multiple task requirements in addition to a mission.
-
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