Questions on how to approach..

16 replies [Last post]
Posts: 1030

I've been wondering for quite a while now. Making a story playable in an MMORPG is pretty difficult. I mean, NPCs can react differently when you've done quests or talked to people or when you "progress in the storyline". The problem with MMORPGs is that you can't just make a new map with the changed NPCs. So you have to keep track internally of "where the player is in the storyline progression". I'm wondering how regular RPGs like Final Fantasy or Dragon Quest do it, or even a thing like Final Fantasy XI.

Any ideas on how to tackle this? The only thing I can think of is a "progress" field in the database and every time you do something for the storyline (talk to an npc, kill a boss, ...) the field is incremented. That way you can use it as a conditional in NPC Chat.

Posts: 1691

For a multiplayer RPG, it is going to be a bit difference since you usually have a much more "open" world. That is, you don't usually force people to follow a relatively linear path with various side-quests along the way like most all single-player RPGs.

Honestly, I haven't thought about it much. A "progress" field is probably a pretty good way to go. Or more accurately, a progress table. Store it as just numeric values, in the database, but probably have it as an enum in your code. Externally, organize it by laying out a document containing the requirements for progression. "SaveThePrincess" might require you to first finish "KillTheDragon".

Keeping an external design would be a very important component, as would be making sure that it always reflects the real implementation. Otherwise, organization would be an absolute mess. All you would need is a basic flow-chart.

Posts: 14

Hi!! i think that creating another table for quest maybe helpfull:

character_questStatus:

charID - id of the character -
questID - quest's ID -
timeLeft - (if the quest has an expiration time) -
rewarded - true or false -
mobsKilled -
itemsGathered -
status - custom constants -

I think the surest sign that there is intelligent life out there in the universe is that none of it has tried to contact us.
- Bill Watterson-

Posts: 1691

That kind of stuff would fall more into just being quests, which is already implemented. You can just as well use quests to track the user's state, but I think the OP was more about small, non-quest things like "have they talked to X?", "have they asked about Y?", "have they been to Z?", etc.

Posts: 1030

Yeah, exactly (even though I'm not sure what OP means Tongue). But the way you said it, with the flowcharts and progress table I'm guessing it would be an appropriate way to do everything that needs some kind of progress tracking (sidequests or not).

Might be an interesting thing to look into to.

Posts: 1691

OP = Original poster, or sometimes original post. Depends on the context.

Posts: 164

Have a quest table (or something of that nature). There will be a field for all the progress data. (stored as a blob) This blob is just a shiz load of bytes, so you can write into it as a byte or a long or a collection of bytes. Then you can set individual bits on one byte -> infinite amount of booleans.

That's just one way to do it. Each row will have foreign indexes going back to the player/quest. (I'm not sure how NetGore's database is maped, but you get the idea)

Posts: 531

Skye if your thinking of doing this in svo with the db you might as well give up now. Tongue Df touched one of the do not manually edit this file files to get phpbb3 to work as a log in. Which means it's a bit annoying to get the database back to a decent state. I'd try doing it myself but i dont have a clue whats been done really Tongue.

But thats off topic...

I think the "progress thing is a good idea but have it implemeted as long quests? So quests inside have multiple mini quests which act as a progress. And then use the progress of a quest to determine whether the next can begin.

For example:

Quest 1:
Kill X's wife.. progress = 1
Kidnap X's dog.. progress = 2
destroy neighbours fish pond.. progress = 3
defeat the waves of policemen.. progress = 4 (condition = Quest1.Prog1 AND Quest1.Prog2 AND quest1.Prog3 == completed)
Quest 2:
destroy neighbours garden.. progress = 1 (condition = Quest1.Progress3 == completed)
and so on.. Smile

There are 10 types of people in this world - Those who understand Binary and those who don't.

Posts: 14

Quote:
There will be a field for all the progress data. (stored as a blob) This blob is just a shiz load of bytes

Or a custom Xml format.

I think the surest sign that there is intelligent life out there in the universe is that none of it has tried to contact us.
- Bill Watterson-

Posts: 1691

Omnio wrote:
There will be a field for all the progress data. (stored as a blob) This blob is just a shiz load of bytes, so you can write into it as a byte or a long or a collection of bytes. Then you can set individual bits on one byte -> infinite amount of booleans.

Just storing the integer values would be far easier. It'd use up more disk space, sure (and quite a lot more), but we're still talking about very little data here. If you had a few thousand values, then it may be worth doing a single row per character. But otherwise, not really worth the hassle.

aPhRo_ wrote:
Skye if your thinking of doing this in svo with the db you might as well give up now. Tongue Df touched one of the do not manually edit this file files to get phpbb3 to work as a log in.

Why did he need to touch it? All it does is generate a strongly-typed copy of the database for using in the code.

Posts: 531

Spodi wrote:
aPhRo_ wrote:
Skye if your thinking of doing this in svo with the db you might as well give up now. Tongue Df touched one of the do not manually edit this file files to get phpbb3 to work as a log in.

Why did he need to touch it? All it does is generate a strongly-typed copy of the database for using in the code.

I know, he just made it so that the table that the particular dbobj looks for is joined with the phpbb3 one. It is an easy hack but seriously messes it up when i wanted to try and add new features using the db. Instead i just haven't bothered it's far easier Tongue ( I'm a completely self taught programmer, i'm lazy Tongue)

There are 10 types of people in this world - Those who understand Binary and those who don't.

Posts: 164

Spodi wrote:
Omnio wrote:
There will be a field for all the progress data. (stored as a blob) This blob is just a shiz load of bytes, so you can write into it as a byte or a long or a collection of bytes. Then you can set individual bits on one byte -> infinite amount of booleans.

Just storing the integer values would be far easier. It'd use up more disk space, sure (and quite a lot more), but we're still talking about very little data here. If you had a few thousand values, then it may be worth doing a single row per character. But otherwise, not really worth the hassle.


Would you have to make a new field for every quest? I think that would be annoying and a hassle. Also I think aphro's approach seems good. Implement mini quests (nested quests). That would give the quests a lot more structure. Still doesn't solve this problem.

Posts: 1691

Omnio wrote:
Would you have to make a new field for every quest?

No, it wouldn't be part of the "quests". And it wouldn't be a new field exactly (which sounds like a new column), but a new row. It'd be just like adding a row in any other table - very simple.

Posts: 5

Just to add some thoughts to the discussion.

I have an NPC generator
Dialogue Generator
Quest Database with fields for the steps, range of rewards, etc.,

When you log in you generate a couple of NPC's along with dialogues and quests to be offered (the generators). Then in certain places you can come across one of these NPC's who will engage you in conversation. If you choose to follow the dialogue you can accept their quest. Your Character sheet now flags you as being on quest (i.e. #1) along with your progress on the quest.

I'm not in front of my database but here is the gist of it.

Quest#, Step1, Step2, Step3, Rewards Group1

and in your Character Quests now shows you on 1.0.0.0.3

The reason you generate these NPC's is that they run through a name generator and select dialogues which are saved to your character so when you return to them they can continue with you. The reason I have a dialogue generator is to avoid too much static content.

Posts: 25

Heres what I did in my game a few months back. I'm not sure if NetGore has this implemented (I'm not to familiar with C# yet) but quests in my games required a previous quest to be completed. So giving it an RPG style story system wasn't so hard. I had 2 Types of quests, Side-Quests and Main. Side-Quest NPC's had a small "?" above their heads while Main quest NPC's had a "!" this way players knew which one was which. To initially set up players into the main quest, before they even got into the game there was a scroll story (seen once per character before the first time they play). The only thing I did from that point is I made the quests and made sure that I put in specific instructions on how to continue it from NPC to NPC. This is more a simple approach but it won't pull from the ORPG feel and it will add something for players to do if they are interested.

-Jeff Sventora
______________________________________
Currently Doing:
-Tinkering with NetGore
-Working on an old game of mine (VB6)

Posts: 164

jeffsventora wrote:
Heres what I did in my game a few months back. I'm not sure if NetGore has this implemented (I'm not to familiar with C# yet) but quests in my games required a previous quest to be completed. So giving it an RPG style story system wasn't so hard. I had 2 Types of quests, Side-Quests and Main. Side-Quest NPC's had a small "?" above their heads while Main quest NPC's had a "!" this way players knew which one was which. To initially set up players into the main quest, before they even got into the game there was a scroll story (seen once per character before the first time they play). The only thing I did from that point is I made the quests and made sure that I put in specific instructions on how to continue it from NPC to NPC. This is more a simple approach but it won't pull from the ORPG feel and it will add something for players to do if they are interested.

I think the question was more on how to store the information on the database. I guess your saying to just make every quest one step, chaining them together to create a larger quest series.

@Spodi: Yeah, that was kind of short sited on my part. I'm not very good when it comes to relational databases...

I wonder how it would be to define everything in a fluent interface in code. All your quests would just be in their own module class. I know designers might think it's weird, but they could get a lot more power out of it without learning too much programming/C#. If they were in an assembly that was loaded via reflection it wouldn't be too bad. I probably just think it's cool because I'm a programmer myself, data driven is the way to go Sad

Posts: 54

I'm wondering how to implement quest chains that allow for multiple paths to achieve a goal, with a different outcome based on what choices the player makes.

For example, say there is a Big_Goal, and the player must pass achieve a certain status through two or three Small_Goals. So:

Start>Small_Goal1>Small_Goal2>Small_Goal3>Big_Goal is the "proper" course of action, giving the most Exp, but
Start>Small_Goal1>Small_Goal4>Small_Goal3>Big_Goal gets the job done almost as well
Start>Small_Goal2>Small_Goal5>Big_Goal works, but doesn't give as much Exp
Start>Small_Goal1>kill an absurd number of bad guys>Big Goal finishes the quest, but doesn't give much rewards at all.

I'd like to have the players be able to have a very dynamic experience, and the world might have destructable locations that would normally prevent everyone else to complete quests. I want alternate routes for people to complete if a Small_Goal becomes impossible. (Small_Goals would also be reused, so that a player might be able to help complete two Big_Goals at the same time with one Small_Goal)

Additionally, since this is a multiplayer game, how are quests handled that require several players to attempt and complete?