Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-07-30 17:28:49

Gallego13
Member
Registered: 2011-12-11
Post 47/94

Problem when adding Volt Switch

Well, I was trying to add Volt Switch to my hack by editing and attack like this:

•Animation: Spark
•Power: 70
•Accuracy: 100%
•Type: Electric
•Effect: The one Batton Pass uses

So I thought it was all going to fit perfectly, I noticed that after the animation played, the Pokémon switched with the other and no damage was done. I don't know what to do, so I'm asking:
¿Is there any possible way to make the attack work properly?
Thanks :P

Offline

#2 2012-08-03 14:57:30

Miksy91
Member
Registered: 2010-10-16
Post 1,010/2,308

Re: Problem when adding Volt Switch

This is just my assumption but it feels right according to what you've written here.

When a move is chosen, its "Animation" is gone through and after that, the game checks what kind of "Effect" the move uses. Most of "Effect" values lead into dealing damage to the foe calculated by its "Power" and "Type". This is likely done by a simple call command that's being executed when the game starts executing code at the rom address where "Effect" "leads to". The "Effect" of Baton Pass is missing this command and so Volt Switch doesn't deal any damage. What you could do is to see where the call to the pokemon switch is located and add the call to dealing damage before it (which is part of the code executed with most "Effect" values).

Last edited by Miksy91 (2012-08-03 15:00:16)

Offline

#3 2012-08-04 11:43:54

Gallego13
Member
Registered: 2011-12-11
Post 48/94

Re: Problem when adding Volt Switch

Ok so... ¿Any idea of how the pokémon changing effect or the damage dealing effect look like (in hex)?
The effects should be stored in numerical order, but this would help me a lot finding them.

Offline

#4 2012-08-04 12:16:59

Akwa
Member
Registered: 2012-06-14
Post 32/140

Re: Problem when adding Volt Switch

I wanted to add some new move effects aswell (like increasing both Def and Sp. Def). First, ASM knowledge is a must, the second and worst thing is that there is absolutely no documentation on move effects. All I found was this post, where IIMarckus just stated the offset being part of ASM routine which determined which type triggers the Curse ghost effect (and by the way, he wrote only 1 offset which was for primary type, game checks secondary type for Ghost aswell). With this information, I found Curse effect ASM and even the +attack/def -speed part. How does it look like? Well, it's full of calls to calls with jumps to another jumps. What I mean is that this is so complicated that I doubt I'd ever understand this. Anyway, I don't want to change Curse, I'd want to put some new effect in place of useless (like Nightmare) one. I didn't get any reply in a topic where I asked where I can at least find location of ASM scripts of other moves.

Not trying to demotivate you, but unless some ASM god comes and explains the issue, it's going to be only a dream for us to add new moves. I'm having a hard time with this too.

Offline

#5 2012-08-04 14:22:25

496/700

Re: Problem when adding Volt Switch

Akwa wrote:

I wanted to add some new move effects aswell (like increasing both Def and Sp. Def). First, ASM knowledge is a must, the second and worst thing is that there is absolutely no documentation on move effects. All I found was this post, where IIMarckus just stated the offset being part of ASM routine which determined which type triggers the Curse ghost effect (and by the way, he wrote only 1 offset which was for primary type, game checks secondary type for Ghost aswell). With this information, I found Curse effect ASM and even the +attack/def -speed part. How does it look like? Well, it's full of calls to calls with jumps to another jumps. What I mean is that this is so complicated that I doubt I'd ever understand this.

It would be worth updating that Curse thread to reflect what you discovered.

Akwa wrote:

Anyway, I don't want to change Curse, I'd want to put some new effect in place of useless (like Nightmare) one. I didn't get any reply in a topic where I asked where I can at least find location of ASM scripts of other moves.

Using a debugger like BGB would help finding specific moves. For example, Curse: set a watchpoint on the user’s type, use the move, and the debugger will stop execution at that point and disassemble everything nearby. Seismic Toss: set a watchpoint on the user’s level. Nightmare: set a watchpoint on the opponent’s status.

You might also look at the Pokémon Red disassembly; it has quite a lot of move effects disassembled. (See EffectsArray1 and the code that handles it, etc.) But GSC may change the battle engine significantly, so it won’t be entirely relevant.

#6 2012-08-04 18:33:21

comet
Member
Registered: 2012-04-09
Post 1/673

Re: Problem when adding Volt Switch

IIMarckus wrote:

Nightmare: set a watchpoint on the opponent’s status.

In Gold the Nightmare flag is bit 0 at CB46 for yourself and CB4B for the opponent. Curse uses bit 1.

Offline

#7 2012-08-06 12:11:11

Akwa
Member
Registered: 2012-06-14
Post 35/140

Re: Problem when adding Volt Switch

IIMarckus, I need some clarifications: I want to find Growth so I need to set a watchpoint on WRA0:CB26-CB27 (current special attack of player's Pokemon). So, on BGB, I have to go Debug->Access breakpoints, add a range CB26-CB27, select r,w,x,j and then? While F3'ing am I supposed to watch the biggest, middle window or the one on the right side? I guess I have to write down hex equivalents of these ASM commands and find them with hex editor in rom so this tells me the location of effect asm?

Offline

Board footer

Powered by FluxBB