View Single Post
Old March 9th, 2013 (5:12 AM).
Jambo51's Avatar
Jambo51 Jambo51 is offline
Glory To Arstotzka
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Posts: 731
Originally Posted by 11bayerf1 View Post
43 0D XX YY ZZ 08 43 4D XX YY ZZ 08 2A 04 1C 3F 02 02 60 00 XX2 YY2 ZZ2 08


00 02 03 09 2E 85 3E 02 02 CF 15 2E 85 3E 02 02 D2 15 28 47 69 1D 08

Offset ZZ2YY2XX2

00 02 03 09 2E 85 3E 02 02 E7 15 2E 85 3E 02 02 EA 15 28 47 69 1D 08

The bytes ZZ YY XX and ZZ2 YY2 XX2 point to the execution of the code under the weather,
wherein ZZ YY XX is normal weather, and ZZ2 YY2 XX2 is Sunny Weather.
I normally place them right behind eachother for conveniences sake.
It will use ZZ YY XX in Rain and Sandstorm as well.
This won't work as intended. You see, command 2A checks literal values, not bitwise checks (which is how the weather bits work). You're asking it if it's 0x4 than 0x60 (I forget what 0x4 actually is).

What you should be doing is ANDing the address with those bits. However, to my knowledge, there are no such commands in the vanilla game.

As such, your script will only work under very specific circumstances, (when the weather bits are set to 0x60) and not under all Sunny weather types. (It's possible to only have 0x20 set, or only 0x40 set).
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote