Jump to content

How to make a multi-stage quest?


th3overseer

Recommended Posts

There are an abundance of tutorials for how to make a super simple, single-stage quest, like "get a thing" or "kill a dude." That's all well and good, but I have no idea how to make anything more than that.

 

Basically, I would like if the quest I'm trying to make goes like:

  1. NPC 1 wants you to go retrieve some caps from NPC 2 through speech of murder.
  2. Now he wants you to go kill some guy.
  3. After that, he wants you to go kill a different guy, so you can get a key that opens up a place where you kill one more guy.
  4. Return to NPC, quest is over, everyone is happy.

So, how would I do this?

Link to comment
Share on other sites

Going into this I assume you have some experience with quests as well as dialogue. It is more or less layers. Quests have layers of little baby assignments.

 

For the first bit I'd suggest looking at the scripts for the Debt Collector mission: 0010e1dc

Specifically the bottle cap quest items: VFSDebtCapsLadyJane

Which will give you the bottle caps as well as progressing the quest.

 

For the rest of it I have written up a bit of a mock script, with an overview of what each stage of the quest is.

scn LAYERSQuestScript

short QuestProg
; stage 1 quest start, your told to get the money
; stage 2 you get the money, and are told to return to the questgiver
; stage 3 you return to the questgiver, he tells you to go kill LAYERSNPC03
; stage 4 you kill LAYERSNPC03, and are told to return to the questgiver
; stage 5 you return to the questgiver, he tells you to go kill LAYERSNPC04 and retrieve LAYERSQuestKey
; stage 6 you retrieve the key, and are told to return to the questgiver
; stage 100 you return to the questgiver, the quest is finished
begin GameMode

		if getStage LAYERSQuest < 100 ; if the quest isn't finished 
    		if ( LAYERSNPC03REF.GetDead == 1 )		
				setobjectivecompleted LAYERSQuest 3 1
         		setObjectiveDisplayed LAYERSQuest 4 1
			endif		
			if player.GetItemCount LAYERSQuestKey > 0
			setobjectivecompleted LAYERSQuest 5 1
         		setObjectiveDisplayed LAYERSQuest 6 1
			endif
		endif
		
end

The script should check to see if LAYERSNPC03REF is dead as well as see if the player has the key need later in the quest.

 

Of course you are also going to have to add conditions to some of the questgiver's dialogue so that topics will only show up after you've completed a certain part of the quest. For instance the following two conditions added to a topic:

 

GetObjectiveDisplayed LAYERSQuest Quest: LAYERSQuest 4 == 1

GetObjectiveCompleted LAYERSQuest Quest: LAYERSQuest 4 == 0

 

Will check to see if you have the objective displayed for returning to the questgiver after killing LAYERSNPC03REF, but haven't actually completing the objective. That is you were told to return to the questigver but haven't done so so yet. This topic should include a result script that moves the quest along.

 

setObjectiveCompleted LAYERSQuest 4 1
setObjectiveDisplayed LAYERSQuest 5 1

 

Which will display the objective to retrieve the LAYERSQuestKey.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...