The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.


Advertise here

Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #22001    
Old July 11th, 2012, 04:19 PM
redriders180's Avatar
redriders180
Mastermind of Pokemon Glazed
 
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180

Advertise here
Quote:
Originally Posted by FrozenInfernoZX View Post
Thing is, all special places show up at the (0,0) coordinate no matter what I do. Maybe I'll try an older Advance Map =/
Since I have to reuse the same tiles to make a new sub-region (sounds hard, is it really?) I wonder how Liquid Crystal is able to fit 2 full regions and the orange islands, impressive. Can I make an "extended" Kanto? since my region is north of Kanto hence route 25 extended route, but how would I be able to use Kanto since it needs to use the same tiles as my Taejo Region map? Am I understanding this correctly? So my subregion to the west of Taejo would be a "rearranged Taejo map." I'm sorry, I'm new to pokemon hacking and I'm not exactly sure how some things work. I'm learning though Thanks for the help.
You mean no matter what you do to the X/Y coordinates, they snap back to 0,0? I can't remember if you said if the towns are doing the same thing, since the XY coordinates need to be specified independently of which path goes where on the map.

I think you kind of got the idea. Of course, don't forget that you aren't limited in the amount of tiles you get...basically, you can add more to that current total. Additionally, it's more efficient if you make all the maps you need at the same time, and you can take the tiles from all three, put them into one tileset, make all the tilemaps using that one tileset, and you're good. Otherwise, you'll just have to work with a "rearranged Taejo map".

Quote:
Originally Posted by HaydenSane View Post
I'm sure this probably has been asked somewhere before, but I wouldn't even know where to begin searching for it. How do I directly access the beginning script (with Oak asking you questions) in FireRed so I can edit it directly, instead of through Advance Text or something?

Basically, I want to be able to remove the gender select and name input events entirely, so that it's like some other RPGs which give you a more distinct main character.
This is not a script-controlled event, it's an ASM-controlled event. You need to use a hex editor and an assembler/disassembler to edit them.
__________________

Thank you for hatching the eggs!
Please view these dragons! Just click them and you're done!
If you don't help them grow up, they'll die...



  #22002    
Old July 11th, 2012, 04:36 PM
HaydenSane
Beginning Trainer
 
Join Date: Jul 2012
I have Hex Workshop, but honestly no idea how to use it. Any advice on where to start learning this stuff?
  #22003    
Old July 11th, 2012, 07:59 PM
Renegade's Avatar
Renegade
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Hello, I have another question. How do I make the world map appear? Like when you "talk" to the map in any PokeCenter? Thanks.
  #22004    
Old July 11th, 2012, 08:14 PM
FrozenInfernoZX's Avatar
FrozenInfernoZX
Legendary Trainer ZX
 
Join Date: Jun 2012
Location: United States
Gender: Male
Nature: Adamant
Send a message via AIM to FrozenInfernoZX
Okay, I now understand what the problem that occurring with the routes, not so much the special places. My edited routes listed from Routes 49 - Routes 74 are all replaced Kanto routes. The game somehow still technically thinks that it's the original routes, therefore, the locator icon adjusts accordingly. My Route 73 is literally divided in half. If I walk over to the other half of the route, (lets say it contains 24 tiles and I pass over to the 13th tile) the locator icon moves over one 8x8 box to the right. However, for my Route 50, the locator moves in a range of 3 boxes on the map up or down while walking from the north end to the south end or vice versa. In that case the locator gives me wrong locations on the map and overlaps to other routes on the world map. Does anybody know why this occurs? The locator basicaly start at its coordinated position and moves "accordingly" to it's Kanto routes as if it is hard coded?

As for speacial areas, by (0,0) coordinate, I meant that it appears on the map that way in the far upper left corner no matter what coordinate I had set it in the world map editor. Cities with special locations are perfect, but not routes.


And as for the addition of subregions and Kanto incorporated into my game, I fully understand what you mean now redriders180. Thanks alot.
  #22005    
Old July 11th, 2012, 08:53 PM
redriders180's Avatar
redriders180
Mastermind of Pokemon Glazed
 
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180
Quote:
Originally Posted by FrozenInfernoZX View Post
Okay, I now understand what the problem that occurring with the routes, not so much the special places. My edited routes listed from Routes 49 - Routes 74 are all replaced Kanto routes. The game somehow still technically thinks that it's the original routes, therefore, the locator icon adjusts accordingly. My Route 73 is literally divided in half. If I walk over to the other half of the route, (lets say it contains 24 tiles and I pass over to the 13th tile) the locator icon moves over one 8x8 box to the right. However, for my Route 50, the locator moves in a range of 3 boxes on the map up or down while walking from the north end to the south end or vice versa. In that case the locator gives me wrong locations on the map and overlaps to other routes on the world map. Does anybody know why this occurs? The locator basicaly start at its coordinated position and moves "accordingly" to it's Kanto routes as if it is hard coded?

As for speacial areas, by (0,0) coordinate, I meant that it appears on the map that way in the far upper left corner no matter what coordinate I had set it in the world map editor. Cities with special locations are perfect, but not routes.


And as for the addition of subregions and Kanto incorporated into my game, I fully understand what you mean now redriders180. Thanks alot.
I have an image here so you understand what's going wrong:
Spoiler:




The values I circled in red dictate the position your face will appear on when you're on a certain map. They DON'T get automatically updated when you change the routes themselves. You have to enter them in manually, and one at a time. And each route only gets one XY pair, so try and place them in the middle of the route.

The values I circled in green are the coordinates of the cursor, for easy reference. They're the same in this case, because I went in and changed all the values. When I go to this route and open the world map, my head'll show up at (5,3) on the world map.

I'm assuming this is your problem. Also, disregard the glitchy map...it doesn't show up right in the World Map editor >_<

More info: Although, the problem of the routes shifting has never been an issue for me. I'm wondering if it's somehow linked to the map tiles themselves, since I changed them completely.
__________________

Thank you for hatching the eggs!
Please view these dragons! Just click them and you're done!
If you don't help them grow up, they'll die...



  #22006    
Old July 11th, 2012, 10:49 PM
FrozenInfernoZX's Avatar
FrozenInfernoZX
Legendary Trainer ZX
 
Join Date: Jun 2012
Location: United States
Gender: Male
Nature: Adamant
Send a message via AIM to FrozenInfernoZX
That wasn't the problem, I think I know what it is now. This explains why my Route 50 locator moved along the route's path. Some of my routes are "opposed." Meaning that I overwrote routes that were either horizontal or vertical with their opposition. So my vertical Route 73 was created over a route that was originally horizontal. That's why the locator moved left to right when I crossed half of the route from left to right. The game was still reading it as a horizontal route. So I changed the map type to indoor and then the locator stayed in its coordinated place at all times. So, in order for me to have the locator smoothy move along the routes, I need to overwrite original horizontal routes with horizontal routes. Is it possible to change a map from "horizontal" to "vertically" (vice-versa) without having to overwrote the correct map? What I mean is not by resizing, but the direction the game reads the route.

Last edited by FrozenInfernoZX; July 11th, 2012 at 10:57 PM.
  #22007    
Old July 12th, 2012, 12:23 AM
redriders180's Avatar
redriders180
Mastermind of Pokemon Glazed
 
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180
Quote:
Originally Posted by FrozenInfernoZX View Post
That wasn't the problem, I think I know what it is now. This explains why my Route 50 locator moved along the route's path. Some of my routes are "opposed." Meaning that I overwrote routes that were either horizontal or vertical with their opposition. So my vertical Route 73 was created over a route that was originally horizontal. That's why the locator moved left to right when I crossed half of the route from left to right. The game was still reading it as a horizontal route. So I changed the map type to indoor and then the locator stayed in its coordinated place at all times. So, in order for me to have the locator smoothy move along the routes, I need to overwrite original horizontal routes with horizontal routes. Is it possible to change a map from "horizontal" to "vertically" (vice-versa) without having to overwrote the correct map? What I mean is not by resizing, but the direction the game reads the route.
I just found something that may hopefully help you. If you go to 0x3F21AC in a hex editor, it appears that those four bytes correspond to the width and height of Route 1. The next four bytes are for Route 2, then the next is Route 3, and so on and so forth. Strangely, this goes in Route-numberical order, i.e. Route 1 -> Route 25, and not in index order (Index order is Route 4, Route 10, Route 1, Route 2...). Maybe editing those bytes will help your map work the right way?

Edit: I just realised the table itself starts at 0x3F2178. The first eleven sets of four bytes correspond to the width and height of each town, and is always 01 00 01 00, since each map is usually 1x1. The next two entries are four Route 4 and Route 10, and are ALSO 01 00 01 00. It took me a bit, but there are two Route 4s and two Route 10s in the index, because both of these spots are flyable. The next entries then go in index order.

Double Edit: I'm sorry if I'm not being very clear, its late and rational thought isn't coming to me. I also don't know the limits of your knowledge, or even if you know what "index order" is. If you open up any map in A-Map, and go to the header tab, at the top, there's a dropdown with the maps name on it. Click the dropdown, and scroll to the top of the list. That is the first entry in the index. In a normal Firered rom, it's "Pallet Town". The next entry is "Viridian City", followed by Pewter, Cerulean, Lavender, Vermillion, Celadon, Fuschia, Cinnabar, Indigo Plateau, Saffron, Flyable spot for Route 4, Flyable spot for Route 10, Route 1, Route 2, Route 3......Route 25, Viridian Forest.........Power Plant, One Island, Two Island....Celadon Dept. This is basically the order that all map-related data goes. Your index will probably have different names, since you're game is in a different region, so I recommend making a list of all the names in index order, and using that to consult with while you edit the above data.
__________________

Thank you for hatching the eggs!
Please view these dragons! Just click them and you're done!
If you don't help them grow up, they'll die...




Last edited by redriders180; July 12th, 2012 at 12:42 AM.
  #22008    
Old July 12th, 2012, 12:35 AM
FrozenInfernoZX's Avatar
FrozenInfernoZX
Legendary Trainer ZX
 
Join Date: Jun 2012
Location: United States
Gender: Male
Nature: Adamant
Send a message via AIM to FrozenInfernoZX
Quote:
Originally Posted by redriders180 View Post
I just found something that may hopefully help you. If you go to 0x3F21AC in a hex editor, it appears that those four bytes correspond to the width and height of Route 1. The next four bytes are for Route 2, then the next is Route 3, and so on and so forth. Strangely, this goes in Route-numberical order, i.e. Route 1 -> Route 25, and not in index order (Index order is Route 4, Route 10, Route 1, Route 2...). Maybe editing those bytes will help your map work the right way?

Edit: I just realised the table itself starts at 0x3F2178. The first eleven sets of four bytes correspond to the width and height of each town, and is always 01 00 01 00, since each map is usually 1x1. The next two entries are four Route 4 and Route 10, and are ALSO 01 00 01 00. It took me a bit, but there are two Route 4s and two Route 10s in the index, because both of these spots are flyable. The next entries then go in index order.
Oh thanks! I wonder if any of those bytes correspond to which way the map is read, either vertically or horizontally. I'll check it out! Thanks!
  #22009    
Old July 12th, 2012, 12:46 AM
redriders180's Avatar
redriders180
Mastermind of Pokemon Glazed
 
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180
Quote:
Originally Posted by FrozenInfernoZX View Post
Oh thanks! I wonder if any of those bytes correspond to which way the map is read, either vertically or horizontally. I'll check it out! Thanks!
I believe that they do. The first thirteen entries are 01 00 01 00, and the entry for Route 1 is 01 00 02 00...which corresponds to one tile wide, and two tiles tall, meaning it's vertical. So the first byte is the width of the route, and the third byte is the height of the route. Meaning if you changed Route 1's data from 01 00 02 00 to 02 00 01 00, the route would then be two tiles wide and one tile tall, or a horizontal route. Additionally, if you changed it to 02 00 02 00, the route would be a square.
__________________

Thank you for hatching the eggs!
Please view these dragons! Just click them and you're done!
If you don't help them grow up, they'll die...



  #22010    
Old July 12th, 2012, 01:36 AM
FrozenInfernoZX's Avatar
FrozenInfernoZX
Legendary Trainer ZX
 
Join Date: Jun 2012
Location: United States
Gender: Male
Nature: Adamant
Send a message via AIM to FrozenInfernoZX
02 00 02 00 as in the locator head would be locked in just one tile on the map, correct? Like all cities are, not matter how big the city may be.

EDIT - Woow, awesome it worked! I changed my starting town (just to test it) and the town became a vertical map! Thanks man, I appreciate for your findings and discoveries!

EDIT 2 - So if I changed that 3rd byte to a 03 the town would become a one tile horizontal 3 tile vertical map?

EDIT 3 - Tried it on Route 49, success! Thanks again man!

Last edited by FrozenInfernoZX; July 12th, 2012 at 02:12 AM.
  #22011    
Old July 12th, 2012, 04:58 AM
SacredMurathJohn's Avatar
SacredMurathJohn
ROM Hacking
 
Join Date: Jul 2012
Location: Turkey
Gender: Male
Nature: Hasty
How can I change the badge sprites? When I attemp to change it, the pallette messes up.
  #22012    
Old July 12th, 2012, 08:20 AM
~[BlackHole]'s Avatar
~[BlackHole]
Unhatched Egg
 
Join Date: Feb 2012
Sorry, is there a way or a tutorial that explain how to animate a door? I changed the tilesets of my rom and I added a new house, but I don't know how to animate its door... Thanks!
  #22013    
Old July 12th, 2012, 08:33 AM
redriders180's Avatar
redriders180
Mastermind of Pokemon Glazed
 
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180
Quote:
Originally Posted by FrozenInfernoZX View Post
02 00 02 00 as in the locator head would be locked in just one tile on the map, correct? Like all cities are, not matter how big the city may be.

EDIT - Woow, awesome it worked! I changed my starting town (just to test it) and the town became a vertical map! Thanks man, I appreciate for your findings and discoveries!

EDIT 2 - So if I changed that 3rd byte to a 03 the town would become a one tile horizontal 3 tile vertical map?

EDIT 3 - Tried it on Route 49, success! Thanks again man!
There is actually one map in-game that uses an 02 00 02 00...That route with the Dotted Hole. I don't know if there's a limit to the numbers (besides the size of the map itself) or not, since I don't know if it does raw calculations or comparing with ASM. For example, I have a map in my game that's 02 00 04 00, which no map in the original game shares. So oddly-shaped routes should be your only "limitation"

Quote:
Originally Posted by SacredMurathJohn View Post
How can I change the badge sprites? When I attemp to change it, the pallette messes up.
I tried to change the sprites using the other colors on the badges palette, but it just crashed the game whenever I loaded the Trainer Card. Or, perhaps you used the wrong palette. Are you able to show a picture of what's happening?

Quote:
Originally Posted by ~[BlackHole] View Post
Sorry, is there a way or a tutorial that explain how to animate a door? I changed the tilesets of my rom and I added a new house, but I don't know how to animate its door... Thanks!
There is a program called "Door Manager" that can be downloaded somewhere on the first page of the Tutorial page (If I remember right, it's on a thread called _______s Toolbox, although I don't know who the _______ is). It works for both Ruby and Firered, although Ruby obviously has more frames to edit.
__________________

Thank you for hatching the eggs!
Please view these dragons! Just click them and you're done!
If you don't help them grow up, they'll die...




Last edited by redriders180; July 12th, 2012 at 08:36 AM. Reason: Your double post has been automatically merged.
  #22014    
Old July 12th, 2012, 11:08 AM
YogiBerra
 
Join Date: Oct 2010
Gender: Male
I have two questions, which I hope will be pretty simple to answer.

First, how would I go about changing the coordinates at which the player respawns after whiting out? I know how to change the map and the map bank, but I want to change the coordinates and also what the game says. This is specifically for the first healing spot in the Player's house. I want him to respawn in his bed, and use different text than the mom text, I just don't know where these things are located.

Secondly, I edited Route 1 in my hack, but kept the same tilesets and dimensions, however whenever I step from Route 1 into Viridian City (which is currently not edited) the tiles at the end of Route 1 that I just stepped off off (about the last fifth of the map or so) all change to random tiles like water or the sides of a mountain or something, but then if I walk farther down the route and they go out of sight, when I come back they're back to normal. My question is just how to fix it so that this doesn't happen anymore.
  #22015    
Old July 12th, 2012, 11:55 AM
amcolash's Avatar
amcolash
Unhatched Egg
 
Join Date: Jan 2012
Gender: Male
Quote:
Originally Posted by CrystalStatic View Post
Hello, I have a question. I want to add some new event pictures to my hack, but I don't know how to. If this is to much to explain, could I have a link to a tutorial please? I couldn't find any on this topic...

Thanks
You may also want to look at this tutorial to figure out about the pictures shown when going into certain places.

Quote:
Originally Posted by SacredMurathJohn View Post
How can I change the badge sprites? When I attemp to change it, the pallette messes up.
You will need to change the sprites in the same palette, or repoint the palette for the badges

Quote:
Originally Posted by YogiBerra View Post
First, how would I go about changing the coordinates at which the player respawns after whiting out? I know how to change the map and the map bank, but I want to change the coordinates and also what the game says. This is specifically for the first healing spot in the Player's house. I want him to respawn in his bed, and use different text than the mom text, I just don't know where these things are located.
For this, you must change the flying data and healing locations. I have not had too much success with this, but here is a tutorial on the subject. Good luck!
__________________
Pokemon Ember - an addition to the already wonderful pokemon games
Coming Soon!


Last edited by amcolash; July 12th, 2012 at 12:00 PM. Reason: Your double post has been automatically merged.
  #22016    
Old July 12th, 2012, 12:05 PM
~[BlackHole]'s Avatar
~[BlackHole]
Unhatched Egg
 
Join Date: Feb 2012
Thank you redriders, I know that tool and I tried to use it, but it shows only the "default doors" of the game... How can edit a new door with it?? Thanks!

EDIT

I'm a dumbass, in the readme file of Door Manager there is a tutorial, sorry D:

Last edited by ~[BlackHole]; July 12th, 2012 at 12:16 PM.
  #22017    
Old July 12th, 2012, 01:28 PM
Renegade's Avatar
Renegade
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Hello, I'm have a problem with XSE compiling. Here is my script:

Code:
#dynamic 0x800440

#org @start
checkflag 0x519
if 0x1 goto @done
setweather 0xB
doweather
release
end

#org @done
setvar 0x5016 0x1
release
end
Every time I try to compile it, I get the Compiler Output box but it doesn't give me any offsets... Help please?\

EDIT: Nevermind, I had a duplicate of this script.

Last edited by Renegade; July 12th, 2012 at 04:04 PM.
  #22018    
Old July 12th, 2012, 05:28 PM
SpadeEdge16's Avatar
SpadeEdge16
 
Join Date: May 2012
Gender: Male
How do you edit the pallet in the OW editor? It won't let me click the button...
Or can I just cut the image of a mini sprite out and import it into OW?

And another question. With the vs seeker in FR, how do they make it so that after a certain point, the trainers pokemon become stronger? And how do they do that for your rival? Do you have to make multiple copies of the trainers and then just give the later versions stronger pokemon? Or does it have to do with scripting. Can someone explain this to me please?

Last edited by SpadeEdge16; July 12th, 2012 at 05:42 PM.
  #22019    
Old July 12th, 2012, 06:23 PM
Darkrai Lv.1000's Avatar
Darkrai Lv.1000
Has a tendency to figure things out
 
Join Date: Jul 2007
Location: Aboard the Arc-Gurren
Age: 19
Gender: Male
Nature: Adamant
Send a message via AIM to Darkrai Lv.1000
ok, there's something i've been wondering about for a while.
how does one go about displaying those pictures when a character talks (ex: You talk to a main character, and a picture of their face shows as they speak, like in Life of Guardians and other hacks I've seen)?

also, my other question from the last page: what are the advantages and disadvantages(if any) of expanding the rom size?
__________________
  #22020    
Old July 12th, 2012, 06:44 PM
redriders180's Avatar
redriders180
Mastermind of Pokemon Glazed
 
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180
Quote:
Originally Posted by Darkrai Lv.1000 View Post
ok, there's something i've been wondering about for a while.
how does one go about displaying those pictures when a character talks (ex: You talk to a main character, and a picture of their face shows as they speak, like in Life of Guardians and other hacks I've seen)?

also, my other question from the last page: what are the advantages and disadvantages(if any) of expanding the rom size?
1. The way most people do it will only work on Ruby, and possibly Emerald. They use one of the 25 ????????? slots to hold small images, and then use showpokepic, and immediately following is the command "hidebox", leaving only a raw image. The reason it works only in Ruby (and Emerald?) is because hidebox doesn't work in FRLG.

2. Advantages: More space. Disadvantages: Lunar IPS no longer works, but A-Ptch, and a few other lesser-known patching utilities support it.

Quote:
Originally Posted by SpadeEdge16 View Post
How do you edit the pallet in the OW editor? It won't let me click the button...
Or can I just cut the image of a mini sprite out and import it into OW?

And another question. With the vs seeker in FR, how do they make it so that after a certain point, the trainers pokemon become stronger? And how do they do that for your rival? Do you have to make multiple copies of the trainers and then just give the later versions stronger pokemon? Or does it have to do with scripting. Can someone explain this to me please?
1. Nameless Sprite Editor allows Palette editing. The only way to do it with Overworld Editor is to import a pre-indexed sprite, and import both the image and palette. It will, of course, make everything that has that palette take on that color, so be careful!

2. I have a scripting reference guide, made by I believe JPAN, but I could be wrong:
Spoiler:

FireRed has a data table at 0x0845318C, which associates a "base" trainer flag with up to five other trainer flags. These other flags are used for rematches; their trainers are rematch versions of the trainer associated with the "base" flag.
The table is limited to 0xDC (zero-indexed) rows. A single row in the table is structured in the following manner:
  • Word: Trainer flag (battle 0) (base flag)
  • Word: Trainer flag (rematch 1)
  • Word: Trainer flag (rematch 2)
  • Word: Trainer flag (rematch 3)
  • Word: Trainer flag (rematch 4)
  • Word: Trainer flag (rematch 5)
  • Word: Unknown.
  • Word: Unknown.
0xFFFF in a row means that there is no rematch for that slot. 0x0000 in a row means that no rematches are defined for that slot or any of the ones after it (and the slots after it should be 0x0000 as well).

and more info here:
Spoiler:

When initiating a rematch battle via trainerbattle, the game will attempt to select the appropriate rematch flag, which will be used to start the battle.
First, the command locates the rematch table row for the input trainer flag (by searching for a row whose first flag is equal to the input trainer flag). The ASM will then loop through each rematch flag in the row, checking their states and retrieving the earliest cleared (non-defeated) rematch flag. If the ASM encounters an 0xFFFF entry, that entry will be skipped. If the ASM encounters 0x0000 at any point in the row, it will stop looping and select the last valid flag it looped over.
The game saves the number of the selected rematch flag (0 - 5), and uses that to check one of five different flags that enable rematches based on the player's progress through the game; we'll cause these five flags "state flags". If the state flag that would enable this rematch flag is cleared, then the game will select the previous rematch flag. (If the previous rematch flag is 0xFFFF, then the game loops backwards through the row until it finds a valid flag; that flag is then selected.)
Finally, the game will take the selected flag and check its state. If it is cleared, trainerbattle will call a script (different one for each battle type), and that script will start the battle by calling repeattrainerbattle (or an equivalent special). If the selected flag is set, on the other hand, then trainerbattle will return without doing anything and the calling script will continue.

It's a very complex process, but it is extendable




Quote:
Originally Posted by YogiBerra View Post
I have two questions, which I hope will be pretty simple to answer.

First, how would I go about changing the coordinates at which the player respawns after whiting out? I know how to change the map and the map bank, but I want to change the coordinates and also what the game says. This is specifically for the first healing spot in the Player's house. I want him to respawn in his bed, and use different text than the mom text, I just don't know where these things are located.

Secondly, I edited Route 1 in my hack, but kept the same tilesets and dimensions, however whenever I step from Route 1 into Viridian City (which is currently not edited) the tiles at the end of Route 1 that I just stepped off off (about the last fifth of the map or so) all change to random tiles like water or the sides of a mountain or something, but then if I walk farther down the route and they go out of sight, when I come back they're back to normal. My question is just how to fix it so that this doesn't happen anymore.
For your second question, Only two tilesets can be displayed on the screen at a given time. Since Tileset 1 is always 0 for outdoor maps, we only consider differences in Tileset 2.

Say, for instance, you're leaving a map with Tileset 3 and entering a map with Tileset 9. Once you cross that barrier, Tileset 3 is erased, and Tileset 9 takes its place. That means all the Tileset 3 tiles get replaced with their Tileset 9 counterparts.

There are a few ways to get around this:
1. Make sure only nature tiles are in view when switching maps. To put it simply, make it so no Tileset 2 tiles are in view. when crossing over maps
2. Use gatehouses.
3. Make maps that share their Tileset 2.
__________________

Thank you for hatching the eggs!
Please view these dragons! Just click them and you're done!
If you don't help them grow up, they'll die...



  #22021    
Old July 12th, 2012, 07:44 PM
SpadeEdge16's Avatar
SpadeEdge16
 
Join Date: May 2012
Gender: Male
Thanks, redriders!
Yeah, I know about all the pallets changing if you import another into it, which is why I would be pretty scared, haha.

The rematches are pretty complicated, but if this wasn't too much to ask, is there any chance you could show me a script from one of the rematchable trainers in FR and point out where the section you mentioned is located? So that way I can analyze it and teach myself how to use it effectively.
  #22022    
Old July 12th, 2012, 08:52 PM
redriders180's Avatar
redriders180
Mastermind of Pokemon Glazed
 
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180
Quote:
Originally Posted by SpadeEdge16 View Post
Thanks, redriders!
Yeah, I know about all the pallets changing if you import another into it, which is why I would be pretty scared, haha.

The rematches are pretty complicated, but if this wasn't too much to ask, is there any chance you could show me a script from one of the rematchable trainers in FR and point out where the section you mentioned is located? So that way I can analyze it and teach myself how to use it effectively.
Well, unfortunately, a fair amount of a rematchable trainer is undercover, in ASM. All the rematched trainer scripts have this format:

Spoiler:

'---------------
#org 0x1A953D
trainerbattle 0x0 0x75 0x0 0x818371B 0x8183746 *\Like any trainerbattle script...
special2 LASTRESULT 0x39 *\checks if VS seeker was used
compare LASTRESULT 0x1
if 0x1 goto 0x81A9564 *\if it was, branch to the second script.
msgbox 0x818374F MSG_NORMAL *\if it wasn't, proceed as normal.
end

'---------------
#org 0x1A9564
trainerbattle 0x5 0x75 0x0 0x81C155D 0x8183746 *\see explanation below
msgbox 0x818374F MSG_NORMAL *\proceed as normal.
end


'---------
' Strings
'---------
#org 0x18371B
= That look you gave me[.]\nIt's so intriguing!

#org 0x183746
= Be nice!

#org 0x18374F
= You can avoid battles by not\nletting TRAINERS see you.

#org 0x1C155D
= That look you give me[.]\nIt intrigues me so!

Commented, if need be.

Now, when it branches, it appears to call the exact same trainer battle, but this is not the case. It calls one of the other trainerbattles associated with that base. The table mentioned in my previous post will "link" up to five trainers together. So the ASM will load one of those trainerbattles, and NOT the 0x75 trainerbattle. Each rematchable person has basically five trainerbattles associated with them.

Another thing I forgot to mention is that certain trainerbattles are "unlocked" after setting certain flags. For example, no trainers are rematchable until flag 0x292 is set. All rematchable trainers jump to the next level when flag 0x896 (Celadon City visited) is set. All rematchable trainers jump ANOTHER level when flag 0x897 (Fuschia City visited) is set. They jump a fourth level when flag 0x82C (E4 beaten) is set. And they reach their highest level once flag 0x844 (RSE Trading established) is set.
__________________

Thank you for hatching the eggs!
Please view these dragons! Just click them and you're done!
If you don't help them grow up, they'll die...



  #22023    
Old July 12th, 2012, 09:19 PM
SpadeEdge16's Avatar
SpadeEdge16
 
Join Date: May 2012
Gender: Male
Quote:
Originally Posted by redriders180 View Post
Well, unfortunately, a fair amount of a rematchable trainer is undercover, in ASM. All the rematched trainer scripts have this format:

Spoiler:

'---------------
#org 0x1A953D
trainerbattle 0x0 0x75 0x0 0x818371B 0x8183746 *\Like any trainerbattle script...
special2 LASTRESULT 0x39 *\checks if VS seeker was used
compare LASTRESULT 0x1
if 0x1 goto 0x81A9564 *\if it was, branch to the second script.
msgbox 0x818374F MSG_NORMAL *\if it wasn't, proceed as normal.
end

'---------------
#org 0x1A9564
trainerbattle 0x5 0x75 0x0 0x81C155D 0x8183746 *\see explanation below
msgbox 0x818374F MSG_NORMAL *\proceed as normal.
end


'---------
' Strings
'---------
#org 0x18371B
= That look you gave me[.]\nIt's so intriguing!

#org 0x183746
= Be nice!

#org 0x18374F
= You can avoid battles by not\nletting TRAINERS see you.

#org 0x1C155D
= That look you give me[.]\nIt intrigues me so!

Commented, if need be.

Now, when it branches, it appears to call the exact same trainer battle, but this is not the case. It calls one of the other trainerbattles associated with that base. The table mentioned in my previous post will "link" up to five trainers together. So the ASM will load one of those trainerbattles, and NOT the 0x75 trainerbattle. Each rematchable person has basically five trainerbattles associated with them.

Another thing I forgot to mention is that certain trainerbattles are "unlocked" after setting certain flags. For example, no trainers are rematchable until flag 0x292 is set. All rematchable trainers jump to the next level when flag 0x896 (Celadon City visited) is set. All rematchable trainers jump ANOTHER level when flag 0x897 (Fuschia City visited) is set. They jump a fourth level when flag 0x82C (E4 beaten) is set. And they reach their highest level once flag 0x844 (RSE Trading established) is set.
Wow, this is perfect, thank you! I think for my hack I'll just need to change when those flags are set, because I might keep the trainers on their own, but if I changed their Pokemon in Atrainer and just replaced their offset in their script so the new changes to heir party would apply, does this mean that the vs seeker will apply those changes to the party as well? Or would I have to make a whole new script for them?
And just to make sure I understand this, I would be putting the same trainer battle in the script, then setting flags for each and once the flag is set, it will pass the original battle and move on to the next unchecked flag? And does the rematch special in the script level up/evolve the pokemon when you fight them later? Meaning you don't have to make five seperate trainers for the same battle.
  #22024    
Old July 12th, 2012, 09:41 PM
redriders180's Avatar
redriders180
Mastermind of Pokemon Glazed
 
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180
Quote:
Originally Posted by SpadeEdge16 View Post
Wow, this is perfect, thank you! I think for my hack I'll just need to change when those flags are set, because I might keep the trainers on their own, but if I changed their Pokemon in Atrainer and just replaced their offset in their script so the new changes to heir party would apply, does this mean that the vs seeker will apply those changes to the party as well? Or would I have to make a whole new script for them?
And just to make sure I understand this, I would be putting the same trainer battle in the script, then setting flags for each and once the flag is set, it will pass the original battle and move on to the next unchecked flag? And does the rematch special in the script level up/evolve the pokemon when you fight them later? Meaning you don't have to make five seperate trainers for the same battle.
The upping of the levels isn't automatic...the levels being "upped" is actually you fighting a completely different trainer, with the same party, just with higher leveled Pokemon.

For example, open up a clean Firered ROM in A-trainer. Navigate to trainer number 0x092...Named Jeff, and has a Level 16 Spearow and a Level 16 Raticate. Now navigate to battle number 0x273...Named Jeff, with a Level 21 Spearow and a Level 21 Raticate. Number 0x274 is also named Jeff, with a Level 29 Fearow and a Level 29 Raticate. Number 0x275 is ALSO named Jeff, with a Level 54 Fearow and a Level 54 Raticate. Even though the script doesn't explicitly call all four of those battles in the conventional sense, each of them is linked on the table I mentioned earlier. Meaning, the only way to edit the "linked" trainers is with a hex editor.

Also, the "rematch" trainer battle uses trainerbattle 0x5, and not trainerbattle 0x0. That's important.

JPANs hack engine has a nifty feature that allows you to change the levels of a battled Pokemon by setting a variable, and I plan to use this as an alternative to having five different trainers for each rematch.

To change which flags activate which levels, you only need to change the half-words at 0x10CCD8, 0x10CCE0, 0x10CCE8, 0x10CCF0, and 0x10CD10. Remember, they're reversed, so flag 0x0800 would be written as 00 08.
__________________

Thank you for hatching the eggs!
Please view these dragons! Just click them and you're done!
If you don't help them grow up, they'll die...




Last edited by redriders180; July 12th, 2012 at 09:46 PM. Reason: Clarification
  #22025    
Old July 13th, 2012, 11:15 AM
FrozenInfernoZX's Avatar
FrozenInfernoZX
Legendary Trainer ZX
 
Join Date: Jun 2012
Location: United States
Gender: Male
Nature: Adamant
Send a message via AIM to FrozenInfernoZX
I am currently doing some scripting. Not wanting to waste free space I decided to start off by editing existing scripts (reusing their offsets to create entirely new events). If my new script is larger than the original script in terms of size, does the script editor automatically repoint the script to a place with free space or would other scripts/things in rom get overwritten?
Closed Thread
Quick Reply

Sponsored Links


Advertise here
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 12:40 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.