The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other Editing Initial Spawn Location (https://www.pokecommunity.com/showthread.php?t=327633)

ZeroV8 May 29th, 2014 11:17 AM

Editing Initial Spawn Location
 
The first question I have is simply how would I go about changing the map and tile you spawn on after Oak's initial speech in FireRed? I am not concerned with changing the actual text in the speech at this point, I just want to change the spawn location so I can test the maps and scripts I have in the game.

Another slightly related question I have involves warps in Advance Map. I am running into a problem where the warp at the stairs in the room you start in in FireRed takes me to a black screen. I'm not sure if that means my ROM is corrupted in some way, or if there is an error in where I am sending the warp to. I have tried changing the map and bank on the warp multiple times but nothing has altered me getting a black screen as a result.

The final question I have is also related to Advance Map. Whenever I load up one of the maps I have created, Advance Map gives me the error message, "ERROR: (ENotAPointer) AdvanceMapError(5): Value $FFFFFFFF is not a Pointer! Please contakt [email protected]". I am not sure what this error means in the first place, and how I would go about resolving it. Any advice would be much appreciated.

Spherical Ice May 29th, 2014 11:18 AM

Edit these bytes: http://www.pokecommunity.com/showpost.php?p=7365034&postcount=270 in a hex editor.

ZeroV8 May 29th, 2014 1:01 PM

Quote:

Originally Posted by Spherical Ice (Post 8274753)

I am extremely new to hacking in general and have never done any hex editing. Do you know of any guides to hex editing? For example, I can find, at least close to, the hex values you indicated in the editor, but I don't know what to do about replacing the values for each hex value.

Spherical Ice May 29th, 2014 11:57 PM

Well, if you want to start the player off at the co-ordinates (found in A-Map, in hexadecimal) of 0D, 04, you would go to the following offset:

0x54A08: Player X Position

in a hex editor and type 0D, and then go to:

0x54A00: Player Y Position

and type 04.

If you wanted to change the starting-off map from (4,1) to, say, (12,0), you would first convert this to hexadecimal, making it 0C as the map bank and 00 as the map number. You then go to:

0x54A04: Map Bank

in a hex editor and type "0C", and then go to:

0x54A06: Map Number

and type "00". Then simply save and test.

ZeroV8 May 30th, 2014 6:47 AM

Just to confirm, in this image, http://i.imgur.com/pv3zIOR.png, 0x54A08 would be where the number at the top and the number at the bottom "meet" so to say, as if I were to draw a line straight from each of them and edit where they cross, correct?

Mana May 30th, 2014 6:53 AM

Yes, where they meet is the byte '54A008' (remember the zero). The top row contibute the last number to the offset.

If you're looking for '54A08' that is actually 54A080' which you can see is down the left handside (where all offsets end with zero).

ZeroV8 May 30th, 2014 9:58 AM

Yay! I got it to work! Thank you two so much for your help!

ZeroV8 May 30th, 2014 10:29 AM

I've run into another problem, so I figure that I might as well ask it in this thread instead of spamming this board with new threads.

Basically, I've created a script in XSE, which has no bugs, but whenever I try to import the script into Advance Map, it erases itself, I guess would be the closest thing. So I have the script I created in XSE, then when I click the open script button in AMap, it pops up some empty script. At this point I simply copy paste my script into the box, overwriting the empty script that AMap puts in there by default. However, once I close the XSE box that pops up in AMap after copying my script over, and then click the open script button again, the same empty script that was there in the beginning pops up. This results in my script not occurring in game. Am I doing something wrong when saving it? Is there something specific I need to name the script? I'm using an offset I found in FSF, so I don't think that is the issue.

Thanks again for the help.

Mana May 30th, 2014 11:51 AM

First, don't bother using FSF, just start your script with: #dynamic 0x740000

Then, make sure you are using the compile button (blue gears) to insert it, not the save button. Then copy the starting offset to your person event and save in advance map.

That should work. Let us know :).

ZeroV8 May 30th, 2014 12:18 PM

No dice.

Here, http://i.imgur.com/8U7fYZK.png, is the script I want.

This, http://i.imgur.com/XfMVRX7.png, is the script that pops up in Advance Map every time I try to edit the script, even after I compile the script I want.

Mana May 30th, 2014 12:23 PM

Click open script, then delete everything and completely paste in your script. Press the gears, it'll give you a new offset (not 740000 by the looks of it) and copy that into amap

ZeroV8 May 30th, 2014 12:31 PM

That kind of worked. When I step on the square the script is set on, the player character stops in place, but doesn't do any of the things the script calls for. When I compiled the script, it gave me two offsets for the two different pointers in my script. Did I maybe use the wrong one?

Mana May 30th, 2014 12:40 PM

Ah, you're using a script tile rather than just a person. That requires a bit more effort :) have a look in out tutorial section for 'flags, variables and script tiles' by Karatekid

ZeroV8 May 30th, 2014 8:10 PM

I'm making progress. I got the text string in the script to pop up on screen and work. However I want this script to only play once, which would mean I need to set the value of the variable controlling this script to a different value at the end of the script. I tried doing this, I put "setvar 0x4012 0x1" after the end command. However the script will still activate if you step on the tile again. Upon further investigation, if I look at the script in AMap after it had been compiled, the command to change the value of the variable isn't there. Do you have any idea what is happening? Is it possible that I am putting the command to change the value of the variable after the wrong command?

Spherical Ice May 31st, 2014 2:04 AM

On the script tile in Advance Map, set the "Var number" to 4012 and the "Var value" to 0.

ZeroV8 May 31st, 2014 11:50 AM

I tried setting the var value to 0, and that didn't work, but then I went into the script and put the setvar command after the release command instead of the end command.

Now my script finally works! Thank you guys so much for the help the past couple of days!


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