drakeelvin Posted July 2, 2011 Share Posted July 2, 2011 (edited) I'm in the early stages of implementing my first quests and having studied in detail the way a handful of them are implemented, and looked at bits and pieces of a lot of others, there are a couple of different ways quests are coded. The most common method I've seen is where a quest script manages the quest, and stages and objectives get set from script or dialog. Each stage and objective in the quest doesn't handle transitions itself, it all gets updated from the quest script or from a dialog end script. I have also seen some quests that use the internal "end script" mechanism to advance a quest to its next stage when required, although this method seems to be much less used. In fact I can't even think of one off hand but I know I saw one a couple of weeks back that did this in at least one place. From my own perspective, I like the method of one controller script beause it allows all of the stages and variables to be documented in one place, then the quest itself gets updated and transitioned through its stages as needed (mostly through dialog or trigger interaction on the part of the player) and when stages or objectives get set this what updates the PIP-Boy display and compass/map markers. Right now I'm only working initially with a very simple fetch and return item quest for starters. I wonder if any of you modders who have done quests have any feedback regarding what coding methods you prefer for implementing quests? Do your methods vary depending on the complexity or type of quest? Do you prefer one "master script" or do you use other methods? What works best? Thanks! Edited July 2, 2011 by drakeelvin Link to comment Share on other sites More sharing options...
tunaisafish Posted July 3, 2011 Share Posted July 3, 2011 This answer is not specific to quests, but the general 'coders block' I get sometimes. ie. it's not that you don't know how to code something, but you have several ways spinning around in your head. Find a colleague (or even a mirror), and explain the various solutions out loud.The easiest one to explain is the way to go. KISS Link to comment Share on other sites More sharing options...
davidlallen Posted July 3, 2011 Share Posted July 3, 2011 I have used one quest script for each quest, which contains only the stages and objectives. Each NPC has a separate dialog quest, which performs setstagedone on the "main" quest. For me, quests are fairly easy to setup; the challenging part is NPC packages. I highly recommend to start with no packages, or extremely simple ones. Getting NPC's to perform tasks in a certain sequence is a big pain. Link to comment Share on other sites More sharing options...
cambragol Posted July 3, 2011 Share Posted July 3, 2011 For me, quests are fairly easy to setup; the challenging part is NPC packages. I highly recommend to start with no packages, or extremely simple ones. Getting NPC's to perform tasks in a certain sequence is a big pain. I have to agree wholeheartedly with this. Packages are hideous to work with, and require endless tweaking and tuning before you get something that even seems to approach what you want. Then the NPC will do it once out of every three times. I almost never use stages, as I found them a little cumbersome for quests that have multiple branches, or are not really linear. I made a town once that had multiple interconnected quests. It was all controlled by a script for each 'Big' quest, and quest variables that signified certain states with the quest, and within the town itself. Link to comment Share on other sites More sharing options...
davidlallen Posted July 3, 2011 Share Posted July 3, 2011 (edited) Well, everybody has a different approach, which is fine. But I use quest stages a lot, as boolean flags, like "If <quest>.getstagedone 20". If you use getstagedone, there is no requirement that the stages be linear. Since the log entry strings are never used in FNV, I put a comment here about what this stage is, and what triggers it. The stage can have an objective marker, it can change text in the quest log, and it has a script which is triggered the first time the stage is achieved. This all fits together in a way I find helpful. Edited July 3, 2011 by davidlallen Link to comment Share on other sites More sharing options...
drakeelvin Posted July 3, 2011 Author Share Posted July 3, 2011 (edited) Definitely the stages are still a bit of a mystery to me my simple quest so far has used mainly objectives, and those documented in my main quest script and updated in the various dialogue or item triggers. But I did put in two different stages the equivalent of "quest is started" and "quest is finished" but I think there is more there to be used. The toughest challenge I've had is dealing with creating new custom dialogue. I've been trying to separate my dialogues into separate quests, I think similar to what David mentioned, I really like the idea of using a separate dialogue quest for each NPC, that keeps things clean and easy to work with. The thing that I have not figured out is how to easily create new dialog entries. It's easy to add existing ones but I have not figured out if there is an easy or quick way to create a batch of new ones, especially when you want a complex dialog that will run several levels deep. I was thinking what might be nice is if I could create a text file template of dialog to import, then I could just edit a copy of it and import it to make all the new dialog entries. Is that feasible? I tried to export some to start with, but my GECK just crashed. What do you guys/gals find the easiest way to create new dialogue entries? Or do you just use the existing ones and add conditionals for your characters? EDIT: p.s. As it turns out even though GECK crashed on me (I'd left it exporting overnight) it did in fact create the dialogueExport file of 21.1MB, not sure if its the whole thing but there is a lot there I could work with if that's a good solution. Edited July 3, 2011 by drakeelvin Link to comment Share on other sites More sharing options...
davidlallen Posted July 4, 2011 Share Posted July 4, 2011 The thing that I have not figured out is how to easily create new dialog entries. It's easy to add existing ones but I have not figured out if there is an easy or quick way to create a batch of new ones, especially when you want a complex dialog that will run several levels deep. I was thinking what might be nice is if I could create a text file template of dialog to import, then I could just edit a copy of it and import it to make all the new dialog entries. Is that feasible? Good idea. As far as I know there is no way to use text files in modding FNV. There is no fast way to enter a large amount of dialog. Have you used the conversation editor, which is the right-most button in the tool bar (it looks like lines of right justified text)? Some people find this to be a handy way to organize complex dialogs. For myself, I don't find it is a big improvement, it is a different kind of big pain. As with packages, I find the best approach is to keep things very simple. Modding FNV is possible, which it isn't for a lot of other games, but that doesn't mean it is easy. Define simple dialogs first, get those working, and then try to move onto something else. It seems that using very simple scripts / dialogs / packages which tell a good story are appreciated more than short things with complex internals. Link to comment Share on other sites More sharing options...
stevie70 Posted July 4, 2011 Share Posted July 4, 2011 (edited) What do you guys/gals find the easiest way to create new dialogue entries? Or do you just use the existing ones and add conditionals for your characters?don't know if i can be of big help here cause i'm just working on my first quests & dialogue myself (finding especially dialogue a big pain in about anywhere imaginable), but there's one thing i read somewhere in the geck-wiki i find really usefull, which is not creating a new topic for every next line (creating new topics being about the biggest torture about it all (would be easier already if that bloody window could be scaled)), but placing several lines in one topic (as info/response), conditioning every one with a variable like NextLine == 2 -> say line 2 and so on, and then incrementing the variable after every said line and linking the topic back to itself. turned out for me to be far less complicated than it sounded at first & saves lots of time and nerves Edited July 4, 2011 by stevie70 Link to comment Share on other sites More sharing options...
drakeelvin Posted July 5, 2011 Author Share Posted July 5, 2011 Wow, awesome responses: First @DavidLAllen: Yes, I did try the far right button dialogue editor but found it to be extremely slow to load and not much of a benefit considering the time. And @Stevie70: Wow, I'm going to try that. Very cool idea. I spent the last day or so doing my first small quest with about 15 lines of dialogue and a few helpful things I've learned are: #1 Write all the dialogues in a word processor first. Plan out the tree that way and edit, edit, and edit again, until you are really happy with how it reads. Then when all the entries are done just assign Topic ID's to each one. Then go into GECK and create all the topics at once without adding any details. Then I connect the still-empty topics in the dialogue tree together in the right layout. And when that's done then cut/paste from the world processor. For special conditions, I note those in the word processor as I'm writing the dialogues, then set them up when I'm doing the cut/paste. Things like conditionals, special emotes, mood, start/end script entries, etc. I would say in the long run doing all this planning in a word processor saves the most amount of time, frustration and pain. It allows you to review the big picture and just makes editing so much easier. It's all got to be done anyhow, and GECK is the worst place to do design and editing. #2 After reading David's previous post the other day I put special attention on the differences between stages and objectives and I was able to eliminate most quest status variables from my quest script and use the Stages tab instead. Using the stages turns out to be much more powerful than a simple tracker variable, and if you plan things in advance you won't get messed up. #3 I also found that using a the Stage number to determine which dialogues should appear to be extremely useful. In fact, I dumped the "Say Once" checkbox entirely and just used the Stage variable consistently and found things much easier to debug. Thanks for all your feedback and if there is anything else that comes to mind, or that anyone else has to add, please do. p.s. My first small stage quest tutorial I did for myself is an NCCS companion Aeryn Sun from Farscape. The quest is very simple but will probably take a long time to actually do in game because of the travel distances likely involved but if anyone is curious Aeryn Sun is in this collection: Drakes Random Mods Link to comment Share on other sites More sharing options...
Recommended Posts