WhiteSpike-Moon_Day_Speed_Multiplier_Patcher icon

Moon Day Speed Multiplier Patcher

Patches the time passing mechanism to solve problems whenever day speed multiplier value has been changed. This is meant for people who wish to use these values and are able to configure them to their desire.

Last updated a month ago
Total downloads 13763
Total rating 8 
Categories Mods Client-side Server-side Bug Fixes
Dependency string WhiteSpike-Moon_Day_Speed_Multiplier_Patcher-1.0.1
Dependants 30 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

Moon Day Speed Multiplier Patcher

A mod which patches the time passing mechanic to solve issues whenever a moon's day speed time multiplier is changed from the default "1.0", leading to unexpected behaviour such as extra days being discounted from the deadline.

How to access the content of the mod

  • Without the mod, the time mechanic will deduct from the deadline with a value influenced by day time speed multiplier. When this value is 1.0, it will act as the multiplier does not exist in the calculations, leading to the correct deducting one day of deadline when leaving from a moon. In the case of value different than 1.0 however, deadline deductions take account to this value change leading to cases like with a day time speed multiplier of 2.0 removing two days of deadline when leaving the moon. There is also a scenario where you would start in the moon already during the night, leading to an early leaving.
  • With the mod, the cases where the value of time speed multiplier of the moon is different than 1.0 will act correctly according to the vanilla mechanics, in other words, whenever you leave the moon, a singular day will be removed from the deadline. Also solves the case of arriving to the moon already at night by making it start at the current time. In other words, the day time speed multiplier is an additional multiplier used to advance the moon's time, along with the universal time multiplier.

Differences between this mod and CentralConfig

  • This mod changes the vanilla time formula from globalTime = Mathf.Clamp(globalTime + Time.deltaTime * globalTimeSpeedMultiplier, 0f, globalTimeAtEndOfDay) to globalTime = Mathf.Clamp(globalTime + Time.deltaTime * globalTimeSpeedMultiplier * currentLevel.DaySpeedTimeMultiplier, 0f, globalTimeAtEndOfDay), in other words, instead of having only one multiplier influencing the time passing, it will have two: one universal (independent from the moon you landed on whose value is 1.4) and one stored for each moon. CentralConfig replaces the value of globalTimeSpeedMultiplier with the values inserted from your config if the moon you landed on has a config entry of time speed multiplier override, not allowing to have "one universal, one specific to the moon" scenario.
  • This mod changes the game's code through three transpilers. CentralConfig replaces the game's code with their own where it shows the same logic as vanilla but with slight changes to account override values from its provided configuration.
  • This mod is meant to fix one issue present in the game due to changes in the moons' day speed time multiplier while CentralConfig's objective is to provide the users means to alter the game's core mechanics to their pleasure and ensuring they function correctly. In other words, this mod is only ideal for people who only wish for the day time speed multiplier functionality working correctly without anything else CentralConfig provides as additional features.

License

This mod is under MIT License. Meaning that you can decide to take this mod for your own things and customize it as you need, so long as you follow the license's requirements