Goals, Needs, Drives

Create issue
Issue #16 new
ᅠKawa repo owner created an issue

Recently, I commented out the whole scheduler subsystem pending a more Lua-friendly replacement. Here's what I came up with:

Given no profession or goal, a character will wander around as current.

A character's stats will change over time, as would the player's.

Characters can have goals assigned, by the game or by their stats.

Goals have associated task lists. These tasks can themself contain tasks, being stored and managed as token trees, and any given subtree may cancel out.

For example, the "go to sleep" goal might be subdivided like this:

  1. get undressed
    1. do we have an assigned closet? if not, cancel this task -- that is, cancel "getting undressed", not cancel "going to sleep".
    2. go to the closet.
    3. undress and stash clothes.
  2. go to bed
    1. do we have an assigned bed? if not, is there a free bed nearby? if still not, cancel this task.
    2. go to the bed
  3. lay down and sleep.

Later, the "wake up" goal might be subdivided like this:

  1. stand up
  2. get dressed
    1. do we have an assigned closet? if not, cancel this task.
      1. go to the closet.
      2. pick out an outfit and equip it.

These two would be assigned at due time by the game, and might be adjusted by both random chance and personality traits.

Other goals may include "manage shop", "get off", "look for the player", "hunt for the player"...

Open question

How do we store these tasks, both in definition and as character data? How much of it is scripted? Perhaps all BoardChar would have a script run every time they get to make a move and that script processes their task Token, adding, removing, and replacing them as needed? That'd mean we'd have no more use of the Motor enum -- wandering and hunting would be handled by the task script, and standing still just equals having no task at all. never mind that we don't use Motor at all. But anyway basically the entirety of BoardChar:ActuallyMove() and BoardChar.Hunt() would be reduced to a script?

Comments (0)

  1. Log in to comment