ROM Hack How do you make a Save Editor?

Newedge_Isaiah

Well-Known Member
OP
Member
Joined
Jan 7, 2016
Messages
158
Trophies
0
Age
22
XP
473
Country
United States
I know there are hundreds of posts about asking this same question, but none seem to have the answers I'm looking for. Before you ask, yes I have knowledge of coding in C#, but mainly Visual Studio (.NET) coding. The goal of my save editor is not to replace hex values, rather strings inside of a .bin save file. Everywhere I have looked has no answers to this certain code, so I would appreciate any help.

So for example, I would like to click a button, and allow the already selected save file to change the values of a row of bytes to different values. I know how to hex, so yeah.

For even more example, I would like for a value at these offsets (all on one line) in a .bin file
656 - 65B (6 bytes long)

To be changed to a certain value written in string (text).

Any idea how I would do this?
 
Last edited by Newedge_Isaiah,

Queno138

Ravens
Member
Joined
Sep 18, 2010
Messages
2,425
Trophies
0
Location
Luigi's Dark Mansion
XP
1,070
Country
Senegal
I know there are hundreds of posts about asking this same question, but none seem to have the answers I'm looking for. Before you ask, yes I have knowledge of coding in C#, but mainly Visual Studio (.NET) coding. The goal of my save editor is not to replace hex values, rather strings inside of a .bin save file. Everywhere I have looked has no answers to this certain code, so I would appreciate any help.

So for example, I would like to click a button, and allow the already selected save file to change the values of a row of bytes to different values. I know how to hex, so yeah.

For even more example, I would like for a value at these offsets (all on one line) in a .bin file
656 - 65B (6 bytes long)

To be changed to a certain value written in string (text).

Any idea how I would do this?

Just convert the string to bytes, and overwrite that location?

(And I've made a save editor and other programs using Visual Studios .NET implementation)
 

Agent Moose

Well-Known Member
Member
Joined
Dec 6, 2014
Messages
407
Trophies
0
Age
33
XP
552
Country
United States
I created my Project Mirai save editor all with Python (this was the first ever time I learned Python). My command line one is simple and straight forward, while the Python GUI one is much more compressed.

With python I used this to change a range of bytes:
Code:
if sys.argv[2] == "UnlockProfileOptions":
    for ProfileCard in range(0, 846):
        rawr.seek(0x7BB4 + ProfileCard)
        rawr.write('\x01')
    print 'All Profile Card Options Unlocked!'

The "range(0, 846)" just makes that snippet of code loop, as well as adds that number to address 0x7BB4 then writes 0x01 to the address it's currently on.

So for your example, in python it would look like this:
Code:
if sys.argv[2] == "argument":
    for variable in range(0, 6):
        rawr.seek(0x656 + variable)
        rawr.write('\x01')
    print 'RAWR'

I am not familiar with C#, so I don't know what the equivalent would be without looking it up.

I hope this helps a little bit.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    The Real Jdbye @ The Real Jdbye: you can fap to your favorite character without it being gay