PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Other Generations Hacking > Guides & Documentation

Guides & Documentation Learn how to make your own Pokémon game through the process of ROM Hacking, or help out the community by sharing your information.

Reply
 
Thread Tools Display Modes
Old 30th July 2014, 10:50 PM   #1
Sky0fBlades
Emerald Hacker
Moderator
 
Sky0fBlades's Avatar
 
Join Date: Sep 2012
Location: ż
Age: 24
Posts: 112
Sky0fBlades
Default [Emerald] Controlling Trainer Battle Music... Without ASM.

Controlling Trainer Battle Music in Pokemon Emerald... Without ASM

by Sky0fBlades
_________________________________


Supplies List:

☆ A Pokemon: Emerald ROM
XSE (Xtreme Script Editor) by HackMew
☆ Some basic scripting ability

Intro, and Method:

Hey again guys. Ever since I've gotten back into hacking I've been making all sorts of little 'discoveries' and whatnot and here's a good one that I managed to somehow pull off a long time ago but ever since then totally forgot how. I've noticed there's a few guides out there for this kind of thing but they either require ASM (assembly language) or a different ROM like FireRed. Some of us don't prefer having to use ASM, some aren't hacking FireRed. Basically, I needed to figure this out through trial and error - especially since I already knew it was possible. I think this is a different method than the one I used before... but whatever works, right? It's easy, here's how you do it:

----------
Make a trainer battle script that uses this format, and fill in the "?"s with what you want. All bold parts are very important things that seem to have to be in that order (just to make sure the song plays at the same time the battle does). In Italics are the comments (you can leave them there if you copy-paste), and the red parts are things you may/may not need to change:
Code:
#freespace 0xFF
#dynamic 0x9C0B20

#org @start
lock
faceplayer
checkflag 0x???? // *Has this trainer been beaten?
if 0x1 goto @nobattle
playsong 0x??? 0x0 // Trainer's intro theme.
msgbox @intro MSG_KEEPOPEN // You'll need to put this here, or the battle will start with no intro.
special 0x3E // Special that makes a default battle happen. Required.
playsong 0x??? 0x0 // What song you want during battle.
trainerbattle 0x0 0x??? 0x0 @intro @defeated
setflag 0x???? // *Trainer has been beaten.
release
end

#org @nobattle
msgbox @afterward MSG_KEEPOPEN
release
end

#org @intro
= Hi there. I can beat you. Easily.

#org @defeated
= You just killed me bro!

#org @afterward
= See you around. My team's wasted...
*= About the setflag commands... This script was mostly made for special trainer battles (ones where they don't challenge you on sight like the average route trainer). I tested it without the setflag and with a typical trainer ID and the battle could be repeated over and over without them, likely because of the additional commands in this script that aren't in normal battles.

Now, Special 0x3E is the real key here. It's purpose is to simply start a trainer battle that can be customized somewhat as long as things are in the right order. If you don't use it, as far as I know it will never give you the right results. It has specific equivalents in the other games (Ruby, FireRed), and you can find those in their special lists which have been publicized already.

EDIT: The values you use for "playsong" can be found in Advance-Map's "Musik_??.ini" files (be sure to find the correct game code: BPEE for the US Emerald ROM), and in Sappy's song list - though Sappy displays them in decimal instead of hex.

You should be able to pull off this same thing the same way with other types of trainer battles (double, gym), although it could work a little differently. Go ahead and experiment though, make things work for you. Thanks for reading.

UPDATE: Here's a script template I wrote for Gym Battles, which I posted later in this thread: http://romhackersonline.com/showpost...6&postcount=14

Last edited by Sky0fBlades; 18th March 2015 at 09:29 AM.
Sky0fBlades is offline   Reply With Quote
Sponsored Links
Old 31st July 2014, 01:58 AM   #2
Dark Sneasel
Anti-Swag
 
Join Date: Oct 2013
Location: Miami, FL
Age: 17
Posts: 42
Dark Sneasel
Default

Thank you very much, I was actually gonna look into this soon
I love you for this
Dark Sneasel is offline   Reply With Quote
Likes Sky0fBlades liked this post
Old 1st August 2014, 08:48 AM   #3
Sky0fBlades
Emerald Hacker
Moderator
 
Sky0fBlades's Avatar
 
Join Date: Sep 2012
Location: ż
Age: 24
Posts: 112
Sky0fBlades
Default

Quote:
Originally Posted by Dark Sneasel View Post
Thank you very much, I was actually gonna look into this soon
I love you for this
I'm glad you like it. As soon as I remembered how to do this trick, I couldn't wait to share it, especially because of how hard it is to find stuff like this. I plan to post some more guides in the near future.

Last edited by Sky0fBlades; 1st August 2014 at 09:02 AM.
Sky0fBlades is offline   Reply With Quote
Likes Dark Sneasel liked this post
Old 7th August 2014, 05:10 PM   #4
Bauerklos
Music Hacking Master
 
Bauerklos's Avatar
 
Join Date: Aug 2014
Location: Candyland
Age: 21
Posts: 19
Bauerklos
Default Is there any way to do this in FireRed?

Since I'm not hacking Emerald and that whole ASM thing gives me a headache, is there any way for this to work in Pokemon FireRed and LeafGreen?
Bauerklos is offline   Reply With Quote
Old 8th August 2014, 01:06 AM   #5
Sky0fBlades
Emerald Hacker
Moderator
 
Sky0fBlades's Avatar
 
Join Date: Sep 2012
Location: ż
Age: 24
Posts: 112
Sky0fBlades
Default

Quote:
Originally Posted by Bauerklos View Post
Since I'm not hacking Emerald and that whole ASM thing gives me a headache, is there any way for this to work in Pokemon FireRed and LeafGreen?
Crocky from PC wrote a tutorial like this for FireRed. Here it is. Anyway, the only real difference should theoretically be the value for 'special' in the script. Anything else is just possible differences in the script structure between the games.

Last edited by Sky0fBlades; 8th August 2014 at 01:24 AM.
Sky0fBlades is offline   Reply With Quote
Old 8th August 2014, 02:09 AM   #6
Bauerklos
Music Hacking Master
 
Bauerklos's Avatar
 
Join Date: Aug 2014
Location: Candyland
Age: 21
Posts: 19
Bauerklos
Default

Quote:
Originally Posted by Sky0fBlades View Post
Crocky from PC wrote a tutorial like this for FireRed. Here it is. Anyway, the only real difference should theoretically be the value for 'special' in the script. Anything else is just possible differences in the script structure between the games.
Thanks. I couldn't figure out ASM at all. Glad there are alternatives here and there.
Bauerklos is offline   Reply With Quote
Old 10th August 2014, 03:10 AM   #7
Dark Sneasel
Anti-Swag
 
Join Date: Oct 2013
Location: Miami, FL
Age: 17
Posts: 42
Dark Sneasel
Default

So I've been trying this (in a script tile, rather than a normal trainer) and the battle repeats itself. Know how to fix?
Dark Sneasel is offline   Reply With Quote
Old 10th August 2014, 09:42 PM   #8
Sky0fBlades
Emerald Hacker
Moderator
 
Sky0fBlades's Avatar
 
Join Date: Sep 2012
Location: ż
Age: 24
Posts: 112
Sky0fBlades
Default

Quote:
Originally Posted by Dark Sneasel View Post
So I've been trying this (in a script tile, rather than a normal trainer) and the battle repeats itself. Know how to fix?
Wierd, when I copied this script over to a tile it doesn't repeat once the custom flag is set (although for some reason with a script tile it makes the player face downwards after... May need 'applymovement' to fix that one). What var number + value are you using with the script tile? I may need to see the script also so I can find out what's going on.
Sky0fBlades is offline   Reply With Quote
Old 11th August 2014, 05:59 PM   #9
Bauerklos
Music Hacking Master
 
Bauerklos's Avatar
 
Join Date: Aug 2014
Location: Candyland
Age: 21
Posts: 19
Bauerklos
Default

Hello again, thanks for your help before by linking to Crocky's guide for this in FireRed.

Now, is there any way to do something like this for regional wild battle music without ASM?
Bauerklos is offline   Reply With Quote
Old 11th August 2014, 09:31 PM   #10
Sky0fBlades
Emerald Hacker
Moderator
 
Sky0fBlades's Avatar
 
Join Date: Sep 2012
Location: ż
Age: 24
Posts: 112
Sky0fBlades
Default

Quote:
Originally Posted by Bauerklos View Post
Hello again, thanks for your help before by linking to Crocky's guide for this in FireRed.

Now, is there any way to do something like this for regional wild battle music without ASM?
Unfortunately, I don't know of any way to do that without ASM. The only place I've seen it is in Jambo51's trainer music controlling guide (it includes changing the wild battle theme by region), which is with ASM and is for FireRed so I've never done it before.
Sky0fBlades is offline   Reply With Quote
Reply

Tags
asm, battle, controlling, emerald, music, trainer, [Tutorial]

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:39 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts