Implementing Simple Quest Code?
by David Taylor · in Torque Game Builder · 10/26/2006 (9:02 pm) · 2 replies
I'm making the first prototype of a roleplaying game, but I don't know how to create a quest system. You know, the simple stereotype:
Get Quest From Person A -> Get Item From Person B -> Take Item Back To Person A = Quest Complete
I'd also like to have it flexible where the item or person b can ber anomised each time someone plays the game. I'd also like to be able to have a sort of nested quest system. For example:
Get Quest From Person A -> Ask Person B For Item -> Do Task For Person B -> Get Item From Person B -> Take Item Back To Person A = Quest Complete
Can anyone point me in the right direction for this? AI has never been my strong suit. :/
Get Quest From Person A -> Get Item From Person B -> Take Item Back To Person A = Quest Complete
I'd also like to have it flexible where the item or person b can ber anomised each time someone plays the game. I'd also like to be able to have a sort of nested quest system. For example:
Get Quest From Person A -> Ask Person B For Item -> Do Task For Person B -> Get Item From Person B -> Take Item Back To Person A = Quest Complete
Can anyone point me in the right direction for this? AI has never been my strong suit. :/
About the author
#2
Then you could just hook into that when you want to start a quest. For example, you talk to person A and you get a quest (a quest object is created with pre-defined objectives). After that, when you talk to person A it will just query your quest object as to whether or not it has been completed. If so, the conversation with person A might be different, you might get a reward, etc.
By setting up a generic system you allow yourself much more freedom later on to grant the user quests in different ways and allow them to complete quests by different means (in other words, not always neccesarily by talking to npc's - which can become boring and predictable).
10/27/2006 (7:59 am)
It seems like what you need is a simple quest management system. I would start with two base objects: a quest object and an objective object. Each quest object would have one or more objective objects associated with it. You would want to set it up so you could query the quest object and it would report true or false depending on whether or not all it's objective objects have been satisfied. The objective objects themselves would check specific details and individually return true or false to report whether or not their condition(s) were met.Then you could just hook into that when you want to start a quest. For example, you talk to person A and you get a quest (a quest object is created with pre-defined objectives). After that, when you talk to person A it will just query your quest object as to whether or not it has been completed. If so, the conversation with person A might be different, you might get a reward, etc.
By setting up a generic system you allow yourself much more freedom later on to grant the user quests in different ways and allow them to complete quests by different means (in other words, not always neccesarily by talking to npc's - which can become boring and predictable).
Associate David Montgomery-Blake
David MontgomeryBlake