I currently have 3 options for a quest system of mine, but I'm unsure what's the better option or if it really even matters which one I do.
Each mob has a questStart and questEnd list with options how I represent the quests therein:
Option #1 - Strings: Each list has the title of the quest, and one global associated list will point the strings to their appropriate quest objects. I suppose the advantage for this is that I'll have a quest table that I can reference anywhere in my code, or that players could reference to get info on a quest (assuming I would let them do that).
Option #2 - Type paths: Each list contains the type for the quest which I will create instances of as needed. This seems like it would be the most concise way of representing quests, however, I sometimes only need the name of the quest.
Option #3 - Associated lists: Here, the quest name strings will point to the type path. I can't really think of any advantage this brings, but it's a combination of the first two options, so I'm including it.
So far, I'm going with option 2, and I'm asking because I thought the way strings and type paths are represented internally in DM could affect what is a better choice.
Any input?
ID:265671
![]() Dec 2 2006, 6:15 pm (Edited on Dec 2 2006, 6:22 pm)
|
|
![]() Dec 2 2006, 7:28 pm
|
|
I recommend using a combination of the two. I'd use datums to track quests and a variable for the player containing the datum of the quest the user is currently on. You can use type paths for predefined quests in the source and strings can help handle any custom quests you'd like to make in-game, and maybe save for later use.
|
Your best bet would probably be to have an associative list, with the index being the quest's name and the value being a reference to the quest object, and saving this list.
This would allow for flexibility. |
you have type paths of quest objects, but when do the quest objects get created? i would think that once you get the quest you should create an instance of the object and store that in the mob's list, not a type path or string.
|
Yeah, that's exactly what I do. I was wanting to know what would be a more efficient way of referencing quests so I could create instances of them. I ended up settling on just type paths, no strings. Sure, it's a little more typing then just storing the name of the quest, but there's no need for a global quest list.
|