• 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?".
  • 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 Apr 9, 2024
Fell Stinger

FireRed:
Code:
#dynamic 0x800000

#org @fellstinger
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
jumpiffainted 0x0 @sharpattackboostifko
goto 0x81D6947

#org @sharpattackboostifko
setbyte 0x2023FDF 0x0
playstatchangeanimation 0x1 0x2 0x0
setbyte 0x2023FDE 0x21
statbuffchange 0x1 true 0x81D6947
jumpifbyte 0x0 0x2023E87 0x2 0x81D6947
printfromtable 0x83FE57C
waitmessage 0x40
goto 0x81D6947

FireRed RAW Code (In case you've got troubles with BSP):
Code:
[B]Script:[/B]
00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A
0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00
E3 00 [B]XX XX XX[/B] 08 28 47 8A 2D 08

[B]XXXXXX:[/B]
2E DF 3F 02 02 00 48 01 02 00 2E DE 3F 02 02 21
89 41 47 69 1D 08 29 00 37 43 02 02 02 47 69 1D
08 13 7C E5 3F 08 12 40 00 28 47 69 1D 08


Emerald:
Code:
#dynamic 0x800000

#org @fellstinger
attackcanceler
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
jumpiffainted 0x0 @sharpattackboostifko
goto 0x82D8A47

#org @sharpattackboostifko
setbyte 0x202448F 0x0
playstatchangeanimation 0x1 0x2 0x0
setbyte 0x202448E 0x21
statbuffchange 0x1 true 0x82D8A47
jumpifbyte 0x0 0x2024337 0x2 0x82D8A47
printfromtable 0x85CC89C
waitmessage 0x40
goto 0x82D8A47

Emerald RAW Code (In case you've got troubles with BSP):
Code:
[B]Script:[/B]
00 01 5E 8A 2D 08 00 00 02 03 04 05 06 07 09 0A
0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00
E3 00 [B]XX XX XX[/B] 08 28 47 8A 2D 08

[B]XXXXXX:[/B]
2E 8F 44 02 02 00 48 01 02 00 2E 8E 44 02 02 21
89 41 47 8A 2D 08 29 00 37 43 02 02 02 47 8A 2D
08 13 9C C8 5C 08 12 40 00 28 47 8A 2D 08

I don't know if the stat change animation or the knockout/fainted message goes first. I've done this with the stat change animation first. If not, please correct me.
 
Last edited:
58
Posts
8
Years
  • Age 31
  • Seen Jan 7, 2017
Could anyone pls re-upload the resources in the attachments in the thread? The attachments have been dead.
 
42
Posts
8
Years
  • Age 29
  • Seen yesterday
Hi,

How would I go about making an Oblivion Wing for FR (and adding it to a patched ROM, I guess)? I've added Yveltal to the ROM and I wanted it to have its signature move.

I understand that the attack has an effect similar to Giga Drain (deals damage and restores 75% HP), but I have no ASM knowledge so I'm not sure how to code such an effect. Or an animation for it.
 
457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024
Could anyone pls re-upload the resources in the attachments in the thread? The attachments have been dead.

I have but these are the only stuff I've saved (before everything was destroyed):

Wring Out (by Chaos Rush):
49dRAUk.png


Aura Sphere (by Chaos Rush):
ZZcrrFK.png


Energy Ball (by Chaos Rush):
OcGGJdK.png


Power Gem (by Chaos Rush):
8dGtGG7.png


Power Trick (by Chaos Rush):
Lw5wUyk.png


Sucker Punch/Purple Hit Marker (by Chaos Rush):
PuqINLR.png
 
Last edited:
218
Posts
10
Years
  • Seen Nov 12, 2021
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.

You should remove the check for Delta Stream, if the mega/primal weather are used, the check has to be made through ASM. Indeed, if those ability are used, the fact that they are present on the field doesn't mean they're active, also, if Air lock is present but Desolate land is active, Growth still gives a +2 boost, already handled in my implementation.
 
Last edited:
325
Posts
10
Years
You'll need to apply this stuff, credit to Doesnt.
Also huge props to kleenexfeu, he helped me through this and is awesome.

RELIC SONG
Spoiler:


~EDIT~ now completely bug free yay
 
Last edited:
218
Posts
10
Years
  • Seen Nov 12, 2021
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."

There are several typos in these BS : goto 0x2D9XXX instead of 0x82D9XXX, sometimes the location are still from fire red too.
They appear multiple times in several battlescripts
 

Trainer 781

Guest
0
Posts
King Shield, Spiky Shield, Quick Guard, Wide Guard, Crafty Shield, Mat Block

Spoiler:
 
Last edited:

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
King Shield, Spiky Shield, Quick Guard, Wide Guard, Crafty Shield, Mat Block

With kleenexfeu telling me a wonderful trick to compile multiple different type of resources together in just a single click that he used in his Emerald Mega implementation too, the protection moves are also implemented using the same trick which makes it ridiculously easy to insert any resource when using ASM.

Is that trick dynamic battle scripts and strings using .byte and .word? If so that's actually awesome and makes inserting battle script abilities and moves a lot easier!
 

Trainer 781

Guest
0
Posts
Is that trick dynamic battle scripts and strings using .byte and .word? If so that's actually awesome and makes inserting battle script abilities and moves a lot easier!

Yes. It becomes very easy.

More importantly, it also avoids the hassle of 'insert this string at SSSSSS, script at DDDDDD' etc. The compilation automatically aligns and assigns the location for them.

I most probably will do the Surf BS for Emerald this way because the one I uploaded can become too confusing to insert.
 
Last edited:
218
Posts
10
Years
  • Seen Nov 12, 2021
Yes. It becomes very easy.

More importantly, it also avoids the hassle of 'insert this string at SSSSSS, script at DDDDDD' etc. The compilation automatically aligns and assigns the location for them.

I most probably will do the Surf BS for Emerald this way because the one I uploaded can become too confusing to insert.

That would be awesome yeah. Also, I use .align 2 for the strings too, because when the routines become long, the assembler does weird things sometimes.



Update, more defines, please use them!

It'd be more convenient if everyone use the same.

Macro & Defines for Abilities and Moves implementation:

Spoiler:
 
Last edited:
794
Posts
10
Years
Foul Play
Spoiler:


Entrainment
Spoiler:


Reflect Type

Spoiler:


Seed Flare

Spoiler:

Also, all moves are for FR. Though, porting them to Emerald should be a matter of changing locations in ASM routines.
 
Last edited:

Trainer 781

Guest
0
Posts

In Foul Play, there is no need for Huge Power handling. It does not considers the target's Huge Power at all.

Also, this:
Code:
#org @start
jumpifhalfword 0x1 0x2023D4A 0x39 @move
jumpifspecialstatusflag 0x0 0x40000 0x1 @move
orword 0x2023DD0 0x40000
setbyte 0x2023FD2 0x2
is unnecessary. This is the code for Surf hitting a diving target for double damage. In fact all instances of x1D6900 in the Battle Scripts Region should replaced with x1D6926 (except the first entry of the Move Effect table if you are not using the new Surf Battle Script).

Here is the new Surf done using an ASM file for easier insertion. Also corrects Boomburst vs Soundproof.
Surf, Boomburst, Petal Blizzard, Parabolic Charge, Discharge, Sludge Wave, Lava Plume, Bulldoze
Spoiler:
 
Last edited:

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
In Foul Play, there is no need for Huge Power handling. It does not considers the target's Huge Power at all.

Also, this:
Code:
#org @start
jumpifhalfword 0x1 0x2023D4A 0x39 @move
jumpifspecialstatusflag 0x0 0x40000 0x1 @move
orword 0x2023DD0 0x40000
setbyte 0x2023FD2 0x2
is unnecessary. This is the code for Surf hitting a diving target for double damage. In fact all instances of x1D6900 in the Battle Scripts Region should replaced with x1D6926 (except the first entry of the Move Effect table if you are not using the new Surf Battle Script).

Here is the new Surf done with an ASM file for easier insertion. Also corrects Boomburst vs Soundproof.

That looks fantastic KDS! What would I have to do to make it compatible with my Absorb abilities routine at the Ability Resource thread? Just branch to this routine in the battle scripts?
 

Trainer 781

Guest
0
Posts
That looks fantastic KDS! What would I have to do to make it compatible with my Absorb abilities routine at the Ability Resource thread? Just branch to this routine in the battle scripts?

You just need to change the pointer of the Goto statement in the Absorb ability Battle Script to the address of AbsorbRebrancherLabel (the last Battle Script in the Surf code just above the solitary routine).

Alternatively, for example if you want to make Lightning Rod compatible.
Insert the Lightning Rod Absorb Battle Script first without changing anything from the ability thread.
Note the address of the Goto statement in that Battle Script. Add +1 to it. Let this address by xXXXXXX
Then in this Surf ASM file uncomment these portions :
Code:
@.equ LightningRodEnd

Assign the value 8XXXXXX to this equ.

Code:
@.org LightningRodEnd
@.word AbsorbRebrancher

Then sort the orgs in the increasing order of addresses if neccesary.
Then the parameter of Goto command in the Absorb ability BS will change to the address of Absorb Rebrancher.
 
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
King Shield, Spiky Shield, Quick Guard, Wide Guard, Crafty Shield, Mat Block

Would implementing the speed-system for Quick Guard require new implementations of Gyro Ball/Electro Ball (the routines made by Mr. DollSteak)? Or can they still work alongside one another?
 

Trainer 781

Guest
0
Posts
Would implementing the speed-system for Quick Guard require new implementations of Gyro Ball/Electro Ball (the routines made by Mr. DollSteak)? Or can they still work alongside one another?

Yes, it would require new implementations.
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
Would implementing the speed-system for Quick Guard require new implementations of Gyro Ball/Electro Ball (the routines made by Mr. DollSteak)? Or can they still work alongside one another?

Yeah I'm going to rewrite these to use the new speed system! Just a matter of having the callasm base the calculations off of the result returned by the BL.

EDIT: They're fixed! Just reinsert them! They're in the same post.
 
Last edited:
Back
Top