The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Research & Development (https://www.pokecommunity.com/forumdisplay.php?f=195)
-   -   Development Fancy Knowledge #3 - Using Two Different Musics In One Event (https://www.pokecommunity.com/showthread.php?t=157294)

Mastermind_X October 16th, 2008 9:44 AM

Fancy Knowledge #3 - Using Two Different Musics In One Event
 
Fancy Knowledge #3 - Using Two Different Musics In One Event

Heyho. Some people asked how zel was able to use more than 1 music in his battles. I created that feature a year ago and called it "jukebox". I think it's time now to explain how it works... (I think zel won't have a problem if i tell it...)

You can find it here:
http://sfc.pokemon-inside.net/lesson.php?id=13&lang=en


greetz
MX

P.S. If you find offsets for other versions than Fire Red US and you want to share them with others post them in this thread or send me a PM.

liuyanghejerry October 17th, 2008 2:45 AM

Your page is kind of in disorder about the binary...
Anyway,thanks~

Νιτραμ October 17th, 2008 7:43 AM

Hey, the tutorial is really nice, it will find sure good use in many hacks.

I don't like being noobish and ask questions in wrong places, but isn't it October already, M_X? :P

cooley October 17th, 2008 12:46 PM

Very useful, indeed. I would make a tool, but I don't know if I can...or rather feel like it.
I'll be using this, and good luck! Especially with that Day&Night System ;)

Mastermind_X October 17th, 2008 2:42 PM

Quote:

Originally Posted by liuyanghejerry (Post 4041053)
Your page is kind of in disorder about the binary...
Anyway,thanks~

Uhm. What exactly do you mean? Oo

Edit: @ Martin™
It is. Well. Do you want to have a D/N system that crashes for unknown reasons when you switch pokemon in battle? ^^° I try to fix that problem... -.-

liuyanghejerry October 18th, 2008 2:20 AM

Well,sorry for my bad English...I mean this:


http://www.pokecommunity.com/picture.php?albumid=365&pictureid=12066

Lady Berlitz October 18th, 2008 10:36 AM

This tutorial seems quite useful. I liked how you said that it's "fancy knowledge", Mastermind.
I will definitely be using this in the future for my hack.

Thanks for writing/translating this, Mastermind.

Νιτραμ October 18th, 2008 11:19 PM

@M_X: Ah, so that is the reason. Sorry then ^^" I hope you will be able to fix it.

Anyway, I am going to try out this tutorial, it will sure be great for me - already planned different wild Pokémon music on different parts of region. I would like to ask: Where the heck you know all this from? You're amazing, did you know?

@liuyanghejerry: Which browser are you using? If Internet Explorer 6- or one of browsers using its rendering engine (Maxthon for example), it should not be a surprise. If you're using a more standards-compilant browser such as IE8 or Firefox and the rest, then I have no idea.

Megiddo-san October 19th, 2008 4:56 PM

I have double checked my hex and have tried both hex and decimal for music values, but it isn't working for me. This is the script that changes it. #org @begin
setvar 0x1014 0x298
setvar 0x1016 0x299
message @this
boxset 6
release
end
#org @this
= Music test.

ZodiacDaGreat October 19th, 2008 8:37 PM

@Megiddo - It doesn't work like that, you have to use it before a wildbattle or trainerbattle. How?

1. Well, find the song that the wildbattle/trainerbattle plays.
2. Setvar 0x1014 the song it plays. (Original Song)
3. Setvar 0x1016 to the song you want it to play.

Ao, in simple terms its changing the played music, through setvars, by setting the original song to 0x1014 and set a new song to 0x1016. If the vars don't work, it can be changed:
Quote:

0xcfff64:
[14 10 00 00] // nr of 1st variable containing music number to replace
[15 10 00 00] // nr of 2nd variable containing music number to replace
[16 10 00 00] // nr of 1st variable containing the value to replace with
[17 10 00 00] // nr of 2nd variable containing the value to replace with
[FF FF 00 00] // value the vars have to be set to in order to disable the track loader
[55 E4 06 08] // std_func_getvaradress + 1; don't change it!
[0F D1 1D 08] // return adress + 1
[9C 32 4A 08] // channel table (usually you don't have to change it)
[CC 32 4A 08] // pointer to the music-pointer-table
Change 1410, 1510, 1610, 1710 to something that works, thats the veryr reason why MX, block quoted this part.

Anyway, Good News is you may see a tool soon :)

Megiddo-san October 20th, 2008 5:27 AM

I think I need new ones. I tried putting them before a trainerbattle in a script. Thanks. I'm going to try others.

Edit: I just made that work by using different variables. It needn't be in the same script.

Drayano January 7th, 2010 3:21 PM

I've tried to do this a couple times now and each time I try the game just stops; you try to load the game, the blue background of the intro opens, and it just stops there.

I've double checked the hex to make sure I've input it correctly and I've put it in the same locations as described on the tutorial, so I've also used the same pointer in the second part where I'm attaching it to the musicloader.

I tried toying around with the var numbers in the hex (the 14 10 00 00, 15 10 00 00 etc) but changing them didn't fix anything. As far as I can tell the Fire Red ROM started doing this intro freeze after I put in the hex that is in the first part of the tutorial.

Either way, I've tried this three odd times now and got the same result every time... would anyone happen to have any idea why the game keeps doing this whenever I put in the hex?

edit: Okay I took a look at AdvanceMap at the broken ROM and it seems that all of the tiles are broken :x

aar2697 August 7th, 2012 5:53 PM

Drayano, it doesn't work with my ROM either for some reason. I'm having the same problem as you. Luckily I made a backup.

thanethane98 August 14th, 2012 8:45 AM

Quote:

Originally Posted by aar2697 (Post 7290776)
Drayano, it doesn't work with my ROM either for some reason. I'm having the same problem as you. Luckily I made a backup.

I had the same problem at first, but I found out what I did wrong. You have to remember to flip your offset when putting it into the music loader. Such as, I had 0x810211 as my offset. So I originally put that in as 81 02 11 00, while I needed to put it in as 11 02 81 08. I'm not an expert with this, but I'm pretty sure that 08 always needs to go on the end of the offset, somebody can correct me if I'm wrong though.

Good luck!

Golden Empoleon August 15th, 2012 5:34 PM

When I go to this part Im kinda lost lol

01 49 08 47 00 00 [XX XX XX XX] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

And my pointer is F1 FE CF 08 also but everytime i do this from 0x1DD0F6 to 0x1DD10E
my rom will end up crashing.

thanethane98 August 15th, 2012 9:05 PM

Quote:

Originally Posted by Golden Empoleon (Post 7301686)
When I go to this part Im kinda lost lol

01 49 08 47 00 00 [XX XX XX XX] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

And my pointer is F1 FE CF 08 also but everytime i do this from 0x1DD0F6 to 0x1DD10E
my rom will end up crashing.

How exactly does it crash? When I originally did this, my hex editor actually expanded the rom when I typed in stuff like this, which leads to the ROM being unusable.

I've actually managed to get this working, but to do it I had to take a look at another hack that had successfully done this. Take a look at Azure Horizons if you're stuck, the makers of it have it inserted and working correctly so it's a great example.

Golden Empoleon August 15th, 2012 10:23 PM

Thanks thanethane98 for the input. :)
It didn't crash this time and you was right that
was a great example.

Now all I need help is the setvar.
Btw. I am using pokescript.

thanethane98 August 16th, 2012 11:02 AM

Quote:

Originally Posted by Golden Empoleon (Post 7301853)
Thanks thanethane98 for the input. :)
It didn't crash this time and you was right that
was a great example.

Now all I need help is the setvar.
Btw. I am using pokescript.

I believe with the modified version used in Azure Horizons it's 7030 and 7033. That worked for me in XSE, and it should work for you no matter what program you're using for scripting. :)

thanethane98 August 16th, 2012 11:50 AM

Quote:

Originally Posted by Team Fail (Post 7302321)
I've actually been looking for something like this for the last little bit, actually. I'll have to give this a try and give it a shot at implementing it in a hack.

Although, with a repointed sound table, this will be fun.

Good luck. :)

The only problem I've had with this at the moment is that it seems to have errors when you attempt to use it with a normal trainer (one that battles you when you're in their sight). Has anyone else had this issue?

Golden Empoleon August 16th, 2012 11:57 AM

#org $script
setvar 0x7030 0x297
setvar 0x7033 0xblah
trainerbattle 0x00 0x0001 $see $win
$see 1 = Battle me!
$win 1 = I lost.
message $after
$after 1 = You're tough.
boxset 6
release
end

This my script for pokescript
And it still not working for me.
Is it the same for xse :)

Jambo51 August 16th, 2012 12:26 PM

Quote:

Originally Posted by Golden Empoleon (Post 7302386)
#org $script
setvar 0x7030 0x297
setvar 0x7033 0xblah
trainerbattle 0x00 0x0001 $see $win
$see 1 = Battle me!
$win 1 = I lost.
message $after
$after 1 = You're tough.
boxset 6
release
end

This my script for pokescript
Is it the same for xse :)

This script won't work. Trainerbattles ONLY work if the first command in the script is the trainerbattle itself. The only exception to this is type 0x1 of trainerbattles.

That's why this method is limited. It can execute changes like regional music, or class based music if you're extremely careful and clever, but it's incapable of more complex changes.

Golden Empoleon August 16th, 2012 1:45 PM

Quote:

Originally Posted by Jambo51 (Post 7302430)
This script won't work. Trainerbattles ONLY work if the first command in the script is the trainerbattle itself. The only exception to this is type 0x1 of trainerbattles.

That's why this method is limited. It can execute changes like regional music, or class based music if you're extremely careful and clever, but it's incapable of more complex changes.

Thanks Jambo51 for this input :D
Also, your last video on youtube was so
amazing i am really a fan but anyways so where
do i put the setvars or i should redue this script. :)

#org $script
trainerbattle 0x1 0x1 $see $win
$see 1 = Blah
$win 1 = Blah Blah.
message $after
$after 1 = Blah Blah Blah.
boxset 6
setvar 0x7030 0x297
setvar 0x7033 0xblah
release
end

Redid the script

Jambo51 August 16th, 2012 3:47 PM

No, it's not possible to use this method to change the music for each trainer. This is because that setvar won't be used until after the battle is finished. It works for rival style trainers, since they execute parts of scripts before battling, but it won't work with normal trainers for the aforementioned reason. You can set the vars in a level script if all trainers in the area need a different music (a Team Rocket takeover of a place, for example), but you can't set each trainer in an area individually.

Golden Empoleon August 16th, 2012 6:30 PM

Okay I see what you are saying and its makes perfect
sense.

So the level script

#org $script
setvar 0x7030 0x297
setvar 0x7033 0xblah
release
end

and i put this in advance map
the area i chose (like you said a bad guys area)
script it to one of the green boxes idk lol
This is confusing in a good way :)

Golden Empoleon August 17th, 2012 11:25 AM

Quote:

Originally Posted by thanethane98 (Post 7302312)
I believe with the modified version used in Azure Horizons it's 7030 and 7033. That worked for me in XSE, and it should work for you no matter what program you're using for scripting. :)

How do you make a level script :)


All times are GMT -8. The time now is 8:58 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.