Save Game Editor help

Discussion in 'NDS - ROM Hacking and Translations' started by omarrrio, Oct 8, 2010.

Oct 8, 2010

Save Game Editor help by omarrrio at 9:32 PM (693 Views / 0 Likes) 2 replies

  1. omarrrio
    OP

    Member omarrrio GBAtemp Advanced Fan

    Joined:
    Feb 18, 2010
    Messages:
    633
    Location:
    nowhere
    Country:
    Morocco
    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
     
  2. BlueFlame90

    Member BlueFlame90 GBAtemp Regular

    Joined:
    Aug 7, 2008
    Messages:
    162
    Country:
    Germany
    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.
     
  3. omarrrio
    OP

    Member omarrrio GBAtemp Advanced Fan

    Joined:
    Feb 18, 2010
    Messages:
    633
    Location:
    nowhere
    Country:
    Morocco
    woow thnx but i don't quite understund this, can you write just the codes plz, thank you.
     

Share This Page