The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Emerald - Use HMs without teaching them (https://www.pokecommunity.com/showthread.php?t=419329)

McPaul March 22nd, 2019 5:33 AM

Emerald - Use HMs without teaching them
 
Hello!

I'm currently trying to hack Pokémon Emerald. As I'm a beginner, it's more a succession of tests than a real project.

What I want to do is to make a Pokémon able to use the HMs it can potentially learn on the field without actually knowing them.

I think when you select a Pokémon in your party or when you click A before a tree/water/boulder/etc. it checks if a Pokémon learned the move.

Instead, I want the check to be if the Pokémon CAN learn the field move instead of actually knowing it.

For example, Nincada can learn Cut, Flash, Dig and Secret Power. If I have a Nincada in my team, when I select it, Cut, Dig, Flash and Secret power should appear and when I'm in front of a Cut Tree or a Secret Base and click A, should be able to use the moves.

My English is not perfect so I hope you understood and that someone could help me find a path to what I desire.

Thank you very much.

McPaul March 24th, 2019 5:58 AM

I resorted to another way, creating items for this purpose.

https://www.noelshack.com/2019-12-7-1553435740-a.png

https://www.noelshack.com/2019-12-7-1553435740-aa.png

But I still have a problem: the animation showing your Pokémon using the HM. I saw a tutorial fot this a week ago but I can't hell find it again. How would you do this?

https://www.noelshack.com/2019-12-7-1553435740-aaa.png

McPaul March 24th, 2019 8:16 AM

I perfectly managed to create the items for Cut, Strength and Rock Smash but I have trouble for Fly, Surf, Waterfall and Dive as the script aren't available on Advance Map and can't find them.

As well as to associate the field moves to the items.

Avara March 26th, 2019 12:08 AM

Here are the HM script offsets if it helps you out:

Cut: 2906BB
Surf: 271EA0
Strength: 2908BA
Rock Smash: 2907A6
Waterfall: 290A49
Dive: 290B0F
Resurfacing from Dive: 290B5A

Fly & Flash are a bit different since they're called exclusively from the party menu rather than the overworld x

McPaul March 26th, 2019 12:51 AM

Thank you very much it helps a lot!

I'll eventually create a tutorial for item-HMs and I'll credit you of course!

Now I'll have to find how to cut the HM animation where the party-Pokémon appears and how to make my Charizard-item able to fly. I'll completely erase Flash from my game and there won't be dark places.

McPaul March 27th, 2019 8:18 AM

Well, I have trouble with the SURF script. I modified the script the same way as the others, but when I click a in front of water nothing happens unless I have a Pokémon with SURF in my party (although I removed the checkattack and bufferpartypokemon)

Here is my script:

'---------------
#org 0x271EA0
checkitem 0x15F 0x1
compare 0x800D 0x6
if 0x1 goto 0x8271ED6
bufferitem 0x0 0x15F
lockall
msgbox 0x8272FD6 0x5 '"The water is dyed a deep blue[.]\n..."
compare 0x800D 0x0
if 0x1 goto 0x8271ED5
msgbox 0x827300D 0x4 '"[player] used [buffer1]!"
doanimation 0x9
releaseall
end

'---------------
#org 0x271ED6
end

'---------------
#org 0x271ED5
releaseall
end


'---------
' Strings
'---------
#org 0x272FD6
= The water is dyed a deep blue[.]\nWould you like to SWIM?

#org 0x27300D
= [player] used [buffer1]!


And the original script:

'---------------
#org 0x271EA0
checkattack 0x39
compare 0x800D 0x6
if 0x1 goto 0x8271ED6
bufferpartypokemon 0x0 0x800D
setanimation 0x0 0x800D
lockall
msgbox 0x8272FD6 0x5 '"The water is dyed a deep blue[.]\n..."
compare 0x800D 0x0
if 0x1 goto 0x8271ED5
msgbox 0x827300D 0x4 '"[buffer1] used SURF!"
doanimation 0x9
releaseall
end

'---------------
#org 0x271ED6
end

'---------------
#org 0x271ED5
releaseall
end


'---------
' Strings
'---------
#org 0x272FD6
= The water is dyed a deep blue[.]\nWould you like to SURF?

#org 0x27300D
= [buffer1] used SURF!


What did I do wrong? And where on earth can I find the scripts of the field moves in the party menu?

Uncommon March 27th, 2019 6:37 PM

Quote:

Originally Posted by McPaul (Post 9998525)
What did I do wrong? And where on earth can I find the scripts of the field moves in the party menu?

You might want to take a look at my HM type-check hack. It's for FireRed, but it's very similar to what you're doing. In particular, if you're looking for the HM scripts, they're all in that post (except Dive as it doesn't exist in FireRed).

McPaul March 27th, 2019 10:51 PM

Thanks, I'll try to look at your scripts. But first I'll have to look how all this asm thing that seems pretty popular atm works.

Just A Remixer March 31st, 2019 3:13 AM

Neat. That's all I got to say for now


All times are GMT -8. The time now is 9:14 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.