kwsch / pk3DS

Pokémon (3DS) ROM Editor & Randomizer
https://projectpokemon.org/forums/forums/topic/34377-pk3ds-xyoras-rom-editor-randomizer/
Other
401 stars 150 forks source link

Wild Encounters becoming disabled #49

Closed Kobazco closed 7 years ago

Kobazco commented 7 years ago

Hey so last night I was able to successfully edit the wild encounters and see them in game. However, now when I updated the tables some more, no wild Pokemon appear whatsoever.

Draydrew commented 7 years ago

I did a little research into this to see if I could have any idea what's going on. I'm not entirely sure but...

I noticed the a/0/8/3 file (on Moon, at least) seemed to gain a fair few bytes after saving - the initial file was 348,871,036 bytes but the file after saving was 348,997,994 bytes. The ends of the files look completely different in a hex editor too - the unedited one has large blocks of FF FF FF FF amongst some 11 00 00 00 which the edited file lacks.

The file size changing happens in Sun's a082 file as well.

No idea if any of that helps but that's pretty much everything I've observed

Kobazco commented 7 years ago

Just tried using honey in an area I left unedited - the Trainer school to be exact. Using Honey caused the game to crash, encounters in Route 1 worked. Encounters pretty much anywhere else in the game caused a crash however.

DeathChaos25 commented 7 years ago

Hmm, this is odd, I tried the randomizer option, and everything seemed to be working fine on my end, here's a screenshot album where I randomized Starters/Trial Pokemon/Totem Pokemon, Wild Encounters, etc

Draydrew commented 7 years ago

The only pattern I can see here is that for when you open the Wild Editor, anything you edit during that instance of it being open will work fine in-game, but any other area won't work (including those that were edited in a previous session)..

That would explain the randomiser working since that would change every area at once, whereas myself and Kobazco changed specific areas and only those worked.

Haven't had time to test this theory though!

Kobazco commented 7 years ago

Can I re open this? Just got to the second island up until then everything was fine. However, none of the encounters on this island work despite me editing them? Maybe its because i edited them on different versions of pk3DS?

kwsch commented 7 years ago

Maybe its because i edited them on different versions of pk3DS?

the likely answer

maps are loaded by 0th index, the edited tables are the 9th file if you count in groups of 11.

9 + 11*i

unpack your current garc, and copy over the i'th files that you edited.

basically all the broken maps table files just need to be marked for compression, but copying over the files you actually modified is easier

Kobazco commented 7 years ago

So would I copy over the edited files to a clean encdata GARC? Also I should mention that I did all of the second island editing today, and switched versions after the SOS copy pasting system was added. Still a bit confused on your instructions sorry.