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
 
Thread Tools
  #1    
Old March 17th, 2012, 04:25 AM
Hackrex
Unhatched Egg
 
Join Date: Aug 2007
Gender:
Dive in FR, LG/BG



At first I have to explain following....
FR is Firered and Feuerrot (Firered German)
LG is Leafgreen
BG is Blattgrün (Leafgreen German)

1. Content

- Foreword
- Knowledge and Tools
- Preparation
- Guide
- Offset for other Roms
- Result
- Conclusion

2. Forword
Hi, today I show you how you can dive in Pokémon Feuerrot/Firered and Blattgrün/Leafgreen.
A big special thanks goes to sonic1 and BattleChan. Without there help it couldn´t be possible for me to write this tutorial.

3. Knowledge and Tools
We need:
- XSE
- AM
- a Rom
- a Hex Editor
- VBA
- .... (a new Underwater Tileset and Map)

4. Preparation
The Script can only work when you have the 5. Badge which allows to surf and to dive. So you have to make a script or fix this, or a battle where you can win this badge, ....

5. Guide
I use a Firered Rom. The offset for the other roms you can find later.

At first we open Advance Map and change the map connections. We go to Tools-->Connections (in German Anbindungen) or press Ctrl+A and do the following.

Abtauchen means dive and Auftauchen means Emerge. Sorry for that but I am from Germany.


(Of course the connection to the map we will dive.)

Now we go to the map in which we want dive and make the same things with the emerge connection.

(Of course the conection to the map we will emerge.)

Now we have to change the mapsettings that a map can called overworld map and the other map can called underwater map. This step is important. Not only that you can call the maps overworld and underwater map. Also you need it that the script can work. We go into the Map Header. Header-->Map-Options. There we have to change it.
We change the Map-Typ to 06 at a overworld map. And 05 to a underwater map. This should look like this.


(Unterwasser is German for Underwater)

After we have done thiis we save all.

THen we open our Rom in a HexEditor. There we navigate to this to Offsets:0x06DF82 and 0x06DF9C and write to Bytes of 00 in it (0000) and save it.

The next thing we have to do are the scripts.
We open XSE and navigate to this offset: 0x1BE38B.
This is our basic-script. This should look like this. If not your rom must be wrong, crashed or ....
Spoiler:
'-----------------------
#org 0x1BE38B
lockall
checkattack 0x123
compare LASTRESULT 0x6
if 0x1 goto 0x81BE3CA
bufferpokemon2 0x0 LASTRESULT
setanimation 0x0 LASTRESULT
setanimation 0x1 0x1
msgbox 0x81BE469 '"The sea is deep here.\nWould you li..."
callstd 0x5
compare LASTRESULT 0x0
if 0x1 goto 0x81BE3D2
msgbox 0x81BE49B '"[buffer1] used DIVE."
callstd 0x4
doanimation 0x2C
goto 0x81BE3D2
lockall
msgbox 0x81BE42B '"The sea is deep here. A POKéMON\nma..."
callstd 0x4
releaseall
end

'-----------------------
#org 0x1BE3CA
msgbox 0x81BE42B '"The sea is deep here. A POKéMON\nma..."
callstd 0x4
releaseall
end

'-----------------------
#org 0x1BE3D2
releaseall
end


'---------
' Strings
'---------
#org 0x1BE469
= The sea is deep here.\nWould you like to use DIVE?

#org 0x1BE49B
= [buffer1] used DIVE.

#org 0x1BE42B
= The sea is deep here. A POKéMON\nmay be able to go underwater.



From this basic script we can make our dive and emerge scripts.
Our dive script:
Spoiler:
#dynamic 0x800000
#include stdattacks.rbh

#org @start
lockall
checkattack 0x123
compare LASTRESULT 0x6
if 0x1 goto @message1
bufferpartypokemon 0x0 LASTRESULT
setanimation 0x0 LASTRESULT
setanimation 0x1 0x1
msgbox @message2 MSG_YESNO
compare LASTRESULT 0x0
if 0x1 goto @buffer
msgbox @message3 MSG_KEEPOPEN
doanimation 0x2C
goto @buffer

#org @message1
msgbox 0x81BE42B MSG_KEEPOPEN
releaseall
end

#org @buffer
releaseall
end

#org @message2
= The sea is deep here.\nWould you like to use DIVE?

#org @message3
= [buffer1] used DIVE

#org 0x1BE42B
= The sea is deep here. A POKéMON\nmay be able to go underwater.


Our emerge script:
Spoiler:
#dynamic 0x800000
#include stdattacks.rbh

#org @start
lockall
checkattack 0x123
compare LASTRESULT 0x6
if 0x1 goto @snippet1
bufferpartypokemon 0x0 LASTRESULT
setanimation 0x0 LASTRESULT
setanimation 0x1 0x1
msgbox @string1 MSG_YESNO
compare LASTRESULT 0x0
if 0x1 goto @snippet2
msgbox @string2 MSG_KEEPOPEN
doanimation 0x2C
goto @snippet2

#org @snippet1
lockall
msgbox @string3 MSG_KEEPOPEN
goto @snippet2
#org @snippet2
releaseall
end

#org @string1
= Light is filtering down from above.\nWould you like to use DIVE?

#org @string2
= [buffer1] used DIVE.

#org @string3
= Light is filtering down from above.\nA POKéMON may be able to surface


If we have import both script we go back into AM. We make a tile with the behavior byte 19 which we need to dive.
This tile we put into our map. On this tile we put a signopost on which we have our script (the offset to our script).
Then it should work.

Our Test shows following. (okay, I have changed the dive connection. Forget my connection on my first picture. It´s the water labyrinth and not Eiland One)



Warning (xD): You don´t have a sprite for underwater. But you can maybe tricks like the gender change script where you can use an other sprite which you make to the underwater sprite or you have to use the surf sprite.
This is not in my tutorial.

6. Offset for other Roms
Offsets where you have to put the 0000´s.
Feuerrot: 0x06DEE6 und 0x06DF00
Blattgrün: 0x06DEE6 und 0x06DF00
Leafgreen: 0x06DF82 und 0x06DF9C

7. Result



8. Conclusion
This tutorial is Copyright by Hackrex and shouldn´t copied without my permission. Link to it is ok.
Again thank you sonic1 and BattleChan.

(DIG UP and DIG DOWN Scripts are possible, too):
There you have to change the text and copy the scripts. Then you need the 5. Badge, too. And you have the behavior 19 on a tile which you have on land and not on water.

Sorry for Bad English
__________________
Temporarily not available

Last edited by Hackrex; March 18th, 2012 at 07:17 AM.
Reply With Quote
  #2    
Old March 24th, 2012, 12:02 AM
LugiaMZ's Avatar
LugiaMZ
 
Join Date: Dec 2011
Gender: Male
This helpful I think...THX~
Reply With Quote
  #3    
Old March 29th, 2012, 01:42 AM
Amachi's Avatar
Amachi
(。・ω・)ノ゙ Hello, I am Amachi-chan~♪
 
Join Date: Jun 2006
Location: Australia
Gender: Male
Nature: Jolly
Thanks for the script, I found it pretty helpful indeed. However, I have a couple of problems with it, and it just seems strange that you haven't had the same.

Firstly, I cannot set the location for where the player goes after diving or emerging. I have found that when I dive, I go to the center of the target map, away from my intended starting point. That's fine, I can deal with that.

However, when I emerge to the previous map, I wind up outside of the maps border, trapped and unable to move.

There seems to be no way in the connections to manage this at all, so yeah, I don't know where to go with this. I think what might be more helpful for everyone though is to have a buoy to indicate where to dive and emerge, rather than imitate RSE's tiles.

edit: okay, I experimented a bit with it. Diving places you in the center of the target map, while emerging places you directly above on the target map. Weird aye, but I think it's manageable.

2nd edit: I wasn't bothered to do any mapping tonight, but I thought I'd try my hand at getting the surf sprite to work.


huzzah! (as you can tell the sprites I imported from RSE aren't too compatible with the underwater mist "weather". Don't know what I'll do about that).

I'm using JPAN's hacked engine, so it might make it easier, but I just made a level script (using this superb tutorial - why isn't it archived in any stickied thread?). Only problem with this solution is that because it's a surf sprite, half of the Pokemon is still "submerged".

The script I compiled was the following simple lines:
Code:
#dynamic 0x800000

#org @start
special 0x161
setvar 0x4033 0x1
release
end
btw the seaweed "grass" works as well. Behaviour byte 22 for the diving animation bubbles when you float over them, and background byte 19 for random battles.

Edit: Since posting here I have found that the above script I shared does not completely work, but also found, using JPAN's hacked fire red engine, another method of changing the sprite, using the runtime trainer customisation he included in the hack.


BECOME THE LITTLE GIRL

All it requires is a level script on the undersea maps, and one on the normal maps for when you come back up, to change the sprite back to how it was. Don't mind the little girl or the messed up sprite, they're just placeholders.
__________________
CHILL OUT DUDES, I GOT THIS
Paired with Juicy.

Last edited by Amachi; March 31st, 2012 at 01:50 AM. Reason: more fun
Reply With Quote
  #4    
Old July 3rd, 2012, 10:58 PM
Darkrai Lv.1000's Avatar
Darkrai Lv.1000
The Ultimate Dark Pokémon...
 
Join Date: Jul 2007
Location: Aboard the Arc-Gurren
Age: 19
Gender: Male
Nature: Adamant
Send a message via AIM to Darkrai Lv.1000
how did you import the underwater tiles from RSE?
it never looks right when i do it.
__________________
Reply With Quote
  #5    
Old November 15th, 2013, 02:21 AM
AntiRellik1's Avatar
AntiRellik1
 
Join Date: Sep 2013
Gender: Male
Quote:
Originally Posted by Amachi View Post
Thanks for the script, I found it pretty helpful indeed. However, I have a couple of problems with it, and it just seems strange that you haven't had the same.

Firstly, I cannot set the location for where the player goes after diving or emerging. I have found that when I dive, I go to the center of the target map, away from my intended starting point. That's fine, I can deal with that.

However, when I emerge to the previous map, I wind up outside of the maps border, trapped and unable to move.

There seems to be no way in the connections to manage this at all, so yeah, I don't know where to go with this. I think what might be more helpful for everyone though is to have a buoy to indicate where to dive and emerge, rather than imitate RSE's tiles.

edit: okay, I experimented a bit with it. Diving places you in the center of the target map, while emerging places you directly above on the target map. Weird aye, but I think it's manageable.

2nd edit: I wasn't bothered to do any mapping tonight, but I thought I'd try my hand at getting the surf sprite to work.


huzzah! (as you can tell the sprites I imported from RSE aren't too compatible with the underwater mist "weather". Don't know what I'll do about that).

I'm using JPAN's hacked engine, so it might make it easier, but I just made a level script (using this superb tutorial - why isn't it archived in any stickied thread?). Only problem with this solution is that because it's a surf sprite, half of the Pokemon is still "submerged".

The script I compiled was the following simple lines:
Code:
#dynamic 0x800000

#org @start
special 0x161
setvar 0x4033 0x1
release
end
btw the seaweed "grass" works as well. Behaviour byte 22 for the diving animation bubbles when you float over them, and background byte 19 for random battles.

Edit: Since posting here I have found that the above script I shared does not completely work, but also found, using JPAN's hacked fire red engine, another method of changing the sprite, using the runtime trainer customisation he included in the hack.


BECOME THE LITTLE GIRL

All it requires is a level script on the undersea maps, and one on the normal maps for when you come back up, to change the sprite back to how it was. Don't mind the little girl or the messed up sprite, they're just placeholders.
I followed RSEs Logic of Dive. The maps have to be identical in size. For example, Pallet Town is 24x20. I used Route 1 as the underwater map and resized it to 24x20. When you Dive or Emerge you will go to the SAME position in the other map. That's it. Works like a charm. The rest is just tileset and changing the player sprite.
Reply With Quote
  #6    
Old November 15th, 2013, 02:24 AM
VV's Avatar
VV
ブラック
 
Join Date: Nov 2013
Location: Beyond the Boundary
Gender: Male
Nature: Quiet
Send a message via Skype™ to VV
Hm.. this maybe helpful, but I suck at importing the tiles D:
__________________
V.V
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 11:45 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.