Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-11-20 00:42:24

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

On wild Pokémon battles

How do I move the music for defeating the wild Pokémon from the point where the wild Pokémon actually faints to the point where the winner gets experience points?

Offline

#2 2015-11-20 12:59:05

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 343/431
Website

Re: On wild Pokémon battles

Please, use the help/question forum for these.

Move lines 883-885 in core.asm after line 905.

Offline

#3 2015-11-20 21:48:07

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

Re: On wild Pokémon battles

Thanks. I'll be sure to remember that.

Anyway, I've moved the relevant lines, and I'll test it out shortly and update this post if anything goes wrong.

UPDATE: The "wild Pokémon fainted" text didn't appear at all, and after the "player's Pokémon gained XXX Exp. Points" text, the "Exp. All" text appeared.

Last edited by Fotomac (2015-11-20 22:00:31)

Offline

#4 2015-11-20 23:20:47

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 344/431
Website

Offline

#5 2015-11-20 23:46:28

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

Re: On wild Pokémon battles

Well! It would appear I calculated the line number after cutting the lines and pasted them at the wrong point. I'll try again shortly, after which I'll test it to see if there are any problems. Obviously, I'll leave an update if there still are.

UPDATE: It worked a bit too well--now the music's playing at the point where I get the experience points even if it isn't a wild Pokémon battle. Perhaps I might need to add a jump point or whatever it's called?

Last edited by Fotomac (2015-11-21 01:24:18)

Offline

#6 2015-11-21 15:11:24

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 345/431
Website

Re: On wild Pokémon battles

You just want to fix the wild draw music bug dont you?

https://github.com/xCrystal/pokered/commit/221bed8

Try to learn something from it.

Offline

#7 2015-11-21 22:21:52

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

Re: On wild Pokémon battles

I deleted the red lines and added the green lines. By my count, I move lines 898-905 down a few to make the "victory against wild Pokémon" music wait until the point where it says "[INSERT PLAYER POKéMON HERE] gained XXX Exp. Points". After line 909 (call SaveScreenTilesToBuffer1), right?

Offline

#8 2015-11-22 16:19:48

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 347/431
Website

Re: On wild Pokémon battles

I don't know what you did exactly but if you move the victory music call below SaveScreenTilesToBuffer1 it will affect both wild and trainer battles. If that's the case you'll have to add a battle type check to determine which kind of battle you're into:

   ld a, [W_ISINBATTLE]
   dec a
   jr nz, .trainer
   ; wild only code
.trainer
   ; common code

W_ISINBATTLE could be wIsInBattle in your repo

Offline

#9 2015-11-23 04:12:37

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

Re: On wild Pokémon battles

And I add that below "call SaveScreenTilesToBuffer1", correct?

Offline

#10 2015-11-25 03:13:35

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

Re: On wild Pokémon battles

Well, I got one part taken care of. But how do I get the "fainting" sound effect to play at the moment the wild Pokémon faints?

Offline

Board footer

Powered by FluxBB