Yeah, very strange.
Edit: Also, working as expected. Very cool!
Printable View
I've come back to help figure things out and wanted to share here and let you all know before submitting to the forge (will stay free). Let me know if you run into any issues. Hopefully I was able to get this in before too many changes by others were made. It might still be a bit messy in the TimeManager script right now, but its late and last time I tried cleaning it out I somehow deleted something I needed so I will wait, but here are the functions I've made that are key to utilizing features like reminders and events.
I've added script to allow other extensions to make use of the time as I have with reminders and events:
local aCurrentDate = TimeManager.getCurrentRawDate() -- gets a table of the current time
local aBuildDate = TimeManager.buildRawDate(nMinute, nHour, nDay, nMonth, nYear) -- gets a table of the time given
local nMinutes = TimeManager.getRawDateDifferences(aCurrentDate, aLastDate) -- gets the difference in minutes
TimeManager.setLastDate(Node, aCurrentDate) -- for repeating events like reminders
local aLastDate = TimeManager.getLastDate(Node, aCurrentDate) -- for repeating events like reminders
TimeManager.addTimeChangeFunction(f) -- add a function to be triggered on TimeChange events
and if you have an extension that could benefit from these functions, you can add
if TimeManager then
TimeManager.addTimeChangeFunction(MyNewFunction);
end
then if you change time with your extension, you just call TimeManager.TimeChanged() right AFTER, never before the adjust function.
hopefully you all find this works out.
oh, and I capped the table rolls by reminders to 60, so you don't kill your computer when you jump a year.
if you were unfortunate enough to get it a moment ago, redownload. sorry, left a mistake in the rounds advancement code
Updated and is live on the forge!
Thanks looking good.
So, with the mod now being on Forge under it's OP, does it currently include all the updates bmos has done over the past while? I just want to make sure I won't be accidentally sliding backward in terms of bug fixes and the like before switching over to the forge extension.
Amazing, thank you!
Well, you beat me to this... I was going to use this idea to learn the LUA stuff... dang it!
Thanks though... I will definitely use this a LOT!
The only things I was going to include that don't appear to be here are...
1. A more abstract output of time for the players based on a range of hours... like "Just after high sun", "Mid-morn"... etc.
2. The color of the theme changing to reflect the time for more immersion.
Obviously, both would/should have options in the settings to turn them on and off.
You could do this as another extension by overriding the CalendarManager.outputTime() function, as that is what is called to display the time in most instances (except reminders and events)
This too can still be done as another extension. Many ways it could be done and will not effect the clock adjuster.
The CalendarManager in Core RPG should have much of what you need. The TimeManager.TimeChange() function of mine would be all you need to have it operate when time changed.
I left the code open in the forge too, so you can still go through and see what I have that you could utilize.