acr_time_i

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

Locked
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

acr_time_i

Post by AcadiusLost »

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).
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Re: acr_time_i

Post by ç i p h é r »

AcadiusLost wrote:Are we intending to initialize the hour / second as well?
If it's throwing off time calculations, then yes we should.
Do we mean to work in "game-seconds"?
I think that largely depends on the context. For creature time-of-day spawning, the system would of course have to depend on in-game time. For spawn/despawn delays, probably not since the frame of reference for builders will generally be real time. But, it could go either way. We're not bound to any hard or fast rule. We can decide what the situation warrants.
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).
Perhaps. I don't know what Ronan's intentions were when he coded that, but as I said above, this isn't etched in stone. We can adopt whatever convention makes most sense for the context in which time is being used.
Locked