Player Class ~ Player Class NPC Integration - uchicago-cs/chiventure GitHub Wiki
Overview
This document will cover how Player Classes can be integrated with the NPC module. While the NPC team is responsible for the design of the NPC structs, the Player Class - Battle Integration team will make certain design choices for what types of classes NPCs can have and what effects they bring. The following document basically covers:
- A new NPC basic class
- Dialogue integration with class
- Battle integration with class
- Movement integration with class
Relevant Files
- npc.h
- dialogue.h
- npc_battle.h
- npc_move.h
NPC Class
We plan to prefab a new NPC class for ordinary, boring NPCs. The class will have pretty standard statistics for everything. It will be useful to assign NPCs a class when game designers don't want to fully flesh out each NPC's character.
Additionally, we plan on having class affect NPC inventory sizes/weights/contents.
Dialogue
- We'd like to create the function
class_interaction
that provides a simple metric of how different classes interact. Dialogue trees will be determined by that. - Example: a warrior and a wizard might not get along, this value will be calculated by class_interaction, like
class_interaction(wizard, warrior) = BAD
. - This list could be provided by the JSON, and this defaults to all neutral interactions. This would need coordination with the WDL team.
- At the very least, have the player’s and/or NPC’s class have an impact on dialogue.
Battles
- Change NPC health based on class
- Change NPC stats based on class
- Change NPC difficulty, hostility, and surrender level based on class
- Implement NPC’s using class-determined skills
- Potentially implement multiclass skills (this part actually needs to be added within playerclass module) or unique skills for NPCs
Movement
- Modify
npc_move_time.time
to include a modifier of the time an npc spends in a room based on the speed stat (and potentially eventually inventory weight) given by the class - Change type of movement (definite/indefinite) or path of movement based on class