diff --git a/src/BreathOfTheWild/Mods/DayLength/patch_DayTime.asm b/src/BreathOfTheWild/Mods/DayLength/patch_DayTime.asm index f2efc7d07..608c0ce0d 100644 --- a/src/BreathOfTheWild/Mods/DayLength/patch_DayTime.asm +++ b/src/BreathOfTheWild/Mods/DayLength/patch_DayTime.asm @@ -8,16 +8,15 @@ const_timeMultiplier: .float $timeMultiplier const_cloudMultiplier: -.float $cloudMultiplier +.float $cloudMultiplier + (($cloudMultiplier == 0) * $timeMultiplier) ; Normal Time Mode - Time multiplyTimeStep: lfs f7, 0xA4(r30) ; original instruction to load timestep -lis r9, const_timeMultiplier@ha -lfs f8, const_timeMultiplier@l(r9) +lis r4, const_timeMultiplier@ha +lfs f8, const_timeMultiplier@l(r4) fmuls f7, f7, f8 -lwz r9, 0(r6) ; repeat prior instruction for free r9 register blr 0x0365FF78 = bla multiplyTimeStep @@ -73,4 +72,18 @@ lbz r12, 0x129(r30) ; Normal load instruction cmpwi r0, 0 blr -0x0365FE0C = bla calcForceTime2 \ No newline at end of file +0x0365FE0C = bla calcForceTime2 + + +clockUnits: +li r0, $clockAdjust +cmpwi r0, 0 +beq clockSkip +subf r0, r12, r3 ; original instruction +clockSkip: +blr + +0x307C130 = bla clockUnits + + +0x10301850 = .float $bloodMoonTime diff --git a/src/BreathOfTheWild/Mods/DayLength/rules.txt b/src/BreathOfTheWild/Mods/DayLength/rules.txt index fc44106b2..f6ff4d45f 100644 --- a/src/BreathOfTheWild/Mods/DayLength/rules.txt +++ b/src/BreathOfTheWild/Mods/DayLength/rules.txt @@ -10,6 +10,8 @@ $timeCycleMode:int = 0 $timeMultiplier = 1.0 $cloudMultiplier = 1.0 $dayTimeEnum:int = 0 +$clockAdjust:int = 1 +$bloodMoonTime = 2520 [Preset] @@ -29,35 +31,30 @@ name = 15 seconds category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 96 -$cloudMultiplier = 96 [Preset] name = 30 seconds category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 48 -$cloudMultiplier = 48 [Preset] -name = 1 minutes +name = 1 minute category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 24 -$cloudMultiplier = 24 [Preset] name = 6 minutes category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 4 -$cloudMultiplier = 4 [Preset] name = 12 minutes category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 2 -$cloudMultiplier = 2 [Preset] name = 24 minutes (Default) @@ -65,63 +62,138 @@ category = Day Length condition = ($timeCycleMode == 1) default = 1 $timeMultiplier = 1.0 -$cloudMultiplier = 1.0 [Preset] name = 36 minutes category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 0.75 -$cloudMultiplier = 0.75 [Preset] name = 48 minutes category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 0.5 -$cloudMultiplier = 0.5 [Preset] name = 72 minutes category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = (1/3) -$cloudMultiplier = (1/3) [Preset] name = 96 minutes category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 0.25 -$cloudMultiplier = 0.25 [Preset] name = 2 hours category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 0.2 -$cloudMultiplier = 0.2 [Preset] name = 4 hours category = Day Length condition = ($timeCycleMode == 1) $timeMultiplier = 0.1 -$cloudMultiplier = 0.1 [Preset] name = 12 hours category = Day Length condition = ($timeCycleMode == 1) -$timeMultiplier = (1/3)/10 -$cloudMultiplier = (1/3)/10 +$timeMultiplier = (1/30) [Preset] name = 24 hours category = Day Length condition = ($timeCycleMode == 1) -$timeMultiplier = (1/6)/10 -$cloudMultiplier = (1/6)/10 +$timeMultiplier = (1/60) + + +[Preset] +name = Normal (No Speedup/Slowdown) +category = Cloud Speed +condition = ($timeCycleMode == 1) +$cloudMultiplier = 1.0 + +[Preset] +name = Scaled with day length (Default) +category = Cloud Speed +condition = ($timeCycleMode == 1) +default = 1 +$cloudMultiplier = 0 + + +[Preset] +name = Update every 5 minutes (Default) +category = Clock Increment Frequency +condition = ($timeCycleMode == 1) +default = 1 +$clockAdjust:int = 1 + +[Preset] +name = Update every minute +category = Clock Increment Frequency +condition = ($timeCycleMode == 1) +$clockAdjust:int = 0 + + +[Preset] +name = 28 days +category = Time between Blood Moons +condition = ($timeCycleMode == 1) +$bloodMoonTime = (28*360) + +[Preset] +name = 14 days +category = Time between Blood Moons +condition = ($timeCycleMode == 1) +$bloodMoonTime = (14*360) + +[Preset] +name = 7 days (Default) +category = Time between Blood Moons +condition = ($timeCycleMode == 1) +default = 1 +$bloodMoonTime = (7*360) + +[Preset] +name = 6 days +category = Time between Blood Moons +condition = ($timeCycleMode == 1) +$bloodMoonTime = (6*360-1) + +[Preset] +name = 5 days +category = Time between Blood Moons +condition = ($timeCycleMode == 1) +$bloodMoonTime = (5*360-1) + +[Preset] +name = 4 days +category = Time between Blood Moons +condition = ($timeCycleMode == 1) +$bloodMoonTime = (4*360-1) + +[Preset] +name = 3 days +category = Time between Blood Moons +condition = ($timeCycleMode == 1) +$bloodMoonTime = (3*360-1) + +[Preset] +name = 2 days +category = Time between Blood Moons +condition = ($timeCycleMode == 1) +$bloodMoonTime = (2*360-1) + +[Preset] +name = 1 day +category = Time between Blood Moons +condition = ($timeCycleMode == 1) +$bloodMoonTime = (1*360-1) [Preset]