• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Code: Move Resource Thread

457
Posts
10
Years
  • Age 28
  • Seen Mar 17, 2024

Attack Order, Defend Order, and Heal Order


HnVZ6O9.gif
3zzkm5x.gif
w1y2rSd.gif

Alright! Since I've gotten into move animations nowadays, I've come up Vespiquen's signature moves: Attack Order, Defend Order, and Heal Order. They are all animations by the way. Their effects will be explained later.

But first, here's the particle to be used in those moves:
UoH0Xtn.png


I used Twister's sheet to redraw the bees which I got its original particle from DPPt. Wherever you have inserted the particle, take note of its index number.

Attack Order:
Spoiler:


Defend Order:
Spoiler:


Heal Order:
Spoiler:


Overall, they are created from Twister's animation. I'd plan on Recover but misdirection of the bees on the particles might occur. Anyway, these are the best ones. Attack Order is plainly Twister's animation. Defend Order is combined Twister's animation with Endure's animation. Heal Order is combined Twister's animation with the healing animation. Use Slash's effect for Attack Order's effect. Use Cosmic Power's effect for Defend Order. And, use Recover's effect for Healing Order. Tada! You now have the three Order moves!

I will come up with Ruby soon since the one I've downloaded isn't organized.
 
16
Posts
9
Years

Attack Order, Defend Order, and Heal Order

Alright! Since I've gotten into move animations nowadays, I've come up Vespiquen's signature moves: Attack Order, Defend Order, and Heal Order. They are all animations by the way. Their effects will be explained later.

Really good looking animations for one of my all time favorite pokes! Great work
 
218
Posts
10
Years
  • Seen Nov 12, 2021
Spoiler:

Something has to be changed here. The second routine to revert ???-type to flying doesn't handle the fact that a ???-type could exist outside of the roost effect.
Indeed it prevent us to use the 9th type or to update roost to gen V effect. (flying types become normal upon using roost, as Chaos Rush stated).

To correct this, we can check 0x02024260 (In emerald, don't know for FR) the moves used by the poke. an Half word is used for each attack used the precedent turn.
First half word for the first banked pokemon, second HW for 2nd poke, etc

I'm too lazy right know to update this, so I'll do it later, I just wanted to point that flaw
 

Exodrake

The Manliest Chick that Ever Manlied
163
Posts
10
Years
  • Age 30
  • Seen Nov 30, 2016
Something has to be changed here. The second routine to revert ???-type to flying doesn't handle the fact that a ???-type could exist outside of the roost effect.
Indeed it prevent us to use the 9th type or to update roost to gen V effect. (flying types become normal upon using roost, as Chaos Rush stated).

To correct this, we can check 0x02024260 (In emerald, don't know for FR) the moves used by the poke. an Half word is used for each attack used the precedent turn.
First half word for the first banked pokemon, second HW for 2nd poke, etc

I'm too lazy right know to update this, so I'll do it later, I just wanted to point that flaw
This is a problem I have (using MrDollSteak's rombase). I want to have ???-type monsters, but because of this routine, they turn into Flying-types.
 
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
Something has to be changed here. The second routine to revert ???-type to flying doesn't handle the fact that a ???-type could exist outside of the roost effect.
Indeed it prevent us to use the 9th type or to update roost to gen V effect. (flying types become normal upon using roost, as Chaos Rush stated).

To correct this, we can check 0x02024260 (In emerald, don't know for FR) the moves used by the poke. an Half word is used for each attack used the precedent turn.
First half word for the first banked pokemon, second HW for 2nd poke, etc

I'm too lazy right know to update this, so I'll do it later, I just wanted to point that flaw

I've just changed it to type #14, which is one of the contest types. It does not make it consistent with Gen V in which the Pokemon turns into Normal type, but it does make the ??? usable for anyone who wants to use it.
 
218
Posts
10
Years
  • Seen Nov 12, 2021
I've just changed it to type #14, which is one of the contest types. It does not make it consistent with Gen V in which the Pokemon turns into Normal type, but it does make the ??? usable for anyone who wants to use it.

Doing this will save me time. We just have to edit the type chart to make the contest/whatever type having the same resistance than the normal type
 

Exodrake

The Manliest Chick that Ever Manlied
163
Posts
10
Years
  • Age 30
  • Seen Nov 30, 2016
What's the point of having ???- type monsters when you can extend types so easily?
Yeah this is true, stupid me for not thinking of this before XD Thanks for that d'oh moment, I'll just program a second ??? type which isn't affected by the routine so scumbag mons with fully unresisted STAB and no weaknesses can be a thing!
 
56
Posts
8
Years
[Ruby] Creating Defensive Moves' Effects

Hi everyone ^^, this is a discovering I made a few days ago, and I'm here to share it with you. This is about how to create Defensive Moves' Effects that raise/lower 2 or more stats. This is only for Ruby, as the effect's codes are different for other Pokemon editions.

Before starting, if you don't know how to add Moves or Effects, you shoud take a look into those 2 tutorials:

[Tutorial] [Ruby] Adding New Moves by destinedjagold
[Tutorial] Adding New Moves and Creating New Move Effects by itman

Let's see. We want to create a Work Up effect, a move that raises in 1 the user's Attack and Special Attack stats. There are only 4 moves that raise 2 stats (as far as I know). They're the following ones: Bulk Up (Attack + Defense), Cosmic Power (Defense + Sp. Defense), Calm Mind (Sp. Attack + Sp. Defense) and Dragon Dance (Attack + Speed).

For example, this is the Bulk Up effect on Ruby:

Code:
00 02 03 20 01 03 01 0C 18 8B 1D 08 20 01 00 02 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 06 00 2E 1E 60 01 02 11 89 41 43 8B 1D 08 29 00 23 4D 02 02 02 43 8B 1D 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 12 89 41 62 8B 1D 08 29 00 23 4D 02 02 02 62 8B 1D 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08

I wrote as GG (effects' bytes), XX, YY, ZZ (pointers) and ?? (effects' color byte) the things that need to be changed:

Code:
00 02 03 20 01 03 GG 0C XX XX XX 08 20 01 00 GG 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 ?? 00 2E 1E 60 01 02 GG 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08

Anything else that isn't changed is in common with other moves of that kind.

I've done a list about those defensive effects on Ruby (they're on hexadecimal):
Spoiler:


The 2 first GG, I don't know why, but they start with 0 and end with the last number of the effect. The first GG is 01 (starts with 0 and ends with 1, that would be the last number of 11, the effect that raises user's Attack), and the second one, 02 (Defense). The third and fourth GG are the effects (11 and 12 respectively). We only need to change those values, being the first GG 01, the second one 04, the third one 11 and the fourth one 14, so it seems more a Work Up effect. It would look like this:

Code:
00 02 03 20 01 03 01 0C XX XX XX 08 20 01 00 04 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 ?? 00 2E 1E 60 01 02 11 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 14 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08

The first pointer (XX) leads to the start of the following bytes: 09 0A 2E DC. That means, in the Bulk Up effect, the pointer 18 8B 1D 08 leads to the Offset 1D8B18, that's where the bytes 09 0A 2E DC start. For example, my XX XX XX have the following pointer: 53 F4 6F 08, and this leads to the bytes 09 0A 2E DC located at the Offset 6FF453. You have to do the same, depending on where you did insert the effect, because the pointers are different for everyone unless you insert them on the same spots I did.

The next pointers (YY) are the same, but they lead to the bytes 2E 1E 60 01 02 14 89. That's the second effect (the one that raises Sp. Attack), not the first one (Attack)! In Bulk Up the pointer is 43 8B 1D 08, that leads to 1D8B43, that's where the bytes 2E 1E 60 01 02 12 89 are, and that would be the effect that raises Defense! My pointers are 7E F4 6F 08.

Finally, ZZ. Those lead to the bytes 28 62 6F 1D 08, the last 5 bytes of the effect. Bulk Up has 62 8B 1D 08 as the pointer. In my Work Up effect, it would be 9D F4 6F 08.

The ?? byte is the one that changes the color's effect. In Bulk Up that value is 06. It does that when it only raises Attack, it's red, when it only raises Defense, it's green, and when it raises both, it's gray. I don't know what value it should have for a perfect Work Up effect, but I use 09. That one makes all the colors to be gray, no matter what it raises.

This one is my Work Up effect:

Code:
00 02 03 20 01 03 01 0C 53 F4 6F 08 20 01 00 04 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 09 00 2E 1E 60 01 02 11 89 41 7E F4 6F 08 29 00 23 4D 02 02 02 7E F4 6F 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 14 89 41 9D F4 6F 08 29 00 23 4D 02 02 02 9D F4 6F 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08

You only have to change the things I mentioned, put that effect to a move with PGE or G3T (I use G3T) and check it in a battle.


And if we want to do an effect that raises more than 2 stats like Quiver Dance or Coil? That's easy. I'll keep explaining with Calm Mind's effect, which raises Sp. Attack and Sp. Defense stats, and we'll do a Quiver Dance effect, which does the same but also raises Speed by 1.

This is Calm Mind's effect in Ruby:

Code:
00 02 03 20 01 03 04 0C 7C 8B 1D 08 20 01 00 05 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 30 00 2E 1E 60 01 02 14 89 41 A7 8B 1D 08 29 00 23 4D 02 02 02 A7 8B 1D 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 15 89 41 C6 8B 1D 08 29 00 23 4D 02 02 02 C6 8B 1D 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08

I will mark the pointers again:

Code:
00 02 03 20 01 03 GG 0C XX XX XX 08 20 01 00 GG 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 30 00 2E 1E 60 01 02 GG 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08

To add an extra effect, copy this and paste it at the end of the 08 and before the 20: 20 01 03 GG 0C XX XX XX 08. It would look like this:

Code:
00 02 03 20 01 03 GG 0C XX XX XX 08 20 01 03 GG 0C XX XX XX 08 20 01 00 GG 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 30 00 2E 1E 60 01 02 GG 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08

You have to copy this too, and paste it before the second efect starts: 2E 1E 60 01 02 GG 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00. I've changed the YY YY YY to SS SS SS, because the pointers will be different. It will look like this:

Code:
00 02 03 20 01 03 GG 0C XX XX XX 08 20 01 03 GG 0C XX XX XX 08 20 01 00 GG 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 30 00 2E 1E 60 01 02 GG 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 SS SS SS 08 29 00 23 4D 02 02 02 SS SS SS 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08

Now the code has 3 effects, we only have to change the values to get the Quiver Dance effect. We change the first 3 GG for 04, 05 y 03, and the last 3 GG for 14, 15 y 13, so it raises Sp. Attack, Sp. Defense and Speed. Then, the pointers. The XX keeps leading to 09 0A 2E DC, but YY now leads to the 2E 1E 60 before the SS, the SS leads to the 2E 1E 60 before the ZZ, and the ZZ keeps leading to 28 62 6F 1D 08.

That's my Quiver Dance effect:

Code:
00 02 03 20 01 03 04 0C 8F F6 6F 08 20 01 03 05 0C 8F F6 6F 08 20 01 00 03 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 09 00 2E 1E 60 01 02 14 89 41 BA F6 6F 08 29 00 23 4D 02 02 02 BA F6 6F 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 15 89 41 D9 F6 6F 08 29 00 23 4D 02 02 02 D9 F6 6F 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 13 89 41 F8 F6 6F 08 29 00 23 4D 02 02 02 F8 F6 6F 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08

Same as before, you put that effect to a move and check it in battle. Now I'll leave here some moves I've done by myself, you only need to put your pointers in the marks, so you can do your own Defensive moves ^^. Keep in mind that my ?? byte will always be 09, unless I know how to change it.

Spoiler:


Below there's a list of effects I've done too, but they don't work completely well. I'll tell the problems they have. I haven't realized how to fix them yet... Stockpile has the same color effect as Cosmic Power (Charge also does, but that one's not correct as it only raises Sp. Defense, not Defense). Shell Smash has 5 effects, so I've put its pointers as XX, YY, SS, MM, LL and ZZ.
Spoiler:


That's all, probably you'll have a lot of doubts because I'm not that good explaining things xD. It seems complicated, but it isn't. You can leave here your doubts and I'll try to answer them.
 

C me

Creator of Pokemon League Of Legends
681
Posts
10
Years
  • Age 27
  • Seen Apr 9, 2021
I've noticed Dragon Tail has an effect for FireRed and Ruby but not for Emerald, so I ported one.

Emerald Dragon Tail effect

Spoiler:


Only bugs are that it says 'But it failed' if you use it against a trainer with one Pokemon (or 2 for a double battle) but it still does damage. It says nothing if used on a wild, just does damage and ends the battle.
 
457
Posts
10
Years
  • Age 28
  • Seen Mar 17, 2024
I've noticed Dragon Tail has an effect for FireRed and Ruby but not for Emerald, so I ported one.

Emerald Dragon Tail effect

Spoiler:


Only bugs are that it says 'But it failed' if you use it against a trainer with one Pokemon (or 2 for a double battle) but it still does damage. It says nothing if used on a wild, just does damage and ends the battle.

Why don't you just use "@stuff", something like those in common scripting if you know what I mean. The changes are bolded. I also remove some lines because they already exist in the ROM.
 

~SAGE

Peruvian Rom Hacker
39
Posts
9
Years

Attack Order, Defend Order, and Heal Order


HnVZ6O9.gif
3zzkm5x.gif
w1y2rSd.gif

Alright! Since I've gotten into move animations nowadays, I've come up Vespiquen's signature moves: Attack Order, Defend Order, and Heal Order. They are all animations by the way. Their effects will be explained later.

But first, here's the particle to be used in those moves:
UoH0Xtn.png


I used Twister's sheet to redraw the bees which I got its original particle from DPPt. Wherever you have inserted the particle, take note of its index number.

Attack Order:
Spoiler:


Defend Order:
Spoiler:


Heal Order:
Spoiler:


Overall, they are created from Twister's animation. I'd plan on Recover but misdirection of the bees on the particles might occur. Anyway, these are the best ones. Attack Order is plainly Twister's animation. Defend Order is combined Twister's animation with Endure's animation. Heal Order is combined Twister's animation with the healing animation. Use Slash's effect for Attack Order's effect. Use Cosmic Power's effect for Defend Order. And, use Recover's effect for Healing Order. Tada! You now have the three Order moves!

I will come up with Ruby soon since the one I've downloaded isn't organized.

Great! Really cool! i've been seraching for this! :D
this movements are my bug type favorite moves.

I have a doubt, How i know which is the particle index?
 
218
Posts
10
Years
  • Seen Nov 12, 2021
This one wasn't really hard, but there was a ton of bugs to fix, and for the first time, I'm not the only one to be guilty.
For the first time either, I do correct KDS routine, in this post
Freeze Dry
I hope it'll be useful because I literally spent 5 hours to fix those annoying bugs ._.

Anyway, here is Thousand Arrows + corrected Freeze Dry :
Spoiler:
 
Last edited:
457
Posts
10
Years
  • Age 28
  • Seen Mar 17, 2024
Here are some Battle Scripts I've ported on Emerald from FireRed.

Close Combat
Spoiler:

Hone Claws
Spoiler:


Flame Charge
Spoiler:


Coil
Spoiler:


Shift Gear and Shell Smash
Spoiler:


Growth/Work Up/Rototiller
Spoiler:


Credits to Spherical Ice for his original Close Combat routine for FireRed, and also to mamamama for his offsets for Emerald. mamamama's post did not cover the changes in scripts so, I made changes on the scripts and fully working. Credits to MrDollSteak for the rest of the moves here.
 
Last edited:

Dragonflye

Author of Pokémon Sovereign of the Skies
107
Posts
14
Years
  • Age 28
  • Seen Oct 9, 2023
I've translated this to Emerald and it's almost working.

I copied your ASM and used the following offsets:

Userbank 0202420B
Targetbank 0202420C
BattleStruct 02024084
TurnOrder 0202407E
MonsMoved 02024082
MovesUsed 02024274
CurrentScript 02024214
FailScript 82D9F15
CurrentAttack 020241EA

MoveTable: Using my own, triple checked and it's correct

BasePower 02024400
EffectTable: 82D86A8 (Using original one)

Copy pasted you script and added +1 on each ASM. Changed Setbytes to 0x202448C and 0x202448D.

Everything seems to be correct, Me First correctly fails if the opponent uses a status move and it copies the attack of the opponent, but it can't perform the move effect. When I tried copying Mega Drain for example the move just fails, when I copy Tackle the game throws a Pokeball (similar glitch that happens when a move effect is wrong). Is there something wrong with the Move Effect Table offset or some slip-up in the ASM? Did anyone use Chaos Rush's code in Fire Red and get it to work?

Yes, i have se same Problem with Fire Red. If I use Me Fist my Pokémon steals the move vom target und show the text but the target become not demage instead of rain beginn...
 
457
Posts
10
Years
  • Age 28
  • Seen Mar 17, 2024
Here are more Emerald implementations from FireRed.

Flower Shield
Spoiler:


Cotton Guard
Spoiler:


Tail Glow
Spoiler:


Charge
Spoiler:


Assurance
Spoiler:

Crush Grip
Spoiler:


Topsy-Turvy
Spoiler:

Final Gambit
Spoiler:

Credits Spherical Ice for Assurance, KDS for Crush Grip, Topsy-Turvy and Final Gambit, and MrDollSteak for the rest I've modified originally all of these are for FireRed.

I've edited my implementation into Emerald of Work Up and Growth on my previous post. It finally includes Rototiller as if I've used MrDollSteak's script than Tlachtli's anymore.

And one more thing, I've found a "setword" command being already existed in BSP. I just dunno if this is exactly what we are mostly using to call a free RAM location and a string. However, the existing setword command doesn't have its index number display but it gets the same description. But, I assure it isn't (if Jambo also made the command so why the callasm isn't included in the unmodified BSP). I think we should stop using "setword" on "setword 0x203E320 0x89CDCDC" and use "loadstring" or something else or whatever might anyone want unless we can modify the program to replace "setword" into something else."
 
Last edited:
Back
Top