-
Notifications
You must be signed in to change notification settings - Fork 12
Game State ~ How to implement a new CLI mode
When working on our run_battle function, Emilio, Nafis, and I realized we would need to switch our mode into battle mode, but we were unsure how to do so and what exactly that meant. This document goes through how to switch to the desired mode and how CLI works in each mode. We will use the battle mode as an example.
How CLI uses modes:
What is a mode operation?
What is a cli_callback function? A CLI callback function prints the given string to the CLI. A callback function takes in a pointer to a Chiventure context struct, a string to be printed as a result of running this command, and additional arguments. See cli/cmd.h for more information.
How to implement a mode:
The first step in the process is adding the desired entry to the normal mode. The add_entry function will take in a command name, operation of added entry, an action type, and a lookup table.
For example, this is what adding the entry for the fight operation would look like:
add_entry("FIGHT", fight_operation, NULL, ctx->cli_ctx->table);
Now, the CLI knows to switch to battle mode when a player inputs "FIGHT <enemy". It does so with the fight operation. The fight operation is a CLI operation for starting a fight, and it will check if the enemy name that was inputting is valid. If it is, the CLI will print the beginning string of the battle and start the first turn of the battle. For different modes, the keyword will be different--for example, you can enter NPC conversation mode by typing "TALK ".
When in battle mode,
-
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