The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking > Tutorials
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

Notices

Tutorials Looking for a guide to help you out? Then you're in the right place! We've got everything you need, ranging from Mapping to Music!
New threads in this forum are to be approved by a moderator before they are displayed. The thread revival limit does not apply here.



Reply
Thread Tools
  #1  
Unread January 8th, 2010, 05:56 AM
Megiddo-san's Avatar
Megiddo-san
Barium - Summer '12 Return?
 
Join Date: Dec 2007
Location: Where you least expect it
Age: 21
Gender: Male
Nature: Relaxed
Send a message via Windows Live Messenger to Megiddo-san
Update: Emerald Offset: 03007420 RS Offset: 03007380
I'm not sure what this can be used for exactly, but I think someone will find a use for it.

For this tutorial you are going to need Advance Map, XSE, and Sappy. To begin, open up your rom in Sappy and look at a song. Note the header offset as we're going to be using it.

We are going to use the pointer to the header offset and an address in the ram to check for a song being played and if that song is playing, a new song will play instead.

I found that 03007300 in the ram is the location of the pointer to the song being played. The command comparefarbytetobyte compares a byte at a specified address to a specified byte value.

If you take the header offset, for example, 6D1DDC, and swap the bytes, you get the pointer (DC1D6D08).

I'm not sure if any songs share the same byte value for their first pointer byte, so we'll be using the three bytes that compose the offset. (DC1D6D)

So, we shall be using comparefarbytetobyte three times to check for three different bytes, as well as use 03007300, 03007301, and 03007302.

Create your script in XSE and enter it with Advance Map. Make a person script, signpost, or etc. If for some reason you want to incorporate into a level script, note that I have not gotten it to work as a level script.

This is the script that I created. I checked for the route 1 song being played. If it is playing, the script will display a message and the battle 3 theme will be played.

#dynamic 0x800000

#org @begin
comparefarbytetobyte 0x03007300 0xDC
if 0x1 goto @continuecheck
release
end

#org @continuecheck
comparefarbytetobyte 0x03007301 0x1D
if 0x1 goto @more
release
end

#org @more
comparefarbytetobyte 0x03007302 0x6D
if 0x1 goto @finish
release
end

#org @finish
playsong 0x128 0x0
message @1 0x2
release
end

#org @1
= You win.

I hope you enjoyed this tutorial or something like that. :P
I'll be posting the Ruby/Sapphire and the Emerald ram offsets soon.

Thanks to ZodiacDaGreat for some help.

__________________

Hashire! Asu e tsudzuku shinka no micha wa

Last edited by Manipulation; April 15th, 2010 at 04:03 PM.
Reply With Quote
  #2  
Unread January 15th, 2010, 11:15 PM
Gamer2020's Avatar
Gamer2020
This love is a sickness...
 
Join Date: Jun 2008
Location: Violet city!
Gender: Male
Nature: Bold
Send a message via AIM to Gamer2020 Send a message via Windows Live Messenger to Gamer2020 Send a message via Yahoo to Gamer2020 Send a message via Skype™ to Gamer2020
Wow that is pretty interesting.
This can be used with radio playing I think.
Like a radio could be in the corner and a character can be like "Hey I like listening to this song."
But if its a different song the character can say "OMG! I hate this song!"
__________________

Shadows are born...
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

Forum Jump


All times are UTC. The time now is 05:31 PM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 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 posts belong to the user.