futuu Posted May 25, 2021 Share Posted May 25, 2021 (edited) Trainer Records is encrypted by LCRNG algorithm Y0 = seedYn+1 = Yn * 0x41C64E6D + 0x6073Xn = origin data XOR Yn 3&4th bytes offsets: Pt: 61B4~6367 seed: 6368~636B HGSS: 4B44~4CF7 seed: 4CF8~4CFBDP are not encrypted Pt can receive globe and crystals from Mr. Goods accessed GTS: flag 2444 set used another underground count by constant 71, 72, 73, 84: ->100 DP is 70~73 HGSS event flag(unset) 0681, 0682, 0683 = battle tower trophy flag 0239, 0240, 0241 constant 226: ->4(conversation) = all Pokéathlon basement room enterable flag(unset) 0725, 0726, 0727, 0728, 0729 = room items Edited April 30, 2022 by futuu 1 Link to comment Share on other sites More sharing options...
futuu Posted October 13, 2021 Author Share Posted October 13, 2021 (edited) It seems Pt/HGSS are using the same offsets +61B0 for Pt or +4B40 for HGSS 4 score 10 berry planted 1C wild pokemon battles 20 NPC trainer battles 24 pokemon caught 28 times fished 2C eggs hatched 30 pokemon evolved 38 played in game corner 3C battle tower continues won 4C link trades 50 link battles 54 link battle wins 58 link battle losses 60 wifi trades 64 wifi battles 68 wifi battle wins 6C wifi battle losses 74 battle tower won 8C money spent A0 daycare sent A4 pokemon defeated B4 mail wrote C0 TV watched C4 nicknames given CC berries pokemon picked C8 premium ball got D0 poffin made DC ***unknown Pt recorded E0 ***unknown Pt recorded E4 battleground won E8 battle frontier total won EC battle brains total won F0 battle factory won F4 battle castle won F8 battle hall won FC battle arcade won 100 battle factory pokemon changed 104 battle castle CP total remained 108 battle hall over level 10 selected? 10C battle arcade bonus BP?110 BP got114 BP spent 118 ***unknown Pt recorded 120 championship won -126 splash used -142 contest participated 144 link contest participated? -146 contest won 148 link contest won? 14C move no effect -14E own pokemon fainted 150 friendlyfire? -152 failed run 154 pokemon run -156 failed fishing 174 fossil restored -176 ***unknown Pt recorded Edited April 24, 2022 by futuu 1 Link to comment Share on other sites More sharing options...
theSLAYER Posted October 19, 2021 Share Posted October 19, 2021 I've merged your messages. Also, no need to send unsolicated pings to specific people to ask for help. Link to comment Share on other sites More sharing options...
futuu Posted April 16, 2022 Author Share Posted April 16, 2022 On 10/19/2021 at 8:19 AM, theSLAYER said: I've merged your messages. Also, no need to send unsolicated pings to specific people to ask for help. I found the encryption algorithm and succeed to decrypt them, researching the offsets now Is it easy to add the editor to PKHeX? 1 Link to comment Share on other sites More sharing options...
theSLAYER Posted April 16, 2022 Share Posted April 16, 2022 @Kaphotics any opinions about this? Link to comment Share on other sites More sharing options...
Jollygator Posted October 28 Share Posted October 28 Can this be implemented to pkhex? Link to comment Share on other sites More sharing options...
jacksonf Posted October 30 Share Posted October 30 (edited) Not knowing a thing about hex editing, I'm trying to make sense of this but got stuck. I'm trying to edit a Platinum save. Flags 71; 72; 73 and 84 are easy. They can be changed in the Research tab of the Event Flag Editor. Don't know what they meant with "accessed GTS: flag 2444 set". It's not a constant (they go from 0 to 287), nor a hex number telling you what flag is it (equals 9284 in decimal). I thought it was an offset and changed it from 00 to 01 in my save file, but seems like I'm mistaken and/or doing something wrong (save file gets corrupted). Changing GeonetGlobalFlag from false to true in the Simple Editor doesn't trigger Mr. Goods giving you the Globe either. Now the dumber tries: I go to the 61B4-6367 block, but I don't know what to do with the list futuu posted. Knowing I caught the entire dex (493) I tried the sum of 61B4+24 (Pokemon Caught) and it's 61D8. Which in my save file is 27 hexadecimal (39 in decimal). Then I tried 61D8-61DB, assuming that Pokemon Caught goes from 24 to 27 because 28 is Times Fished. In my save file that's 27 D0 1B F7 and no matter if I flip the order or not (I remember hex editing a Gen3 file and I had to flip them), it's a very high decimal number, far from 493 (01ED in hex). Then I tried searching for 01 ED and ED 01 but no matches found in the 61B4-6367 block. If teaching how to understand this is too much, I just really want two things: 1.- The Globe from Mr. Goods. 2.- See where is my Battle Hall won count stored (F8 in the futuu's list). I have a legit 180 streak but I want to set the score to 10000 and trigger this: If the record is over 1,000, the player will get Johanna, and over 10,000 will get Professor Oak or Jasmine. BUT... Changing the record in the Battle Frontier tab of the Misc Editor is not enough. Bulbapedia may be wrong or it may be a random or bugged event, not sure. Edited October 30 by jacksonf Link to comment Share on other sites More sharing options...
futuu Posted November 2 Author Share Posted November 2 (edited) On 10/30/2023 at 10:15 AM, jacksonf said: Not knowing a thing about hex editing, I'm trying to make sense of this but got stuck. I'm trying to edit a Platinum save. Flags 71; 72; 73 and 84 are easy. They can be changed in the Research tab of the Event Flag Editor. Don't know what they meant with "accessed GTS: flag 2444 set". It's not a constant (they go from 0 to 287), nor a hex number telling you what flag is it (equals 9284 in decimal). I thought it was an offset and changed it from 00 to 01 in my save file, but seems like I'm mistaken and/or doing something wrong (save file gets corrupted). Changing GeonetGlobalFlag from false to true in the Simple Editor doesn't trigger Mr. Goods giving you the Globe either. Now the dumber tries: I go to the 61B4-6367 block, but I don't know what to do with the list futuu posted. Knowing I caught the entire dex (493) I tried the sum of 61B4+24 (Pokemon Caught) and it's 61D8. Which in my save file is 27 hexadecimal (39 in decimal). Then I tried 61D8-61DB, assuming that Pokemon Caught goes from 24 to 27 because 28 is Times Fished. In my save file that's 27 D0 1B F7 and no matter if I flip the order or not (I remember hex editing a Gen3 file and I had to flip them), it's a very high decimal number, far from 493 (01ED in hex). Then I tried searching for 01 ED and ED 01 but no matches found in the 61B4-6367 block. If teaching how to understand this is too much, I just really want two things: 1.- The Globe from Mr. Goods. 2.- See where is my Battle Hall won count stored (F8 in the futuu's list). I have a legit 180 streak but I want to set the score to 10000 and trigger this: If the record is over 1,000, the player will get Johanna, and over 10,000 will get Professor Oak or Jasmine. BUT... Changing the record in the Battle Frontier tab of the Misc Editor is not enough. Bulbapedia may be wrong or it may be a random or bugged event, not sure. globe: just set flag 2444 on Battle Hall won count (trainer records) needs to be decrypted, a boring work you can upload your save file and let me check it out but it looks like the characters don't always appear every time https://www7a.biglobe.ne.jp/~namake/diary/2008/stage.htm Edited November 2 by futuu Link to comment Share on other sites More sharing options...
jacksonf Posted November 3 Share Posted November 3 10 hours ago, futuu said: globe: just set flag 2444 on Battle Hall won count (trainer records) needs to be decrypted, a boring work you can upload your save file and let me check it out but it looks like the characters don't always appear every time https://www7a.biglobe.ne.jp/~namake/diary/2008/stage.htm Ah, so Flag and Constant are two different things? Or does the Constant list only includes what has been already researched? Goes to show how much I don't know. Thank you, the Globe part was easy to follow. Grateful for the offer, here's my save file: Plat Save.sav Link to comment Share on other sites More sharing options...
futuu Posted November 3 Author Share Posted November 3 (edited) 8 hours ago, jacksonf said: Ah, so Flag and Constant are two different things? Or does the Constant list only includes what has been already researched? Goes to show how much I don't know. Thank you, the Globe part was easy to follow. Grateful for the offer, here's my save file: Plat Save.sav 512 kB · 1 download (flag has 2 states on and off in 1 bit & constant is a number 0~65535 in 2 bytes) your pokemon caught count is 219 and battle hall won count is certainly 180 here i edited the battle hall won count to 10180, see if the characters appear Plat Save.sav Edited November 3 by futuu 1 Link to comment Share on other sites More sharing options...
jacksonf Posted November 3 Share Posted November 3 (edited) 7 hours ago, futuu said: (flag has 2 states on and off in 1 bit & constant is a number 0~65535 in 2 bytes) your pokemon caught count is 219 and battle hall won count is certainly 180 here i edited the battle hall won count to 10180, see if the characters appear Plat Save.sav 512 kB · 2 downloads Thanks again for taking the time to help! Oops, I thought that caught=owned (that's what I said 483) but I guess caught=caught. Will edit this post If I manage to trigger the NPCs. Hope this gets added to PKHeX someday. Edited November 3 by jacksonf Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now