Forum Discussion

ForestNinja0's avatar
9 years ago

Request for Context: TunableClock

Hello Again,

I've been working on a set of scripts for 'live tuning' and I need to know if there is any possibility of importing the TunableClock. Please provide the full context.

Thanks.
  • Can you be more specific? I don't know what you mean by "provide the full context".
  • "SimGuruEugi;15097061" wrote:
    Can you be more specific? I don't know what you mean by "provide the full context".


    Sorry, I just need the import path, not necessarily the full context.
  • Clock functionality is in clock.py. You can also check out commands in clock_commands.py.
  • "SimGuruEugi;15097210" wrote:
    Clock functionality is in clock.py. You can also check out commands in clock_commands.py.


    In date_and_time you're calling TunableClock.SetSimSecondsPerRealSecond() from __main__, Is there no possibility of importing it?
  • That does not seem to be an existing class. Probably some code that was left over from a previous implementation. Is there anything in particular you're trying to do?
  • "SimGuruEugi;15098565" wrote:
    That does not seem to be an existing class. Probably some code that was left over from a previous implementation. Is there anything in particular you're trying to do?


    I wanted to make use of it without creating a conflict but it isn't really necessary. I know that it exists since I've been using it to set the clock rate since the base version so I'll just write the class to a file.
  • "SimGuruEugi;15098565" wrote:
    That does not seem to be an existing class. Probably some code that was left over from a previous implementation. Is there anything in particular you're trying to do?


    Apparently it isn't effective and may never have been... Is there any function which can be used to resend the clock tuning (at least REAL_MILLISECONDS_PER_SIM_SECOND) without re-loading the zone?
  • You'll want a mod that overrides that value. The tuning data is consumed by UI/native code, meaning that the clocks are probably kept in sync using that value, without any possibility to override it at runtime.
  • "SimGuruEugi;15100214" wrote:
    You'll want a mod that overrides that value. The tuning data is consumed by UI/native code, meaning that the clocks are probably kept in sync using that value, without any possibility to override it at runtime.

    It actually does update if I set the values for the TunableInt however it doesn't update until travel or loading of zones from map view so I was hoping for a resend.

    Thanks for the quick response.