MudBytes
Pages: << prev 1, 2 next >>
Quest System, What works for you?
JohnnyStarr
Wizard






Group: Members
Posts: 550
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#1 Posted Jun 29, 2009, 12:10 pm

Ok, so I'm at the point to where I want to fully implement a Quest system. Most systems I've seen
are more or less community quests, like "First player to get BLANK wins 1000 gold!" And they are timed
or whatever. This is fun and all, but i've always wanted a WoW type quest system, perhaps not exactly, but
along those lines. So I am using a QuickMud as the platform, with quite a bit of customization, and I am wondering
what you guys think about actually building a custom quest system, OR just using MobProgs to accomplish this.

I dont know much about MobProgs but it seems that it might be quite effective without having to reinvent the wheel
or hardcode something similar. Have any of you done this? Or do you prefer to fully customize your quest system?
If so, how difficult was it?

I welcome all lines of thought  :wink:
.........................
Current Development: Lunacy (a Lua powered Merc project)

Runter
Wizard






Group: Members
Posts: 1,074
Joined: Jun 1, 2006

Go to the bottom of the page Go to the top of the page
#2 Posted Jun 29, 2009, 12:13 pm

You're going to really want a scripting engine for this.  You're going to spend all your time writing code for every unique quest otherwise.
Lua and python seem to be in vogue right now for doing this, but even writing your own simple syntax is possibly acceptable.
.........................
-Heath

For once you have tasted flight Ruby you will walk the earth with your eyes turned skywards,
for there you have been and there you will long to return. --
                                              Leonardo Da Vinci Yukihiro Matsumoto

Last edited Jun 29, 2009, 12:18 pm by Runter
Idealiad
Sorcerer




Group: Members
Posts: 257
Joined: Jan 28, 2007

Go to the bottom of the page Go to the top of the page
#3 Posted Jun 29, 2009, 12:41 pm

There's been some pretty interesting threads on quests at MudLab. This one comes to mind:

http://mudlab.org/forum/viewtopic.php?t=202


eta: I came across this old thread too, it'd be neat to see it incorporated into a quest system: http://mudlab.org/forum/viewtopic.php?t=352

Last edited Jun 29, 2009, 12:46 pm by Idealiad
JohnnyStarr
Wizard






Group: Members
Posts: 550
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#4 Posted Jun 29, 2009, 12:50 pm

Runter said:
but even writing your own simple syntax is possibly acceptable.
Well, my plan is to use MobProgs which isn't as powerful as Lua or Python, but it
does work pretty well for light scripting on the fly. Ideally my quest system will have quests such as "Kill 10 orcs, collect 5 orc rings" after doing these you would return to the quest master npc and get your reward, i havent tried yet but it seems like MobProgs could do this no sweat.
.........................
Current Development: Lunacy (a Lua powered Merc project)

Runter
Wizard






Group: Members
Posts: 1,074
Joined: Jun 1, 2006

Go to the bottom of the page Go to the top of the page
#5 Posted Jun 29, 2009, 12:53 pm


staryavsky said:
Runter said:
but even writing your own simple syntax is possibly acceptable.
Well, my plan is to use MobProgs which isn't as powerful as Lua or Python, but it
does work pretty well for light scripting on the fly. Ideally my quest system will have quests such as "Kill 10 orcs, collect 5 orc rings" after doing these you would return to the quest master npc and get your reward, i havent tried yet but it seems like MobProgs could do this no sweat.


All of those examples make it easy to design system with templates.  The generic scripting engines are more useful for giving your builders the power to design quests rather than base them on existing templates.
.........................
-Heath

For once you have tasted flight Ruby you will walk the earth with your eyes turned skywards,
for there you have been and there you will long to return. --
                                              Leonardo Da Vinci Yukihiro Matsumoto

David Haley
Wizard






Group: Members
Posts: 5,730
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#6 Posted Jun 29, 2009, 1:00 pm

Quote:
Well, my plan is to use MobProgs which isn't as powerful as Lua or Python, but it does work pretty well for light scripting on the fly. Ideally my quest system will have quests such as "Kill 10 orcs, collect 5 orc rings" after doing these you would return to the quest master npc and get your reward, i havent tried yet but it seems like MobProgs could do this no sweat.

Work with mobprogs for a while and then come back -- we'll see if you still think they're so great and can do this kind of stuff "no sweat". :wink:

Here's a simple question: how do you track quest state using mobprogs? How do you check if player X has completed Y steps of quest Z? The mudprog syntax only allows one argument to the if-check "function" (I cringe at even using that word w.r.t. mudprogs) and one on the right-hand side of the operator.
.........................
-- d.c.h --
BabbleMUD Project (custom codebase)
Legends of the Darkstone (head coder)
http://david.the-haleys.org
.........................

elanthis
Wizard




Group: Members
Posts: 761
Joined: Feb 26, 2008

Go to the bottom of the page Go to the top of the page
#7 Posted Jun 29, 2009, 1:21 pm

You don't technically really need a script system, to be honest, if you're going for the kind of simplistic FedEx-style quests WoW and almost every other MMO/MUD relies on.  You can use a very simple description of a quest stored as a list of structs that represents a series of steps with each step having a set of requirements.  For example, the quest Kill Orc King Mandy might simply have a single step with requirement KILL_MOB and the mob_num set to whatever your Orc King Mandy is.  You could extend it to have failure conditions too, such as DEATH_MOB and then providing the mob_num of some NPC you were supposed to protect from the Orc King.  And so on.

You can then extend mob progs with a few calls to check if a player has a certain quest active and which step the player is on for any particular quest, as well as calls to add, complete, or fail a quest or to change the current step number.  Then you can work dialog into quests relatively easily, within the limits of what mob progs can really do for dialog.

This in turn makes it a lot easier to develop quests than a full scripting language, because you can come up with some simple file format (or even better, a good OLC tool) for quests that doesn't rely on builders scripting the same kind of thing over and over and over.  They could just whip up a .quest file that reads something like:

Kill Orc King Mandy~
1
Kill Orc King Mandy~
require KILL_MOB 445
2
Get Reward From Cindy~
require SPECIAL 0
fail MOB_DEATH 546

Add in any number of special requirements you want.  You can make ones that require killing a specific number of a certain mob, getting a certain set of objects, etc.  You will most likely end up growing a few additional features if your quests become interesting, but you can do a lot with very little here.

The neat thing with a system like that is that it is complementary to a real script environment.  If you do decide to add Python or Lua or whatever, you can simply allow scripts to dynamically create quests or quest steps, alter quest requirements or fulfill steps, and even allow for "quest requirement plugins" so that builders can extend quest system capabilities with a script where needed, and stick to the simpler system where it's not (or where a plugin already exists for what they need).
.........................
Cutting corners to keep your line count down is just sad.

David Haley
Wizard






Group: Members
Posts: 5,730
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#8 Posted Jun 29, 2009, 1:25 pm

Well, if all quests look the same, then yes, you're better off with a specialized system -- whether it be implemented in C++ or in Lua. Nick's 'task system' (which he published on his forum somewhere) is an example of such a system written in Lua, and it works rather nicely for this kind of relatively straightforward quest structure.

My 'vision' for quests is basically a collection of nodes that can be customized and stuck together in flow charts. So the simple quests would be made from one or two very standard nodes (kind of like what Elanthis showed) whereas you can make far more complex quests with all kinds of branching depending on all kinds of things using more nodes that can be conditioned on previous things, etc.
.........................
-- d.c.h --
BabbleMUD Project (custom codebase)
Legends of the Darkstone (head coder)
http://david.the-haleys.org
.........................

Scandum
Wizard






Group: Members
Posts: 1,105
Joined: Aug 8, 2006

Go to the bottom of the page Go to the top of the page
#9 Posted Jun 29, 2009, 1:51 pm

staryavsky said:
I dont know much about MobProgs but it seems that it might be quite effective without having to reinvent the wheel
or hardcode something similar. Have any of you done this? Or do you prefer to fully customize your quest system?
If so, how difficult was it?

Emud's mobprogs are quite effective when it comes to this and the license is easy going:

http://slackhalla.org/~emud/codebase

I also wrote a small snippet for Smaug a while back.

http://www.mudbytes.net/index.php?a=files&s=viewfile&fid=2562

JohnnyStarr
Wizard






Group: Members
Posts: 550
Joined: Feb 14, 2009

Go to the bottom of the page Go to the top of the page
#10 Posted Jun 29, 2009, 1:56 pm

Well, thats a good point David.

Now, i havent done it yet, but i was planning on checking for each requirement. Apparently you cannot do this?
I was thinking if the quest required you kill 5 trolls, it would check your kill log and verify this, i might add that i'm
certain that STOCK MobProgs might not have all the exact details i might need, but using the GIVE script would
work great for giving them the reward and stuff.

I also like Elanthis' idea as well, i'm just not that savy with embedding an additional language and was hoping that
it might make more sense to *add to MobProgs what it does not have, rather then overhaul the mud to use Lua.
I did by the way read up on Nick Gammons site, but i have to admit that it is very intimidating, especially because its
documented for SMAUG and not ROM.
.........................
Current Development: Lunacy (a Lua powered Merc project)

David Haley
Wizard






Group: Members
Posts: 5,730
Joined: Jun 30, 2007

Go to the bottom of the page Go to the top of the page
#11 Posted Jun 29, 2009, 1:59 pm

The problem with mudprogs is that eventually it becomes incredibly difficult to add to them, because the underlying parsing engine etc. is just fundamentally broken. I'll admit that I'm assuming that the ROM implementation is similar to the one in SMAUG; it's possible that ROM has a far nicer system, but the one in SMAUG is just plain painful to deal with. If not for breaking compatibility, it would probably be easier to just rip it out and write a simple top-down parser instead.
.........................
-- d.c.h --
BabbleMUD Project (custom codebase)
Legends of the Darkstone (head coder)
http://david.the-haleys.org
.........................

KaVir
Wizard






Group: Members
Posts: 1,115
Joined: Jun 19, 2006

Go to the bottom of the page Go to the top of the page
#12 Posted Jun 29, 2009, 2:18 pm

Runter said:
You're going to really want a scripting engine for this.  You're going to spend all your time writing code for every unique quest otherwise.

Scripting languages are code as well, so you're still going to have to write a load of code.  The main advantage of scripting languages is that you can let other people create the mobprogs for you without (1) needing access to your code, or (2) breaking the mud with their bugs.  A simple scripting language also tends to be easier for non-programmers to use, although simplicity can sometimes come at the price of flexibility.

Personally I just hardcode the lot - although my trigger system is set up in a pretty generic way, so I could easily mix-and-match hardcoded and softcoded triggers should I later choose to add support for a scripting language.  I don't have any builders though, so it's not really a priority, as I'd be the only one using it (and I prefer C++).
.........................
KaVir at God Wars II: godwars2.org 3000  Roomless world.  Manual combat.  Endless possibilities.

Last edited Jun 29, 2009, 2:20 pm by KaVir
Runter
Wizard






Group: Members
Posts: 1,074
Joined: Jun 1, 2006

Go to the bottom of the page Go to the top of the page
#13 Posted Jun 29, 2009, 2:31 pm


KaVir said:
Runter said:
You're going to really want a scripting engine for this.  You're going to spend all your time writing code for every unique quest otherwise.

Scripting languages are code as well, so you're still going to have to write a load of code.  The main advantage of scripting languages is that you can let other people create the mobprogs for you without (1) needing access to your code, or (2) breaking the mud with their bugs.  A simple scripting language also tends to be easier for non-programmers to use, although simplicity can sometimes come at the price of flexibility.

Personally I just hardcode the lot - although my trigger system is set up in a pretty generic way, so I could easily mix-and-match hardcoded and softcoded triggers should I later choose to add support for a scripting language.  I don't have any builders though, so it's not really a priority, as I'd be the only one using it (and I prefer C++).


The point was you can let builders write code in a sandbox in a language suited for rapid development. 
.........................
-Heath

For once you have tasted flight Ruby you will walk the earth with your eyes turned skywards,
for there you have been and there you will long to return. --
                                              Leonardo Da Vinci Yukihiro Matsumoto

Idealiad
Sorcerer




Group: Members
Posts: 257
Joined: Jan 28, 2007

Go to the bottom of the page Go to the top of the page
#14 Posted Jun 29, 2009, 2:49 pm

Right, but as KaVir mentioned he has no builders. I can think of a couple of muds with one main developer where this also might be the case.

However I think the idea that builders will create quests quickly with a scripting language may not be accurate. If you really want rapid development of quests than an OLC template system sounds better to me.

Runter
Wizard






Group: Members
Posts: 1,074
Joined: Jun 1, 2006

Go to the bottom of the page Go to the top of the page
#15 Posted Jun 29, 2009, 3:16 pm


Idealiad said:
Right, but as KaVir mentioned he has no builders. I can think of a couple of muds with one main developer where this also might be the case.

However I think the idea that builders will create quests quickly with a scripting language may not be accurate. If you really want rapid development of quests than an OLC template system sounds better to me.


KaVir wasn't defending using a poorly designed prog system, either. ;)
.........................
-Heath

For once you have tasted flight Ruby you will walk the earth with your eyes turned skywards,
for there you have been and there you will long to return. --
                                              Leonardo Da Vinci Yukihiro Matsumoto

Pages:<< prev 1, 2 next >>

Valid XHTML 1.1! Valid CSS!