NPC ~ NPC Demo Design Document - uchicago-cs/chiventure GitHub Wiki
Overview
In past years, the demos seemed to have separate examples for dialogue, movement, and battle integration. This year, we would like to create an integrated demo that incorporates all four sub-teams dialogue, action management, movement, and battle integration. The scenario we've currently drawn out roughly looks like this:
- NPC wandering on an INDEFINITE path with CONDITIONAL_FRIENDLY hostility_level. (movement)
- Player could exchange items with the wandering NPC. (action_management)
- Player comes up and converses with the NPC. In the process, their tone becomes negative which provokes the NPC. (dialogue)
- This triggers a battle between player and NPC. (battle_integration)
- Demo ends showing the results of the battle and transferring items from NPC to player in the case the NPC loses.
Movement
To showcase our improvements to movement, we will set up a set of rooms that resemble places on campus (tentative) and have both static NPCs in rooms and a wandering NPC. The rooms will include locations like the Reg, the Quad, Crear, etc.
Dialogue
The main things we want to showcase through dialogue would be the NPC provocation implementation via the tone_t
struct as well as dialogue-initiated actions like GIVE_ITEM
and TAKE_ITEM
. We will create a merchant NPC with a multitude of items
The NPC will have the following items:
- Health Potion
- short_desc: "A simple potion"
- long_desc: "A simple potion that restores 10 HP"
- in: "Merchant's Shop"
- actions:
- Golden Sword
- short_desc: "A golden sword."
- long_desc: "Unused and shining. Looks very sharp"
- in: "Merchant's Shop"
- actions: ""
- Iron Pickaxe
- short_desc: "An iron pickaxe."
- long_desc: "A little worn. Might not last long."
- in: "Merchant's Shop"
- actions: ""
- Iron Helmet
- short_desc: "An iron helmet."
- long_desc: "Seems durable. Would protect you in a fight."
- in: "Merchant's Shop"
- actions: ""
- Merchant's Necklace
- short_desc: "The merchant's necklace."
- long_desc: "Kept within a box on his desk. He would get very angry if you took it."
- in: "Merchant's Shop"
- actions: ""
Since the TRADE
action likely will not be implemented, let's say NPC is willing to give anything in exchange for Player's "Rare Bow" item.
- Rare Bow
- short_desc: "A rare bow."
- long_desc: "A rare bow you found while exploring."
- in: "Merchant's Shop"
- actions: ""
The player will give the bow and the NPC will allow the player to select an item they want. Selecting any normal item will maintain the NPC as FRIENDLY. But trying to take the Merchant's Necklace will aggravate the NPC and initiate a battle.