Register  |  FAQ  |  Search  |  Memberlist  |  Usergroups  |  Log in 
Reply to topic
 [V2 server]Efficient quest system? 
Malachai
Private First Class
Private First Class

Joined: 09 Aug 2016
Posts: 9
Reply with quote
I have been trying to develop a quest system to replace the old one in the v2 server, however I'm kind of lacking in knowledge and have only come up with a rudimentary system that might not be very efficient.

Right now I've made a separate data structure containing all variables a quest might need: http://pastebin.com/drqVANik
As you can see each quest may have up to 10 objectives. Right now there are 3 objective IDs: 1 for delivering item, 2 for killing monster class and 3 for killing 1 monster from a defined template (for boss killing).
Every character has a "quest[100]" variable that holds their progress on each quest. (100 quests total - can be changed)
This is what I commented below the definition:
Code:

Players hold the state of each quest within the last digit of this variable. (quest[#]%10-1)
        *Amount of monsters slain for objective type 2 is referenced as "quest[#]/10"
        *Started quests have state of 1 or higher.
        *Completed quests have state 10. (last digit 9, hence the -1)

This means I cannot have multiple type 2 objectives (monster class killing) since the number of monsters slain is stored in the quest variable's second digit and beyond.
This ended up being somewhat weird and un-intuitive. I wanted to avoid making a 2d array inside the character structure because of size reasons.

Any other way to do this? Sorry C veterans, I'm pretty new to this Laughing
View user's profile Send private message
  
Labfiveonly
Lieutenant Colonel
Lieutenant Colonel

Joined: 26 Jul 2016
Posts: 218
Location: Kuwait
Reply with quote
Awesome Idea, this feels like the missions you could get from the Governor in Aston.

Perhaps adding different difficulties (Number of monsters / Rank +) would be awesome too.

Also reward completion for higher difficulties wouldn't be a lot more than the easy or normal missions but it will still give more total exp.

Lets say the experience reward for "solving" the quest depends on the rank of the character taking it, and so this experience is multiplied by the difficulty level.

Easy: 1 X exp
Normal: 1.2 X exp
Advanced: 1.4 X exp
Hard: 1.6 X exp
Insane: 1.8 X exp

Quest completion could also just not reward exp but also an item, a gpot , rpot , etc... with a random factor, depending on the difficulty it could have different rewards, plat even.


A command like /mission would tell you how many monsters you have slain.

We could also add in a daily task of completing 5-10 missions of any difficulty to get an extra reward. (Later on we can add P2W items bwahahahaha. No).

This will also make people log in at least daily to reap awesome rewards!

People will always pent anyways, so adding an extra dynamic to the whole system might make the whole idea of killing monsters and touching pents have a more fun/rewarding approach.
View user's profile Send private message Visit poster's website
  
Malachai
Private First Class
Private First Class

Joined: 09 Aug 2016
Posts: 9
Reply with quote
Well I just ended up creating an array for players that holds each quest's objective progress. So far it seems to work correctly!
View user's profile Send private message
  
Lurker
Colonel
Colonel

Joined: 02 Sep 2016
Posts: 234
Reply with quote
Could do it a bit differently too to allow mostly infinite quest amounts. If you had the objective array instead be an array of quests. So you could stack quests inside quests. In order to accomplish it you have to finish each nested objective. Which would allow for some deep quests or just simple ones. Each quest would be a single objective, with an additional quest array.
View user's profile Send private message
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic