Jump to content

Need help with quest logic...


Korodic

Recommended Posts

Ok so im making a basic quest. One where you go and simply talk with one person to the next. How would I go about that exactly?

 

Here is what I have done:

 

Made a quest script

Used variables to control the advancement of one quest stage to the next.

Inside the dialogue I used result scripts to change the variable (TalkedToNPC) to 1 (which then should advance the quest stage)

 

The objective does not update, the quest itself isn't working correctly. Can someone point out how I should go about this please (In idiot terms, so I miss nothing)?

Link to comment
Share on other sites

is there any more insight you could give me on how I should handle quests mixed into dialogue?

 

The bethesda tutorial only shows the implementation between quests and triggers.

Link to comment
Share on other sites

Hi there,

 

maybe you could post your questscript and resultscript so we may see how you want to do it?

 

Also I recently strated doing this myself, and I just went with a questscript that starts the quest, in other words setStage to the first step, and from there controlled the quest via the dialogue result script, by setting queststages and their display status, wich you can look up here.

 

Hope this might help.

Link to comment
Share on other sites

Well, I'm still having an issue with my quest. I appreciate any help you can, and did give me :)

 

My current issue is trying to advance the quest stage... here is the way I did it.

 

This code block IS the QUEST SCRIPT.

NOTE: I was relying on variables inside the result blocks to change the variables. (see the recruiter's below...)

scn JDMQ1EnlistTodayScript


short	DoOnceQuestStart
short TalkedToRecruiter                           ; Pinellas Rockaway
short TalkedToAdministrator                  ; Shaun Steinman 
short TalkedToHoS                                     ; Head of Security


BEGIN GameMode

if (DoOnceQuestStart==0)
SetStage JDMQ1EnlistToday 10
ShowMessage JDMQEnlistTodayMessage
set DoOnceQuestStart to 1
endif

if (TalkedToRecruiter==1)
SetObjectiveCompleted JDMQ1EnlistToday 10 1 ; Shows old objective as completed.
SetStage JDMQ1EnlistToday 25 ; Updates the Quest Stage
SetObjectiveDisplayed JDMQ1EnlistToday 25 1 ; Shows new objective
endif
		
if (TalkedToAdministrator==1)
SetObjectiveCompleted JDMQ1EnlistToday 25 1
SetStage JDMQ1EnlistToday 75
SetObjectiveDisplayed JDMQ1EnlistToday 50 1
endif

if (TalkedToHoS==1)
SetObjectiveCompleted JDMQ1EnlistToday 50 1
SetStage JDMQ1EnlistToday 100
endif

END

 

This is the recruiter's dialogue result script box... I use her to do her task, then disable her after.

 

player.moveto JDMcGinVertiREF
set TalkedToRecruiter to 1                        ; HERE is where the variable is exposed to be altered.
WGRecruiterPhaseREF.disable

Link to comment
Share on other sites

There's no reason to do it that way. If you're the quest such that you talk to the NPCs in a linear fashion, just set up stages that correspond to the talking.

 

I.e.

 

Stage 10 - Talk To Recruiter

Stage 20 - Talk to Administrator

Stage 30 - Talk to Head of Security.

 

Then, when the player activates the dialog they need to, have the result script on that topic do the appropriate SetStage. Finally, in the Stage script, have the objectives update.

 

I.e.

 

Recruiter's Dialog Result Script

 

player.moveto JDMcGinVertiREF
SetStage JDMQ1EnlistToday 20
WGRecruiterPhaseREF.disable

 

Stage 20 Script

 

SetObjectiveCompleted JDMQ1EnlistToday 10 1 ; Shows old objective as completed.
SetObjectiveDisplayed JDMQ1EnlistToday 20 1 ; Shows new objective

 

Etc.

Link to comment
Share on other sites

 

 

Then, when the player activates the dialog they need to, have the result script on that topic do the appropriate SetStage. Finally, in the Stage script, have the objectives update.

 

 

And to do this, Inside the quest script, as a conditional, I would make it look like this?

 

if (getqueststage=="30") ; this may not be correct, but you get the idea
SetObjectiveCompleted JDMQ1EnlistToday 10 1 ; Shows old objective as completed.
SetObjectiveDisplayed JDMQ1EnlistToday 20 1 ; Shows new objective
endif

 

correct?

 

The reason I allowed the script to do it, was because if I ever needed to adapt it, then I thought I could change variables inside the result script which would then use the conditional inside the quest script itself to change the stages and such. It was quicker for me to copy and paste it ;P

 

As a side question, was my script wrong before, because you CAN NOT change the variable of a quest script from a result script? (is this true?)

Link to comment
Share on other sites

Nah, don't bother putting it in the quest script with conditionals. Just put it directly on the stage script. Everything in the quest script is resolved every 5 seconds by default, meaning every 5 seconds you're checking to see if the stage is 30. Easier and more reliable to just do it directly in the result.

 

As for the aforementioned script, it's possible you might've had to have done this:

 

set JDMQ1EnlistToday.TalkedToRecruiter to 1

Not sure how FNV handles that, though.

Edited by NorthWolf
Link to comment
Share on other sites

Nah, don't bother putting it in the quest script with conditionals. Just put it directly on the stage script. Everything in the quest script is resolved every 5 seconds by default, meaning every 5 seconds you're checking to see if the stage is 30. Easier and more reliable to just do it directly in the result.

 

As for the aforementioned script, it's possible you might've had to have done this:

 

set JDMQ1EnlistToday.TalkedToRecruiter to 1

Not sure how FNV handles that, though.

So I won't even need a quest script at all will I? If it is all kept in dialogue that is...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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