Jump to content

A script to make a dialogue appear once a day?


wattbatt

Recommended Posts

Posted

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?

Posted

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)

Posted
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

Posted
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.

Posted

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

 

 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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