Managing quest stages with choices?

Post » Thu Aug 25, 2016 12:29 pm

I'm working on my very first quest. I've finished all the tutorials on the CK wiki about quest-making and scripting, so I have a pretty strong, albeit basic, grasp of the CK.


My quest revolves around the player trying to recruit five NPCs to work for him. There are seven available unique NPCs that I've created for the player to choose from. The player is free to choose which one he hires based on who he feels is fit for the job, in a manner similar to Oblivion when you're re-forming the Knights of the Nine. The player is given the location of all of the potential hires and can talk to them in whichever order they please, in typical Bethesda fashion.


I had in mind a quest objective along the lines of "Find workers... (x/5)". After a player chooses to hire an NPC, it updates with the current count of hired NPCs.


I have a pretty good idea of how (I think) I would go about doing this, but there's a few things that I'm unsure about before I get deep into working on it and start scripting, etc.


At first, my thought was to create a quest stage for each new hire. Of course, I don't think this is the right way to go about doing it, because it seems as if the game only allows quest stages to go up, so the player would have to do it in a specific order.


So the hiring phase of the quest would be just one stage then, yes? And then when the player has picked his five recruits, it advances to the next stage.


In that case, I would need to create a variable to track how many recruits the player currently has chosen. Each time he recruits an NPC, it adds one to that number and updates the objective. When it hits five, it advances to the next stage. Simple enough.


But what happens when the player says no initially to an NPC, then decides later he wants to hire him? In the tutorial, it had me advance the Quest Stage to another level, and then Bendu Olo would react differently the next time I approached him. Would I instead use scripting and variables to judge an NPCs reaction?


I guess the part where I'm stuck is actually starting the scripting elements. I've been looking at The Golden Claw and Fetch the Netch from Dragonborn for reference, which has helped. However, I still don't quite now where to start defining the variables. Would I make a new quest script in the Scripts tab?


I can't seem to find any information on this type of situation anywhere, which is surprising. I'm sure there's some out there, though, and if anyone could point me in the right direction, that would be great.

User avatar
Carlos Rojas
 
Posts: 3391
Joined: Thu Aug 16, 2007 11:19 am

Post » Thu Aug 25, 2016 1:19 am


NPC's reaction, and by that I assume you mean dialogue lines delivered, is almost always determined by variables either on a script or global or by quest stages completed etc. If you have a script you can define variables on that they can be local to the script or they can be shared outside it by making them properties.



There are condition functions used for checking variables for dialogue lines its typically



GetVMQuestVariable or GetVMScriptVariable they have to be properties on the script and I think Conditional but more experienced folk will be along to clear that up I'm sure there is also GetQuestStageComplete



If you want to store a simple numeric value then you'll need to decide if they're Integer or Floating Point



a script would look something like



Int MyIntegerVariable property Auto Conditional

or



Float MyFloatingPointVariable property Auto Conditional

that way they're accessible outside of the script i.e. by condition functions on dialogue lines.

User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Post » Thu Aug 25, 2016 10:12 am

Perfect! That's helpful. I'll look into it.



Thanks!

User avatar
Sasha Brown
 
Posts: 3426
Joined: Sat Jan 20, 2007 4:46 pm


Return to V - Skyrim