Jump to content

Dialog after a number of days have passed


MimiTheAlchemist

Recommended Posts

I have recently released a mod that allows the player to pay court wizards

to fill soul gems. It works great, but now I want to add a feature in which

you can customize the days you want to wait until you can come back and pick them up. So, i have two questions.

 

1. How do you make dialog show up after a number of days have

passed? I plan on using a global (waittime) for the chosen amount

of days the user of my mod wants to wait.

 

2. Will this cause any problems when the player asks another court

wizard to fill their soul gems?

 

I'd really appreciate any help on this subject since timing dialog is

something I have never tried before.

Link to comment
Share on other sites

There is a global called GameDaysPassed. You can capture the current day in a global variable that is stored in the quest add the number of days you want the player to wait, then compare it to GameDaysPassed using the conditional function GetGlobalValue or by script. If the value is greater than GameDaysPassed then the dialogue option will appear. If it is less, then the dialogue option will not.
Link to comment
Share on other sites

Another way to do it if you are using repeatable quest stages as a handler, you can have the stage for "starting the work" have a Utility.WaitGameHours(#) line followed by a setstage to the next quest stage for the " work done" which is handy because you can have the quest status pop up as a reminder that the work is done. This is also a little less confusing than having to poll and set the current gamedayspassed into int values and globals and then having to compare them. Another nice thing if you do want to customize the amount if time in game, you could have several pairs of start work/end work stages for various wait times and basically trigger them with dialog options
Link to comment
Share on other sites

That is absolutely NOT a good way to do it. waitgamehours pauses the script and doesn't let it continue processing. If you want to do it using quest stages you should use registerforupdategametime(). Still I recommend the global as it uses the least script resources. To customize it you would just change the float value that you add to game time. You could also use the globalvariable to add a quest goal for the player that says "Pick up your soul gems on (XYZ day)."
Link to comment
Share on other sites

That is absolutely NOT a good way to do it. waitgamehours pauses the script and doesn't let it continue processing. If you want to do it using quest stages you should use registerforupdategametime(). Still I recommend the global as it uses the least script resources. To customize it you would just change the float value that you add to game time. You could also use the globalvariable to add a quest goal for the player that says "Pick up your soul gems on (XYZ day)."

Well it really depends on what exactly you are trying to accomplish. I use it for several functions and I see no considerable slow down due to script load, and this is coming from within a cell that has over 200 display activators, so I wouldn't discount someone's viable suggestion on the grounds that there may be other better ways of doing it. I was merely suggesting a way that I have accomplished similar tasks

Link to comment
Share on other sites

You should avoid utility.wait and utility.waitgamehours for any appreciable amount of time. This kind of thing is exactly what registerforupdategametime is designed for. It's not just about script resources, it also means that the script cannot continue processing. The purpose of these functions is to prevent your script from doing anything for a short period of time, which is slightly but meaningfully different from telling your script to do something specific in two day's time. It's the difference between telling your troops, "Don't do anything until I give the word" vs. "If I'm not back in two days, come rescue me." It's not that the function has no use, it's just that you don't want your script idling for two days anymore than you want to leave your car idling for two days.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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