[Tutorial] How to Change the Start Map with a Hex Editor (FireRed only)

Notices

Welcome to the PokéCommunity!

Hi there! Thanks for visiting PokéCommunity. We’re a group of Pokémon fans dedicated to providing the best place on the Internet for discussing ideas and sharing fan-made content. Welcome! We’re glad you’re here.

In order to join our community we need you to create an account with us. Doing so will allow you to make posts, submit and view fan art and fan fiction, download fan-made games, and much more. It’s quick and easy; just click here and follow the instructions.

This tutorial is for FireRed hackers who use JPAN's Hacked Engine and have had the unfortunate experience of opening SMCA to get this error:

(I'll type it too, so hopefully searching the error in Google will find this page)
Run-time error '380':

Invalid property value

I will explain what caused this error in a little bit, but first, let's do what SMCA can do with a Hex editor. I personally recommend HxD for this.

So, here are your offsets:
(These are taken from the source code of SMCA, except for the y-coordinate, which I had to find myself, only later realizing JPAN had documented it in his notes for the first Hacked Engine release.)

And, here they are in HxD (on a copy of FireRed with the Hacked Engine of course):

So, it is as simple as changing those bytes to match what you want the starting players location to be. Remember, everything is in Hex.

Now, you will notice I did not tell you how to change the player facing. In a standard, unhacked FireRed, the location for the player facing is 0x168CCB and here is a key:

Quote:

down= 01
up= 02
left= 03
right= 04

Now, let's go to that offset in the hacked copy of FireRed:

As you can see, this location has been removed by JPAN. It was a map script and in his hacked engine, all scripts are removed. This is what caused the error in SMCA. It was looking for either a 01, 02, 03, or 04 at offset 0x168CCB, but instead got an FF.

I already tried that, my best bet is it is part of an ASM routine that loads offset by adding a certain amount to an earlier offset. But, i just had an idea! Set a breapoint on the read of the playerfacing location in a clean rom. Let me give this a try.....

Hmm, so taking the old one doesn't work, and searching for the new one doesn't work,
seems like it all must be stored in the ram, or something crazy like that.
maybe the whole thing was just recreated, like a whole new way of calling the beginning.
Maybe creating your own kind, and in a clean rom, find all offsets that point to the one in the clean rom.
Then in the hacked rom, go to those pointers and point to the new address where you made yours.
all this is nuts man!

Hmm, so taking the old one doesn't work, and searching for the new one doesn't work,
seems like it all must be stored in the ram, or something crazy like that.
maybe the whole thing was just recreated, like a whole new way of calling the beginning.
Maybe creating your own kind, and in a clean rom, find all offsets that point to the one in the clean rom.
Then in the hacked rom, go to those pointers and point to the new address where you made yours.
all this is nuts man!

Hey, this is great! Only one problem though, I tried this on an unhacked FireRed but the when I try to change the way the player is facing, he always ends up facing down no matter what I do. Do you know why this is?

Actually, JPAN's engine removes that part completely, you can see this because the player faces up at the beginning of a regular FR ROM whereas they face down in a patched version. The reason behind this is because the direction the player faces is determined by a level script in the player's room which is only activated when they first enter/ spawn there. But since all scripts are cleared in the patch it was replaced with 0xFF bytes, leading to the error encountered.

Anyway, this is a pretty helpful/ simple tutorial to get around the problems associated with SMCA and its even better now that people will be able to know at a glance how to change that elusive Y-coordinate :P

Actually, JPAN's engine removes that part completely, you can see this because the player faces up at the beginning of a regular FR ROM whereas they face down in a patched version. The reason behind this is because the direction the player faces is determined by a level script in the player's room which is only activated when they first enter/ spawn there. But since all scripts are cleared in the patch it was replaced with 0xFF bytes, leading to the error encountered.

Anyway, this is a pretty helpful/ simple tutorial to get around the problems associated with SMCA and its even better now that people will be able to know at a glance how to change that elusive Y-coordinate

So, I decided to check this out and found that the level script type for the way the player is facing is a "Validates Values... [4]". Is it possible that I could have this level script and a level script of the "[2] Validates Values" at the same time so the player is facing a certain way and have another level script activate at the same time?

Actually, JPAN's engine removes that part completely, you can see this because the player faces up at the beginning of a regular FR ROM whereas they face down in a patched version. The reason behind this is because the direction the player faces is determined by a level script in the player's room which is only activated when they first enter/ spawn there. But since all scripts are cleared in the patch it was replaced with 0xFF bytes, leading to the error encountered.

Anyway, this is a pretty helpful/ simple tutorial to get around the problems associated with SMCA and its even better now that people will be able to know at a glance how to change that elusive Y-coordinate

The experienced are the dead, collapsed in their heaps
The beyond is ahead and you can only hope to catch a glimpse
You peer into the fabric mirage
There is no form, no color
A new scene without compare nor equal

sorry if Im asking yah this, I aint using JPAN hacked engine and I'm having problem in SMCA, it doesnt have Y coordinate and I cant find the right X value in my desired position...
Is there a way to edit the Y position using Hex editor?

sorry if Im asking yah this, I aint using JPAN hacked engine and I'm having problem in SMCA, it doesnt have Y coordinate and I cant find the right X value in my desired position...
Is there a way to edit the Y position using Hex editor?

The PokéCommunity

Meta

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, or The Pokémon Company International. We just love Pokémon.