Advertiser Content

Development Move Resource Thread Page 4

Started by Spherical Ice April 22nd, 2013 10:29 PM
  • 159108 views
  • 420 replies

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 20
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,473 posts
6.6 Years
No patch exist (Like Mr.DollSteak) for new moves and ability for Ruby? ^^
No. Ruby's engine is unstable and not fit for asm hacking like that. You should really use FR. :D
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue

LCCoolJ95

Limited Capacity

Age 24
Male
The World That Never Was
Seen 16 Hours Ago
Posted 2 Weeks Ago
604 posts
10.1 Years
No. Ruby's engine is unstable and not fit for asm hacking like that. You should really use FR. :D
Well, what if other hackers don't want to use Fire Red and want to hack other games?
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Theta Emerald EX: https://www.pokecommunity.com/showthread.php?t=386240

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 20
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,473 posts
6.6 Years
Well, if they're good enough they might be able to port any of RSE features to FR
Not even that
It's the wanting of it
And it REALLY doesn't matter the game you build on, CUZ YOU'RE CHANGING IT ANYWAY
It matters the ENGINE and FR's ENGINE is the better one of the 3, and more researched one, so why fight it
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue

Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
5.9 Years
This is my first effect (Psycho shift):
#dynamic 0xYourOffest
#freespacebyte 0xFF

#include std.bsh

#org @psycoshift
attackcanceler
accuracycheck 0x1D695E 0x0
attackstring
ppreduce
jumpifsecondarystatus BANK_TARGET 0x1000000 0x81D7DF2
jumpifstatus BANK_USER 0x10 @burnandcure
jumpifstatus BANK_USER 0x8 @poisonandcure
jumpifstatus BANK_USER 0x80 @toxicandcure
jumpifstatus BANK_USER 0x40 @paralijeandcure
jumpifstatus BANK_USER 0x7 @sleepandcure
goto 0x81D7DF2

#org @burnandcure
jumpifsecondarystatus 0x0 0x1000000 0x81D7DF2
jumpifstatus 0x0 0x10 0x81D7F91
jumpiftype 0x0 0xA 0x81D7E04
jumpifability 0x0 0x29 0x81D7F77
jumpifstatus 0x0 0xFF 0x81D7DF2
jumpifhalverset 0x0 0x20 0x81D8B39
attackanimation
waitanimation
setbyte 0x2023E85 0x3
seteffecttarget
cureifburnedparalysedorpoisoned 0x81D7DF2
cmd98 0x1
goto 0x81D694E

#org @poisonandcure
jumpifability 0x0 0x11 0x81D6E4F
jumpifsecondarystatus 0x0 0x1000000 0x81D7DF2
jumpifstatus 0x0 0x8 0x81D6E41
jumpifstatus 0x0 0x80 0x81D6E41
jumpiftype 0x0 0x3 0x81D7E04
jumpiftype 0x0 0x8 0x81D7E04
jumpifstatus 0x0 0xFF 0x81D7DF2
jumpifhalverset 0x0 0x20 0x81D8B39
attackanimation
waitanimation
setbyte 0x2023E85 0x2
seteffecttarget
cureifburnedparalysedorpoisoned 0x81D7DF2
cmd98 0x1
goto 0x81D694E

#org @paralijeandcure
jumpifability 0x0 0x7 0x81D7245
jumpiftype 0x0 0xD 0x81D7E04
jumpifsecondarystatus 0x0 0x1000000 0x81D7DF2
cmd6
jumpifbyte 0x4 0x2023DCC 0x29 0x81D7DF2
jumpifstatus 0x0 0x40 0x81D7237
jumpifstatus 0x0 0xFF 0x81D7DF2
jumpifhalverset 0x0 0x20 0x81D8B39
attackanimation
waitanimation
setbyte 0x2023E85 0x5
seteffecttarget
cureifburnedparalysedorpoisoned 0x81D7DF2
cmd98 0x1
goto 0x81D694E

#org @toxicandcure
jumpifability 0x0 0x11 0x81D6E4F
jumpifsecondarystatus 0x0 0x1000000 0x81D7DF2
jumpifstatus 0x0 0x8 0x81D6E41
jumpifstatus 0x0 0x80 0x81D6E41
jumpifstatus 0x0 0xFF 0x81D7DF2
jumpiftype 0x0 0x3 0x81D7E04
jumpiftype 0x0 0x8 0x81D7E04
jumpifhalverset 0x0 0x20 0x81D8B39
attackanimation
waitanimation
setbyte 0x2023E85 0x6
seteffecttarget
cureifburnedparalysedorpoisoned 0x81D7DF2
cmd98 0x1
goto 0x81D694E

#org @sleepandcure
jumpifsecondarystatus 0x0 0x1000000 0x81D7DF2
jumpifstatus 0x0 0x7 0x81D69B0
jumpifcannotsleep 0x81D69CC
jumpifstatus 0x0 0xFF 0x81D7DF2
jumpifhalverset 0x0 0x20 0x81D8B39
attackanimation
waitanimation
setbyte 0x2023E85 0x1
seteffecttarget
clearstatus 0x1
jumpifbyte 0x0 0x02023D6B 0x0 @slot1
jumpifbyte 0x0 0x02023D6B 0x1 @slot2
jumpifbyte 0x0 0x02023D6B 0x2 @slot3
jumpifbyte 0x0 0x02023D6B 0x3 @slot4

#org @slot1
bicbyte 0x20242D4 0xFF
cmd98 0x1
goto 0x81D694E

#org @slot2
bicbyte 0x202407C 0xFF
cmd98 0x1
goto 0x81D694E

#org @slot3
bicbyte 0x2024338 0xFF
cmd98 0x1
goto 0x81D694E

#org @slot4
bicbyte 0x20240E0 0xFF
cmd98 0x1
goto 0x81D694E
Bugs:
1. Fixed :D. Used cmd98 0x1 to fixed that problem and also placed the cureifburnedparalysedorpoisoned 0x81D7DF2 after setting the status so that you do not get affected by synchronize ability.
2. Fixed :D:D. Earlier, using the clearstatus command I partially managed to cure the user's sleep. But it still displayed the sleep icon.

Therefore the move can effectively shift paralysis, toxic, burn, poison and sleep (Creselia's sleeptalk,rest,psycoshift strategy XD).

Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
5.9 Years
Some more effects:

Freeze Shock/Ice burn
#dynamic 0x740000
#freespacebyte 0xFF

#org @freezeshock
jumpifsecondarystatus 0x1 0x1000 @execute
jumpifword 0x4 0x2023DD0 0x200 @execute
setbyte 0x2023FD3 0x3
call @firstturn
goto 0x81D694E

#org @execute
attackcanceler
setbyte 0x2023E85 0xC
setbyte 0x2023FDC 0x1
clearstatus 0x1
orword 0x2023DD0 0x800
setbyte 0x2023E85 0x5 (0x3 instead 0x5 for ice burn)
goto 0x81D6927

#org @firstturn
attackcanceler
attackstring
waitmessage 0x40
ppreduce
attackanimation
waitanimation
orword 0x2023DD0 0x8000000
setbyte 0x2023E85 0x4C
seteffecttarget
copyarray 0x2023E87 0x2023FD3 0x1
printstring 0xA5
waitmessage 0x40
return
Set 30% effect accuracy in a move editor like PGE.

Geomancy:
#dynamic 0x730000
#freespacebyte 0xFF

#org @geomancy
jumpifsecondarystatus 0x1 0x1000 @execute
jumpifword 0x4 0x2023DD0 0x200 @execute
setbyte 0x2023FD3 0x3
call @firstturn
goto 0x81D694E

#org @execute
attackcanceler
setbyte 0x2023E85 0xC
setbyte 0x2023FDC 0x1
clearstatus 0x1
orword 0x2023DD0 0x800
goto @boost

#org @boost
attackstring
ppreduce
jumpifstat 0x1 0x3 0x4 0xC @spattack
jumpifstat 0x1 0x3 0x5 0xC @spattack
jumpifstat 0x1 0x0 0x3 0xC 0x81D85E7
goto @spattack

#org @spattack
attackanimation
waitanimation
setbyte 0x2023FDF 0x0
playstatchangeanimation 0x1 0x30 0x0
setbyte 0x2023FDE 0x24
statbuffchange 0x1 true @spdef
jumpifbyte 0x0 0x2023E87 0x2 @spdef
printfromtable 0x83FE57C
waitmessage 0x40
goto @spdef

#org @spdef
setbyte 0x2023FDE 0x25
statbuffchange 0x1 true @speed
jumpifbyte 0x0 0x2023E87 0x2 @speed
printfromtable 0x83FE57C
waitmessage 0x40
goto @speed

#org @speed
setbyte 0x2023FDE 0x23
statbuffchange 0x1 true 0x81D694E
jumpifbyte 0x0 0x2023E87 0x2 0x81D694E
printfromtable 0x83FE57C
waitmessage 0x40
goto 0x81D694E

#org @firstturn
attackcanceler
attackstring
waitmessage 0x40
ppreduce
attackanimation
waitanimation
orword 0x2023DD0 0x8000000
setbyte 0x2023E85 0x4C
seteffecttarget
copyarray 0x2023E87 0x2023FD3 0x1
printstring 0xA5
waitmessage 0x40
return
These moves display a charging message in their charging turn which can be easily changed by the argument in printstring command.

Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
5.9 Years
Some updated effects for the old moves:

1. Knock off:

This emulates the gen 6 buff for Knock Off. Using pawell and kurapika's Acrobatics' effect and reading the JPAN's incredibly useful Battle Script Thread, I managed to create this. The problem is that to emulate knock off's 1.5 increase when the foe is holding an item, the damage multiplier set to 3 and set to 2 for normal damage. To compensate for this you have to set its base power to 32 or 33 (i.e 65/2 to emulate Gen VI damage nearly) or 'the actual intended base power that you want to keep in you game' divided by 2. Because I am unable to manipulate damage increase in fractions using battle scripts.
Anyways, here is the code.
#dynamic 0x(YourOffset)
#freespacebyte 0xFF

#org @start
jumpifbyte 0x0 0x02023D6C 0x0 @slot1
jumpifbyte 0x0 0x02023D6C 0x1 @slot2
jumpifbyte 0x0 0x02023D6C 0x2 @slot3
jumpifbyte 0x0 0x02023D6C 0x3 @slot4
goto @doubledamage

#org @slot1
jumpifhalfword 0x1 0x02023C12 0x0 @tripledamage
goto @doubledamage

#org @slot2
jumpifhalfword 0x1 0x02023C6A 0x0 @tripledamage
goto @doubledamage

#org @slot3
jumpifhalfword 0x1 0x02023CC2 0x0 @tripledamage
goto @doubledamage

#org @slot4
jumpifhalfword 0x1 0x02023D1A 0x0 @tripledamage
goto @doubledamage

#org @tripledamage
setbyte damagemultiplier 0x3
goto 0x81D8263

#org @doubledamage
setbyte damagemultiplier 0x2
goto 0x81D6900
So it works effectively but the problem is that it displays the half of actual intended power.

2. Blizzard (infinite accuracy in hail and chance to freeze opponent)
#dynamic 0x(YourOffset)
#freespacebyte 0xFF

#org @blizzard
setbyte 0x2023E85 0x4
jumpifhalfword 0x0 weather 0x80 @notmiss
goto 0x81D6900

#org @notmiss
attackcanceler
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x0
setbyte 0x2023FD8 0x0
cmd49 0x0 0x0
end
3. Charge (set charge and raise user's sp. def by one stafe)
#dynamic 0x(YourOffset)
#freespacebyte 0xFF

#org @charge
attackcanceler
attackstring
ppreduce
setcharge
attackanimation
waitanimation
printstring 0xA5
waitmessage 0x40
jumpifstat 0x1 0x0 0x5 0xC 0x81D694E
setbyte 0x2023FDE 0x15
statbuffchange 0x1 true 0x81D694E
jumpifbyte 0x0 0x2023E87 0x2 0x81D694E
playstatchangeanimation 0x1 0x30 0x0
printfromtable 0x83FE57C
waitmessage 0x40
goto 0x81D694E
New Effect:
Hex (inflict double damage to a status-ed foe)
#dynamic 0x(YourOffset)
#freespacebyte 0xFF

#org @hex
jumpifstatus 0x0 0x10 @doubledamage 
jumpifstatus 0x0 0x8 @doubledamage
jumpifstatus 0x0 0x80 @doubledamage
jumpifstatus 0x0 0x40 @doubledamage
jumpifstatus 0x0 0x7 @doubledamage
goto 0x81D6900

#org @doubledamage
setbyte damagemultiplier 0x2
goto 0x81D6900

Jambo51

Glory To Arstotzka

Male
Seen January 28th, 2018
Posted December 6th, 2015
732 posts
10 Years
So basically this is a RAM versus ROM trade-off.
Then you have chosen poorly.

When writing a script or a programme of any description, the last thing you should be concerned about is the ROM space, as there is 114 times as much ROM space as there is RAM space in a GBA ROM (assuming a 32 meg ROM).

But that isn't even the biggest issue. Your script wastes unnecessary CPU cycles reading from and writing to these RAM addresses, meaning that the CPU has to sit and wait on data to be returned to it from the memory chip. Time where the CPU is idle, not processing anything, but continuing to drain battery power.

In order of importance, it's processor time, ram usage, rom usage. So if you can spare your processor from having to do more, even if it costs a significant amount of ROM space, you should do it.

ETA: Original post changed, so this is largely irrelevant now. Nonetheless, I'll leave it here as a cautionary post.
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

DoesntKnowHowToPlay

Tiny Umbrella with Lots and Lots of Good

Seen February 12th, 2019
Posted June 15th, 2017
258 posts
7.4 Years
^this, albeit for somewhat different reasons

I'd like to point out, since a lot of people seem to be unaware, that the AI runs damage calcs to determine move power, but it does not run battle scripts beforehand. Damage-modifying effects like Sacred Sword, Venoshock, Brine, and Acrobatics should be implemented into the damage calc (x3ecec) if you want the AI to be able to use them in the proper context. In the same vein note which effect slot you're putting your scripts in if you want the AI to use them sensibly. While you can't expect the AI to be sane with unused effect slots, you can probably expect it to not be a complete idiot with Quiver Dance if it's mapped to Calm Mind, or Flame Charge that's mapped to Metal Claw.

Also is 0x02FF7D20 even a legal address on the GBA? I thought that part of RAM only went up to x0203FFFF.

Jambo51

Glory To Arstotzka

Male
Seen January 28th, 2018
Posted December 6th, 2015
732 posts
10 Years
Also is 0x02FF7D20 even a legal address on the GBA? I thought that part of RAM only went up to x0203FFFF.
It's legal on an emulator, but not on the real hardware. Good catch, as I missed this.

Also this:
Hex (inflict double damage to a status-ed foe)
#dynamic 0x(YourOffset)
#freespacebyte 0xFF

#org @hex
jumpifstatus 0x0 0x10 @doubledamage 
jumpifstatus 0x0 0x8 @doubledamage
jumpifstatus 0x0 0x80 @doubledamage
jumpifstatus 0x0 0x40 @doubledamage
jumpifstatus 0x0 0x7 @doubledamage
goto 0x81D6900

#org @doubledamage
setbyte damagemultiplier 0x2
goto 0x81D6900
Can be combined into a single check:

#org @hex
jumpifstatus 0x0 0xFF @doubledamage
goto 0x81D6900

#org @doubledamage
setbyte damagemultiplier 0x2
goto 0x81D6900
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
5.9 Years
@Jambo51 - Aah, thank you. I'm inexperienced, so I don't know about the GBA system properly. I will keep this in mind for the next time. I'll update this code so it will use only 2 RAM bytes and try to put it somewhere in the 0x02000000-x0203FFFF region if there is free space (I don't know the offsets, can anyone tell?. It would be a great help). And also thanks for the correction of the hex check, I really forgot about this.

@DoesntKnowHowToPlay - You are right about the AI. I am aware of this (I read one of your posts in this thread mentioning about this). I don't have the ASM skills to modify the command (hopefully,
someday I or someone else can). These types of scripts can serve as decent placeholders for the time being. Also, thanks for telling about the RAM region limit.

I tested this move. It was working properly in an emulator (in double battles too), but because i used an outside RAM region so it will not work on GBA.

EDIT: I have now updated the code in the OP (it is not complete because of not knowing the free RAM offsets). If further improvement need to be done, then advice is welcome.

Shadowraze

ur mum

Age 20
Non-binary
ur mum
Seen 1 Week Ago
Posted October 16th, 2016
798 posts
6.2 Years
Well after 10,001 years I finally updated the OP! :)

Thanks for all your contributions everyone especially to MrDollSteak, KDS, Bugmania, Spherical Ice now lets get some animating and coding going on. :D

I would probably add in 6th gen moves and other versions some time later since they are not my top priority now.
Seen January 10th, 2017
Posted April 21st, 2016
180 posts
5.3 Years
Well after 10,001 years I finally updated the OP! :)

Thanks for all your contributions everyone especially to MrDollSteak, KDS, Bugmania, Spherical Ice now lets get some animating and coding going on. :D

I would probably add in 6th gen moves and other versions some time later since they are not my top priority now.
On the first page, 11bayerf1 made an animation for Payback that doesn't work. The only thing that needs to be done to fix it is to add 08 after every pointer which 11bayerf1 seems to have forgotten when adding it.

This animation looks really nice so you should definitely add it with the added 08's after every instance of ZZ YY XX(2,3,4)

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 20
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,473 posts
6.6 Years
On the first page, 11bayerf1 made an animation for Payback that doesn't work. The only thing that needs to be done to fix it is to add 08 after every pointer which 11bayerf1 seems to have forgotten when adding it.

This animation looks really nice so you should definitely add it with the added 08's after every instance of ZZ YY XX(2,3,4)
also I tested the quiver dance one and it freezes after it says I used it
I added it 3 different times in different roms, so it's not my sanity :P
(not necessary for me but it's just to help)
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue
Seen January 10th, 2017
Posted April 21st, 2016
180 posts
5.3 Years

3. Charge (set charge and raise user's sp. def by one stafe)
#dynamic 0x(YourOffset)
#freespacebyte 0xFF

#org @charge
attackcanceler
attackstring
ppreduce
setcharge
attackanimation
waitanimation
printstring 0xA5
waitmessage 0x40
setbyte 0x2023FDE 0x15
statbuffchange 0x1 true 0x81D694E
jumpifbyte 0x0 0x2023E87 0x2 0x81D694E
playstatchangeanimation 0x1 0x30 0x0
printfromtable 0x83FE57C
waitmessage 0x40
goto 0x81D694E
Your Charge will freeze if you max out the Sp. Def and try to raise another level. You'll need to add "Jumpifstat 0x1 0x0 0x5 0xC 0x81D694E" after waitmessage 0x40 to fix it.
Seen January 10th, 2017
Posted April 21st, 2016
180 posts
5.3 Years
Sorry for the double post, but I actually have a contribution as well as a question

These are my Close Combat Effect scripts:

Method 1:

Emerald:
Spoiler:
#dynamic 0xXXXXXX
#freespacebyte 0xFF

#include moves.bsh

#org @start
attackcanceler
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
jumpifstat 0x1 0x3 0x2 0x0 @next
jumpifstat 0x1 0x0 0x5 0x0 @end

#org @next
setbyte 0x202448F 0x0
playstatchangeanimation 0x1 0xE 0x1
setbyte 0x202448E
statbuffchange 0x41 TRUE @next2
jumpifbyte 0x0 0x2024337 0x2 @next2
printfromtable 0x85CC89C
waitmessage 0x40

#org @next2
setbyte 0x202448E 0x95
statbuffchange 0x41 TRUE @end
jumpifbyte 0x0 0x2024337 0x2 @end
printfromtable 0x85CC89C
waitmessage 0x40

#org @end
goto 0x82D8A4E


Fire Red:
Spoiler:
#dynamic 0xXXXXXX
#freespacebyte 0xFF

#include moves.bsh

#org @start
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
jumpifstat 0x1 0x3 0x2 0x0 @next
jumpifstat 0x1 0x0 0x5 0x0 @end

#org @next
setbyte 0x2023FDF 0x0
playstatchangeanimation 0x1 0xE 0x1
setbyte 0x2023FDE 0x92
statbuffchange 0x41 TRUE @next2
jumpifbyte 0x0 0x2023E87 0x2 @next2
printfromtable 0x83FE57C
waitmessage 0x40

#org @next2
setbyte 0x2023FDE 0x95
statbuffchange 0x41 TRUE @end
jumpifbyte 0x0 0x2023E87 0x2 @end
printfromtable 0x83FE57C
waitmessage 0x40

#org @end
goto 0x81D694E


Method 2:
I'll just post one version of this:

Fire Red:
Spoiler:
#dynamic 0xXXXXXX
#freespacebyte 0xFF

#include moves.bsh

#org @start
attackcanceler
accuracycheck 0x81D695E
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
setbyte 0x2023E85 0xD7
seteffectwithchancetarget
setbyte 0x2023E85 0xDA
seteffectwithchancetarget
goto 0x81D6947


While both of these can be used fine, they have their problems.

Method 1 has an animation which is consistent with the rest of the game: 1 grey downwards anmation for both stats. However, if, say, the user Has -4 in Defense and -6 (maximum, - 3 and - 5 works fine) in Sp. Def at one point, neither will be lowered. It only works if the stats are lowered at the same phase.

Method 2 has good functionality as it treats both stats seperately. However, it has 1 animation for each stat so you have to go through two "lower stats animation" every time you use the move (which is inconsistent with the rest of the game).

So yeah, feel free to use whichever you want. I would love if someone else could help me see what I miss in the first animation to make it have 1 animation for lowering the stats but treat Sp. Def and Def separately.
Male
Seen August 19th, 2018
Posted August 19th, 2018
1,312 posts
12.1 Years
Here's my Roost animation for Emerald:
00 1E 28 0A 03 29 19 CA 00 3F 04 00 02 88 63 59 08 80 08 00 00 F0 FF 40 00 02 00 68 00 28 2C 20 00 01 00 04 06 02 88 63 59 08 80 08 00 00 F0 FF 20 00 02 00 68 00 28 2C 20 00 01 00 02 88 63 59 08 80 08 00 00 F0 FF 00 00 02 00 68 00 28 2C 20 00 01 00 04 06 02 88 63 59 08 80 08 00 00 F0 FF E0 00 02 00 68 00 28 2C 20 00 01 00 02 88 63 59 08 80 08 00 00 F0 FF 80 00 02 00 68 00 28 2C 20 00 01 00 04 06 02 88 63 59 08 80 08 00 00 F0 FF C0 00 02 00 68 00 28 2C 20 00 01 00 02 88 63 59 08 80 08 00 00 F0 FF A0 00 02 00 68 00 28 2C 20 00 01 00 04 06 02 88 63 59 08 80 08 00 00 F0 FF 60 00 02 00 68 00 28 2C 20 00 01 00 05 0B 03 00 2F 27 05 0B 02 0D 04 01 0E DF 79 2D 08 05 08
It's basically Feather Dance + healing animation.

Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
5.9 Years
Your Charge will freeze if you max out the Sp. Def and try to raise another level. You'll need to add "Jumpifstat 0x1 0x0 0x5 0xC 0x81D694E" after waitmessage 0x40 to fix it.
Hmm. This is a good idea for safety I'll update it.
Edited the OP for charge.

BugMania

The Bug Master

Male
Seen November 4th, 2016
Posted July 30th, 2014
32 posts
6 Years
Here is the "Flame Burst":
Spoiler:

______________________
#dynamic 0xXXXXXXXX
#freespacebyte 0xFF

#include moves.bsh

#org @start
jumpifhalfword 0x1 0x2023D4A 0x39 @demange
jumpifspecialstatusflag 0x0 0x40000 0x1 @demange
orword 0x2023DD0 0x40000
setbyte 0x2023FD2 0x2

#org @demange
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
critcalc
cmd5
cmd6
cmd7
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x8000000
setbyte 0x2023FD8 0x0
cmd49 0x0 0x0
setbyte 0x2023D50 0x0
setbyte 0x2FF7D20 0x1
attackcanceler
setbyte 0x2FF7D20 0x0
jumpifbyte 0x0 0x2023D50 0x0 @end
pause 0xA
jumpifability 0x0 0x12 @end
jumpifability 0x0 0x62 @end
graphicalhpupdate 0x0
datahpupdate 0x0
printstring 0x184
waitmessage 0x40
faintpokemon 0x0 0x0 0x8000000
setbyte 0x2023FD8 0x0
#org @end
end
_________________________________

But first, I must show how it is possible to apply a new effect in the system.

You may have noticed that I used a very sinister method at this code.
Well, go to a table in 0x8025011C
This table is responsible for commands like "attackcanceler"
Leave in the first Halfworld an offset other to a free memory space +1.
In the free space that you chose, you must pass this routine that i will show:
_________________________________
.align 2
.thumb

main:
PUSH {R1, R2}
LDR R1, =0x2FF7D20
LDRH R1, [R1]
LDR R2, =0xXXXXXX
MOV R0, #0x4
MUL R1, R0, R1
ADD R1, R2, R1
LDR R1, [R1]
ADD R0, R1, R0
POP {R2, R1}
BX R0


________________________________
That code can read one byte at 0x2FF7D20 (or any other offsets)
and sum a number in a table that must be in "0xXXXXXX".
""setbyte 0x2FF7D20 0x1
attackcanceler
setbyte 0x2FF7D20 0x0""
________________________________

This table must to have in your first Halfworld these bytes:
D7 61 01 08
If 0x2FF7D20 is 0x0, run to the "attackcanceler".

So do not forget to always leave the "setbyte 0x2FF7D20 0x0"
________________________________
type in table "XXXXXX", an offset to a new routine ... here:

.align 2
.thumb

main:
push {r1-r3}
ldr r1, =0x2023Bcc
ldr r1, [r1]
cmp r1, #0x2
beq end
ldr r1, =0x02023d6c
ldrb r1, [r1]
ldr r2, =0x02023d6c
cmp r1, #0x2
beq zero
cmp r1, #0x3
beq one
cmp r1, #0x0
beq two
cmp r1, #0x1
beq three
end:
pop {r1-r3}
PUSH {LR}
LDR R1, =0x2023D74
LDR R0, [R1]
ADD R0, #0x1
STR R0, [R1]
POP {R0}
BX R0

zero:
mov r1, #0x0
strb r1, [r2]
ldr r1, =0x2023C10
b divide
one:
mov r1, #0x1
strb r1, [r2]
ldr r1, =0x2023C68
b divide
two:
mov r1, #0x2
strb r1, [r2]
ldr r1, =0x2023CC0
b divide
three:
mov r1, #0x3
strb r1, [r2]
ldr r1, =0x2023D18
b divide
divide:
mov r3, #0x4
sub r3, r1, r3
ldrh r3, [r3]
cmp r3, #0x0
ldrh r1, [r1]
beq end
mov r3, #0x0
divid2: add r3, #0x1
mov r2, #0x10
mul r2, r3, r2
cmp r2, r1
blo divid2
cmp r3, #0x1
beq end2
sub r3, #0x1
end2: ldr r1, =0x02023D50
strh r3, [r1]
b end
_______________________________________

this will make possible the "FlameBurstCalculationDemageCommand"!!
I apologize if anyone has been trying to use this code and could not until today ^_^:
Spoiler:

PUSH {R1, R2}
LDR R1, =0x2FF7D20
LDRH R1, [R1]
LDR R2, =0xXXXXXX
MOV R0, #0x4
MUL R1, R0, R1
ADD R1, R2, R1
LDR R1, [R1]
ADD R0, R1, R0
POP {R2, R1}
BX R0

I noticed that there was a mistake in the table counter ...
here is the fixed routine:
Spoiler:

PUSH {R1-R2}
LDR R1, =0x02FF7D20
LDRH R1, [R1]
LDR R2, =0x08770FC0
MOV R0, #0x4
MUL R1, R0, R1
ADD R1, R2, R1
LDR R1, [R1]
MOV R0, R1
POP {R1-R2}
BX R0

Now we can use this to create assembly routines for use in the BSP!
Even the smallest of beings can achieve the greatest of obstacles!
Click in the spoiler, if you dare!
Spoiler:


L
et's dream bigger than our bodies can endure!
G
et to the extreme!

See my works here

Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
5.9 Years
Wake-up Slap (Improved):
I figured out the way to cure sleep :D, so my psyco shift's 2nd problem is also fixed.
Spoiler:

#org @sleepchecker
jumpifsecondarystatus 0x0 0x1000000 0x81D6926
jumpifstatus 0x0 0x7 @wakupslap
goto 0x81D6926

#org @wakupslap
setbyte damagemultiplier 0x2
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
faintpokemon 0x0 0x0 0x0
jumpiffainted 0x0 0x81D694E
setbyte 0x2023E85 0x1
clearstatus 0x0
setword 0x203C020 0x08DDDDDD
printstring 0x184
waitmessage 0x20
jumpifbyte 0x0 0x02023D6C 0x0 @slot1
jumpifbyte 0x0 0x02023D6C 0x1 @slot2
jumpifbyte 0x0 0x02023D6C 0x2 @slot3
jumpifbyte 0x0 0x02023D6C 0x3 @slot4

#org @slot1
bicbyte 0x20242D4 0xFF
cmd98 0x0
goto 0x81D694E

#org @slot2
bicbyte 0x202407C 0xFF
cmd98 0x0
goto 0x81D694E

#org @slot3
bicbyte 0x2024338 0xFF
cmd98 0x0
goto 0x81D694E

#org @slot4
bicbyte 0x20240E0 0xFF
cmd98 0x0
goto 0x81D694E
String at 0xDDDDDD
FD 10 00 EB E3 DF D9 00 E9 E4 AB FF


Updated the psyco shift too.
Changed the condition byte for blizzard.

Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
5.9 Years
Found Jambo's callasm method (link here) in battle scripts by seeing Chaos Rush's roost effect post.

So made two effects using the callasm method and Tlachti's decimal damage manipulation ASM code, which is found here.

1. Knock Off (Better Alternative)
#dynamic 0x(YourOffset)
#freespacebyte 0xFF

#org @start
jumpifbyte 0x0 0x02023D6C 0x0 @slot1
jumpifbyte 0x0 0x02023D6C 0x1 @slot2
jumpifbyte 0x0 0x02023D6C 0x2 @slot3
jumpifbyte 0x0 0x02023D6C 0x3 @slot4

#org @slot1
jumpifhalfword 0x1 0x02023C12 0x0 @knock
goto 0x081D6926

#org @slot2
jumpifhalfword 0x1 0x02023C6A 0x0 @knock
goto 0x081D6926

#org @slot3
jumpifhalfword 0x1 0x02023CC2 0x0 @knock
goto 0x081D6926

#org @slot4
jumpifhalfword 0x1 0x02023D1A 0x0 @knock
goto 0x081D6926

#org @knock
setbyte 0x2023E85 0x36
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
callculatedamage
cmdF8  0x([Offset to 1.5x damage asm]+1)
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x0
setbyte 0x2023FD8 0x0
cmd49 0x0 0x0
end
This knock off script is much better it as does not required base power change (set to 65), and better AI understanding (not perfect though) and also does not give techician mons a undesirable boost as mine first script does, but requires the ability to insert ASM and repointing tables.
--
2. Metal Burst
#dynamic 0x720000
#freespacebyte 0xFF

#org @start
jumpifhalfword B_== 0x2023D4A 0x44 0x81D7433
attackcanceler
counterdamagecalculator @specialpass
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
damagecalc2
cmd69
cmdF8 0x([Offset to 0.75x damage asm]+1)
goto 0x81D6934

#org @specialpass
mirrorcoatdamagecalculator 0x81D7DF0
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
damagecalc2
cmd69
cmdF8 0x([Offset to 0.75x damage asm]+1)
goto 0x81D6934
Understanding Doesnt's point on mapping new effects to similar old effects so that AI can use them in a better way, this script is meant to replace the original counter script (so change the counter's original pointer in the effect table to the inserted scripts's location). It branches to counter's effect if the move ID is of counter, otherwise it executes metal burst's effect. This also requires Jambo's callasm method.
--
The way of inserting these two codes is:
i.) First use Jambo's callasm method, if already done then skip this step.
ii.) Insert this in command.bsh by opening in notepad, if already done then skip this step also
#command cmdF8 0xF8 0x1 "Offset of routine" 0x4
#command cmd69 0x69 0x0
#command cmd98 0x98 0x1 "Byte" 0x1
iii). View Tlachtli's ASM routines and change 0x020241F0 to 0x02023d50 in the last line before compiling to make them working for FR.
iv) Then insert the compiled decimal multiplier ASM routines using an Hex Editor.
v) Then insert the battle scripts using BSP.
--
3. Soak (no callasm required):
#dynamic 0x720000
#freespacebyte 0xFF

#org @start
attackcanceler
accuracycheck 0x1D695E 0x0
attackstring
ppreduce
jumpifsecondarystatus 0x0 0x1000000 0x81D7DF2
attackanimation
waitanimation
jumpifbyte 0x0 0x02023D6C 0x0 @slot1
jumpifbyte 0x0 0x02023D6C 0x1 @slot2
jumpifbyte 0x0 0x02023D6C 0x2 @slot3
jumpifbyte 0x0 0x02023D6C 0x3 @slot4

#org @slot1
setbyte 0x2023C05 0xB
setbyte 0x2023C06 0xB
goto 0x81D694E

#org @slot2
setbyte 0x2023C5D 0xB
setbyte 0x2023C5E 0xB
goto 0x81D694E

#org @slot3
setbyte 0x2023CB5 0xB
setbyte 0x2023CB6 0xB
goto 0x81D694E

#org @slot4
setbyte 0x2023D0D 0xB
setbyte 0x2023C06 0xB
goto 0x81D694E

Spherical Ice

Age 21
Bristol, UK
Seen 6 Hours Ago
Posted 6 Days Ago
5,246 posts
11.6 Years
I've managed to port Chaos Rush's Roost over to FireRed. I'm just going to copy his explanation, and edit parts where applicable.

-------------------

Here's how to implement it:
1. First, you need Jambo51's callasm routine for Battle Script Pro. It is found right here. Your new command will be 0xF8.

2. Now to get BSP to recognize our new command, open up the folder where BSP is located, and then there should be another folder called "Data". Then you should see a file called, "commands.bsh". Open it up with Notepad, and put this in:

#command callasm 0xF8 0x1 "Offset of routine" 0x4
DO NOT change anything in the quotation marks!

3. Now, put in this routine somewhere:
.text
.align 2
.thumb
.thumb_func

/*What this routine does is check if the attacking PKMN
is Flying-type. It then changes its Flying-type to
the ???-type.*/

GetPkmnType1:
push {r0-r5}
ldr r1, .BattleData
ldr r0, .CurPokeIndex
ldrb r0, [r0]
mov r2, #0x58
mul r2, r0
add r1, #0x21
add r1, r2
ldrb r0, [r1]
ldrb r2, [r1, #0x1]
mov r3, #0x2
cmp r0, r3
beq ChangeType1
cmp r2, r3
beq ChangeType2
b End

ChangeType1:
mov r4, #0x9
strb r4, [r1]
cmp r2, r3
beq ChangeType2
b End

ChangeType2:
mov r4, #0x9
strb r4, [r1, #0x1]
b End

End:
pop {r0-r5}
bx lr

.align 2
.BattleData:        .word 0x02023BE4
.CurPokeIndex:        .word 0x02023D6B
4. Now open up BSP, and open up Recover's battle script. Replace it with this:

#dynamic 0x800000
#freespacebyte 0xFF

#org @start
jumpifhalfword 0x0 0x2023D4A 0x163 @roost
attackcanceler
attackstring
ppreduce
setdamageasrestorehalfmaxhp @max 0x1
attackanimation
waitanimation
orword 0x2023DD0 0x100
graphicalhpupdate 0x1
datahpupdate 0x1
printstring 0x4B
waitmessage 0x40
goto @end

#org @roost
attackcanceler
attackstring
ppreduce
setdamageasrestorehalfmaxhp @max 0x1
attackanimation
waitanimation
orword 0x2023DD0 0x100
graphicalhpupdate 0x1
datahpupdate 0x1
printstring 0x4B
waitmessage 0x40
jumpiftype2 0x1 0x2 @changetype
goto @end

#org @max
pause 0x20
printstring 0x4C
waitmessage 0x40
goto @end

#org @changetype
callasm 0x(offset of your routine +1)
goto @end

#org @end
setbyte 0x2023FD8 0x0
cmd49 0x0 0x0
end
A couple things to note: At the top, we have "jumpifhalfword 0x0 0x2023D4A 0x163 @roost".
Replace 0x163 with your move ID for Roost.

Towards the bottom, at "#org @changetype", you see "callasm 0x(offset of your routine +1)". Obviously, put in the offset of the routine we added earlier, but add 0x1 to the offset.

So far, we have made it so that every time a Flying-type Pokémon uses Roost, it will turn into a ???-type. (If it was part-Flying, it would become part-???, and if it was pure-Flying, it would become pure-???).

5. Now we're going to insert another routine. This second routine will be called at the end of every turn and simply checks to see if there are any ???-type Pokémon, and then changes them back to Flying types.
.text
.align 2
.thumb
.thumb_func

HandlePoke1:
push {r0-r5}
mov r3, #0x9
ldr r1, .Poke1Type
ldrb r0, [r1]
ldrb r2, [r1, #0x1]
cmp r0, r3
beq Poke1ChangeType1
cmp r2, r3
beq Poke1ChangeType2
b HandlePoke2

Poke1ChangeType1:
mov r4, #0x2
strb r4, [r1]
cmp r2, r3
beq Poke1ChangeType2
b HandlePoke2

Poke1ChangeType2:
mov r4, #0x2
strb r4, [r1, #0x1]
b HandlePoke2

HandlePoke2:
ldr r1, .Poke2Type
ldrb r0, [r1]
ldrb r2, [r1, #0x1]
cmp r0, r3
beq Poke2ChangeType1
cmp r2, r3
beq Poke2ChangeType2
b HandlePoke3

Poke2ChangeType1:
mov r4, #0x2
strb r4, [r1]
cmp r2, r3
beq Poke2ChangeType2
b HandlePoke3

Poke2ChangeType2:
mov r4, #0x2
strb r4, [r1, #0x1]
b HandlePoke3

HandlePoke3:
ldr r1, .Poke3Type
ldrb r0, [r1]
ldrb r2, [r1, #0x1]
cmp r0, r3
beq Poke3ChangeType1
cmp r2, r3
beq Poke3ChangeType2
b HandlePoke4

Poke3ChangeType1:
mov r4, #0x2
strb r4, [r1]
cmp r2, r3
beq Poke3ChangeType2
b HandlePoke4

Poke3ChangeType2:
mov r4, #0x2
strb r4, [r1, #0x1]
b HandlePoke4

HandlePoke4:
ldr r1, .Poke4Type
ldrb r0, [r1]
ldrb r2, [r1, #0x1]
cmp r0, r3
beq Poke4ChangeType1
cmp r2, r3
beq Poke4ChangeType2
b End

Poke4ChangeType1:
mov r4, #0x2
strb r4, [r1]
cmp r2, r3
beq Poke4ChangeType2
b End

Poke4ChangeType2:
mov r4, #0x2
strb r4, [r1, #0x1]
b End

End:
pop {r0-r5}
ldr r0, .ReturnAddress
bx r0


.align 2
.Poke1Type: .word 0x02023C05
.Poke2Type: .word 0x02023C5D
.Poke3Type: .word 0x02023CB5
.Poke4Type: .word 0x02023D0D
.ReturnAddress:	.word 0x08013BD5
6. At the following offsets, replace the pointers to instead point to the second routine +1:

0x13BBC
0x18254

Remember to add +1 to the routine's offset; this is NOT the case in the Emerald version.

And now we have a fully working Roost with Generation IV's effect, and the AI can use it properly too, since we're using Recover's battle script slot, but the battle script is designed so that Recover will still function separately from Roost.

A couple things to note, this routine replicates the Generation IV effect of Roost where if the user was pure-Flying, it would become ??? type upon using Roost. In Generation V+, a pure-Flying type using Roost would become Normal-type.. If anyone wants to mod my routine to have the Generation V effect, feel free to do so.

Credits:
Chaos Rush - creating the original
DoesntKnowHowToPlay - for the idea of the method to achieve this
Tchlatli - Chaos Rush looked at his custom Protean code to figure out how to correctly calculate the type offset of the attacking Pokémon
JPAN - documentation on FireRed battle-related RAM offsets

To verify that it's working properly, here are some useful RAM offsets:
02023BE4 - Battle Data (check out this post to see how its structured.)

02023C05 - Your(1) Type 1
02023C06 - Your(1) Type 2

02023C5D - Opponent(1) Type 1
02023C5E - Opponent(1) Type 2

02023CB5 - Your(2) Type 1
02023CB6 - Your(2) Type 2

02023D0D - Opponent(2) Type 1
02023D0E - Opponent(2) Type 2

-------------------

This probably has some mistakes, so feel free to correct me. It appears to work in-game properly without any bugs or side-effects, but who knows? If you find something out, please do tell me! This was my first real excursion into disassembly, etc. so it likely won't be perfect.

Edit:

Here's the animation, it's just a hybrid of Featherdance and the healing animation:

00 A3 27 00 2F 27 00 1E 28 0A 03 29 19 C3 00 3F 04 00 02 00 6C 3E 08 80 08 00 00 F0 FF 40 00 02 00 68 00 28 2C 20 00 01 00 04 06 02 00 6C 3E 08 80 08 00 00 F0 FF 20 00 02 00 68 00 28 2C 20 00 01 00 02 00 6C 3E 08 80 08 00 00 F0 FF 00 00 02 00 68 00 28 2C 20 00 01 00 04 06 02 00 6C 3E 08 80 08 00 00 F0 FF E0 00 02 00 68 00 28 2C 20 00 01 00 02 00 6C 3E 08 80 08 00 00 F0 FF 80 00 02 00 68 00 28 2C 20 00 01 00 04 06 02 00 6C 3E 08 80 08 00 00 F0 FF C0 00 02 00 68 00 28 2C 20 00 01 00 02 00 6C 3E 08 80 08 00 00 F0 FF A0 00 02 00 68 00 28 2C 20 00 01 00 04 06 02 00 6C 3E 08 80 08 00 00 F0 FF A0 00 02 00 68 00 28 2C 20 00 01 00 04 06 02 00 6C 3E 08 80 08 00 00 F0 FF 60 00 02 00 68 00 28 2C 20 00 01 00 05 0B 02 0D 04 01 0E C9 56 1D 08 05 08 02 80 76 3E 08
And here's a video demonstrating the full package in action:
Advertiser Content