[API] Time Control
An API mod made to allow creators to add time manipulation for individual objects and the world itself. Many actions such as harvesting and crafting are currently unaffected by local timescale. I am trying to find a fix for this.
If you have the "Dev tools" mod you can access a handy-dandy little menu for easily adjusting global or local timescales and toggling debug mode as seen in the above screenshot. Amazing for testing out what this mod is capable of.
All functions will work identically when ran from both server and client and will automatically make sure every current client is synced up. You must be an admin to call these functions from the client.
Note that when using a function from the console "GLOBAL" is not required, however elsewhere it is.
<Overview>
Global timescale is the speed of the world itself as seen by all players, lower speed makes everything play in slow motion and may make animations a bit choppier. Higher speed makes the world faster and has no noticeable issues.
Setting to 0 may cause issues.
Currently global timescale is not saved so reloading a save may require it to be readjusted.
<Functions>
"GLOBAL:SetGlobalTimeScale(nil, value)": adjusts the global timescale to "value".
For example, typing "SetGlobalTimeScale(nil, 0.5)" in the console will make the game go at half the speed it normally does.
"GLOBAL:GetGlobalTimeScale()": outputs the global timescale, that’s all.
<Overview>
Local timescale is the speed of a particular object, an object with lower speed will move slower, have slower animations, and SOME actions will take longer. local timescale seems to not play well lag compensation, it is recommended to turn it off when adjusting local timescale of the player. Very high values may make some actions fail.
<Functions>
"GLOBAL:SetLocalTimeScale(nil, inst, value)": adjust the local timescale of "inst" to "value".
For example, typing "SetLocalTimeScale(nil, ThePlayer, 2)" in the console will make your character move at twice the speed, play animations twice as fast, and do some actions faster.
"GLOBAL:GetLocalTimeScale(nil, inst)": outputs the local timescale of "inst", that’s all.
"GLOBAL:SetTCDebug(nil, boolean)": adjusts debug settings, currently only "true" or "false". Setting this to true will have it tell you anytime it does anything. Most function will tell you who or what activated them, useful for pinning blame on a pesky admin or player who sneakily got admin access.