Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-10-30 01:37:57

Fotomac
Member
Registered: 2015-10-25
Post 30/297

Putting defeatedwildmon into caught_mon.asm

How do you put the defeatedwildmon music in when you catch a wild Pokémon like in later generations? Is it as easy as, say, scripting the respective branches of defeatedwildmon to play at the end of caught_mon.asm for each channel?

Offline

#2 2015-10-30 11:16:16

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 332/432
Website

Re: Putting defeatedwildmon into caught_mon.asm

Put this after the mon is caught:

call WaitForSoundToFinish
call EndLowHealthAlarm
ld a, MUSIC_DEFEATED_WILD_MON
call PlayBattleVictoryMusic

Some of these will probably need to be far calls though.

Last edited by Crystal_ (2015-10-30 11:18:24)

Offline

#3 2015-10-30 14:38:01

Fotomac
Member
Registered: 2015-10-25
Post 37/297

Re: Putting defeatedwildmon into caught_mon.asm

In which file do I put it, specifically? caught_mon.asm, or some other file?

Offline

#4 2015-10-30 18:24:43

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 334/432
Website

Re: Putting defeatedwildmon into caught_mon.asm

In items.asm. Track down the ItemUseBall routine and find out at which point the game has decided that the enemy mon is caught.

You'd probably be better off making a function with those four instructions in bank f, and calling it from whichever bank the items engine is at. If I'm not mistaken at the very least PlayBattleVictoryMusic is defined in bank f.

So at the bottom of core.asm put:

PlayDefeatedWildMonMusic:
  call WaitForSoundToFinish
  call EndLowHealthAlarm
  ld a, MUSIC_DEFEATED_WILD_MON
  jp PlayBattleVictoryMusic

And in items.asm add:
 
  callba PlayDefeatedWildMonMusic

Consider adding it at line 516 (https://github.com/pret/pokered/blob/46 … s.asm#L516) which is right before printing the "pokemon was caught" text. Or place it at line 512-513 if you want the sound to play in the old man tutorial as well.

Offline

#5 2015-10-31 00:58:44

Fotomac
Member
Registered: 2015-10-25
Post 41/297

Re: Putting defeatedwildmon into caught_mon.asm

How do I play the Battle Victory Music without the intro upon catching a wild Pokémon?

Offline

Board footer

Powered by FluxBB