Jump to content

A script to make a dialogue appear once a day?


Recommended Posts

I am making some custom dialogues and i'd like a topic to be available once per day, but the available condition functions can't do this.

 

Apparently i need a script, i think the game has a "gamedayspassed" global variable that can be used but apart from that i don't know what to do.

 

I was thinking of a script that just makes an int go to 1 when the dialogue is selected, and it will go back to 0 making the dialogue selectable again the next day, or so

Can you give me an example of a script like this?

Link to comment

Create a global variable TimeoutGlob (or whatever you want to call it) And when your topic runs do

TimeoutGlob.SetValue(Utility.GetCurrentGameTime() + 1.0)

 

Then on your topic set condition

GetGlobal  GameDaysPassed  >  TimeoutGlob

 

 

Thats a timeout of 24 hours. So if you run the topic at 3pm then it will only be available after 3pm tomorrow. If you want it available on the next day, straight after midnight then instead do

 

TimeoutGlob.SetValue(Math.Floor(Utility.GetCurrentGameTime()) + 1.0)

Edited by Monoman1
Link to comment
2 hours ago, Monoman1 said:

Create a global variable TimeoutGlob (or whatever you want to call it) And when your topic runs do

TimeoutGlob.SetValue(Utility.GetCurrentGameTime() + 1.0)

 

Then on your topic set condition

GetGlobal  GameDaysPassed  >  TimeoutGlob

 

 

Thats a timeout of 24 hours. So if you run the topic at 3pm then it will only be available after 3pm tomorrow. If you want it available on the next day, straight after midnight then instead do

 

TimeoutGlob.SetValue(Math.Floor(Utility.GetCurrentGameTime()) + 1.0)

 

Nice! Can i just write that inside a blank .psc file, compile it, add the script to the topic and thats all it's done? Or do i have to wrap those instructions inside something? I have skyrim LE without creation kit and all these infos are only in the creation kit wiki so its a bit confusing for me, i'm using xedit

Edited by wattbatt
Link to comment
4 minutes ago, wattbatt said:

 

Nice! Can i just write that inside a blank .psc file, compile it, add the script to the topic and thats all it's done? Or do i have to wrap those instructions inside something? I have skyrim LE without creation kit and all these infos are only in the creation kit wiki so its a bit confusing for me

Ah well I don't know how you're doing this without the ck. Its actually going to be more awkward without the ck. 

All you do is type it into one of the fragment boxes in the topic info and fill the properties.

Link to comment

Maybe this is interesting for someone:

 

I'll let you know i had a no-steam semi hacked CK that works although quite old and buggy and basically i spent all day doing these things on CK, and then looking the changes to the .esp from xedit, now i finally got my goal.

 

The catch of the whole operation is that all the CK buttons basically pre-write some needed code in the .psc file and some entries in the .esp so yeah, a kit to help creators..

Without CK knowing everything must be written from scratch unless one learns the whole fundamentals of papyrus i guess, there isn't much else than CK on the internet.

 

I inspected what happened to the code and to xedit after i did the script with CK and copied what it did in another .esp for some practice, it worked

 

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use