Configurable message to display every X amount of time.

Post » Wed Feb 20, 2013 11:42 am

Seeing as how crime factions cannot be added to the menu, at least by no easy means whatsoever, my mod tracks crime and shows the player a message telling them their current bounty.

I'm making this message configurable. I want the player to be able to choose between three options:

1. Having it displayed every X ingame hours. They will have several choices here. (6, 12, 24?)
2. Having it displayed every X real hours. Again, with several choices. (1, 3, 5?)
3. Having it never display. They must check the book mentioned below to see what it currently is.

This setting can be changed via a book that is found in the world and can be acquired repeatedly through dialogue. The book opens, showing the player's current bounty and giving them the option to tweaking the message settings.

Now, here's my question. What's the best way to set up this variable, and to make a script that counts down and shows the message every X period of time? Should I do a script on a quest? Repeatable quest stage fragments with Utility.Wait(X) commands? What happens if the player changes the option in the middle of the current wait cycle (Which they will no doubt do)? How should I handle that?

I had considered doing this: I would set up two repeatable quest stages. The first would check a variable, which is either 0, 1, or 2. 0 for No wait, 1 for wait game hours, and 2 for wait real hours. It then calls the appropriate command (or not command for 0) to make the script wait a certain amount of time based off another setting, the amount of time. After that wait, it sets the stage to the second stage. The second stage calls the message to be shown, and sets the quest back to the first stage, which recalculates wait times based on the player's current setting. However this seems really weird and inefficient and bad to me, so I'd love some advice!

Any ideas are welcome! As well as input on what you think the player's choices should be!
User avatar
Crystal Birch
 
Posts: 3416
Joined: Sat Mar 03, 2007 3:34 pm

Return to V - Skyrim