Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2018-10-03 18:24:14

rbroab
Member
Registered: 2017-06-13
Post 81/86

Disable Surf Music in Caves

Does anybody know how to disable the music while surfing in a cave? I’ve added custom music to a few caves in Pokemon Crystal, but I don’t want that music to start and stop over and over while I’m surfing in places like Mt Mortar or the Whirl Islands. I’m not looking to disable it all together. I still would like to hear it while surfing outside.

Ragni featured this in one of the caves for Polished Crystal, however I wasn’t able to find the script applied for said function. Any pointers would be appreciated!

Offline

#2 2018-10-03 22:35:52

Rangi
Member
Registered: 2016-05-09
Post 866/870

Re: Disable Surf Music in Caves

You can solve this kind of question by working backwards. Presumably the code that plays the Surf music must identify that music somewhere. The relevant ID is MUSIC_SURF, so search on GitHub for that. Spoiler: it turns up the SpecialMapMusic routine. Now you can compare it with Polished Crystal's implementation, or even study its logic and figure out where+how to add a check for your cave maps.

Last edited by Rangi (2018-10-03 22:37:33)


Pokémon Polished Crystal (GitHub) — version 2.2.0 released
Pokémon Red★ and Blue★: Space World Edition (GitHub) — updated August 19!
Polished Map: pokered+pokecrystal map, tileset, and palette editor — version 3.5.1 released!

Offline

#3 2018-10-04 06:00:10

rbroab
Member
Registered: 2017-06-13
Post 82/86

Re: Disable Surf Music in Caves

Fantastic help as always. Much appreciated! My only idea was to check the Lugia Chamber map file, but looking at how you’ve scripted this to work for Polished Crystal, it makes much more sense. Going to attempt to replicate the effect in other caves.

Offline

#4 2018-10-05 23:42:19

rbroab
Member
Registered: 2017-06-13
Post 84/86

Re: Disable Surf Music in Caves

So I was able to replicate the effect, but only for one location. After I added others, I tried compiling the rom and it kept saying error unable to place ‘Home’ at ROM0. I’m guessing the added line of script was making the file too large to compile together. Any advice? What I mean by that is, would there be a way to script it in a way that checks if you’re in a cave rather than individual map groups?

Last edited by rbroab (2018-10-06 16:08:25)

Offline

#5 2018-10-22 08:26:29

KeiTaRo
Member
Registered: 2015-12-05
Post 51/56
Website

Re: Disable Surf Music in Caves

the map permission is what you want to be polling in this case. something like:

ld a [wPermission]
cp CAVE
jr z, .yourcode

should do the trick

Last edited by KeiTaRo (2018-10-22 08:29:11)

Offline

Board footer

Powered by FluxBB