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.
__________________
My Pokémon Omega Ruby and Alpha Sapphire Wishlist!
Reply With Quote
  #2    
Old August 12th, 2013, 06:24 AM
giradialkia's Avatar
giradialkia
Community Supporter
 
Join Date: Apr 2009
Location: Ireland
Age: 20
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
xGal
du bist n00b
 
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 .
__________________

Last edited by xGal; August 12th, 2013 at 08:08 AM.
Reply With Quote
  #4    
Old August 12th, 2013, 08:28 AM
Wobbu's Avatar
Wobbu
 
Join Date: Mar 2012
Location: Cyllage City
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.
__________________
Team Spheal!
WAC|DCC|SOURCE
Reply With Quote
  #5    
Old August 12th, 2013, 08:37 AM
xGal
du bist n00b
 
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!
__________________
Reply With Quote
  #6    
Old August 12th, 2013, 08:53 AM
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.
__________________
- During Centuries... Whole worlds try keep in survive... Beafore the space start existing... In chaos eye appeared two eggs... One of mighty pokemon Arceus... Secound with less known Rejishan... Those two pokemon start build their worlds in other warps... Rejishan lose him mission... And undone world named now was TORN WORLD where now live Giratina... Arceus create world with Pokemons where live everywhere alongside with humans... What do Arceus after fail of Rejishan? He give him able to live in him world... But Rejishan want create something which been himself... And from biggest dessert upper than Unova Region start creating new region... This region is Thonsu... New species of Pokemons start locate at their region... Arceus fell angry... But forgive Rejishan and make with him friendship... But now... Is no one know... Rejishan hide in human body... Human name of Thonsu Creator is Sir Allan Newlight... - MYTH ABOUT REJISHAN (Pokemon Dirty Sun plot)

MY MUSIC SHOP - http://www.pokecommunity.com/showthread.php?t=296954

Last edited by Ksiazek Bartlomiej; August 12th, 2013 at 09:32 AM. Reason: Your double post has been automatically merged.
Reply With Quote
  #7    
Old August 12th, 2013, 11:38 AM
GoGoJJTech's Avatar
GoGoJJTech
GoGo
 
Join Date: Nov 2012
Location: Earth
Age: 15
Gender: Male
Nature: Quiet
Flag 0x9 is not safe in any game we hack here.
__________________
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
Proof that I'm the third best Temple Run player in the Universe
The SoulSilver Music Patch - The Black Music Patch - Mega-Huge Sappy Tutorial - Time-Based Events - Yet Another Sprite Resource

Pokémon Platinum Red and Blue

Join me in the chat! Get help or just talk, I really don't care :D | Click here: http://chat.linkandzelda.com:9090/?c...omhacking,GoGo
Reply With Quote
  #8    
Old 2 Weeks Ago, 08:58 PM
RaileysXerilyasRX's Avatar
RaileysXerilyasRX
The Battlefield is Ready
 
Join Date: Feb 2014
Location: Philippines
Gender: Male
Nature: Adamant
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
"Light is one peaceful thing. Darkness is one dangerous thing. However, many fears from the darkness. The reality is everyone has his or her own darkness. You cannot have the light without the darkness. The good thing why the darkness is in you: It is because the darkness wants you to control it."
Pokémon Twilight Version
ONGOING! - BETA 1 Release: October 31, 2014
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 10:04 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.