- 48
- Posts
- 8
- Years
- Katones City
- Seen May 13, 2025
Hello.
I wanted to know if there was a way to make the weather change in overworld based on what month it is. I have installed Primal-Dialga's RTC and wrote a script that compares the month and the time of the day bytes from the RAM and performs various 'doweather's based on comparisons. Here is the overall script in case needed:
It works if placed as a level script as well. What i want to know is whether there is a way to activate it everytime a map is loaded. Something related to the map headers may be? Someway similar to how the music, tileset or map names are loaded? I just dont wanna write level scripts in every single map.
I wanted to know if there was a way to make the weather change in overworld based on what month it is. I have installed Primal-Dialga's RTC and wrote a script that compares the month and the time of the day bytes from the RAM and performs various 'doweather's based on comparisons. Here is the overall script in case needed:
Spoiler:
#org 0xA150D7
comparefarbytetobyte 0x300553F 0x1
if 0x1 call 0x8A15169
comparefarbytetobyte 0x300553F 0x2
if 0x1 call 0x8A1518F
comparefarbytetobyte 0x300553F 0x3
if 0x1 call 0x8A1519D
comparefarbytetobyte 0x300553F 0x4
if 0x1 call 0x8A151AB
comparefarbytetobyte 0x300553F 0x5
if 0x1 call 0x8A151C5
comparefarbytetobyte 0x300553F 0x6
if 0x1 call 0x8A151DF
comparefarbytetobyte 0x300553F 0x7
if 0x1 call 0x8A15205
comparefarbytetobyte 0x300553F 0x8
if 0x1 call 0x8A15243
comparefarbytetobyte 0x300553F 0x9
if 0x1 call 0x8A15205
comparefarbytetobyte 0x300553F 0xA
if 0x1 call 0x8A151DF
comparefarbytetobyte 0x300553F 0xB
if 0x1 call 0x8A1528D
comparefarbytetobyte 0x300553F 0xC
if 0x1 call 0x8A1518F
return
#org 0xA15169
comparefarbytetobyte 0x203C000 0x0
if 0x1 call 0x8A152A1
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A152A1
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A152A1
return
#org 0xA1518F
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A152A1
return
#org 0xA1519D
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A152AD
return
#org 0xA151AB
comparefarbytetobyte 0x203C000 0x1
if 0x1 call 0x8A152AD
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A152AD
return
#org 0xA151C5
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A152AD
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A1529B
return
#org 0xA151DF
comparefarbytetobyte 0x203C000 0x3
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A152A7
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A1529B
return
#org 0xA15205
comparefarbytetobyte 0x203C000 0x0
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x3
if 0x1 call 0x8A152A7
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A152B3
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A152A7
return
#org 0xA15243
comparefarbytetobyte 0x203C000 0x0
if 0x1 call 0x8A152A7
comparefarbytetobyte 0x203C000 0x1
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x3
if 0x1 call 0x8A152A7
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A152B3
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A152B3
return
#org 0xA1528D
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A1529B
return
#org 0xA152A1
setweather 0x4
doweather
return
#org 0xA152AD
setweather 0xC
doweather
return
#org 0xA1529B
setweather 0x3
doweather
return
#org 0xA152A7
setweather 0x5
doweather
return
#org 0xA152B3
setweather 0xD
doweather
return
comparefarbytetobyte 0x300553F 0x1
if 0x1 call 0x8A15169
comparefarbytetobyte 0x300553F 0x2
if 0x1 call 0x8A1518F
comparefarbytetobyte 0x300553F 0x3
if 0x1 call 0x8A1519D
comparefarbytetobyte 0x300553F 0x4
if 0x1 call 0x8A151AB
comparefarbytetobyte 0x300553F 0x5
if 0x1 call 0x8A151C5
comparefarbytetobyte 0x300553F 0x6
if 0x1 call 0x8A151DF
comparefarbytetobyte 0x300553F 0x7
if 0x1 call 0x8A15205
comparefarbytetobyte 0x300553F 0x8
if 0x1 call 0x8A15243
comparefarbytetobyte 0x300553F 0x9
if 0x1 call 0x8A15205
comparefarbytetobyte 0x300553F 0xA
if 0x1 call 0x8A151DF
comparefarbytetobyte 0x300553F 0xB
if 0x1 call 0x8A1528D
comparefarbytetobyte 0x300553F 0xC
if 0x1 call 0x8A1518F
return
#org 0xA15169
comparefarbytetobyte 0x203C000 0x0
if 0x1 call 0x8A152A1
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A152A1
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A152A1
return
#org 0xA1518F
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A152A1
return
#org 0xA1519D
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A152AD
return
#org 0xA151AB
comparefarbytetobyte 0x203C000 0x1
if 0x1 call 0x8A152AD
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A152AD
return
#org 0xA151C5
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A152AD
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A1529B
return
#org 0xA151DF
comparefarbytetobyte 0x203C000 0x3
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A152A7
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A1529B
return
#org 0xA15205
comparefarbytetobyte 0x203C000 0x0
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x3
if 0x1 call 0x8A152A7
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A152B3
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A152A7
return
#org 0xA15243
comparefarbytetobyte 0x203C000 0x0
if 0x1 call 0x8A152A7
comparefarbytetobyte 0x203C000 0x1
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x2
if 0x1 call 0x8A1529B
comparefarbytetobyte 0x203C000 0x3
if 0x1 call 0x8A152A7
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A152B3
comparefarbytetobyte 0x203C000 0x5
if 0x1 call 0x8A152B3
return
#org 0xA1528D
comparefarbytetobyte 0x203C000 0x4
if 0x1 call 0x8A1529B
return
#org 0xA152A1
setweather 0x4
doweather
return
#org 0xA152AD
setweather 0xC
doweather
return
#org 0xA1529B
setweather 0x3
doweather
return
#org 0xA152A7
setweather 0x5
doweather
return
#org 0xA152B3
setweather 0xD
doweather
return
It works if placed as a level script as well. What i want to know is whether there is a way to activate it everytime a map is loaded. Something related to the map headers may be? Someway similar to how the music, tileset or map names are loaded? I just dont wanna write level scripts in every single map.