Jump to content

Recommended Posts

Posted

Table with found Flags and Constant (it's not empty, just scroll down):

  Reveal hidden contents

 

I appreciate any help or report of errors.

 

Original post:

  Reveal hidden contents
Posted (edited)

Last update: December 10, 2018

Complete (or almost complete):

  • Trainer battles
  • Static encounters
  • In-game trades
  • Move tutors
  • Items
  • Hidden items

Missing (or almost missing):

  • Trainer re-battles
  • In-game events
  • Others

 

 

Original post:

  Reveal hidden contents

 

Edited by cicciochiave
Posted
  On 9/26/2018 at 2:25 PM, cicciochiave said:

Yes, the 1569 flag does nothing.

Those are the constants:

  Reveal hidden contents

I can collect this info for every legendary if this is useful 

  Reveal hidden contents

 

Expand  

that looks like way too many constants.

Consider changing both flags and constants to before state, then check if the Zapdos can be re-battled :)

Posted

I just tried to change only the constants, only the flag, both constants and flag... Guess what? No Zapdos re-battle ?

I copied 85 constants individually in PKHeX for nothing! ?

I think that there is something bigger to understand in 3rd gen flags than i know... 

I hope someone will find the answer.

Thanks anyway for the reply @theSLAYER!

Posted
  On 9/26/2018 at 3:55 PM, cicciochiave said:

I just tried to change only the constants, only the flag, both constants and flag... Guess what? No Zapdos re-battle ?

I copied 85 constants individually in PKHeX for nothing! ?

I think that there is something bigger to understand in 3rd gen flags than i know... 

I hope someone will find the answer.

Thanks anyway for the reply @theSLAYER!

Expand  

hey, do you mind sending me the before save? :3

Posted
  On 9/26/2018 at 4:04 PM, cicciochiave said:

Sure!

I'll PM you everything ?

Expand  

Looks like the flag 1569 isn't required.

I've identified that something in save section 00 to 01 or save section 09 to 0E (half the save's data) is responsible for toggling Zapdos on and off.
(playing with the flag on a before save keeps Zapdos appearing, even after refreshing the map)

I'm trying to narrow the save sections down, to make it easier to notice differences.
(It doesn't help that the save sections change)

  • Thanks 1
Posted

Okay, I got a way to make legendary reappear.

1. Save right in front of where legendary would be.
2. You need to find save section 01 of the latest save block in your save (there's 2 save blocks in your save, navigate to the latest one). (here's how the save sections work)
3. Change offsets as listed below (offsets are of save section 01, not the entire save)
4. Use PKHeX to fix the overall save's checksum
5. Take a step in-game. The map will refresh and the legendary will appear.
 

@Kaphotics
These are the only offsets we need to be bothered with, in save section 01:

tested:
Mewtwo: 0xEF0, bit 1 [set] (went from 0x99 to 0x9B)
Articuno: 0xEF0, bit 2 [set] (went from 0x99 to 0x9D)
Zapdos: 0xEEB, bit 5 [set] (went from 0xCD to 0xED)
Moltres: 0xEEA, bit 2 [set] (went from 0x9A to 0x9E)

untested presently (data obtained by comparing bitflags from saves)
Lapras: 0xF28, bit 6 [set] (went from 0x00 to 0x40)
Eevee: 0xEEA, bit 7 [unset] (went from 0x9E to 0x1E)
Togepi: 0xF3B, bit 2 [set] (went from 0x20 to 0x24)
Hitmonlee: 0xF2F, bit 0 [set] (went from 0x30 to 0x31), 0xEEC bit 0 [set] (went from 0x04 to 0x05)
Hitmonchan: 0xF2F, bit 0 [set] (went from 0x30 to 0x31), 0xEEC bit 1 [set] (went from 0x04 to 0x06)
Aerodactyl (Fossil Restoration): 0xF3D, bit 6 [set] (went from 0x80 to 0xC0)
Omanyte (Fossil Restoration): 0xF3D, bit 5 [set] (went from 0x00 to 0x20)
Kabuto (Fossil Restoration): 0xF3D, bit 4 [set] (went from 0x00 to 0x10) 
 

In the mean time, if rebattling legendaries is desperately needed, and don't know how to hex edit, then use the code below on VBA.
It will need FRLG's (M) code to work. (I got this code from here; appears to work once I reload the map using ladders/cave entrances):

  Reveal hidden contents
  • Like 2
  • Amazed 1
Posted (edited)
  On 9/26/2018 at 5:59 PM, theSLAYER said:

Kaphotics this can probably be implemented for PKHeX :D

Expand  

I think this part is fine ahaha

You're doing a really amazing job!

I'm almost ashamed of my research... I found the flags for trainer card stickers ?

  Reveal hidden contents

 

Edited by cicciochiave
  • Like 1
Posted
  On 9/27/2018 at 2:30 AM, Kaphotics said:

@theSLAYER : it could be that PKHeX is reading from the wrong offset.

https://github.com/kwsch/PKHeX/commit/ee57bc49f066bb6c477df39f2db7aea5f209198c

Was added over a year ago; the real 'offset' isn't Block2+0; it's likely Block1+0xE??.

Need to get the alignment right. The disassembly of firered's large block doesn't have nearly as much documentation as RS/E (flags, vars).

Expand  

That makes sense.

If you do get some makeshift implementation up, I could test it to see if it works.
(the bitflags I'm finding, are in the teams/items block)

Posted
  On 9/27/2018 at 2:37 AM, theSLAYER said:

That makes sense.

If you do get some makeshift implementation up, I could test it to see if it works.
(the bitflags I'm finding, are in the teams/items block)

Expand  

The savefile chunks aren't separate, they're just chopped up when saving to the cartridge, and verified in pieces (checksums).

block0 = trainer data

block1|block2|block3|block4 = savedata stuff

block5+ = storage

Posted
  On 9/27/2018 at 2:40 AM, Kaphotics said:

The savefile chunks aren't separate, they're just chopped up when saving to the cartridge, and verified in pieces (checksums).

block0 = trainer data

block1|block2|block3|block4 = savedata stuff

block5+ = storage

Expand  

yeah, I had to figure that out the hard way when I first looked at the saves.

I basically checked block by block (copied from pre save into post save),
and discovered that all those bitflags are in block 1.

Posted
  On 9/27/2018 at 2:42 AM, theSLAYER said:

yeah, I had to figure that out the hard way when I first looked at the saves.

I basically checked block by block (copied from pre save into post save),
and discovered that all those bitflags are in block 1.

Expand  

Offset for FRLG should be Block1+0xEE0, not Block2+0x000

 

PKHeX's current setup for gen3 saves doesn't work for split-chunk operations, so don't expect it to work for flags >1280 (read the recent commit message). I need to figure out how to rework some logic...

Edit: fixed with some workaround, should be all good now :)

  • Like 1
  • Amazed 1
Posted

There is nothing you guys can't do! Really impressed!

I just compiled the latest build of PKHeX and used the FlagDiff Researcher to test Zapdos re-battle.

Unsetting flag 93 and 703 makes Zapdos appear again

  Reveal hidden contents

The strange thing is that even if you unset only one of the flags above, it will reappear anyway

Posted

As usual, @Kaphotics you're our hero :3

  On 9/27/2018 at 9:04 AM, cicciochiave said:

There is nothing you guys can't do! Really impressed!

I just compiled the latest build of PKHeX and used the FlagDiff Researcher to test Zapdos re-battle.

Unsetting flag 93 and 703 makes Zapdos appear again

  Reveal hidden contents

The strange thing is that even if you unset only one of the flags above, it will reappear anyway

Expand  

If I'm not mistaken, only one is required. I think one controls NPC appearance (for present map) and another controls whether it's active.

based on what Kaph has said so far, for Zapdos [0xEEB, bit 5] counting (0xEEB - 0xEE0) x 8 + 5 bits, the value does add up to 0093, which is the same value displayed above.

I'll need to play around and check with other in-game events to be sure..

Posted
  On 9/27/2018 at 9:53 AM, cicciochiave said:

I tested the other legendaries and everything worked:

  • Mewtwo: unset 0129
  • Articuno: unset 0130
  • Zapdos: unset 0093
  • Moltres: unset 0082
Expand  

thanks for the confirmation.

now I just gotta play around with the rest

I also made some saves for Magikarp sellers, the 2 Snorlaxes, Berry Forest Hypno etc.

its now easier to check the bitflags; while not difficult, jumping it's the saves to find the correct section for comparison was a bit tedious

Posted

Cool! I hope you'll find every event flags and implement them in PKHeX ;)

One last discover (but you sure know it already ahah): 

Old Amber (Aerodactyl):

  • unset 0086 (for the OW to re-appear)
  • unset 0606 (to trigger the gift)
  • Like 1
  • 3 weeks later...
Posted (edited)

Wow, you guys are doing awsome work. I don't suppose y'all know which flags activate which hidden items in FR/LG? Still, to this day I can't seem to spawn those Heart Scales in Tanoby Ruins or that Big Pearl in Trainer Tower. ?

Edited by DestroyMagnet
Misspelled a word

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...