acr_time_i
Posted: Fri Mar 02, 2007 8:58 am
These functions are used pretty extensively by the spawn system for scheduling and considering when/if to refresh areas- However, I had a few proceedural questions with them, maybe someone who has been in on things from earlier can help clarify them.
InitializeTime() sets the module to day 1, month 1, year 1373 - I've called it in my moduleload script, and it seems to function. Are we intending to initialize the hour / second as well? Seems the toolset defaults modules to a 13:00 start time unless otherwise specified, which is making the scripts think the module has been running for 13 game-hours as soon as it's loaded.
We've got ACR functions to GetGameSecondsSinceStart(), which is used a few places in the spawn scripts, it basically totals game-hours for all the years, months, days, and hours since the module was loaded, using 60 minutes per hour, 60 seconds per minute.
The time ratio / compression is typically handled in a RL minutes to game hours conversion, IIRC: the default is something like 2 RL min to one "game-hour".
Do we mean to work in "game-seconds"? Even at modest time compression, they add up very quickly, though it's actually handled as a float, so the range is pretty broad. I just wondered about the intention of it- generally "seconds" seem to be the only time measure that is treated consistently as RL-time in the NWNscript conventions- everything else tended to require the awkward clarification of "ingame vs. RL" time.
Or does this code reflect a time when we expected to use significantly less time compression for NWN2? (I seem to recall it was up for debate at some point).
InitializeTime() sets the module to day 1, month 1, year 1373 - I've called it in my moduleload script, and it seems to function. Are we intending to initialize the hour / second as well? Seems the toolset defaults modules to a 13:00 start time unless otherwise specified, which is making the scripts think the module has been running for 13 game-hours as soon as it's loaded.
We've got ACR functions to GetGameSecondsSinceStart(), which is used a few places in the spawn scripts, it basically totals game-hours for all the years, months, days, and hours since the module was loaded, using 60 minutes per hour, 60 seconds per minute.
The time ratio / compression is typically handled in a RL minutes to game hours conversion, IIRC: the default is something like 2 RL min to one "game-hour".
Do we mean to work in "game-seconds"? Even at modest time compression, they add up very quickly, though it's actually handled as a float, so the range is pretty broad. I just wondered about the intention of it- generally "seconds" seem to be the only time measure that is treated consistently as RL-time in the NWNscript conventions- everything else tended to require the awkward clarification of "ingame vs. RL" time.
Or does this code reflect a time when we expected to use significantly less time compression for NWN2? (I seem to recall it was up for debate at some point).