Jump to content

Photo

Problem with quest start

modding quests scripting

  • Please log in to reply
17 replies to this topic

#11
Zorkaz

Zorkaz

    Resident poster

  • Premium Member
  • 4,496 posts

Bear in mind that when it comes to fragments the CK will sometimes display the script as correct when it has the source file but not the compiled version (90% sure about it)

If it's not in the .ba2 then it's missing for users.

It can't be in the .esp, that's Morrowind tech.



#12
SKK50

SKK50

    Institutum delenda est

  • Premium Member
  • 5,782 posts

The compiled pex code is not in the ESP but the symbolic links to missing script fragments and their properties ARE in the ESP and thats exactly what blows things up.

 

I have found that once a quest goes bad like that, you cant just delete the quest as the ESP is trashed giving constant random errors you spend bloody hours chasing and eventually give up and xEdit copy all the saveable resources into a new ESP.

 

Happend a couple of times before I learnt to avoid fragments, but thats just my experience, someone may offer a better outcome.



#13
Zorkaz

Zorkaz

    Resident poster

  • Premium Member
  • 4,496 posts

You could create an empty dummy .pex, create a new quest, which automatically stops the previous one (OnInit())

 

Idk how you've set up your quest but maybe by duplicating your old one and cleaning it up, adding new scripts, etc... you could avoid the hassle of setting tons of new things up, like aliases.

 

Sorry this is so vague but quest scripts and setups are extremely intricate and unique so I find it hard to give concrete advice.



#14
SantaMatt

SantaMatt

    Enthusiast

  • Members
  • PipPip
  • 143 posts

I like the idea of a quest with a script of functions instead of fragments. Tie the functions to the events involved in the objectives and then have the function advance the quest stage. I assume that is what you were refering to above. Picking up a holotape triggers a script to start the quest so changing it to the new quest should be clean.Then just leave the busted quest there but never called. Probably still need some aliases for quest targets but everything else should be able to be handled by script functions.

 

Your thoughts?



#15
Zorkaz

Zorkaz

    Resident poster

  • Premium Member
  • 4,496 posts

Sounds good



#16
SKK50

SKK50

    Institutum delenda est

  • Premium Member
  • 5,782 posts

One of the MASSIVE issues with quest stages is that once done they stay done if queried GetStageDone so its a one way linerar flow with no do overs:

 

The GetCurrentStageID & GetStage functions both return the highest Quest stage completed. When a Quest that allows repeated stages regresses stages, the actual lower current stage value will not be returned. Use a script counter or Global.

 

So in a quest attached script I have:

Event OnQuestInit()
  Stage10()
EndEvent

Fuction Stage10() ; call me with (pMyQuestName as MyQuestNameScript).Stage10() 
   pThisQuestNameStage.SetValue(10) ;globalvariable
   ;dostuff
EndFunction 

Function Stage(20)  ; call me with (pMyQuestName as MyQuestNameScript).Stage20() 
   pThisQuestNameStage.SetValue(20) ;globalvariable
   ;dostuff
EndFunction

& etc so life is gooooooood for hundreds of thousands (actually half a million now) lines of papyrus.

 

JUST ONE THING to avoid stacking and recursion DO NOT chain stage functions from each other. Break them up with timer or event triggers.



#17
SantaMatt

SantaMatt

    Enthusiast

  • Members
  • PipPip
  • 143 posts

This is not as easy as I thought. I'm doing something wrong. Here is what I have:

New Quest

Stage 10 - initialize quest and set stage and objective to 20 when holotape is pickedt up. - Works fine

Stage 20 - Go to library

Stage 30 - check terminal on second floor

 

 

When we arrive at the library we have started the quest and set stage to 20, objective to 20 and set the target to the a map marker just outside the door. So far everything is good. Just inside the door is a trigger box with this script:

 

Quest Property Orb Auto Const Mandatory
 
Event OnTriggerEnter(ObjectReference akActionRef)
debug.trace("Acquire Quest At library")
if (Orb.GetStage()< 30)
Orb.SetObjectiveCompleted(20,1)
Orb.SetStage(30)
Orb.SetObjectiveDisplayed(30)
EndIf
EndEvent
 
Primitive settings: Box, L_TRIGGER
 
Enter room, kill synth, walk through trigger box . . . nothing. Doesn't even show up in the log.
 
I've tried several different collision layers, none work. I've used trigger boxes like this in other places and they work fine. What am I missing?
 
Feeling like a total noob.


#18
SantaMatt

SantaMatt

    Enthusiast

  • Members
  • PipPip
  • 143 posts

OK, got past that. Stopped using the trigger box and put the script on the onOpen event of the door.







Also tagged with one or more of these keywords: modding, quests, scripting

IPB skins by Skinbox
Page loaded in: 1.045 seconds