# Example state machine (D15/D20: behavior language v2) — quest prototype. # State = quest stage (inactive -> active -> complete); transitions = event + # condition; rewards/state = actions. Demonstrates onEnter actions (give-item, # set-state) and the player.questProgress. convention from boundaries.md. id: spring-quest initial: inactive states: - id: inactive - id: active onEnter: - action: give-item itemId: parsnip-seed qty: 1 - id: complete onEnter: - action: set-state path: player.questProgress.spring-quest value: complete transitions: - from: inactive to: active on: day-start when: op: gte path: time.day value: 3 - from: active to: complete when: op: gte path: player.inventory.parsnip value: 5