I shall now embark on an extended example to illustrate what Ive described about quest generation so far. Hopefully, this will highlight some issues that might not be apparent from reading a mere description of how such a system ought to function. Its a little long, so it cuts across 2 articles.
Suppose Doris is a dwarf with a variety of skills, in none of which she particularly excels. Her days are spent standing on a stool, milking her parents cows. A player approaches her and engages her in conversation (ie. presses her quest-dispenser button).
Up until now, she has no plan: shes just a regular, run-of-the-mill piece of wallpaper. In response to the players request, though, she creates one. Of the many overall goals available to her, she picks that of having a career. Of the many careers available, a random choice from a selection based on her personality and skills throws up that of childcare. She chooses the option of working in a nursery, but there are none in the area so she backtracks and decides to set up her own nursery. To do this, she needs capital (which the computer can instantly provide shes been saving up), she needs premises, and she needs customers. To get the customers she can knock on doors, advertise in the local newspaper or stick fliers on walls. She decides (randomly) to use the bill-sticking approach.
The actions involved up until this point might look as follows:
Action: |
Career Quest
|
Preconditions: |
I have a career, X
I have a job doing X
|
Effects: |
I have a quest
|
|
|
Action: |
elect career, X
|
Preconditions: |
not (I have a career, any)
|
Effects: |
I have a career, X
[Hardwired: selects a career reasonable for this mobiles personality and skill set, X]
|
|
|
Action: |
work for X doing Y
|
Preconditions: |
X isnt me
I have a career, Y
X has a job doing Y
X has a vacancy
I pass interview with X
|
Effects: |
I have a job doing Y
|
|
|
Action: |
set up business doing X
|
Preconditions: |
I have a career, X
I have >= 1000 GP
I have premises
I have customers
|
Effects: |
I have a job doing X
I have a vacancy
|
|
|
Action: |
advertise in X
|
Preconditions: |
I have >= 25GP
I have premises
I have advertisement text
I have a local newspaper, X
|
Effects: |
I have 25GP less
X has advertisement
I have customers
[Hardwired: places an ad in newspaper X]
|
|
|
Action: |
leaflet the neighborhood
|
Preconditions: |
I have fliers
I have premises
|
Effects: |
not (I have fliers)
public places have fliers
I have customers
[Hardwired: sticks fliers on walls in public places]
|
|
|
Action: |
doorstep
|
Preconditions: |
I have premises
|
Effects: |
I have customers
I have enemies
[Hardwired: knocks on doors, annoying some people] |
So far, then, Doris has selected the goal Career Quest
. In order to satisfy its first precondition, I have a career, X
, she has performed the directly-executable (ie. hardwired) action select career, X
, which has instantiated X and thus given her a career choice of I have a career, childcare
. Moving on to the second precondition of Career Quest
, she discovered she needed to satisfy the requirement I have a job doing childcare
. The first approach she tried, work for X doing childcare
, failed because (as far as she knows) there is no possible instantiation for X
.
Now it may be that she knows some way of getting someone to set up a nursery so she can ask them for a job. Being a feisty, go-getting dwarf, however, this doesnt enter into consideration because her emotional system rejects the possibility. A lazy, sneaky dwarf might have tried it, though (eg. by asking a player to do it).
Doris, though, backtracked and tried a different tack: going into business herself. She has the money, but she still needs the premises and the customers. Choosing to tackle the customer option first, she chooses to leaflet the neighborhood. This also requires that she has premises, though (you cant tell people to come to your shop until you have a shop). She also needs some leaflets.
Her current plan is therefore:
solve goal: |
I have premises
|
solve goal: |
I have fliers leaflet the neighborhood |
Once shes done this, it will give her customers, which in turn will mean shes set up a business, giving her a job in childcare and therefore a career.
All because a player asked her, need anything doing?.
Next time, well look at what her answer could be.