ROM Hack Save Game Editor help

omarrrio

Well-Known Member
OP
Member
Joined
Feb 18, 2010
Messages
634
Trophies
1
Location
nowhere
XP
527
Country
Macau
hi, i need some help, it's for a save game editor i'm making, for an NDS game, but i don't know these things:

1- how to open the save file in decimal for a special adress
2- how to save the changes on the same .sav file (already open) without opening a dialog window (File browser)

i use: visual studio (especially Visual Basic)

thank you
 

BlueFlame90

Well-Known Member
Member
Joined
Aug 7, 2008
Messages
162
Trophies
1
Age
33
Website
Visit site
XP
212
Country
Gambia, The
I never used vb before but it should be similar to C#.
So here is the answer of you first question:

This is for opening a file to write in it!
Code:
'// First the filestream
Dim fs As FileStream = File.Create("C:\testfile.bin")
Dim utf8 As New UTF8Encoding() '// The encoding (can be change if needed)

'// now open the filestream with binarywriter
Dim bw As New BinaryWriter(fs, utf8)

Next go to a specefic position!
Code:
'// Using the seek() method to go to the position (in this case 500d)
bw.Seek(500, SeekOrigin.Current)


Parameters of Seek(): Seek(offset, origin)

offset
Type: System.Int32
A byte offset relative to origin.

origin
Type: System.IO.SeekOrigin
A field of SeekOrigin indicating the reference point from which the new position is to be obtained.


I hope this helps you, if you have questions feel free to ask.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    cearp @ cearp: Welcome hazbeans