Originally Posted by Spherical Ice
[ Original Post ]
You can just use Aurora Beam's effect for Play Rough.
Huh, the more I know. I never was lucky enough to lower a foe's Attack stat using Aurora Beam, so I just thought it has a low chance of either freezing or lowering the foe's speed, like normal Ice attacks. xD
By the way, the following moves also require custom Effects: Boomburst, Bulldoze, Discharge, Lava Plume, Parabolic Charge, Petal Blizzard, Searing Shot, Sludge Wave and Surf (needs to be updated). They do not work properly with their current effect, as they are supposed to hit Both Foes AND the allied Pokemon similar to Earthquake.
I have managed to make Surf work so it hits Ally + Target 1 + Target 2, the problem is that it does not recognise the ally's Water Absorb. I guess it's the same with Flash Fire and Volt Absorb when using Lava Plume and Discharge. Is there theoretically any way to get around this without using ASM?
Just tried your Growth/Work Up/Rototiller script and spotted a few bugs. First one was growth sharply increasing Att. And Sp. Att when not Sunny (I fixed this by adding the goto @workup in red), probably just a simple oversight in the code.
Also, I got some problems with Rototiller, it seems to freeze directly after printing the second status message, just as it goes to @Return.
Here is the Script I used. I've double checked it to make sure all Offsets are ok with the original Flower Shield Script. Everything is working fine except that last little part where it freezes :(
By the way, the following moves also require custom Effects: Boomburst, Bulldoze, Discharge, Lava Plume, Parabolic Charge, Petal Blizzard, Searing Shot, Sludge Wave and Surf (needs to be updated). They do not work properly with their current effect, as they are supposed to hit Both Foes AND the allied Pokemon similar to Earthquake.
I have managed to make Surf work so it hits Ally + Target 1 + Target 2, the problem is that it does not recognise the ally's Water Absorb. I guess it's the same with Flash Fire and Volt Absorb when using Lava Plume and Discharge. Is there theoretically any way to get around this without using ASM?
(I'll post the BSP when I get back home)
Just tried your Growth/Work Up/Rototiller script and spotted a few bugs. First one was growth sharply increasing Att. And Sp. Att when not Sunny (I fixed this by adding the goto @workup in red), probably just a simple oversight in the code.
Also, I got some problems with Rototiller, it seems to freeze directly after printing the second status message, just as it goes to @Return.
Here is the Script I used. I've double checked it to make sure all Offsets are ok with the original Flower Shield Script. Everything is working fine except that last little part where it freezes :(
Boomburst doesn't need a custom effect. Just use 147. The Dig hit I believe is tied to Earthquake's ID not the Move Script. But I can't guarantee. If that is the case just copy it.
Thanks for spotting that with Growth. Rototiller works fine for me. I'll compare it against my BS to see if anything's different.
Here are the updated Gyro Ball and Electro Ball effects.
Fire Red
Spoiler:
You will need to have inserted either the Turn Order Loader that KDS recently made located here, OR if you want the included new moves, items and abilities, the routine found here
Then you will need to make a Battle Script in the same way as Flail, with a Callasm to the following routine replacing the AC command for Flail.
To make Gyro Ball work you'll need to find its index (make sure it is even) and replace B4 in the base power calculation, with half of the index for the move. In my Rombase Gyro Ball is move 168, which B4 is half of. So if your index is 178 it would be BC, etc.
Emerald
Spoiler:
You will need to have inserted either the Turn Order Loader that KDS recently made and Kleenex ported located here, OR if you want the included new moves, items and abilities, the routine found here
Then you will need to make a Battle Script in the same way as Flail, with a Callasm to the following routine replacing the AC command for Flail.
To make Gyro Ball work you'll need to find its index (make sure it is even) and replace B4 in the base power calculation, with half of the index for the move. In my Rombase Gyro Ball is move 168, which B4 is half of. So if your index is 178 it would be BC, etc.
Old Post: There's really no benefit to using this, but I'll just leave this here for interest's sake.
Spoiler:
So I've got Gyro Ball and Electro Ball effects working in Fire Red and Emerald.
I'd like to thank HidoranBlaze for pushing me to make it, and testing out the code for me, identifying all its bugs that have since been fixed.
Fire Red
Spoiler:
Firstly you'll need to insert 01 48 00 47 00 00 xx xx xx 08 at 15096, where xx xx xx is the pointer to the following routine plus one.
To make Gyro Ball work you'll need to find its slot (make sure it is even) and replace B4 in the base power calc, with half of the index for the move.In my Rombase it's move 168, which B4 is half of. So if yours is 178 it would be BC, etc.
Emerald
Spoiler:
Firstly you'll need to insert 01 48 00 47 00 00 xx xx xx 08 at 3D2D6, where xx xx xx is the pointer to the following routine plus one.
To make Gyro Ball work you'll need to find its slot (make sure it is even) and replace B4 in the base power calc, with half of the index for the move.In my Rombase it's move 168, which B4 is half of. So if yours is 178 it would be BC, etc.
EDIT: Having talked with Doesn't, I realised that this method does not account for things like Scary Face and Thunder Wave happening in the same turn the user uses Gyro Ball. As such I am rewriting it based upon Doesnt's suggestions. If this isn't a huge concern to you, feel free to use it as it is, but as I said, it won't work in every situation.
Additionally the updated code will likely also come with Trick Room and Tailwind. Which is something to look forward to.
I've been trying to port your Heavy Slam to Emerald, but I can't get it to deal more than 40 Base Damage. I've made sure to change 0x24 to 0x20 and the RAM offsets work for Doesn'ts Stored Power and Punishment. 0xE is the byte that determines weight just as in Fire Red.
Any ideas what could be going wrong? I tried to use Flail as script as well (which I guess is more optimized) and got the same result, 40 Damage no matter what weight I set on my test mon.
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global heavyslam
main:
push {lr}
ldr r0, userBank
ldrb r0, [r0]
ldr r1, battleData
mov r2, #0x58
mul r0, r2
add r3, r0, r1
ldr r0, targetBank
ldrb r0, [r0]
mul r0, r2
add r4, r0, r1
ldrb r5, [r3, #0x0]
ldrb r6, [r4, #0x0]
ldr r1, dexData
mov r2, #0x20
mul r5, r2
add r0, r1, r5
ldrh r5, [r0, #0xE]
mul r6, r2
add r0, r1, r6
ldrh r6, [r0, #0xE]
mov r2, #0x5
mul r2, r6
cmp r5, r2
bgt set120
sub r2, r6
cmp r5, r2
bgt set100
sub r2, r6
cmp r5, r2
bgt set80
sub r2, r6
cmp r5, r2
bgt set60
mov r1, #0x28
b end
set60:
mov r1, #0x3C
b end
set80:
mov r1, #0x50
b end
set100:
mov r1, #0x64
b end
set120:
mov r1, #0x78
end:
ldr r2, basePower
strh r1, [r2, #0x0]
pop {r0}
bx r0
.align 2
targetBank: .word 0x0202420C
userBank: .word 0x0202420B
battleData: .word 0x02024084
basePower: .word 0x02024400
dexData: .word 0x0856B5B0
I've been trying to port your Heavy Slam to Emerald, but I can't get it to deal more than 40 Base Damage. I've made sure to change 0x24 to 0x20 and the RAM offsets work for Doesn'ts Stored Power and Punishment. 0xE is the byte that determines weight just as in Fire Red.
Actually there is some problem in the ASM. I'll look to fix it.
EDIT: Here is the corrected code for Emerald. Will update the OP of the ASM later.
Hey KDS, in the process of translating your ASM routines to Emerald, but these recurring RAM locations I can't seem to find. I've tried to find similar RAM pointers in the Emerald ROM tracing pointers in a HEX-editor and thought I found them, but the effect just freezes the game so I must be wrong.
Would you mind telling me how you found these locations in Fire Red so I can do the same in Emerald, or if you happen to have the Emerald RAM locations written down somewhere?
Hey KDS, in the process of translating your ASM routines to Emerald, but these recurring RAM locations I can't seem to find. I've tried to find similar RAM pointers in the Emerald ROM tracing pointers in a HEX-editor and thought I found them, but the effect just freezes the game so I must be wrong.
Would you mind telling me how you found these locations in Fire Red so I can do the same in Emerald, or if you happen to have the Emerald RAM locations written down somewhere?
Thanks!
These pointers are actually pointer to the actual pokemon party structure rather than battle structure pointers.
I' ll tell you for Emerald:-
Slot 1 - [0x020244EC(for US) or 0x02024190(other Emerakd)]+0x50
Slot 2 - 0x02024744 + 0x50
Slot 3 - [0x020244EC(for US) or 0x02024190(other Emerakd)]+0x50+0x64
Slot 4 - 0x02024744 + 0x50 + 0x64
Sorry for double-post, but I would like to report a potential glitch.
This move effects works fine except it doesn't remove the SLP Icon after using Wake-Up Slap. Does it work for you on your system?
I saw a similar report on MrDS ROM-base which I assume uses the same Battle Script.
Sorry for double-post, but I would like to report a potential glitch.
This move effects works fine except it doesn't remove the SLP Icon after using Wake-Up Slap. Does it work for you on your system?
I saw a similar report on MrDS ROM-base which I assume uses the same Battle Script.
It is working properly in my system. You might be getting glitches because of large scripts, BSP sometimes messes up the dynamic pointers. So try to the check script in the hex editor, correct the pointers and then check if the script is being able to decompile again in BSP without problems.
It is working properly in my system. You might be getting glitches because of large scripts, BSP sometimes messes up the dynamic pointers. So try to the check script in the hex editor, correct the pointers and then check if the script is being able to decompile again in BSP without problems.
I also get this issue, could you perhaps post the hex dump of your scripts?
At VV VV VV:
2E 20 C0 03 02 DD 2E 21 C0 03 02 DD 2E 22 C0 03 02 DD 2E 23 C0 03 02 08 10 84 01 12 20 00 2E 85 3E 02 02 04 18 00 29 00 6C 3D 02 02 00 WW WW WW 08 29 00 6C 3D 02 02 01 XX XX XX 08 29 00 6C 3D 02 02 02 YY YY YY 08 29 00 6C 3D 02 02 03 ZZ ZZ ZZ 08
At WW WW WW:
36 D4 42 02 02 FF 98 00 28 4E 69 1D 08
At XX XX XX:
36 7C 40 02 02 FF 98 00 28 4E 69 1D 08
At YY YY YY:
36 38 43 02 02 FF 98 00 28 4E 69 1D 08
At ZZ ZZ ZZ:
36 E0 40 02 02 FF 98 00 28 4E 69 1D 08
String at DD DD DD:
FD 10 00 EB D5 E7 FE D8 D9 DA E6 E3 E7 E8 D9 D8 AB FF
I have actually made some changes in these script to improve some message formatting and sequence of events. The scripts in the OP are also updated now.
At VV VV VV:
2E 20 C0 03 02 DD 2E 21 C0 03 02 DD 2E 22 C0 03 02 DD 2E 23 C0 03 02 08 10 84 01 12 20 00 2E 85 3E 02 02 04 18 00 29 00 6C 3D 02 02 00 WW WW WW 08 29 00 6C 3D 02 02 01 XX XX XX 08 29 00 6C 3D 02 02 02 YY YY YY 08 29 00 6C 3D 02 02 03 ZZ ZZ ZZ 08
At WW WW WW:
36 D4 42 02 02 FF 98 00 28 4E 69 1D 08
At XX XX XX:
36 7C 40 02 02 FF 98 00 28 4E 69 1D 08
At YY YY YY:
36 38 43 02 02 FF 98 00 28 4E 69 1D 08
At ZZ ZZ ZZ:
36 E0 40 02 02 FF 98 00 28 4E 69 1D 08
String at DD DD DD:
FD 10 00 EB D5 E7 FE D8 D9 DA E6 E3 E7 E8 D9 D8 AB FF
I have actually made some changes in these script to improve some message formatting and sequence of events. The scripts in the OP are also updated now.
KDS, I believe I posted a Setword Battle Scripting command, that I use as command FA. so you don't need to buffer each individual byte. Saves space and makes scripting easier. I think it's with my Geomancy one.
KDS, I believe I posted a Setword Battle Scripting command, that I use as command FA. so you don't need to buffer each individual byte. Saves space and makes scripting easier. I think it's with my Geomancy one.
Actually, in my version of bsp there is a setword command that actually decomposes into 4 setbyte commands, just like the calculatedamage commands break into command no (5,6,7,8). If you see my original script of wakeup slap, there is a setword command to set the string. On your geomancy post I can't seem to find the link to the setword command (maybe because I am using a phone to post this).
Actually, in my version of bsp there is a setword command that actually decomposes into 4 setbyte commands, just like the calculatedamage commands break into command no (5,6,7,8). If you see my original script of wakeup slap, there is a setword command to set the string. On your geomancy post I can't seem to find the link to the setword command (maybe because I am using a phone to post this).
I've been using your new script with Wake-Up Slap. The issue is that when I give Spore + Wake-Up slap to a wild Pokemon and have it use it on my Pokemon, everything is flawless and the SLP icon disappears. However, when I give Spore and Wake-Up Slap to my own Pokemon, put a wild pokemon to sleep, and wake-up slap it, it wakes up but the SLP icon is still there.
Have you tried both of these ways on your system and gotten them to work?
I've been using your new script with Wake-Up Slap. The issue is that when I give Spore + Wake-Up slap to a wild Pokemon and have it use it on my Pokemon, everything is flawless and the SLP icon disappears. However, when I give Spore and Wake-Up Slap to my own Pokemon, put a wild pokemon to sleep, and wake-up slap it, it wakes up but the SLP icon is still there.
Have you tried both of these ways on your system and gotten them to work?
Mine definitely works when I use spore + wakeup slap on the opponent. Can you VM or PM me your version of the hex dump, so that i can check it?
----------------------------------------------------- To fix Spite's reduction to 4 PP
Spoiler:
Fire Red
At 2A55A: 04 D8 90 E0 00 00 00 00 00 00 00 00 04 26
Emerald ports for Taunt, Encore and Disable (Credits to Doesnt for the FR ones from which I
found the Emerald ones easily).
Spoiler:
Taunt's duration is controlled by the byte at x54DB6; change it to 04 for BW's length.
To fix Encore at 4 turns, insert 00 00 00 00 at x529EE and x529FE.
To fix Disable at 4 turns, insert 00 00 00 00 at x528B6 and x528C6.
Facade's ignore burn effect on attack (Fire Red Only):
Spoiler:
Important things :-
1. Only works for DoesntKnowHowToPlay's Fire Red PSS Split patch.
2. Make sure before making the hex edits, the region (x3F32c - x3F397) is filled with 00's
only, otherwise you will have to perform a hook or extra logic instead of directly
inserting these hex bytes).
3. Also make sure that facade's vanilla battle script is intact and not altered.
Anyways, the hex edits:
At x3F326: 27 E0 (branch to x3F378)
At x3F378:
F0 6C 10 21 08 40 00 28 16 D0 09 99 08 78 3E 28 12 D0 05 49 09 88 0C 20 41 43 04 48 40 18
01 78 A9 29 09 D0 05 E0 00 00 4C 3D 02 02 XX XX XX 08 00 00 (XX XX XX is location of your
move table )
I also have made some changes to Hidden Power so check its OP again.
However, I can't manage to get "The Moved Failed" in my script. It just shows "XX Used Sucker Punch" and then nothing
(everything works fine, just that this textstring doesn't come up). I've tried to add Resultmessage and missmessage
after the callasm, but neither of that worked.
Do I need to add a printstring somewhere? Sorry if noobish question.
Actually jambo's callasm increments your script pointer by 5 regardless of whether you made change in the Script
Pointer, so you should subtract it by 5 i.e change 0x082D9F1C to 0x082D9F17 in the ASM then your message should appear.
Also updated the Script Pointer of the Second ASM of Acupressure to reflect this type of change in the OP
---------------------------------------------------------------------------------------------------
-- Now this post contains very important fixes to some of my move effects, and a few useful stuff also.
--------------------------------------------------------------------------------------------------- 1. Emerald port for Battle String Loader (credits to Jambo51 for original one)
Spoiler:
Byte Changes
0x14E6C0: 01 49 08 47
0x14E6C8: XX+1 XX XX 08 (Pointer to routine)
0x202C4D0 is chosen as the free RAM space to set the position of required string (if there any flaw in this location,
then please notify with the reason), it is placed similar as 0x203C020 in Fire Red.
Use this offset in setword command to setup your battle string
---------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------- 2. Incinerate (Destroys target's berry completely)
Instead of checking the index, the way to check whether an item is a berry or not is to check its pocket number (5 for
FR and 4 for Emerald) and there is an preexisting command that clears the item of banked pokemon (so no need for
---------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------- 3. Hi Jump Kick (Now it crashes due to type immunity also)
(Remove the Bold Lines in the Script if you don't have Magic Guard)
---------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------- 4. Cure Primary Status Command Some points about it:-
--> It is custom command created by me to cure any primary status of banked Pokemon.
--> It is actually a mod of the cureifburnparalysedpoisoned to command to support curing of any status and adds the
functionality of selecting banks to too.
--> It provides an efficient way to cure any primary status of a Pokemon. My fixed Wake-Up Slap, Scald and Psycho Shift
use this now (I might have missed some flags in my previous methods for simulating these but this command addresses all
those issues).
--> It can also be handy for simulating Bug Bite and Healer ability.
--> It branches to an address mentioned in the command if the banked Pokemon does suffer from a primary status (added
2. Add another entry to your repointed command table containing the offset to this ASM + 1.
3. Add this entry in commands.bsh in BSP for our new command
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
I recommend to use the new scripts for Wake-Up Slap and Scald with this new command.
--------------------------------------------------------------------------------------------------- 5. Wake-Up Slap (With the custom command)
---------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------- 7. Scald (Thaw user, thaw foe & chance to burn (don't burn if foe is thawed by Scald) & Hook with effect 125 to thaw
--------------------------------------------------------------------------------------------------- 1. Emerald port for Battle String Loader (credits to Jambo51 for original one)
Spoiler:
Byte Changes
0x14E6C0: 01 49 08 47
0x14E6C8: XX+1 XX XX 08 (Pointer to routine)
PS : I wanted to created an effect like Judgment, but I don't know if there is a function to set the attack's type. And I don't remember the function to check the held object. Also, is it possible to change the ratio of drained HP in the drain effect, in order to make Oblivion Wing ? Thanks.
PS : I wanted to created an effect like Judgment, but I don't know if there is a function to set the attack's type. And I don't remember the function to check the held object. Also, is it possible to change the ratio of drained HP in the drain effect, in order to make Oblivion Wing ? Thanks.
You'll need ASM for all of these things since there are no dedicated commands for these. You can use Jambo's callasm command to put custom ASM in a battle script.