kwsch / PKHeX

Pokémon Save File Editor
https://projectpokemon.org/pkhex/
Other
3.74k stars 701 forks source link

[Bug] XY map coordinate edits #1523

Closed sora10pls closed 7 years ago

sora10pls commented 7 years ago

Note: Might not be limited to XY but it's all I've tested.

From what I can tell, every time map values are changed in PKHeX, the game will fail to load the save file after it's re-imported and will just stay on a black screen instead.

Below I've provided 3 save files.

You can download the save files here.

kwsch commented 7 years ago

don't warp maps, only change coordinates. likely crashes the game as the saved overworlds can't be placed on the new map.

warp from a quiet place (aka no NPCs loaded) and it should work.

sora10pls commented 7 years ago

Warped from Chamber of Emptiness to Cyllage City, and while the game didn't crash this time, it instead lead me to a softlock with this odd blue screen.

image

Again, you can download the save files here.

sora10pls commented 7 years ago

And doing yet another test taking what you said into consideration, I don't think the map editor does anything in terms of actually changing your coordinates.

Was in front of Camphrier Pokemon Center

Used PKHeX to move 2 places right (X +2 = 671.5) Re-imported save data, and I was still in that same position from before editing the save data (X = 669.5)

No crash or blue screen though! And again, save files are here.

sora10pls commented 7 years ago

After one final test, doing the following properly changed my coordinates without needing to do so in-game.

When changing the X coordinate, PKHeX only updates offset 0x1411, while in-game updates several different values within the Trainer1 block in addition to that.

Good: image

Bad: image

^ The save files with the data shown here are in my previous comment.

kwsch commented 7 years ago

SAV6 doesn't update the Overworld block.

https://github.com/kwsch/PKHeX/blob/a11b6f4a606a87c241a985cea5ad0e625eae5449/PKHeX.Core/Saves/SAV6.cs#L442-L446

https://github.com/kwsch/PKHeX/blob/a11b6f4a606a87c241a985cea5ad0e625eae5449/PKHeX.Core/Saves/SAV7.cs#L444-L452

https://github.com/kwsch/PKHeX/blob/a11b6f4a606a87c241a985cea5ad0e625eae5449/PKHeX.Core/Saves/SAV7.cs#L217-L221