Jump to content

Objectives popping up


SkiaMK

Recommended Posts

This is driving me bat s#*! crazy...

 

I have two books (well, a book and a journal), The book starts the quest-line, works great, exactly as intended in that you pickup and/or read the book where it is sitting and the quest begins AFTER the bloody thing closes... At a later stage along the quest line you receive the journal, you read the journal... and herein lies the problem. When you open the journal it immediately shows the objective to read the journal as being complete and lists the next objective in the quest line. I have been through all the scripts on the book, the journal, and the rest of the quest and cannot find any bloody difference what-so-ever. WTF am I overlooking, what is it that makes the objectives wait until AFTER you close the damned book/journal/letter/whatever to pop up?

 

I realize in the grand scheme of things I am nit picking seeing as the bloody quest is actually working, but it is bugging me, I would really prefer if the bloody objectives didn't pop up until after the player closes the journal.

 

Anyone have any guesses? Code from both items below (first one from the book, second from the journal)...

 

Cheers,

Skia

Scriptname SkiaMK_TAQLScript01 extends ObjectReference  

Int Property MyStage Auto
Quest Property MyQuest Auto

Event OnRead()
MyQuest.SetStage(MyStage)

EndEvent
Scriptname SkiaMK_TAQL_ReadCJ extends ObjectReference  

Int Property MyStage Auto
Quest Property MyQuest Auto

Event OnRead()
MyQuest.SetStage(MyStage)

EndEvent

Each script has it's respective properties set to call the quest and stage in CK.

Link to comment
Share on other sites

Use one of the default vanilla scripts :

defaultSetStageOnCloseBook

This script will set the specified stage in the owning quest when you read (NOT close, open) the book this alias references. Only works for Reference Aliases.


defaultSetStageOnCloseBookNotAlias

This script will set the specified stage in the specified quest when you read (NOT close, open) the book.

Link to comment
Share on other sites

 

Use one of the default vanilla scripts :
defaultSetStageOnCloseBook
This script will set the specified stage in the owning quest when you read (NOT close, open) the book this alias references. Only works for Reference Aliases.
defaultSetStageOnCloseBookNotAlias
This script will set the specified stage in the specified quest when you read (NOT close, open) the book.

 

 

I appreciate the info but that would have the opposite effect of what I am looking for... I want the objectives to display after the book is closed, not as soon as it's opened. Currently, the book that starts the quest off to begin with is behaving the way I want it to, but the journal (a journal book, not the players quest journal) is triggering it's objectives the instant you open it and I don't want that. What I can't figure out is what the hell is causing that because I have both items scripted the same way.

Link to comment
Share on other sites

defaultSetStageOnCloseBookNotAlias
It will set the stage to the quest when it've been read.
You can optionally insert a property to your script to "wait" a certain amount of time before it will set the stage.


Int Property MyStage Auto
Quest Property MyQuest Auto
float property TimeToWait = 1.0 auto
{The time to WAIT before setting the STAGE. DEFAULT = 1.0 Sec}
 
Event OnRead()
    Utility.wait(TimeToWait)
    MyQuest.SetStage(MyStage)
EndEvent

 

 

 

 

Hope it helps.

 

Edit: Typo

Edited by maxarturo
Link to comment
Share on other sites

Hmm... Adding a delay would be better than leaving it as is. I'll use that if I can't find a full solution to the problem. I'm wondering if it has something to do with the item I cloned for the journal; as much of a PITA as it will be I think I may try cloning my book that is working as intended and then changing the contents, mesh and textures, etc. then insert the scripts to that and see how it behaves.

Link to comment
Share on other sites

Some items might bug out or have an initial bug, for example "Notes" : notes have a problem setting stage on read, is a default vanilla bug.

 

Thanks for the heads up... I won't clone a note for anything then... Should be able to just clone a book and then change the mesh and textures.

Link to comment
Share on other sites

 

defaultSetStageOnCloseBookNotAlias
It will set the stage to the quest when it've been read.
You can optionally insert a property to your script to "wait" a certain amount of time before it will set the stage.


Int Property MyStage Auto
Quest Property MyQuest Auto
float property TimeToWait = 1.0 auto
{The time to WAIT before setting the STAGE. DEFAULT = 1.0 Sec}
 
Event OnRead()
    Utility.wait(TimeToWait)
    MyQuest.SetStage(MyStage)
EndEvent

 

 

 

 

Hope it helps.

 

Edit: Typo

 

 

So... I cloned the book, which was working as intended and used that to recreate the journal... No joy, still popped it's objective the instant it was opened... So after I last ditch effort to find something in the script I overlooked I said screw it and added the "wait" in... I timed myself reading the journal from beginning to end 3 times and then used the average as the time to wait. Tested it out, objectives didn't pop up. Just as I was about to close the game and remove it thinking it broke the script in some way they popped. Reloaded and tested again with a stopwatch, sure enough, they popped "wait" time after the journal was closed.

 

When you posted wait time I thought the objectives would still pop while the journal was open, simply delayed by "wait-time" seconds, but no, they now wait that amount of time after the journal closes. So I set the time to 1 second and that fixed it, now the objectives pop up 1 second after the journal closes... I don't know if I misunderstood what it was meant to accomplish or if this result it not what you expected either but at any rate, thanks, saves me obsessing over it anymore.

Link to comment
Share on other sites

First of all the most important :

1) Never test mods that contains quest fragments or script scene sequences on a SAVE that has seen your mod, always make a "Clean Save" without your mod loaded (before you have loaded & start testing the mod ) and keep that save file to test your mod (from the "Clean Save" and after).

2) While testing your mod (script fragment or script sequence), if you need to reload the save to test again, always EXIT the game, exiting to the game's menu will always keep in memory traces of the script causing unexpected testing results.

* This also applies for saves that you did after running the mod (while testing) from your "Clean Save" and "After".


Now to your actual question.

The OnRead() event will fire as soon as you open the book and the book's animation executes + you enter the book's UI (when the book UI opens a book).

But since you can not "wait" while you are inside the book's UI or run another direct script function (the game is in a pause mod), the "wait" command will fire the instant you leave the UI.

This was a simple "work around" to your original issue.

Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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