The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.

Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old August 7th, 2013 (04:15 PM).
Crocky's Avatar
Crocky
SuperScarlet!
 
Join Date: Feb 2009
Hey All,
Today I stumbled across this thread, which made me find out you can change the wild Pokémon music without ASM. I thought, hey, if you could do this with wild Pokémon, why not trainers?

Introducing the script that makes it all happen, using XSE:

Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
checktrainerflag 0x9
if 0x1 goto @alreadybattled
playsong 0x11D 0x0
msgbox @before 0x6
special 0x03B
playsong 0x10A 0x0
trainerbattle 0x0 0x9 0x0 @before @after
release
end

#org @alreadybattled
msgbox @beaten 0x6
release
end

#org @before
= Go, all my fight!

#org @after
= Tch!

#org @beaten
= Your good at this!


If you instert this into a FireRed game using XSE, you will find yourself in a battle with an unnamed cooltrainer who uses a level 5 Ekans, with the great Hoenn trainer battle music instead of the default Kanto trainer battle music. This is because the Hoenn Trainer battle music is still in the FRLG Game, and so are the leftover RS trainer sprites. (You can easily change the trainer you would like to battle, and the music to any music in the Fire Red game)

The way this script works is that it makes the trainer you are interacting with face you, then check to see if you already battled said trainer, because without this you can just re battle the trainer whenever you talk to them. If you didn't, it plays the male trainer encounter (this also can easily be changed) theme, and proceeds to enter the battle. It then plays your selected music for the battle and ends normally.

Currently, this script doesn't work when you give the trainer any amount of view radius above 0. If any of you know a way to stop the trainer battle from looping without the checktrainerflag, I believe it will work with view radius.
__________________
How to Breed Perfect Pokemon in Omega Ruby and Alpha Sapphire!
How to EV Train in Omega Ruby and Alpha Sapphire!
Reply With Quote
  #2    
Old August 12th, 2013 (06:24 AM).
giradialkia's Avatar
giradialkia
Community Supporter
 
Join Date: Apr 2009
Location: Ireland
Age: 21
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to giradialkia
This had been left unapproved for a number of days since I wasn't too sure of its validity as a tutorial (it works, but it could do with being developed further). As such, I've approved it in the hopes that it CAN be developed further, and have its kinks worked out.

Furthermore, the following thread is generally very similar, something I only realised upon approving this thread:
http://www.pokecommunity.com/showthread.php?t=305091
__________________

This one's called 'Red', and it's actually kinda Pokémon themed, so have a listen! Check out the links below for more stuff, if you like this!



This is the Doctor
This is my Soundcloud
This is my bandcamp

My Pokémon Y character is the same as my username. If you see me as a Passerby let me know! I tend to get a lot of Passerby requests and I often wonder if it's people from this site.
Reply With Quote
  #3    
Old August 12th, 2013 (07:34 AM). Edited August 12th, 2013 by xGal.
xGal's Avatar
xGal
Playing some ESL
 
Join Date: Nov 2011
Location: A tree
Gender: Male
Nature: Bold
Great

Nice found!

Anyway, I think it's better you'll just show the command and not the script itself

What I meant is to just show the:
Code:
special 0x03B
 playsong 0x10A 0x0
 trainerbattle 0x0 0x9 0x0 @before @after
and then, an example of it in a script .

I was looking for this a lot of time, thanks!

EDIT:

Quote:
Originally Posted by Crocky
If any of you know a way to stop the trainer battle from looping without the checktrainerflag, I believe it will work with view radius
Code:
#dynamic 0x800000
 
#org #start
special 0x3B
playsong 0x10A 0x0
trainerbattle 0x0 0x9 0x0 @before @after
msgbox @1 \\This is the message will play after you defeat the trainer. No checktrainerflag is needed.
release
end
 
#org @before
= Let me battle you
 
#org @after
= I battled you!
 
#org @1
= No more battles again.
Also, I have been talking a little with Jambo51 about it and he said it's very limited - it only works with trainers who don't have encounters.

But after all, it can help a little for guys with poor hex editing knowledge .
__________________
Hey guys, I made a soundcloud account not long ago, and I would be very happy if you guys will check it out: https://soundcloud.com/dewombat. Thanks .

Also, if you ever wanted to make a ROM hacking tool, click here: http://www.pokecommunity.com/showthread.php?t=334348
Reply With Quote
  #4    
Old August 12th, 2013 (08:28 AM).
Wobbu's Avatar
Wobbu
ຯອອ
 
Join Date: Mar 2012
Location: Kalos Route 12
Gender: Male
Nature: Relaxed
ALL OF THIS IS FOR EMERALD

Well, I don't know if this helps, but here's something.

Code:
'---------------
#org 0xEC4617
special 0x139
playsong 0x1FF 0x0
trainerbattle 0x0 0xCE 0x1 0x8EC4637 0x8EC464C
msgbox 0x8EC4656 0x6 '"Did it work?"
release
end


'---------
' Strings
'---------
#org 0xEC4637
= This is a test yo!

#org 0xEC464C
= I lost.

#org 0xEC4656
= Did it work?
If you talk to the trainer, the encounter music will play. If you press A quick enough, then you'll proceed to the battle with the normal battle music. If you don't press A, then you'll battle a ? Pokémon while the encounter music is still playing. After you run or defeat it (catching it will freeze the game), the battle will end like normal. Then you'll be paused in the overworld with the normal map music playing, and then the normal trainer battle will start. After you talk to the trainer again, Gary's champ music will play (playsong 0x1FF 0x0) and the trainer's last used Pokémon will battle you as a wild Pokémon with zero HP.
__________________
Avatar Courtesy of Pepperton

Hall of Fame

Reply With Quote
  #5    
Old August 12th, 2013 (08:37 AM).
xGal's Avatar
xGal
Playing some ESL
 
Join Date: Nov 2011
Location: A tree
Gender: Male
Nature: Bold
Quote:
Originally Posted by jsziede View Post
ALL OF THIS IS FOR EMERALD

Well, I don't know if this helps, but here's something.

Code:
'---------------
#org 0xEC4617
special 0x139
playsong 0x1FF 0x0
trainerbattle 0x0 0xCE 0x1 0x8EC4637 0x8EC464C
msgbox 0x8EC4656 0x6 '"Did it work?"
release
end
 
 
'---------
' Strings
'---------
#org 0xEC4637
= This is a test yo!
 
#org 0xEC464C
= I lost.
 
#org 0xEC4656
= Did it work?
If you talk to the trainer, the encounter music will play. If you press A quick enough, then you'll proceed to the battle with the normal battle music. If you don't press A, then you'll battle a ? Pokémon while the encounter music is still playing. After you run or defeat it (catching it will freeze the game), the battle will end like normal. Then you'll be paused in the overworld with the normal map music playing, and then the normal trainer battle will start. After you talk to the trainer again, Gary's champ music will play (playsong 0x1FF 0x0) and the trainer's last used Pokémon will battle you as a wild Pokémon with zero HP.
Nice! I will try to improve it on my free time!
__________________
Hey guys, I made a soundcloud account not long ago, and I would be very happy if you guys will check it out: https://soundcloud.com/dewombat. Thanks .

Also, if you ever wanted to make a ROM hacking tool, click here: http://www.pokecommunity.com/showthread.php?t=334348
Reply With Quote
  #6    
Old August 12th, 2013 (08:53 AM). Edited August 12th, 2013 by Ksiazek Bartlomiej.
Ksiazek Bartlomiej's Avatar
Ksiazek Bartlomiej
Rejishan awake...
 
Join Date: Jun 2008
Location: Takoabe Town (Region Thonsu)
Age: 21
Gender: Male
Nature: Hardy
This code need small remade bro. When I test it in game. It was been script of never ending Battle. I figured way how to use your script <mEYBE ONly Ruby make that failure. But I fix it> This is small fix of this script. But Important to CHECKFLAG section.

#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x9
if 0x1 goto @alreadybattled
playsong 0x11D 0x0
msgbox @before 0x6
special 0x03B
playsong 0x10A 0x0
trainerbattle 0x0 0x9 0x0 @before @after
setflag 0x9
release
end

#org @alreadybattled
msgbox @beaten 0x6
release
end

#org @before
= Go, all my fight!

#org @after
= Tch!

#org @beaten
= Your good at this!


And done... It now read flag changes and give you text after Trainer Battle.

We allways set OW People event in 0000 flag. Rom change our flag to that which we needed. And make it new flag known as 1F00 <In my example> Thank you for this script. I use it in my Pokemon Ruby Renev hack. I need post there Team Rocket and Johto Trainer Battle themes. Now with your script i know what to do. Only one task which I must figured is How change by script WIld Battle Theme.

By This limiting I've seen that is Ideal Script for GYM LEADERS and for E4 and CHAMPIONS. By This you can inster separate E4 theme in FRLG.
__________________
- Thonsu Region will never die when Rejishan take care about them. Even the evilnesse of Team Mystic do not destroy land of Thonsu.

POKEMON DIRTY SUN - Comming Soon.
Reply With Quote
  #7    
Old August 12th, 2013 (11:38 AM).
GoGoJJTech's Avatar
GoGoJJTech
http://GoGoJJTech.com (WIP!)
Community Supporter
 
Join Date: Nov 2012
Location: Earth
Age: 16
Gender: Male
Nature: Quiet
Flag 0x9 is not safe in any game we hack here.
__________________
Reply With Quote
  #8    
Old July 1st, 2014 (08:58 PM).
RaileysXerilyasRX's Avatar
RaileysXerilyasRX
You have failed me from the last time.
 
Join Date: Feb 2014
Location: Philippines
Gender: Male
Nature: Adamant
Send a message via Skype™ to RaileysXerilyasRX
Can you manipulate victory themes?
I'm doing a FireRed hack and I want to have the villain team to have its own victory theme when beaten, same for the elite four would be the gym leader's victory, and the champion would have its own victory theme. Can you help me out? This is one of my dilemmas. :/
__________________
RaileysXerilyasRX
Pokémon Dark Vengeance Version
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 08:19 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 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 - 2014 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.