Jump to content

Quest Won't Advance After Killing NPC


RangerBoo

Recommended Posts

Please see 'TIP: Debugging Compound Conditionals' and 'TIP: Debugging data to file' under the "Scripting" section of the wiki "Getting started creating mods using GECK" article.

 

When you have a problem such as your quest not seeming to progress, then you need to insert debug messages liberally to track progress. It's much more effective to work through the messages in a log file than jumping back and forth to the console. And using the DBPrintC method in that tip, you can leave the messages in place unless you start to near the limits of the script space (roughly 32000 characters). Make it a habit to begin each debug message with the name of the script it comes from so you can tell if you have suddenly switched context.

 

Actually if you are new to scripting in the GECK in general you should at least look over the "Scripting" section. We are constantly adding to that article and "Scripting" gets the most attention.

 

Over the years I have found it a good practice to immediately place an "End" immediately after writing a "Begin" block. Same applies to "If/EndIf" and any other form that require an ending statement to save/compile correctly. Liberal use of indentation helps to keep track of which "beginning" goes with which "ending".

 

I also suggest you include an "Else" statement in your "If" structures, even if all it contains is a comment: (i.e. "; do nothing") simply so you know what you expect to happen when none of the previous conditions are true. A debug message there will tell you that none of the expected conditions were met so you know to focus on their actual values.

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

They are just script commands. Take a look at the code example in the 'TIP: Debugging Compound Conditionals'. The lines below:

; NVSE required: PrintD (string:expression), DBPrintC (formatted string)
DBPrintC "Script [HeadshotAmmoSCRIPT], GetHitLocation = [%g].", GetHitLocation
PrintD "Script [HeadshotAmmoSCRIPT], GetHitLocation = [" + $(GetHitLocation) + "]."

are a format "reminder" comment (because I'm always forgetting which needs which and there are occasions to switch format) and a debug message using a "formatted string". The third line is an example of the same message using a "string expression". All of those "message" lines in that TIP code example were added by me to trace and debug a script written by someone else. They had zero direct impact on that script.

You can just copy and paste debug message lines as needed, and then edit as desired. You could even set a string variable with the name of your script at the beginning and use that variable instead of hard coding the script name in each message line to minimize the number of edits when copying between scripts.

 

But as these use NVSE "Debug Print" statements you will also need to run a "debug bat" file from the game console before or while you trigger your quest script to run or they won't output anything. The same "debug bat" file has the console command needed to direct the output to a file and to enable "Debug" mode.

 

I had thought this was explained in that TIP. (This is the problem with experience. You tend to make hidden assumptions.) Please let me know how it can be improved to more clearly convey this information. Where did you get confused?

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

ahh finally !

for TES 4 OBSE the debug syntax usually DebugPrint or PrintToConsole or printc

so... for NV is printD and DBprintC... I see I see

it could be something like this then

scn VAAMorganQuestScript

short bLetterDelivered    
short bBrookGreeted
short bBrooksFollow     

short sh1

begin GameMode
	Set sh1 to GetStage AAAMorganQuest
	PrintD "AAAMorganQuest stage %g" sh1
	if sh1 == 10
		PrintD "YAY ! now AAAMorganQuest is stage 10"
		AAACathyRef.Enable
		AAAChaseRef.Enable
	elseif sh1 == 50
		PrintD "YAY ! now AAAMorganQuest is stage 50"
		AAAByronRef.disable
		AAAByronRef.MarkForDelete
	elseif sh1 == 90
		PrintD "YAY ! now AAAMorganQuest is stage 90"
		AAACassiusRef.enable 
		AAALegionSpy01Ref.enable
		AAALegionSpy02.enable
	endif

	if AAACassiusRef.GetDead * AAALegionSpy01Ref.GetDead * AAALegionSpy02Ref.GetDead
		PrintD "YAY ! now AAAMorganQuest is stage 100"
		Set bBrookGreeted to 1
		SetStage AAAMorganQuest 100
	endif
end 
Link to comment
Share on other sites

@L: Just to be clear: "PrintD" and "DBPrintC" and "ToString" ($) are additional functions provided by the "New Vegas Script Extender" (NVSE); the FNV version of OBSE. You have to load NVSE along with GECK (and the game) to use them. (Instructions in the "Getting started" article.) The commands you were using are acceptable as well. The syntax differences between vanilla commands still exist. I simply prefer the NVSE versions for flexibility and because they already include the automatic checking for "debug mode".

 

And while I have modded in the past, and am an experienced professional programmer, I have little direct experience with the GECK myself. It's just that I have been compiling information and publishing it in wiki articles that gives the impression I know more than I actually do. My practical experience with FNV mod internals is extremely limited. I rely heavily on the experience of others to correct any false impressions that may get conveyed.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

thanks for clarification, Dubious

it is funny to know that even after a decade the script from CS is still similar to up-to-date GECK (construction set -- Oblivion)

also I am happy that you gave me some insight, so I could learn more in this forum~ (even tho I don't own the game copy, I only own TES4 & TES5)

same here

my strong point in modding is scripting,

if we talk about modeling count me out :p

Link to comment
Share on other sites

  • Recently Browsing   0 members

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