[MUD-Dev] re: Questing Systems
Malcolm Tester
MTester at cambric.com
Tue Jul 25 09:02:56 CEST 2000
> -----Original Message-----
> From: mud-dev-admin at kanga.nu
> [mailto:mud-dev-admin at kanga.nu]On Behalf Of
> John Hopson
> Sent: Sunday, July 23, 2000 5:08 PM
> To: mud-dev at kanga.nu
> Subject: [MUD-Dev] re: Questing Systems
>
> 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
> Pond_quest_trying
I'm a big fan of quests (as opposed to hack'n'slash), so this area interests
me to no end :)
I use the LDMud driver, so this makes more sense to others.
First, in the player save object, I have two data types. The first is a
string, just like in the original LP muds. When you solve a quest, the name
of the quest is added to that array. I.e.:
"orc_slayer#demon_crusher#king_hyle". Each quest is separated by a #,
though it could be any symbol not used in an actual quest name. The second
data type is a mapping. This mapping holds data that I want to save on the
player, but could be related to quests, or something else entirely. The
keys are strings identifying the 'origin' of the data. The first value of
each key is also a mapping. And from there, the wizard can have the mapping
in any format they choose to identify the data they wish to store. An
example:
saved_data ([
"orcslayer": (["orcs": 1, "shaman": 0 ]),
"demon_crusher": (["minor": 1, "major": 2, "ruler": 0 ]),
...
])
This data can be stored, queried, or deleted at the wizard's will. I use it
for more than just quests, but in regards to quests, this can be really
helpful for storing data across the player's login/logout, or if the mud
crashes. It also helps in that you don't need an "invisible" object carried
around by the player to store transient flags.
Second, The player object has two functions. set_quest(string questname),
and remove_quest(string questname). The first function can be set by any
wizard, but the second one can only be used by admin level wizards. In
order to prevent false quests from being set, a wizard must have their quest
approved, and installed into a database of names by the admin. Pretty
similar to the original LP stuff. (Hey, if it works, why fix it?) When a
player has done what you sufficiently decide is "enough" to solve the quest,
you simply call this function in the player.
I saw it mentioned about adding pretitles or titles to players for solving a
quest. The same can be done here. When you call set_quest(), you can do
most anything you like at the same time. Give the player a new title, add a
pre-title, or even clone an auto-loading object to the player that gives
them an extra line in their long description. Maybe an object or flag in
saved_data that allows them to access a new area. etc etc.
As far as how the quests are coded, well, LPC can be very soft-coded. If
you take the time to do it right. You can make quests that are always the
same (which means the solution gets passed around quickly), or make them
random. My favorite are those with alternate endings. I try to make quests
that have plug-n-play modules. You take out one module, plug another in its
place. Or let the computer randomly choose the modules when the player
starts the quest. A little tougher to do, but it means less time rewriting
the quest later because Joewho posted the solution to it somewhere. Quests
can _be_ anything. It could be delivering a letter, it could be
assasinating a king, or it could be rescuing the damsel in distress. I
don't like the idea of having categories of quests, because you limit your
flexibility with the quest. Maybe you need to deliver a letter, then kill
some guards to save the girl, and then find the missing crystal to release
the magical spell on the girl. Leaving all that in the hands of the coder
allows you to have a quest that can do anything you want it to do, no
restrictions. Well, other than Laws of the Mud, of course.
Again, keep in mind that this is LPC on LDMud. I have no real idea of any
of the ROM/CIRCLE/SMAUG/DIKU/etc code bases out there and how they work.
Maybe that's not possible with those.
Regards,
Malc
Mindless at Amnesia
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list