[MUD-Dev] re: Questing Systems

John Hopson jwh9 at acpub.duke.edu
Sun Jul 23 15:08:14 New Zealand Standard Time 2000

"Ben" <bjchambers at phoenixdsl.com> said:

>    One way I thought of doing this was to use flags.  For example a mud
>would for instance have flags 1 to 255.  If the quest was simply to go here
>and kill this then when I entered the given room I might get flag 1.  Then
>when I killed that it would check to see if flag 1 was true, if it was I
>would have completed the quest.  Now obviously there would have to be many
>triggers etc... for this to work, but does anybody have ideas for a better
>questing system.

	Yup!  I use a system that I think is a bit more flexible than the one
you're describing.  Each player has a text field on them that starts out
empty.  To this field, any number of one word questflags can be added and
removed, such as "Baker_quest_step_1" and so on.  Mobs can check to see if
you have a flag and respond accordingly.  They can also add and remove
flags as needed.  Players can't see what flags they have.

A player's questflag field  might look like:

	Baker_quest_step_1 Dragonslayer_completed Thieves_guild_member

	This system lets you have a basically unlimited number of flags without
having to hard code a new flag each time or assign the flag a slot in the
array.  The flag names can be mnemonic, so you don't have to consult some
huge table each time you write a quest.

Some examples of the system in action:

	An Errand quest:  You go to a baker who tells you he needs you to go pick
up some flour for him from a place across town.  He flags you as
"Baker_errand" and you go off to the mill to get the flour.  The milliner
checks you to make sure you have the flag (So you can't skip a step), then
gives you the flour and removes the first flag and gives you a
"Baker_return" flag.  You return to the baker and he gives you money for
the flour, removing the "baker_return" flag.

	Dragon slaying quest:  You are told by a mob that there's a dragon
terrorizing the town and he asks you if you'll go slay it for them.  If you
answer yes, he flags you as "Dragonslayer_trying" and you then march off to
the woods.  The dragon hides himself from anyone who doesn't have the flag,
but you do so you find him in his lair and kill him.  As he dies, he
removes the first flag and flags you as "Dragonslayer_victorious".  You
return to the town to get rewarded, at which point you're reflagged as
"dragonslayer_completed", so you can't slay the dragon again.

	One-shot quests:  It's easy to flag people as having completed a given
quest so they can't do it again.

MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list