-
Notifications
You must be signed in to change notification settings - Fork 13
Player Class ~ Loading Classes from WDL
Subject to PR #1086, Classes can be stored and loaded from WDL files.
At the time of writing, the only WDL file with classes in chiventure is tests/wdl/examples/wdl/classes.wdl
The code that converts a WDL file to a game with classes lives in the WDL module.
Supported class_t fields are:
- "prefab": Marks whether a prefab class should be loaded in.
- "short_desc"
- "long_desc"
- "attributes"
- "base_stats"
Note that the spelling (underscores) differs slightly between the WDL files and the class_t struct. I favored more consistency when designing the WDL file.
The following attributes are permitted, but they are ignored when the class is being loaded:
- "effects": The relationship between classes and effects is in an odd place. In their current implementation, effects have a limited duration, while a class probably only wants infinite duration effects. Until this is sorted out, effects will not be defined in WDL.
- "skill_tree" and "starting_skills": I feel that the skill trees team is more suited for designing the WDL form of these structs. As such, they are currently ignored for now.
Note that all other fields, including misspellings (case sensitive), are considered illegal and trigger an error message during loading. Additionally, it is ok for fields to be missing or null in the WDL format. If that is the case, they will be filled in with ""
or NULL
.
This comes from tests/wdl/examples/wdl/classes.wdl
. Unrelated sections of the file are omitted with { ... }
:
{
"GAME": { ... },
"CLASSES": {
"Knight": {
"short_desc": "Knight's short description",
"long_desc": "Knight's long description",
"attributes": {
"noble": true,
"hot-headed": true
},
"base_stats": {
"health": {
"current": 100,
"max": 200
},
"mana": {
"current": 20,
"max": 100
}
},
"effects": null,
"skill_tree": null,
"starting_skills": null
},
"Lich": {
"short_desc": "Lich's short description",
"long_desc": "Lich's long description",
"attributes": {
"evil": true,
"brittle": true
},
"base_stats": {
"health": {
"current": 40,
"max": 200
},
"mana": {
"current": 80,
"max": 100
},
"spookiness": {
"current": 8,
"max": 10
}
},
"effects": null,
"skill_tree": null,
"starting_skills": null
},
"Rogue": {
"long_desc": "Rogue's long description"
},
"Monk": {
"prefab": true
},
"Warrior": {
"prefab": true,
"long_desc": "Warrior's overwritten long description",
"base_stats": {
"health": {
"max": 200,
"current": 120
},
"mana": {
"max": 100,
"current": 5
}
}
}
},
"ROOMS": { ... },
"ITEMS": { ... }
}
This shows off a variety of types of classes that can currently be parsed:
- Fully defined classes, like
Knight
. - Partially defined classes, like
Rogue
, which have missing fields filled in. - Prefab classes, like
Monk
, which call code inclass_prefabs.c
to generate fields. These classes can have fields that are not yet supported by the WDL format, like skill trees. - Overwritten Prefab classes, like
Warrior
, which are prefab classes that have some of their fields overwritten by the game author.
-
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