[crossfire] Quests with multiple outcomes

Brendan Lally brenlally at gmail.com
Sun Mar 28 20:19:06 CDT 2010


Hello All,

Those of you who have been following IRC recently will know I have been
doing some things involving quests over the last week or so.

The bulk of these I am targeting for after the current release is due,
and there will be a list of changes that I will be seeking approval
and/or editing for on the maps list after that happens

However, I am conscious that server administrators are able to
cherry-pick map updates, so I want to get the main server changes in
ahead of the release. That way that admins may continue to use a stable
server with any future map updates that take place.

The server changes are twofold:

Firstly, there is a patch that 'funnyman3595' wrote to add Object.Clone
and Object.Split to the python plugin. - I'll be committing this
tomorrow anyway.

Secondly, there is a change to the way that quests are represented.
Rather than having an idea of an 'endquest' call as there is at the
moment, I introduce a 'stopstep'. Any quest which is advanced to a
stage beyond the stopstep is marked completed when that occurs.

This does three things:
1) Removes the need for separate 'stop quest' calls, making scripts to
update quests simpler.
2) Permit multiple outcomes for quests which can then be tracked.
3) Allow (for non-restartable quests) post completion updates (eg,
"After Foo mcBar rewarded me for saving his life, I killed him anyway")

The following quest definition is an example of one where there are
multiple possible outcomes. (this could be expanded further, eg,
something like step 50, => "after buying a pass, I found one lying
around for free, I took it anyway")

quest scorn/PortPass
title Port Pass
description
Acquire a port pass to be allowed into Scorn's docks.
end_description
stopstep 20
restart 0
step 10
description
The guards told me that I could acquire a port pass from the Office for
Gate Passes. I should try asking there. 
end_description
end_step
step 20
description
I have purchased a port pass to allow me into Scorn docks
end_description
end_step
step 30
description
I have found a port pass that should allow me access to Scorn Docks
description
end_step
step 40
description
I have found another way through the gate that leads to Scorn Docks.
end_description
end_step
end_quest

Here then, the 'stopstep' is 20, and the steps 20, 30 and 40 are all
steps that complete the quest, but in different ways.*

The 'quest info' command is altered to show the outcome for
non-restartable quests, so that, rather than just saying 'this quest is
complete' it describes how the player chose to complete it so that
there is something of a 'narrative' that forms around the character
recording the actions of the player. (there is an assumption here
that for restartable quests, there will not be an outcome which can
have a permanent impact if the quest can be repeated)

There are other structural change I have in mind for quests
during the next version's lifetime, but this is the only one that
substantially impacts on the way quests interact with maps, the others
would all preserve compatibility with quests with minimal effort
(commenting out some extra fields with a couple of regexps).


* Minor style note, I have used numbering 10,20,30,... so that, should a
quest be made more complex or have more quest updates attached to it,
there is room to add additional steps without breaking any existing
scripts, or needing to edit any player files - there are a number of
similar things I have been thrashing out over the last few days, they
are mostly on the wiki, and I will cover them in more detail when I
post on the maps list after the release.

Brendan



More information about the crossfire mailing list