Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2016-06-13 08:34:56

Adam
Member
Registered: 2016-05-07
Post 33/73

Move Typings and Fire Spin effect

I've finally resolved the big problem I had and a few minor other issues as a result of the change. Now I can focus on the final problem that I have been trying to figure out. One is kinda major, the other not so much. I've put in the general help forum as I imagine RBY will have a similar issue.

I have added about 25 new moves into the game (replacing old moves). To do this I first changed the name and description using x1C9F20 and x2CD50, and then I went to the attack data at x41AFE to change the PP/BP/Type/etc. Finally, to find the move animation I wanted, I simply searched for the data of the move whose animation I wanted, and copied the animation code from that. For example, to find the animation for Drain Punch, I looked for the animation byte for Giga Drain.

So, following that, the issues I have are as follows:

1) During battle, when you highlight a move it will display the typing. The typing here is NOT the typing placed in the 4th byte of the move info. It bases the typing on the attack animation! Using the Drain Punch example, this will claim that the move is a grass type!

However, the actual effect of the move is correct. Drain punch will be SE against Steel, Dark, etc just as it should. Also, if I look at the detailed move info for a pokemon (via the menu outside of battle). The move has the correct typing. I don't understand why the text showing the typing here is based off the typing byte, but in battle it is based on the animation byte. It seems a bit stupid.

2) I have added Magme Storm, which is a fire trapping move. As such, I have used the animation for Fire Spin. The problem is that I have replaced Fire Spin with another move (Drill Run). When I use Magme Storm it will say "[...] is trapped by DRILL RUN" There trapping text seems to point to the move animation instead of the move name.

Any idea how I can change these two things? I can cheat with the second by changing the name of drill run to something that fits the trapping text a little better, and then replace yet another move with Drill Run. It's a bit messy though so I'd rather avoid that if possible.

Any advice on this would be great as this problem is one of the final things I need to sort out.

Let me know if you need me to post any screenshots for clarification.

Thanks!

Offline

#2 2016-06-17 11:03:31

Adam
Member
Registered: 2016-05-07
Post 38/73

Re: Move Typings and Fire Spin effect

Just bumping this. Did a workaround for the fire spin thing. It's not perfect but it's ok, I guess.

I've been searching the disassembly for about a day now trying to find something to help me work out how to fix the typings, but I've got nothing.

Any advice on that? Surely someone must have added new moves to gen 2! Thanks!

Offline

#3 2016-06-17 11:36:58

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 387/415
Website

Re: Move Typings and Fire Spin effect

Don't reuse animations. Make new ones, and make them point to the same animation data if you want. Then make each move have its own animation id. Animation id and move id are supposed to be interchangeable. Apart from the typing text error, you'd have introduced a bug with Mirror Move and I don't remember what else that checked the animation id (first byte of move data buffer) instead of the move id.

This should fix 2) too.

Last edited by Crystal_ (2016-06-17 11:40:33)

Offline

#4 2016-06-17 12:02:52

Adam
Member
Registered: 2016-05-07
Post 39/73

Re: Move Typings and Fire Spin effect

Seems to make sense. Presumably I can just replace the animations for moves that no longer exist with the data for the move I want, and then just alter the typing?

Is there any information on how to make sense of the animations? There isn't really any data on it. The disassembly just has a list of animations:

https://github.com/pret/pokecrystal/blo … /anims.asm

The other parts of the disassembly are animations for other things. I imagine that withing each animation is a pointer corresponding to the name of the move, and possibly the typing as well? Although maybe it points to the attack data for the corresponding attack it is an animation for? Again not sure of the structure so wouldn't know what I need to replace and what I need to change.

Thanks.

Offline

#5 2016-06-17 14:00:16

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 388/415
Website

Re: Move Typings and Fire Spin effect

Oh damn, this is gen 2. But I guess it works in a similar way. Say, if you remove the move Pound and add Magma Storm, delete the data of BattleAnim_Pound and put the BattleAnim_Pound label above BattleAnim_FireSpin like:

BattleAnim_Pound:
BattleAnim_FireSpin: ; c97e5
anim_1gfx ANIM_GFX_FIRE
(...)

You can rename the two instances of BattleAnim_Pound (this one and the one in the pointer table) to BattleAnim_MagmaStorm if you want to. Then you'd have BattleAnim_MagmaStorm being a separate animation from BattleAnim_FireSpin despite sharing the same data, so you don't need to have both Fire Spin and Magma Storm use the smae animation id.

Last edited by Crystal_ (2016-06-17 14:00:39)

Offline

#6 2016-06-17 14:16:22

Adam
Member
Registered: 2016-05-07
Post 40/73

Re: Move Typings and Fire Spin effect

How many bytes are used per move, and is there any reference to the typing within the animation? I'm  using hex so need to do it that way. Looking at the code, it doesn't seem to contain the type within it so I'm assuming they run parallel (ie, the third move would correspond with the third anmation)?

Thanks

Offline

#7 2016-06-17 14:26:23

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 389/415
Website

Re: Move Typings and Fire Spin effect

Whatever prints the type probably is given the anim id rather than move id but you don't have to worry about it as long as you make all move id's match their anim id's. All you'd have to do with hex editing in the example above would be editing the BattleAnim_Pound pointer to be e7 57 in the anims pointer table, then go to the move data (https://github.com/pret/pokecrystal/blo … /moves.asm) and update the characteristics of the Pound entry to match those of Magma Storm.

i.e. the hex equivalents of

move POUND,        EFFECT_BIND,         120, FIRE,   70, 5,   0

Offline

#8 2016-06-23 11:35:27

Adam
Member
Registered: 2016-05-07
Post 45/73

Re: Move Typings and Fire Spin effect

OK, I've had a busy week so only just coming around to this. I have already altered the move data. Frustration was changed to Magma Storm. Aside from name, description, etc changes, the move data is now:

53 2A 64 14 B2 05 00 (It's balanced slightly differently to Heatran's signature move)

So this in move slot number 218 (DA) for frustration, using the animation for Fire Spin, which is move number 83(53).

The issue I have with your explanation is I am not sure how you came to the bytes E7 57. Looking at the animations table (https://github.com/pret/pokecrystal/blo … /anims.asm), it seems as if the Fire Spin animation is located between xC97E5 and xC9810. I would have thought that I would need to copy and replace these 44 bytes over the bytes located between xCB4C1 and xCB4F8 (for frustration). Is this not the case? Do you mean that I only need to replace the two bytes near the end?

E7 57 is located at xC980D and xC980D. So am I to input these two codes where bytes xCB4F5 and xCB4F6 are, and nothing else?

Just want to clarify as if I don't understand the reasoning behind only replacing specific bytes, and what those bytes relate to, I fear that I will mess things up. Even if things appear ok, I don't want something else to go wrong (like with my pokeball problem :) )

Thanks!

Offline

#9 2016-06-23 15:57:55

Adam
Member
Registered: 2016-05-07
Post 46/73

Re: Move Typings and Fire Spin effect

OK, I tried replacing only the 2 bytes and the game froze during the animation. I tried putting those 44 bytes in frustrations area, replacing the remaining bytes with 00s. Game crashed when the move tried to give the trapping text.

So neither works. I guess I completely misunderstood, since it was neither option that I thought :/

Offline

#10 2016-06-23 21:14:20

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 392/415
Website

Re: Move Typings and Fire Spin effect

I guess I meant e5 57 but made a typo. Change Frustation (now magma storm) anim pointer to e5 57 so that it points to fire spin's animation. Do this and keep frustration's anim id at 218:
DA 2A 64 14 B2 05 00

Last edited by Crystal_ (2016-06-23 21:15:14)

Offline

#11 2016-06-28 10:33:52

Adam
Member
Registered: 2016-05-07
Post 47/73

Re: Move Typings and Fire Spin effect

Still doesn't work. I altered the anim id to DA and replaced the bytes at xc9115 and xc9116 to E5 57.

The results are (oddly) mixed. Sometimes, the game shows the error screen after the attack animation. Sometimes it shows the trappng animation after and then just locks up. The animation, at least, is correct. But the move is now unusable for some reason.

I may just change the animations of the other moves to something else with the correct typing, and remove magma storm. It doesn't seem like I can fix this issue. I don't have mirror move or anything similar anyway so it shouldn't matter if I do it that way. :/ It's kinda frustrating as the two remaining things I need to do both don't work and I can't sort out. It's annoying to have put in countless hours only to be thwarted at the final hurdle.

Offline

#12 2016-06-28 14:06:52

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 394/415
Website

Re: Move Typings and Fire Spin effect

c9115-c9116 is the fire spin anim pointer so it was already E5 57. What you have to change to E5 57 is c9223-c9224, which is Frustration's pointer, i.e. the one referenced by anim DA.

Offline

#13 2016-06-28 14:46:19

Adam
Member
Registered: 2016-05-07
Post 48/73

Re: Move Typings and Fire Spin effect

Sorry, I'm a bit burned out. I meant xc9223/4. That's where I've put the bytes and it messes up. Rechecked the previous version and that has no error, so these two bytes are messing it up.

Could it be to do with the part after the animation? Ie, the need to call up the trapping text / script?

Offline

#14 2016-06-28 15:17:28

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 395/415
Website

Re: Move Typings and Fire Spin effect

Change DA back to 53. Does it still crash?

Offline

#15 2016-06-28 16:04:05

Adam
Member
Registered: 2016-05-07
Post 49/73

Re: Move Typings and Fire Spin effect

Nope, as the pointer is looking at fire spin, I just get the same issue as before where the trapping text says I was hurt by drill run.

No crashing though.

Offline

#16 2016-06-28 16:31:06

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 396/415
Website

Re: Move Typings and Fire Spin effect

Okay, I think I found it.

https://github.com/pret/pokecrystal/blo … .asm#L7475

The trapping move text is based on anim id. You have to add a case for id 0xDA.

Offline

#17 2016-06-28 17:11:03

Adam
Member
Registered: 2016-05-07
Post 50/73

Re: Move Typings and Fire Spin effect

I had a feeling something like that would be the issue. Thanks for your help, it worked. Once I sort out the other moves, I can move onto getting sprites sorted.

Fun.

Offline

Board footer

Powered by FluxBB