• 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

Trainer 781

Guest
0
Posts
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.
Spoiler:

Constant Base Power Hidden Power:
Just place these bytes:

Fire Red:
At 0x2B712: 07 E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Emerald:
At 0X544C0: 07 E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Now, it saves some processor cycles and set the base power directly in the move editor.
 
Last edited:
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
Code:
#org @slot1
bicbyte 0x20242D4 0xFF
goto @thawdisp

#org @slot2
bicbyte 0x202407C 0xFF
goto @thawdisp

#org @slot3
bicbyte 0x2024338 0xFF
goto @thawdisp

#org @slot4
bicbyte 0x20240E0 0xFF
goto @thawdisp


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!
 

Trainer 781

Guest
0
Posts
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

And here is the link for the pokemon data structure:
http://bulbapedia.bulbagarden.net/wiki/Pokémon_data_structure_in_Generation_III
 
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
Made an animation for Electro Ball

Emerald
Spoiler:
 
Last edited:
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
Wake-up Slap (Improved):

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.
 

Trainer 781

Guest
0
Posts
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.
 
5,256
Posts
16
Years
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?
 

Trainer 781

Guest
0
Posts
I also get this issue, could you perhaps post the hex dump of your scripts?

Sure, here are 2 in hex format.
WAKE-UP SLAP:-

Spoiler:


SCALD:-(hook this with 125)
Spoiler:


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.
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
Sure, here are 2 in hex format.
WAKE-UP SLAP:-

Spoiler:


SCALD:-(hook this with 125)
Spoiler:


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.
 

Trainer 781

Guest
0
Posts
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).
 
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
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?
 

Trainer 781

Guest
0
Posts
Welp, I deleted this message by accident in process of editing it for adding something new. x0

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:


Emerald ports for Taunt, Encore and Disable (Credits to Doesnt for the FR ones from which I
found the Emerald ones easily).

Spoiler:


Facade's ignore burn effect on attack (Fire Red Only):

Spoiler:



I also have made some changes to Hidden Power so check its OP again.
 
Last edited:

Trainer 781

Guest
0
Posts
.FailScript: .word 0x082D9F1C


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:


---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
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

encrypt-er decry-pt-er calls in the ASM).

First add this entry in commands.bsh in BSP
Code:
#command removeitem 0x6A 0x1 "Bank" 0x1

Fire Red:-
Spoiler:


Emerald:-
Spoiler:


String at DDDDDD (Common to both):
Code:
FD 10 B3 E7 00 FD 16 FE EB D5 E7 00 D6 E9 E6 E2 E8 00 E9 E4 AB

---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
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)

Fire Red:-
Spoiler:


Emerald:-
Spoiler:


---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
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

for safety)

STEPS To Add This:

1. Insert this ASM somewhere

Fire Red:-
Spoiler:


Emerald:-
Spoiler:


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
Code:
#command cureprimarystatus 0xF9 0x2 "Bank" 0x1 "Fail Address" 0x4

Then you are set to use this.

---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
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)

Fire Red:-
Spoiler:


Emerald:-
Spoiler:


String at DDDDDD:
Code:
FD 10 00 EB E3 DF D9 00 E9 E4 AB FF

---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
6. Psycho Shift (Type Immunity check in Paralysis removal)

Fire Red:-
Spoiler:


Emerald:-
Spoiler:


---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
7. Scald (Thaw user, thaw foe & chance to burn (don't burn if foe is thawed by Scald) & Hook with effect 125 to thaw

user)

Fire Red:-
Spoiler:


Emerald:-
Spoiler:


(OPTIONAL) Updating of defrost message to thaw message

Fire Red:-
At x3FB6D6 and x3FB6E8 place E8 DC D5 EB D9 D8 00 E3 E9 E8 AB 00 00 00 FF

Emerald:-
At x5C9F46 and x5C9F58 place E8 DC D5 EB D9 D8 00 E3 E9 E8 AB 00 00 00 FF
 
252
Posts
10
Years
  • Age 27
  • Seen Jul 6, 2019
---------------------------------------------------------------------------------------------------
1. Emerald port for Battle String Loader (credits to Jambo51 for original one)
Spoiler:
Don't really want to burst your bubble, but I actually ported that to EM a while ago :p

Nice work with the battle scripts though!
 

Trainer 781

Guest
0
Posts
Don't really want to burst your bubble, but I actually ported that to EM a while ago :p

Nice work with the battle scripts though!

Alright, then its very good. I couldn't find one so I made one myself.
 
457
Posts
10
Years
  • Age 28
  • Seen Mar 17, 2024
Emerald Shadow Claw animation:
Spoiler:

Simply combined Crush Claw and shadow background. Hope you like this simplicity but it suits well.
 
116
Posts
16
Years
Here are Worry Seed and Fairy Wind animation for Emerald which I'm going to share, I translated them from MrDollSteak's Rombase:

Worry Seed:
Spoiler:


Fairy Wind:
Spoiler:
 
40
Posts
9
Years
Hello, I ported some effects you made for Fire Red to Emerald.

Blizzard Updated :
Spoiler:


Charge Updated :
Spoiler:


Freeze Shock Ice Burn and Sky Attack :
Spoiler:


Geomancy :
Spoiler:


Hex :
Spoiler:


Venoshock :
Spoiler:


Knock Off Updated :
Spoiler:


Toxic Updated :
Spoiler:


I also made one effect by myself. (For Emerald too).

U-Turn :
Spoiler:


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.
 

Trainer 781

Guest
0
Posts
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.
 
Back
Top