Jump to content

Rhydon Save Editor (new Pokemon RBY Save Editor)


SciresM

Recommended Posts

Rhydon_1.png

This is a new save editor for Pokemon RBY, loaning its design (and a lot of its internals) from PKHeX.

Open or drag/drop a Gen I save file or a .pk1 Pokemon file, edit, then export the sav/pk1.

Currently (as far as I know) only supports US save files, from game cartidges, emulators, or the 3DS VC re-releases. If someone can link me to documentation of the JP save offsets, I'd be happy to add support for JP games.

Using the original RBY-style sprites can be toggled from the options menu.

Source Code is available here: https://github.com/SciresM/Rhydon

And you can download it here: https://github.com/SciresM/Rhydon/releases

More images:

Rhydon_.png

Rhydon_3.png

Rhydon_4.png

  • Thanks 1
Link to comment
Share on other sites

This came about from my implementing Gen I pokemon reading (so that PKHeX will be able to easily convert from Gen I -> Gen VII when Sun/Moon release), and when I realized that the current Gen I save editors have pretty bad UIs.

Hopefully it's useful to people!

Link to comment
Share on other sites

I'm probably not going to be of much help,

but I used this page when attempting to locate Mew in the JPN save I got.

http://bulbapedia.bulbagarden.net/wiki/Character_encoding_in_Generation_I

It has the character encoding values, which helped me identify the locations of some data.

Next off, BlackShark once mentioned in another thread:

Party Pokemon Data is at 0x2ED5 in Japanese Green Version.

The party structure should be the same as the non-Japanese from what I've seen.

0x0000 	Party Count 	1 Bytes
0x0001 	Species list 	6 x 1 Bytes
0x0008 	Pokémon list 	6 x 44 (0x2C) Bytes
0x0110 	OT names 	6 x 6 Bytes
0x0134 	Pokémon names 	6 x 6 Bytes

Also, I know the offsets of the second party slot to be:

Where to find Mew on my save (I went Hex offset hunting myself >< ):

Offset of Mew in save: 0x2F09 [2nd party slot]

Offset for Mew's Nickname: 0x300F [Name is ミュウ, so characters is 0x9E 0xAE 0x82 0x00 0x00 0x50 (0x50 is string terminator)]

Offset of Mew's Trainer ID: 0x2FEB [Name is ゲーフり, so 0x08 0xE3 0x9B 0xD8 0x00 0x50]

Sorry that I'm not much help :/

Link to comment
Share on other sites

Yeah, that tells me where the party is.

Now I just need all the other stuff listed here, heh:

http://bulbapedia.bulbagarden.net/wiki/Save_data_structure_in_Generation_I

I'm slowly doing trials and errors to determine where is what.

I just started off with Items:

Before

40 02 14 02 04 09 FF

After

40 00 FF 00 FF 09 FF

I had 2 Potions and 9 Pokeballs (which 14 is Potion and 04 is Pokeball)

Not sure why the 02 changed to 00,

but the offset of the 40 is 0x25C3

edit:

My money went from 0 to 300 to 100 to 350,

and I watched this value changed from 00 00 00 to 00 03 00 to 00 01 00 to 00 03 50

0ffset 0x25EE

Link to comment
Share on other sites

Hey that looks really cool! PKHeX has a really nice UI indeed.

Our current save editors didn't have the best UIs yeah, but also I've heard that a lot of them didn't always work well and would tend to cause corruption. If this one works (close to) perfectly, that'll be great.

Link to comment
Share on other sites

edit: some offsets inside

I released all my Pokemon (except for the one slot in party, which is a Mew that doesn't belong to my OT Name)

Two instances of my OT name appeared in my save starting at:

0x2598 and 0x2C4E

If I'm not mistaken, there should only be 5 characters, excluding the final terminator.

rival name 0x25F1

Trainer ID 0x25FB and 0x2B52 (Is it supposed to even appear twice? remnant data?)

Time played hh hh (little endian) mm ss, starting at 0x2CA0

Badges 0x25F8

Pokedex Seen begins at 0x25B1

Pokedex Owned begins at 0x259E

Edit:

I'm testing a theory,

that the difference between their ram/code offset and save offset is 0xACDD

For example, (courtesy to : http://glitchcity.info/wiki/index.php/Pok%C3%A9mon_Red,_Green,_Blue_and_Yellow_%28JP%29_GameShark_codes )

For Pokedex Seen save offset 0x25B1 + 0xACDD => 0xD28E (same value as ram)

For Pokedex Owned save offset 0x259E + 0xACDD => 0xD27B (also same value)

Rival name 0x25F1 + 0xACDD => 0xD2CE

Now,

Theoretical values (I haven't tested them)

Game corner coins 0x2846

Box Changed/set 0x2414 (does not seem right to me)

EDIT:

this is something that I've done.

I've got Box 8 (last box) set,

and stored a venusaur, and only a venusaur, and 9A only appeared twice.

[current box]

First it appeared as 01 9A FF (to my understanding, means 1 slot used, species venusaur, terminator) at 0x302D,

and next as 9A 01 1E 65 and so on (Venusaur, 286 HP, Level 101) at 0x304D.

Nickname (9b8b06) appeared at 0x34DF

ot name (07d8) at 0x342B

Venusaur in boxes that isn't current box

Venusaur in Box 1

01 9A FF appeared at 0x4000

9A 01 1E 65 appeared at 0x4020

nickname at 0x44B2

ot name at 0x43FE

Venusaur in Box 2

01 9A FF appeared at 0x4566

9A 01 1E 65 appeared at 0x4586

nickname at 0x4A18

ot name at 0x4964

Venusaur Box 3

01 9A FF appeared at 0x4ACC

9A 01 1E 65 appeared at 0x4AEC

nickname at 0x4F7E

ot name at 0x4ECA

Venusaur box 4

01 9A FF appeared at 0x5032

9A 01 1E 65 appeared at 0x5052

nickname at 0x54E4

ot name at 0x5430

venusaur box 5

01 9A FF appeared at 0x6000

9A 01 1E 65 appeared at 0x6020

nickname at 0x64B2

ot name at 0x63FE

venusaur box 6

01 9A FF appeared at 0x6566

9A 01 1E 65 appeared at 0x6586

nickname at 0x6A18

ot name at 0x6964

Venusaur in box 7

01 9A FF appeared at 0x6ACC

9A 01 1E 65 appeared at 0x6AEC

nickname at 0x6F7E

ot name at 0x6ECA

Venusaur in Box 8.

01 9A FF appeared at 0x7032

9A 01 1E 65 appeared at 0x7052

nickname at 0x74e0

ot name at 0x7430

structure of pokemon in party

Offset of Mew in save: 0x2F09 [2nd party slot]

Offset for Mew's Nickname: 0x300F [Name is ミュウ, so characters is 0x9E 0xAE 0x82 0x00 0x00 0x50 (0x50 is string terminator)]

Offset of Mew's Trainer ID: 0x2FEB [Name is ゲーフり, so 0x08 0xE3 0x9B 0xD8 0x00 0x50]

Analysis of Mew.

<offsets below courtesy to bulbapedia>

[TABLE=width: 1000, align: left]

[tr][td]Offset[/td][td]Contents[/td][td]Size[/td][td]Details[/td][/tr]

[tr][td]0x00[/td][td]Index Number of Species[/td][td]1 byte[/td][td]0x15 (which is Mew for Gen I)[/td][/tr]

[tr][td]0x01[/td][td]Current HP[/td][td]2 bytes[/td][td]26 HP[/td][/tr]

[tr][td]0x03[/td][td]Level (as seen in PC)[/td][td]1 byte[/td][td]00 (this Mew has never been deposited into the PC)[/td][/tr]

[tr][td]0x04[/td][td]Status Condition[/td][td]1 byte[/td][td]00[/td][/tr]

[tr][td]0x05[/td][td]Type 1[/td][td]1 byte[/td][td]0x18 (Psychic)[/td][/tr]

[tr][td]0x06[/td][td]Type 2[/td][td]1 byte[/td][td]0x18 (Psychic)[/td][/tr]

[tr][td]0x07[/td][td]Catch Rate/Held Item[/td][td]1 byte[/td][td]0x2D (45, same as per usual)[/td][/tr]

[tr][td]0x08[/td][td]Index No. of First Move[/td][td]1 byte[/td][td]0x01 (Pound)[/td][/tr]

[tr][td]0x09[/td][td]Index No. of Second Move[/td][td]1 byte[/td][td]0x00[/td][/tr]

[tr][td]0x0A[/td][td]Index No. of Third Move[/td][td]1 byte[/td][td]0x00[/td][/tr]

[tr][td]0x0B[/td][td]Index No. of Fourth Move[/td][td]1 byte[/td][td]0x00[/td][/tr]

[tr][td]0x0C[/td][td]Original Trainer ID Number[/td][td]2 bytes[/td][td]0x590C (22796)[/td][/tr]

[tr][td]0x0E[/td][td]Experience Points[/td][td]3 bytes[/td][td]0x000087[/td][/tr]

[tr][td]0x11[/td][td]EV: HP[/td][td]2 bytes[/td][td]0x0000[/td][/tr]

[tr][td]0x13[/td][td]EV: ATT[/td][td]2 bytes[/td][td]0x0000[/td][/tr]

[tr][td]0x15[/td][td]EV: DEF[/td][td]2 bytes[/td][td]0x0000[/td][/tr]

[tr][td]0x17[/td][td]EV: SPD[/td][td]2 bytes[/td][td]0x0000[/td][/tr]

[tr][td]0x19[/td][td]EV: SPE[/td][td]2 bytes[/td][td]0x0000[/td][/tr]

[tr][td]0x1B[/td][td]IV DATA[/td][td]2 byte[/td][td]0xFFFF (Max IVs, means no chance of shiny)[/td][/tr]

[tr][td]0x1D[/td][td]1st move's PP value[/td][td]1 byte[/td][td]0x23 (35 PP)[/td][/tr]

[tr][td]0x1E[/td][td]2nd move's PP value[/td][td]1 byte[/td][td]0x00[/td][/tr]

[tr][td]0x1F[/td][td]3rd move's PP value[/td][td]1 byte[/td][td]0x00[/td][/tr]

[tr][td]0x20[/td][td]4th move's PP value[/td][td]1 byte[/td][td]0x00[/td][/tr]

[tr][td]0x21[/td][td]Level[/td][td]1 byte[/td][td]0x05 (Level 5)[/td][/tr]

[tr][td]0x22[/td][td]Maximum HP[/td][td]2 bytes[/td][td]0x001A[/td][/tr]

[tr][td]0x24[/td][td]Attack[/td][td]2 bytes[/td][td]0x0010[/td][/tr]

[tr][td]0x26[/td][td]Defense[/td][td]2 bytes[/td][td]0x0010[/td][/tr]

[tr][td]0x28[/td][td]Speed[/td][td]2 bytes[/td][td]0x0010[/td][/tr]

[tr][td]0x2A[/td][td]Special[/td][td]2 bytes[/td][td]0x0010[/td][/tr]

[/table]

Playing Pokemon Green on BGB emulator. (which IIRC, I imported the save over from VC re-release)

Thats about all the offsets I think of/can find for now.

I'm having difficulties locating the "present box set" offset.

I'll probably sleep for now. Hope this post helps.

Edited by theSLAYER
Link to comment
Share on other sites

This is great, lots of thanks SciresM!

I think the problem is more related to OT/NICKNAME having only 5 chars + terminator and the japanesse games having different amount of pokemon in each box (and different amount of boxes) than locating the offsets.

Link to comment
Share on other sites

This is great, lots of thanks SciresM!

I think the problem is more related to OT/NICKNAME having only 5 chars + terminator and the japanesse games having different amount of pokemon in each box (and different amount of boxes) than locating the offsets.

Eh, those problems are way easier for me to deal with than the lack of offset documentation.

I wish I was joking.

Link to comment
Share on other sites

Eh, those problems are way easier for me to deal with than the lack of offset documentation.

I wish I was joking.

If need be I can continue with some documentation or send you saves

edit:

Using bulbapedia's format, I was able to come up with this:

Save structure format

Offset	Size	Contents
0x2598	6	Player name
0x259E	19	Pokédex owned
0x25B1	19	Pokédex seen
0x25C4	42	Pocket item list
0x25EE	3	Money
0x25F1	6	Rival name
0x25F7	1	Options
0x25F8	1	Badges
0x25FB	2	Player Trainer ID
?	1	Pikachu FriendshipY
0x27DC	102	PC item list
0x2842	1	Current PC Box
0x2846*	1	Casino coins
0x2CA0	4	Time played
0x2CA7	1	Daycare Occupant Flag
0x2CA8	6	daycare Pokemon's nickname
0x2CAE	6	daycare Pokemon's OT Name
0x2CB4	21	daycare Pokemon data
0x2ED5	344	Team Pokémon list
0x302D	1382	Current Box Pokémon list
0x3594	1	Checksum
0x4000	1382	PC Box 1 Pokémon list
0x4566	1382	PC Box 2 Pokémon list
0x4ACC	1382	PC Box 3 Pokémon list
0x5032	1382	PC Box 4 Pokémon list
0x6000	1382	PC Box 5 Pokémon list
0x6566	1382	PC Box 6 Pokémon list
0x6ACC	1382	PC Box 7 Pokémon list
0x7032	1382	PC Box 8 Pokémon list

Format for Boxed Pokemon

Offset	Size	Contents	Notes
0x0000	1	Entries used	Can go up to 30 Pokemon
0x0001	31	Species List	Last one is FF terminator
0x0020	990	Pokemon List	Each Pokemon takes up 33 bytes
0x03FE	180	OT Names	6 bytes per name
0x04B2	180	Pokemon Names		6 bytes per name

Format for Party Pokemon

Offset	Size	Contents	Notes
0x0000	1	Entries used	Can go up to 6 Pokemon
0x0001	7	Species List	Last one is FF terminator
0x0008	264	Pokemon List	Each Pokemon takes up 44 bytes
0x0110	36	OT Names	6 bytes per name
0x0134	36	Pokemon Names	6 bytes per name

edit:

I'm not sure about casino coins.

Edited by theSLAYER
Link to comment
Share on other sites

That was quick! Almost all data has been found. Daycare offset is missing too I think

For pikachu's friendship offset, it should be easy to figure out exploiting the friendship bug, were using a potion on pikachu will increase its friendship by 1 even if its health is full.

Also, what's the pk1 format structure? I'm asking mostly because even though this is a gen 1 save editor, people might want to import pk1 files into a gen 2 save and I wonder if you mirrorred pikasav's pkm file structure.

Also, I suggest using jpk1 for japanesse pkm files.

Link to comment
Share on other sites

That was quick! Almost all data has been found. Daycare offset is missing too I think

For pikachu's friendship offset, it should be easy to figure out exploiting the friendship bug, were using a potion on pikachu will increase its friendship by 1 even if its health is full.

Also, what's the pk1 format structure? I'm asking mostly because even though this is a gen 1 save editor, people might want to import pk1 files into a gen 2 save and I wonder if you mirrorred pikasav's pkm file structure.

Also, I suggest using jpk1 for japanesse pkm files.

I don't know how pikasav does it, but I implemented a pk1 as a pokemon list of capacity one. That seemed the most straightforward way to do it, to me.

Link to comment
Share on other sites

I don't know how pikasav does it, but I implemented a pk1 as a pokemon list of capacity one. That seemed the most straightforward way to do it, to me.

Are there any other offsets you need me to find for now? :)

edit:

Additional offsets. (also will be updated to the list above)

0x2CA7 01 byte For Daycare (01 for occupied, 00 for not occupied)
0x2CA8 06 bytes In daycare Pokemon's nickname
0x2CAE 06 bytes In daycare Pokemon's OT Name
0x2CB4 21 bytes In daycare Pokemon data

0x27DC 102 bytes PC Item list in PC
(same structure as per English games)

Edited by theSLAYER
Link to comment
Share on other sites

Pikachu's friendship on japanesse yellow: 0x2712

Pikasav's structure:

- Species index

- OT

- Nickname

- Full pokemon structure (party or pc size).

A single pokemon list seems a great way to do it, but maybe export/import support could be added?

Link to comment
Share on other sites

Hi, I made an account specifically to reply to this thread. You should be honoured.

Anyway, I've tried out this program and it's great. It has a nice UI, is generally easy to use (I say generally because I didn't know at first that you had to export the sav file and overwrite the previous sav instead of saving or saving as, but it's not really a problem), one can complete the Pokédex with the click of two buttons instead of slowly and painfully ticking every Pokémon's seen and caught boxes like in Pikasav, and one doesn't need to fumble around with Pokémon types and catch rates like in Pikasav. Wonderful.

The catch rate of Yellow's starter Pikachu, however, is 163, and I found out that using this program to change its moves and then setting the Pikachu set its catch rate to its common 190. Yeah, I don't know how Prof. Oak caught it on full HP in one try, either. Maybe the Poké Ball he used was secretly an Ultra or even a Master Ball in disguise. Speaking of the previously mentioned Pikasav...

Could you possibly extend this program to include Pokémon GSC some day in the future, or create a separate program that does the same thing? RSE has A-Save and DPPtBW has PokéGen, but GSC doesn't have a program that can edit it other than Pikasav and PKXDelta, both of which do the job but both of which I've had problems with, too. Pikasav's UI is bad and has the previously mentioned flaws, and PKXDelta has deleted items and Pokémon from my game without my consent. Fail! It would be wonderful if you could do this, and you would be doing me and many other GSC fans a huge favour.

Anyway, I've rambled on too long. Enjoy the rest of your day.

Link to comment
Share on other sites

Saidon removed :)

original post:

Hello everyone,

I've pieced together a temporary solution for Japanese 1st Generation editing, until SciresM comes up with a more user friendly, permanent solution.

This, is Saidon Editor (beta).

mvvixti.png

I used SciresM's open source code for Rhydon Editor (which is based on Kaphotic's Pkhex) and changed various offsets, tweaked the values to match Gen I name sizes,

and here is the Japanese save editor!

And I gotta say, I know nothing about C# (heck, I'm a vb.net novice),

hence I am eternally grateful for his very tidy implementation of the editor.

There is an issue I'm facing, which I've yet to figure out how to change the implementation of the name encoding

(may need to craft a different system for it),

but for now it should work with editing everything else but the names.

So far, worked with my Pokemon Green save on an emulator.

Cheers~

edit: I can't stress enough how this isn't my work. all I had to do was change the offsets to what I previously found,

and ensure all 10 character names became 5 (excluding terminator count),

and change 12 boxes to 8 boxes (and the cycling through functionality).

All code belongs to SciresM, and I merely changed a bunch of values. ><

Edited by theSLAYER
Link to comment
Share on other sites

I'm an impatient twit, I know, but I've been following this program here and on GBATemp and there hasn't been any activity from SciresM for over a week. No replies to anybody's posts or anything. I'm really conflicted. Over a week isn't long at all and Scires has a life outside of the Internet, and I shouldn't feel this stressed over something like this, but I was hoping a quick reply to me, Metropolis, or theSLAYER would have been posted, especially theSLAYER after the gracious effort he put into translating the program. I hope nothing bad has happened to Scires. Okay, I'll shut up now since I feel ashamed of myself for writing a comment like this.

Link to comment
Share on other sites

Saidon corrupts saves due to invalid checksum calculation.

That said, I've just added preliminary JP save support to Rhydon. Stuff might be broken -- test it, and let me know! :)

Whoops, didn't realize.

been mainly using it as a reader, and was trying to get the japanese text implementation to work.

I got as far as to reading the text (PC entries), not so much editing it.

Glad to hear the implementation :)

edit:

btw there's a save which the program seems to ignore, but emulators doesn't.

Is this checksum related? (other saves from emulators work fine)

(this is a VC pokemon green save after receiving the Mew. emulators also run this save normally)

Link to comment
Share on other sites

Whoops, didn't realize.

been mainly using it as a reader, and was trying to get the japanese text implementation to work.

I got as far as to reading the text (PC entries), not so much editing it.

Glad to hear the implementation :)

edit:

btw there's a save which the program seems to ignore, but emulators doesn't.

Is this checksum related? (other saves from emulators work fine)

(this is a VC pokemon green save after receiving the Mew. emulators also run this save normally)

Haha, not a checksum issue. I recognize saves by checking whether or not their boxes are valid -- turns out this fails if you've never switched boxes.

Now recognizes by Party/Current Box validity.

Re-download and it should work. I attached the mew from that save, by the way -- interesting that it has all 15 for DVs.

I am very amused by the idea that any mew with less than perfect DVs in a Gen I save is illegal.

There's also the neat fact that its name/OT has 00 bytes between the JP characters and 0x50 terminator -- that's not the case for any game generated pokemon.

tl;dr: Mew glitch Mews are differentiable from event ones.

Link to comment
Share on other sites

Haha, not a checksum issue. I recognize saves by checking whether or not their boxes are valid -- turns out this fails if you've never switched boxes.

Now recognizes by Party/Current Box validity.

Re-download and it should work. I attached the mew from that save, by the way -- interesting that it has all 15 for DVs.

I am very amused by the idea that any mew with less than perfect DVs in a Gen I save is illegal.

There's also the neat fact that its name/OT has 00 bytes between the JP characters and 0x50 terminator -- that's not the case for any game generated pokemon.

tl;dr: Mew glitch Mews are differentiable from event ones.

Yes, which also means that nobody can create the same OT, since 0x00 byte cannot be chosen in the characters/letters menu.

(unless someone has some way to glitch their system into changing their trainer name and mew's nickname to containing the 0x00 characters.)

edit:

also, it is not known is GF/NINT intends to utilize Shiny imports for Pokebank from VC (not sure if they will, since there's no VC Gen II games),

But given the current IVs for the Mew, no Gen I Event Mew can be shiny ><

edit2: thanks for the quick fix!

it's all working now.

Also, you've kept the 0x00 for mew right? (just that we can't see it)

Link to comment
Share on other sites

Yes, which also means that nobody can create the same OT, since 0x00 byte isn't use and cannot be chosen in the character menu.

(unless someone has some way to glitch their system into changing their trainer name and mew's nickname to containing the 0x00 characters.)

edit:

also, if they keep the same type of shiny generation (not sure if they will, since there's no VC Gen II games),

no Gen I event Mew can be shiny ><

edit2: thanks for the quick fix!

it's all working now.

Also, you've kept the 0x00 for mew right? (just that we can't see it)

If you edit the nickname/OT, the 00 bytes will go away (and the mew will become illegitimate).

If you don't touch the textboxes, the 00 bytes will be preserved.

Link to comment
Share on other sites

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...