Advertiser Content

Deokishisu

Mr. Magius

Male
If I'm online, it's a safe bet I'm at a computer.
Seen January 9th, 2019
Posted March 4th, 2018
859 posts
13.8 Years
Thought this might help out a couple people...

How to Kill the "Killing PC" Glitch

The "Killing PC Glitch" occurs when the player heals at a PC you created (i.e. one that you made out of another map or inserted into a blank map, not a PC that was already in the game and was edited) and hasn't healed at a "real" or "default" PC beforehand. It messes everything up and freezes the game as most of you know. Well, I've done some research, and I've learned how to fix it.

Now, default Nintendo PCs have two levelscripts in the map. The first goes like this:
#org 0x(offset)
sethealingplace 0x(#)
end
The second is always the same on every PC map, whose offset is: 1BC05C.

The first is what we have to worry about. When the command "sethealingplace" is used, it's basically setting that this was the last Pokémon Center the player has visited, and allows the Nurse to heal your Pokémon with the generic Nurse script without freezing. The "#" is a value in hex from 1 to 14 in Firered and Leafgreen. That means there are a total of 20 default PCs in Firered and Leafgreen.

Simply add these two levelscripts to your custom Pokémon Center, and your PC won't kill anyone.

However, there is a catch. As far as I can tell, you can't go past the default amount of Pokémon Centers included in the game. That means you can't increase the sethealingplace value past 14 and magically add another PC. If you do that, you'll appear at the last default PC, which happens to be Six Island in FR. The sethealingplace value should correspond to the previous Pokémon Center the player would have normally visited. That way, when your unsuspecting victims-I mean-loving playerbase finds their Pokémon have been eaten by a Lvl. 100 wild Cleffa, they'll go back to the previous town to heal and not, say, your unedited Seven Island's Pokemon Center.

The values go in order. In Firered they start with:
0x01 = Player's House
0x02 = Viridian City
0x03 = Pewter City
0x04 = Cerulean City
0x05 = Lavender Town
0x06 = Vermilion City
0x07 = Celadon City
0x08 = Fuchsia City 
0x09 = Cinnabar Island
0x0A = Indigo Plateau/Pokemon League Entrance
0x0B = Saffron City
0x0C = Route 4/Mt. Moon Entrance
0x0D = Route 10/Rock Tunnel Entrance
0x0E = One Island
0x0F = Two Island
0x10 = Three Island
0x11 = Four Island
0x12 = Five Island
0x13 = Seven Island
0x14 = Six Island

^Notice Seven and Six Island are switched.
NOTE: The levelscript for the player's house is actually in the player's room,
and not on the first floor.
As a totally random example, if you wanted to add a PC between Viridian and Pewter right before Viridian Forest, you would use 0x2 as your value for sethealingplace in your custom PC. That way, if the player dies, they will appear at Viridian's Pokémon Center and not Pewter's or Fuchsia's or another PC.

I don't hack R/S/E, but I'd imagine it'd work in a similar fashion. Someone's welcome to confirm it.

EDIT:
Sorry to bump, but here are the values for Pokemon Emerald:

0x01 = Player's Room (male)
0x02 = Player's Room (female)
0x03 = Petalburg City
0x04 = Slateport City
0x05 = Mauville City
0x06 = Rustboro City
0x07 = Fortree City
0x08 = Lilycove City
0x09 = Mossdeep City
0x0A = Sootopolis City
0x0B = Ever Grande City (Victory Road)
0x0C = Littleroot Town (left)
0x0D = Littleroot Town (right)
0x0E = Oldale Town
0x0F = Dewford Town
0x10 = Lavaridge Town
0x11 = Fallarbor Town
0x12 = Verdanturf Town
0x13 = Pacifidlog Town
0x14 = Ever Grande City (Pokemon League)
0x15 = Southern Island
0x16 = Battle Frontier
EDIT: Updated the list. Thanks colcolstyles.

0m3GA ARS3NAL

Im comin' home...

Age 27
Male
Superjail Penitentiary
Seen October 4th, 2015
Posted September 12th, 2013
1,816 posts
11.9 Years
I can imagine this would be a table, so if we can find the table data, we might be able to add more PC's... unless there IS not table, and the game just reads that one byte and does what it does...
This table data would be a bit more difficult to locate, I'll look for some help.

GREAT data BTW.
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>

Deokishisu

Mr. Magius

Male
If I'm online, it's a safe bet I'm at a computer.
Seen January 9th, 2019
Posted March 4th, 2018
859 posts
13.8 Years
this is useful, but are these also the numbers I can use in a script for sethealing place?
Yes, put one of the values in the sethealingplace 0x(#) bit of your level script and it will port the player to the Pokemon Center that corresponds to that value when they lose. That way, your custom PC won't try to heal the player and crash the game when they lose.

Samike360

Lover of May

ATL
Seen June 9th, 2015
Posted October 3rd, 2010
397 posts
10.7 Years
How would I edit the Nurse Joy script? Is that the second level script you mentioned? And thanks a lot, this will prove very useful to me.





Please warm my eggs...I'll be sure to return the favor

From now one, if you haven't contacted me yet....I will not accept hacks unless they are at least in progressing hacks. So if you want my help, get some screenshots first.

Deokishisu

Mr. Magius

Male
If I'm online, it's a safe bet I'm at a computer.
Seen January 9th, 2019
Posted March 4th, 2018
859 posts
13.8 Years
How would I edit the Nurse Joy script? Is that the second level script you mentioned? And thanks a lot, this will prove very useful to me.
It really depends on what you want to do with the Nurse Joy script, as far as I can tell, it has nothing to do with the second levelscript on the map:

#org 0x1BC05C
special 0x182
end
^Which is the same offset and everything in every PC. I've tried using the special a number of times in different situations, and it appears to do nothing. However, it has to be important for the Pokemon Center, or it wouldn't be there. So I'd just be on the safe side and leave it as is.



There are a variety of things you could do with Nurse Joy's script without killing its functionality, would you care to be more specific?

For example, in something I've been working on in my spare time, you could get to a Pokemon Center before receiving your starter. I just added a checkflag 0x828 to the beginning of her script and if I didn't have a Pokemon, I had it simply go to a msgbox instead of going through and trying to heal my nonexistant Pokemon and crashing the game.

If you wanted to go even more simple and edit what she says in each town, you'd just replace the text and repoint if it's bigger in each town's individual Nurse Joy script.

You can do anything really, she's just like any other NPC, add some checkflags, applymovements, whatever you want and she'll function in any event. Just make sure she's pointed back to her original healing script if the event's already been done with a "checkflag 0x(#)" and a "if 0x1 goto 0x(offset of healing script)".

If you don't have a clue what I'm saying, read a scripting tutorial.

Samike360

Lover of May

ATL
Seen June 9th, 2015
Posted October 3rd, 2010
397 posts
10.7 Years
It really depends on what you want to do with the Nurse Joy script, as far as I can tell, it has nothing to do with the second levelscript on the map:

#org 0x1BC05C
special 0x182
end
^Which is the same offset and everything in every PC. I've tried using the special a number of times in different situations, and it appears to do nothing. However, it has to be important for the Pokemon Center, or it wouldn't be there. So I'd just be on the safe side and leave it as is.



There are a variety of things you could do with Nurse Joy's script without killing its functionality, would you care to be more specific?

For example, in something I've been working on in my spare time, you could get to a Pokemon Center before receiving your starter. I just added a checkflag 0x828 to the beginning of her script and if I didn't have a Pokemon, I had it simply go to a msgbox instead of going through and trying to heal my nonexistant Pokemon and crashing the game.

If you wanted to go even more simple and edit what she says in each town, you'd just replace the text and repoint if it's bigger in each town's individual Nurse Joy script.

You can do anything really, she's just like any other NPC, add some checkflags, applymovements, whatever you want and she'll function in any event. Just make sure she's pointed back to her original healing script if the event's already been done with a "checkflag 0x(#)" and a "if 0x1 goto 0x(offset of healing script)".

If you don't have a clue what I'm saying, read a scripting tutorial.
What I'm trying to ask is how would I change what she says after all my pokemon faint.





Please warm my eggs...I'll be sure to return the favor

From now one, if you haven't contacted me yet....I will not accept hacks unless they are at least in progressing hacks. So if you want my help, get some screenshots first.
China,Xi'an
Seen December 18th, 2018
Posted January 23rd, 2017
219 posts
11.9 Years
What I'm trying to ask is how would I change what she says after all my pokemon faint.
You can use a hex editor and search what she says .
Zel,thethethethe,LU-HO,Darthatron,HackMew,ZodiacDaGreat,Juan,score_under,JPAN,Tamah-chan,I really appreciate your kindness and your help!:D

0m3GA ARS3NAL

Im comin' home...

Age 27
Male
Superjail Penitentiary
Seen October 4th, 2015
Posted September 12th, 2013
1,816 posts
11.9 Years
Hmm, about locating possible data, I have a theory.

I was thinking that first we are going to want to search for the bank and map number of the map, then it's X/Y coordinates.
I'll see what I can come up with...


Nope, no luck...
I'll see if I can get a hold of some help here...
HackMew or something, anyone would help though!
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>

Deokishisu

Mr. Magius

Male
If I'm online, it's a safe bet I'm at a computer.
Seen January 9th, 2019
Posted March 4th, 2018
859 posts
13.8 Years
What I'm trying to ask is how would I change what she says after all my pokemon faint.
The "blah blah scurried to a Pokemon Center" bit? Or the "if your Pokemon's HP is low please come see us" bit?

Well, either way, A-Text is an easy way to edit it. Open your ROM with it, search for the text you want, hit resume 'till you find it, add it to the ini, and edit it from there. It'll even repoint it for you if it's bigger than the previous text.

Hmm, about locating possible data, I have a theory.

I was thinking that first we are going to want to search for the bank and map number of the map, then it's X/Y coordinates.
I'll see what I can come up with...


Nope, no luck...
I'll see if I can get a hold of some help here...
HackMew or something, anyone would help though!
Glad I got people excited about this, I'll work on my end when I have the time. Maybe we can crack this.

0m3GA ARS3NAL

Im comin' home...

Age 27
Male
Superjail Penitentiary
Seen October 4th, 2015
Posted September 12th, 2013
1,816 posts
11.9 Years
Glad I got people excited about this, I'll work on my end when I have the time. Maybe we can crack this.
Yeah, it would be a great thing to find table data, that means we might be able repoint and expand.
That means more Pokemon Centers!
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>

Samike360

Lover of May

ATL
Seen June 9th, 2015
Posted October 3rd, 2010
397 posts
10.7 Years
The "blah blah scurried to a Pokemon Center" bit? Or the "if your Pokemon's HP is low please come see us" bit?

Well, either way, A-Text is an easy way to edit it. Open your ROM with it, search for the text you want, hit resume 'till you find it, add it to the ini, and edit it from there. It'll even repoint it for you if it's bigger than the previous text.



Glad I got people excited about this, I'll work on my end when I have the time. Maybe we can crack this.
Ok thanks a lot. I'll see what I can do.





Please warm my eggs...I'll be sure to return the favor

From now one, if you haven't contacted me yet....I will not accept hacks unless they are at least in progressing hacks. So if you want my help, get some screenshots first.

0m3GA ARS3NAL

Im comin' home...

Age 27
Male
Superjail Penitentiary
Seen October 4th, 2015
Posted September 12th, 2013
1,816 posts
11.9 Years
Pokemon Center.




I was thinking, could it be a list of pointers to the fly-to data for towns? I haven't hacked the Advance gen much, I'm a Metal Gen hacker mostly, but it might be worth looking into.
Checked that, and no, didn't work, still have yet to find the data for this, it would be GREAT to expand.
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>

score_under

I program the *other* ASM.

Age 27
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
14.3 Years
so you haven' figured out how to add more yet though?
I have.
I can imagine this would be a table, so if we can find the table data, we might be able to add more PC's... unless there IS not table, and the game just reads that one byte and does what it does...
This table data would be a bit more difficult to locate, I'll look for some help.

GREAT data BTW.
There is a table... and think what you're saying! If it "reads one byte and does what it does", then the code to do that is in the ROM somewhere! ;)

To anyone skimming this topic, this is pretty important:

BFD80 and BFDA4 in FR point to the sethealingplace table, and BFD54 and BFD78 point to it in LG.

I can't believe it wasn't found before, that was really simple :P (I also can't believe people overlooked the very fundamental sethealingplace until now... I'd considered it for a long time)
Plz not to PM me, I don't come here often enough. Email if you need me

0m3GA ARS3NAL

Im comin' home...

Age 27
Male
Superjail Penitentiary
Seen October 4th, 2015
Posted September 12th, 2013
1,816 posts
11.9 Years
I have.

There is a table... and think what you're saying! If it "reads one byte and does what it does", then the code to do that is in the ROM somewhere! ;)

To anyone skimming this topic, this is pretty important:

BFD80 and BFDA4 in FR point to the sethealingplace table, and BFD54 and BFD78 point to it in LG.

I can't believe it wasn't found before, that was really simple :P (I also can't believe people overlooked the very fundamental sethealingplace until now... I'd considered it for a long time)
You didn't have to show off, lol.
I looked for a bit, and I couldn't find it, what did you do to find it?
(I looked for bank.map data, I looked for the X/Y positions, I couldn't find it.)
So if these POINT to it, then why are there 2 pointers for each ROM?
Does it point to 2 different tables?
Care to elaborate a bit?
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
Male
Seen October 26th, 2019
Posted August 19th, 2018
1,312 posts
12.6 Years
Sorry to bump, but here are the values for Pokemon Emerald:
0x01 = Player's Room (male)
0x02 = Player's Room (female)
0x03 = Petalburg City
0x04 = Slateport City
0x05 = Mauville City
0x06 = Rustboro City
0x07 = Fortree City
0x08 = Lilycove City
0x09 = Mossdeep City
0x0A = Sootopolis City
0x0B = Ever Grande City (Victory Road)
0x0C = Littleroot Town (left)
0x0D = Littleroot Town (right)
0x0E = Oldale Town
0x0F = Dewford Town
0x10 = Lavaridge Town
0x11 = Fallarbor Town
0x12 = Verdanturf Town
0x13 = Pacifidlog Town
0x14 = Ever Grande City (Pokemon League)
0x15 = Southern Island
0x16 = Battle Frontier

EDIT: Updated the list. Thanks colcolstyles.

Sole developer of STARLIGHT LEGACY intended to be released on Steam.
Discord: https://discord.gg/fTS5Q78

colcolstyles

Yours truly

Male
The Bay Area
Seen May 18th, 2019
Posted August 13th, 2012
1,590 posts
11.5 Years
Here are your missing values:

0x01 = Player's Room (male)
0x02 = Player's Room (female)
...
0x0C = Outside Player's House (male)
0x0D = Outside Player's House (female)
...
0x15 = Southern Island
0x00 and anything higher than 0x16 appears to always warp the player to Petalburg City.

Brother of Vrai
Advertiser Content