• 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

218
Posts
10
Years
  • Seen Nov 12, 2021
Spoiler:
Spoiler:
 
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
Changing type seems to work, but not Base power

You are using the wrong RAM pointer for Base power.

Instead of 020244E0, use 02024400.

I ported Chaos Rush's Natural gift to Emerald and used the same offsets as you do except for this Base power change, so I assume it should work for Judgement as well. When setting power in G3T/PGE, just set it as 0 and the routine will calculate it for you.

EDIT: Tried to change mine to 020244E0 and the Base Power no longer worked.
 
Last edited:
218
Posts
10
Years
  • Seen Nov 12, 2021
You are using the wrong RAM pointer for Base power.

Instead of 020244E0, use 02024400.

I ported Chaos Rush's Natural gift to Emerald and used the same offsets as you do except for this Base power change, so I assume it should work for Judgement as well. When setting power in G3T/PGE, just set it as 0 and the routine will calculate it for you.

EDIT: Tried to change mine to 020244E0 and the Base Power no longer worked.

Oh thanks to pointing me. But since then I made a new routine (few post above), far more simple than the chaos Rush one. And since a power of 100 is displayed for Judgment, it's much more approriated IMO. Though don't hesitate to post the good Natural Gift routine :)
 
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
Natural Gift for Emerald offsets collected:
(Follow Chaos Rush's post)

ASM 1

Spoiler:

ASM 2

Spoiler:

Fixed battle script for Volt Absorb etc.

Spoiler:

And the animation...
Spoiler:

---------------------------------------------------------
Play Nice, Emerald

Move Effect (Infinite Accuracy; Misses during Dig and Fly; Do not check the "affected by Protect" box; Attached to Growl's effect)

Spoiler:

I use this Animation

Spoiler:

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

In Emerald, to update Minimize to its Gen VI effect, Change 0x2D9867 to 27

-----------------------------------------
 
Last edited:
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017

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?
 
Last edited:
218
Posts
10
Years
  • Seen Nov 12, 2021
Made a routine that changes the attack into the user's primary type (Judgment...), here :

Spoiler:


Just callasm this routine before the attackcanceler in battle script. Pm if there is bug/problem/other
I think it's not optimized but whatever, it works. I'll see if I can change it

Edited, thanks KDS

Spoiler:

That that the routine judgment won't work for a move that is not 0x0 type and you want to change to 0x0 type. Exemple : You have an fire (0xA) attack that uses this routine, and your primary type is normal(0x0), then the attack won't be changed to normal. This is because the MemAddress if by default 0, so set 0 at this place doesn't change anything. I don't know how to fix it atm but it's not a huge issue since every attack that are supposed to change type are normal by default. Just wanted to note
 

Trainer 781

Guest
0
Posts
That that the routine judgment won't work for a move that is not 0x0 type and you want to change to 0x0 type. Exemple : You have an fire (0xA) attack that uses this routine, and your primary type is normal(0x0), then the attack won't be changed to normal. This is because the MemAddress if by default 0, so set 0 at this place doesn't change anything. I don't know how to fix it atm but it's not a huge issue since every attack that are supposed to change type are normal by default. Just wanted to note

Yes this happens because the 'type effectiveness calculator' command first checks the content of the dynamic memory location allocated for the type. If its content is zero, then it starts retrieving the type from the move table.
So in a nutshell, the content of the loc is 0x0 if you use a normal type mon, and then it reads from the move table picking up the fire type changing it to fire.
And I don't see the point of changing this unless you are going for a truly wacky custom move.
 
218
Posts
10
Years
  • Seen Nov 12, 2021
Update

It is now 100% working, Psystrike/Psyshock and Secret Sword effect :

Spoiler:
 
Last edited:

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
PsyStrike effect for Emerald :

Spoiler:

It swaps defense/defense special as well as the boost defense/def spe. Though it doesn't handle Fur coat/Marvel Scale. Other than that it's fine.
callasm this routine before AND after calculate damage.

With that Mewtwo will take down Blissey !

EDIT : A way to have a proper effect is to make the move physical, and rather than swaps the defense of the foe, you swap attacks/boosts of the user. This way ability the damage-reduced ability will be kept, so here is the second routine (which I advice to use) :

Spoiler:

So here you have to set the move "Physical" and it'll work exactly as expected, you still have to callasm this routine before AND after calculate damage in BSP.

I believe this won't actually take into account other multipliers. For example if you have x2 sp. atk. it's not going to correctly apply the damage. Because you'll be swapping say 160 attack with 320 sp atk. Instead of using an the sp.atk stat of 640, it'll use 320, because it's now treated as the attack stat.

The best way to do it as far as I can tell would be to have a check in the damage calculation for the move effect, as opposed to a custom battle script, which means you can place it after different multipliers. I'd probably find where it actually loads the 'fully treated' Sp. Attack of the user and Sp. Defense of the opponent, and just load the Defense stat instead.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Effect: Confide for Ruby...
Code:
2E 1E 60 01 02 94 28 27 72 1D 08

Effect: Acid Spray for Ruby...
Code:
2E 21 4D 02 02 B2 28 14 6F 1D 08
 
Last edited:

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
Dark Void effect :

Spoiler:

You branch the effect 1 to this script, you don't even have to select "both foes and parter", the script handles this.

I don't have an animation yet since I've never dealt with it. I'll try tu use luster purge, but with the color black instead of white, another font (the dark one should be right) and without the hits after-flash.

Any help would be appreciated.

The move doesn't put your partner to sleep. Only your two opponents.
Also shouldn't you include a move check at the start, otherwise every single sleep move is going to hit both foes.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Yes and nope.

Everything works as it should afaik. It asleeps everyone (and check correctly safeguard/insomnia/already sleep etc) including parter. And yeah as I said you have to branch the effect 1 to this battlescript, but it's true that I wasn't accurate, I'll correct that.

Why? Dark Void only targets foes.

Dark Void
- Pokémon Hit in Battle: All opponent Pokémon in range

Source
 
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
Dark Void effect for Emerald

With damaging moves, it's enough to just set target as "both foes" in order to hit both opponents, while you have to make an entirely new script similar to that of earthquake if you want the move to also hit your ally.

Is this different with status moves? I've never really tried it out except for changing Poison Gas without testing. If it's the same, it should be enough to just use the original Hypnosis script and change the target to "both foes".

I don't have a save near a double battle to test with.
 
218
Posts
10
Years
  • Seen Nov 12, 2021
With damaging moves, it's enough to just set target as "both foes" in order to hit both opponents, while you have to make an entirely new script similar to that of earthquake if you want the move to also hit your ally.

Is this different with status moves? I've never really tried it out except for changing Poison Gas without testing. If it's the same, it should be enough to just use the original Hypnosis script and change the target to "both foes".

I don't have a save near a double battle to test with.

I actually thought that dark void was supposed to asleep everyone so I made this script. But testing with just selecting "both foe" deserves indeed a try.

EDIT : Oh yeah.. you're right, I guess I can delete my previous posts lol
 

Trainer 781

Guest
0
Posts
I actually thought that dark void was supposed to asleep everyone so I made this script. But testing with just selecting "both foe" deserves indeed a try.

EDIT : Oh yeah.. you're right, I guess I can delete my previous posts lol

IMO it should work, because 'target both foes' automatically re-runs the same battle script for differrent foes.
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
I actually thought that dark void was supposed to asleep everyone so I made this script. But testing with just selecting "both foe" deserves indeed a try.

EDIT : Oh yeah.. you're right, I guess I can delete my previous posts lol

I've noticed that with quite a few moves and abilities you haven't actually looked into their effects on Bulbapedia or somewhere. I don't want to call you out or anything, but please make sure you check this so it doesn't clutter threads with stuff haha.
 

Trainer 781

Guest
0
Posts
Freeze Dry
Spoiler:
 
Last edited:

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Effect: Fiery Dance / Charge Beam for Ruby...
Code:
[S]2E 21 4D 02 02 D2 28 14 6F 1D 08[/S] [I][SIZE="1"]- this one is bugged. use the code below.[/SIZE][/I]
2E 21 4D 02 02 52 28 14 6F 1D 08
Effect: Dragon Tail / Circle Throw for Ruby...
Code:
00 01 72 6F 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 5B 6F 1D 08 1E 00 15 08 94 1D 08 21 00 00 04 00 00 00 27 8F 1D 08 8F D6 83 1D 08 28 5B 6F 1D 08
 
Last edited:
Back
Top