|
Generation 3 (Traditional) Traditionally, Generation 3 is hacked using tools, hex editors and patches. This is for you if you do that. |
![]() |
|
Thread Tools | Display Modes |
![]() |
#11 | |
Anti-Swag
Join Date: Oct 2013
Location: Miami, FL
Age: 22
Posts: 30
![]() |
![]() Quote:
special 0x3E playsong 0x??? 0x0 trainerbattle 0x0 0x??? 0x0 @intro @defeated and then finally a var was set to prevent the things from happening again. I'll try to remake the script later. |
|
![]() |
![]() |
Sponsored Links |
![]() |
#12 | |
Emerald Hacker
![]() Join Date: Sep 2012
Location: Ice Path
Age: 29
Posts: 68
![]() |
![]() Quote:
From what you're saying about using a variable you seem to know already, but just as a reminder for everyone: since the lines that work with changing the music are supposed to come before the actual 'trainerbattle' command, it requires that you use flags or variables at the start of the whole script to stop the music stuff and default-style battle from happening again (regardless if the actual trainerflag is set or not) so that it will instead go to what the trainer says/does after you've beaten them. I'd personally recommend you use flags instead of variables in Emerald if you want to stop events from happening again, since there are very few really safe variables in this game at all. I'll be updating it with more later. If you need flags, check out Diegoisawesome's XSE Scripting Guide. This method was mostly meant for a battle that works in a similar way to the Steven battle in Emerald, where you talk to them (or through a story-like event) and they say their lines and the battle starts. I haven't tested it with the kind of battle you're doing; I haven't worked with those in forever since I'm leaving most trainers as they are in my hack but with stronger teams. Once you post the remake of the script you were doing, I'll see if I can make it work properly. Let me know what variable you're using if you can.
__________________
My YouTube Channel My AdventureQuest/BattleOn character My Tutorials: Stabilizing Pokemon Emerald (Preventing Corruption) [Emerald] Controlling Trainer Battle Music... Without ASM How to Fix the 64K Save 'White-Screen' in VBA Without Save-States My ROM Hack:
Pokémon CosmicEmerald Version
(PokéCommunity) Original
Last edited by Sky0fBlades; 29th November 2014 at 05:16 AM. |
|
![]() |
![]() |
![]() |
#13 |
Newbie
Join Date: Jan 2015
Posts: 1
![]() |
![]()
Could you make a sample script for gym battles and other type of boss battle. Also setting the checkflag, trainerbattle, setflag for a trainer and gym leader.
|
![]() |
![]() |
![]() |
#14 | |
Emerald Hacker
![]() Join Date: Sep 2012
Location: Ice Path
Age: 29
Posts: 68
![]() |
![]() Quote:
Code:
// Custom GYM LEADER battle with changeable battle music. Symbol sets to replace: ###, $$$, %%%, ??? #freespace 0xFF #dynamic 0x9C0B20 #org @start lock faceplayer checkflag 0x### // Checks if the TM has been given to you. if 0x0 goto @battle_or_tm msgbox @after_2 MSG_KEEPOPEN release end #org @battle_or_tm checkflag 0x$$$ // Has player gotten the badge? if 0x0 goto @battleforbadge giveitem ITEM_TM01 0x1 MSG_OBTAIN // Give player a TM. compare LASTRESULT 0x0 // Is bag full? if 0x1 goto @bagfull setflag 0x### // You've gotten the TM. msgbox @tmdescription MSG_KEEPOPEN release end #org @battleforbadge msgbox @intro MSG_KEEPOPEN special 0x3E // Special that makes a default battle happen. Required. playsong 0x%%% 0x0 // What song you want during battle. trainerbattle 0x1 0x??? 0x0 @intro @defeat @after_1 goto @after_1 // Must put this here even though it is in the above line, or it won't work. #org @bagfull msgbox @fullmessage MSG_KEEPOPEN release end #org @after_1 preparemsg @receivedbadge waitmsg call @badgefanfare setflag 0x$$$ // Player now has this badge. msgbox @describebadge MSG_KEEPOPEN goto @battle_or_tm release end #org @badgefanfare fanfare 0x171 waitfanfare return #org @intro = Hi there, welcome to my GYM.\pLet's battle now! #org @defeat = Alright, you win. #org @receivedbadge = [player] received the MYSTERY BADGE\nfrom LEADER. #org @tmdescription = That TECHNICAL MACHINE, TM01,\ncontains COOLMOVE.\pIt not only does THIS, but it\nalso does THIS too. #org @describebadge = The MYSTERY BADGE heightens the ATTACK\n of your POKéMON.\pIt also enables them to use the HM move\nWHIRLPOOL outside of battle.\pPlease take this TM, too. #org @after_2 = Good luck on your path to the LEAGUE. #org @fullmessage = Uh... You have at least 99 of this TM.\nDid you.... cheat, or something?
__________________
My YouTube Channel My AdventureQuest/BattleOn character My Tutorials: Stabilizing Pokemon Emerald (Preventing Corruption) [Emerald] Controlling Trainer Battle Music... Without ASM How to Fix the 64K Save 'White-Screen' in VBA Without Save-States My ROM Hack:
Pokémon CosmicEmerald Version
(PokéCommunity) Original
Last edited by Sky0fBlades; 13th January 2017 at 03:18 AM. Reason: spelling error |
|
![]() |
![]() |
![]() |
#15 |
Newbie
Join Date: Nov 2015
Posts: 4
![]() |
![]()
What I'm trying to do is change Steven's music in Pokémon Emerald to the champion music because his default music is the rival music and I really don't think that suits him at all, being a final boss and all, but I still want the rival to have that music. Would that just be like this or would it be something completely different. Also, if it isn't to much trouble, can you tell me what the 'playsong' value for the champion music is in Pokémon Emerald (I'm a bit unsure about where to find it in Advanced-Map's file). P.S. Sorry if any of this is very obvious, I'm pretty new to hacking. Thanks!
|
![]() |
![]() |
![]() |
#16 | |
Emerald Hacker
![]() Join Date: Sep 2012
Location: Ice Path
Age: 29
Posts: 68
![]() |
![]() Quote:
__________________
My YouTube Channel My AdventureQuest/BattleOn character My Tutorials: Stabilizing Pokemon Emerald (Preventing Corruption) [Emerald] Controlling Trainer Battle Music... Without ASM How to Fix the 64K Save 'White-Screen' in VBA Without Save-States My ROM Hack:
Pokémon CosmicEmerald Version
(PokéCommunity) Original
Last edited by Sky0fBlades; 21st November 2015 at 05:56 AM. |
|
![]() |
![]() |
![]() |
#17 | |
Newbie
Join Date: Nov 2015
Posts: 4
![]() |
![]() Quote:
EDIT: Or if you could tell me how to safely compile the new script that would be fine as well, whichever is easier for you. Thanks again! |
|
![]() |
![]() |
![]() |
#18 | |
Emerald Hacker
![]() Join Date: Sep 2012
Location: Ice Path
Age: 29
Posts: 68
![]() |
![]() Quote:
You can find the offset for the script in A-Map, it is located in the events tab for Steven's location in Meteor Falls when his sprite is selected in the viewer (which should be automatic since he is the only sprite on this paticular map). From here, you can open the ROM in XSE and enter that script offset in the offset box and click on the 'screwdriver and wrench' icon next to it to decompile the script. A much easier way to do this though is to use A-Map's "Open script" button which is a bit below where it shows the offset from earlier. To make it work though, you'll have to have it set to open XSE as your script editor (you can do that by clicking "Choose script editor" in A-Map's Settings drop-down menu and locating XSE's executable file). In the prompt that asks you about separation of the offset from the ROM name, just go ahead and hit "No". From then on, it should open the scripts you want as long as you have one selected in A-Map. To compile your finished script to free space instead, you will have to replace the script addresses in the parts you edited with a dynamic label, like "@myscriptstartshere". An example of this kind of thing is my script in post #14. To be safe, I typically just replace all used offsets with dynamic labels so they get their own space away from the normal data when compiled.The whole script (like my example) should start with: #freespace 0xFF <---- To make sure the right kind of space is used. #dynamic 0x?????? <---- Your free space offset.
__________________
My YouTube Channel My AdventureQuest/BattleOn character My Tutorials: Stabilizing Pokemon Emerald (Preventing Corruption) [Emerald] Controlling Trainer Battle Music... Without ASM How to Fix the 64K Save 'White-Screen' in VBA Without Save-States My ROM Hack:
Pokémon CosmicEmerald Version
(PokéCommunity) Original
Last edited by Sky0fBlades; 19th January 2016 at 09:29 AM. |
|
![]() |
![]() |
![]() |
#19 |
Newbie
Join Date: Nov 2015
Posts: 4
![]() |
![]()
So I finally finished the main game of Emerald on my playthrough and went to fight Steven, who has now got the champion battle theme (thanks btw), but after I beat him another battle starts immediately after, before the msgbox can even show up. It just goes to the overworld and starts a new battle. I don't know why this is. If you could offer any help it would be greatly appreciated.
Here's my script. (Before I compiled it and XSE changed everything into hex). Code:
'--------------- #freespace 0xFF #dynamic 0xE3E2CA #org @start lock checkflag 0x4F8 if 0x1 goto @nobattle checksound sound 0x15 applymovement 0x1 0x8272598 waitmovement 0x0 applymovement 0x1 0x827259A waitmovement 0x0 applymovement 0x1 0x827259E waitmovement 0x0 msgbox @intro MSG_KEEPOPEN '"STEVEN: Oh, wow, [player]\v\h05.\n..." special 0x3E playsong 0x1DE 0x0 trainerbattle 0x0 0x324 0x0 @intro @defeated msgbox @afterwards MSG_KEEPOPEN '"STEVEN: Come to think of it, ever ..." setflag 0x4F8 release end '--------------- #org @nobattle applymovement 0x1 0x827259E waitmovement 0x0 msgbox @afterwards MSG_KEEPOPEN '"STEVEN: Come to think of it, ever ..." release end '--------- ' Strings '--------- #org @intro = STEVEN: Oh, wow, [player]\v\h05.\nI'm amazed you knew where to find me.\pDo you, uh[.]maybe think of me as\njust a rock maniac?\pNo, that can't be right.\pWe battled alongside each other at\nthe SOOTOPOLIS SPACE CENTER.\pYou should have a very good idea\nabout how good I am.\pOkay, [player]\v\h05, if you're going to mount\na serious challenge, expect the worst! #org @defeated = You[.]\nI had no idea you'd become so strong[.] #org @afterwards = STEVEN: Come to think of it, ever since\nour paths first crossed in GRANITE\lCAVE in DEWFORD, I had this feeling.\pI thought that you would eventually\nbecome the CHAMPION.\pMy predictions usually come true.\pAnd where will you go from here?\p[.] [.] [.] [.] [.] [.]\n[.] [.] [.] [.] [.] [.]\pFufufu, even I couldn't tell you that. '----------- ' Movements '----------- #org 0x272598 #raw 0x56 'Exclamation Mark (!) #raw 0xFE 'End of Movements #org 0x27259A #raw 0x14 'Delay5 #raw 0x14 'Delay5 #raw 0x14 'Delay5 #raw 0xFE 'End of Movements #org 0x27259E #raw 0x3E 'Face Player #raw 0xFE 'End of Movements Code:
'--------------- #org 0xE3E2CA lock checkflag 0x4F8 if 0x1 goto 0x8E3E321 checksound sound 0x15 applymovement 0x1 0x8272598 waitmovement 0x0 applymovement 0x1 0x827259A waitmovement 0x0 applymovement 0x1 0x827259E waitmovement 0x0 msgbox 0x8E3E336 MSG_KEEPOPEN '"STEVEN: Oh, wow, [player]\v\h05.\n..." special 0x3E playsong 0x1DE 0x0 trainerbattle 0x0 0x324 0x0 0x8E3E336 0x8E3E484 msgbox 0x8E3E4B1 MSG_KEEPOPEN '"STEVEN: Come to think of it, ever ..." setflag 0x4F8 release end '--------------- #org 0xE3E321 applymovement 0x1 0x827259E waitmovement 0x0 msgbox 0x8E3E4B1 MSG_KEEPOPEN '"STEVEN: Come to think of it, ever ..." release end '--------- ' Strings '--------- #org 0xE3E336 = STEVEN: Oh, wow, [player]\v\h05.\nI'm amazed you knew where to find me.\pDo you, uh[.]maybe think of me as\njust a rock maniac?\pNo, that can't be right.\pWe battled alongside each other at\nthe SOOTOPOLIS SPACE CENTER.\pYou should have a very good idea\nabout how good I am.\pOkay, [player]\v\h05, if you're going to mount\na serious challenge, expect the worst! #org 0xE3E484 = You[.]\nI had no idea you'd become so strong[.] #org 0xE3E4B1 = STEVEN: Come to think of it, ever since\nour paths first crossed in GRANITE\lCAVE in DEWFORD, I had this feeling.\pI thought that you would eventually\nbecome the CHAMPION.\pMy predictions usually come true.\pAnd where will you go from here?\p[.] [.] [.] [.] [.] [.]\n[.] [.] [.] [.] [.] [.]\pFufufu, even I couldn't tell you that. '----------- ' Movements '----------- #org 0x272598 #raw 0x56 'Exclamation Mark (!) #raw 0xFE 'End of Movements #org 0x27259A #raw 0x14 'Delay5 #raw 0x14 'Delay5 #raw 0x14 'Delay5 #raw 0xFE 'End of Movements #org 0x27259E #raw 0x3E 'Face Player #raw 0xFE 'End of Movements Last edited by Gameskiller01; 12th May 2016 at 05:08 PM. |
![]() |
![]() |
![]() |
#20 |
Emerald Hacker
![]() Join Date: Sep 2012
Location: Ice Path
Age: 29
Posts: 68
![]() |
![]()
@Gameskiller01
No problem, we are all a little forgetful sometimes but it's great you've got it all working though. Good luck with the rest of your work and if you need any more help with this stuff feel free to ask of course. The forum may not be very active anymore but I'll still drop in once in a while at least.
__________________
My YouTube Channel My AdventureQuest/BattleOn character My Tutorials: Stabilizing Pokemon Emerald (Preventing Corruption) [Emerald] Controlling Trainer Battle Music... Without ASM How to Fix the 64K Save 'White-Screen' in VBA Without Save-States My ROM Hack:
Pokémon CosmicEmerald Version
(PokéCommunity) Original
|
![]() |
![]() |
![]() |
|
![]() |
Tags |
asm, battle, controlling, emerald, music, trainer, [Tutorial] |
Thread Tools | |
Display Modes | |
|
|