Jump to content

  •  

  • iBotModz CBox


    Photo

    [Req]First gamesave editor on C# - help


    • Please log in to reply
    17 replies to this topic

    #1 zzz

    zzz

      Apprentice Grade 1

    • Members+

    • 9 posts
    • Joined: 20-July 09
    • Gender:Male

    Posted 27 August 2009 - 03:35 AM

    Hi, i want to make a simple app for changing "Gald"-(money) amount in "Tales Of vesperia" game save, in c#.
    I am only a beginner at this, i hope this lil app will be a good practice for me.

    The app would look something like this (nothing fancy)
    Posted Image
    I just quickly made this in MS visual studio 08 - pro, but the problem is obviuosly in coding it.
    Let my start-off by saying i have no clue on how actually this gamesave-editing should work, tho i do have a guess other apps like this change the hex value at a certain address to a wanted-one is that about right ?

    I've found a very similar application to what i want to achieve - exept for a dif game (prototype)
    Where Dakote Provided a code for it
    Imports System.IO
    Imports System.Text
    
    Public Class Form1
    
        Public fileName
    
        Private Sub btnOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpen.Click
            Dim ofd As New OpenFileDialog
            If ofd.ShowDialog() = DialogResult.OK Then
                fileName = ofd.FileName
                Dim fs As New FileStream(ofd.FileName, FileMode.Open)
                Dim br As New BinaryReader(fs)
                Dim length As Long = fs.Length
    
                br.BaseStream.Position = &H666 'HeX Offset
                Dim EP As Byte() = br.ReadBytes(666) 'lengh of EP allowed
                txtEP.Text = ASCIIEncoding.ASCII.GetString(EP)
    
            End If
        End Sub
    
        Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
            Dim bw As New BinaryWriter(New FileStream(fileName, FileMode.Open))
    
            bw.BaseStream.Position = &H666 'EP Offset
            Dim EP As Byte() = ASCIIEncoding.ASCII.GetBytes(txtEP.Text)
            bw.Write(EP)
        End Sub
    End Class

    And i was wondering if i could modify this so that it would work for me. Could any one highlight to what i should be paying attention?
    Sorry for noob'ish questions - im new to programing and this forum :unworthy:
    P.s Please excuse my english grammar - it isn't my first lang.
    P.p.s Manual hex editing for this game works i allready tested it out.

    #2 Rogue Modder

    Rogue Modder

      Class of 2008

    • VIP

    • 1,328 posts
    • Joined: 02-January 09
    • Gender:Male
    • Location:London, UK

    Posted 27 August 2009 - 07:14 AM

    What is the Offset and Length of the Gold* in the game?

    #3 zzz

    zzz

      Apprentice Grade 1

    • Members+

    • 9 posts
    • Joined: 20-July 09
    • Gender:Male

    Posted 27 August 2009 - 08:36 AM

    Posted Image
    First offset - 70335
    Second offset - 70362

    And it is actually called gald not gold :)

    Edited by zzz, 27 August 2009 - 08:37 AM.


    #4 Rogue Modder

    Rogue Modder

      Class of 2008

    • VIP

    • 1,328 posts
    • Joined: 02-January 09
    • Gender:Male
    • Location:London, UK

    Posted 27 August 2009 - 09:04 AM

    Upload a save game, and comment how much gald you have in it.

    #5 zzz

    zzz

      Apprentice Grade 1

    • Members+

    • 9 posts
    • Joined: 20-July 09
    • Gender:Male

    Posted 27 August 2009 - 09:25 AM

    Here you go - dummy save just at the start of the game. Gald is set to 999999
    Should find 3 values From the top;

    1st one is just a text that show how much gald you have when loading up game - but doesent actually change the gald value itself
    2nd value is the gald in the game (the one i was talking about in #3 post)
    3rd i havent tested it out yet (but dont think it has anything to do with gald at all)

    EDIT: what now Dakote? is it possible ? :)

    Attached Files


    Edited by zzz, 27 August 2009 - 10:47 AM.


    #6 Rogue Modder

    Rogue Modder

      Class of 2008

    • VIP

    • 1,328 posts
    • Joined: 02-January 09
    • Gender:Male
    • Location:London, UK

    Posted 27 August 2009 - 11:45 AM

    Yeah it is. I'm writing a Sauce now. I will attach it to this post when done.
    • zzz likes this

    #7 zzz

    zzz

      Apprentice Grade 1

    • Members+

    • 9 posts
    • Joined: 20-July 09
    • Gender:Male

    Posted 27 August 2009 - 01:30 PM

    I rly hope you'll get to finish it mate - and help this dumb guy :unworthy:

    #8 SotG Caboose

    SotG Caboose

      TheMasterSnails Pimp!

    • Donors+

    • 827 posts
    • Joined: 29-May 08
    • Gender:Male

    Posted 27 August 2009 - 03:17 PM

    Why are you calling it yours if someone is going to code it for you?

    #9 zzz

    zzz

      Apprentice Grade 1

    • Members+

    • 9 posts
    • Joined: 20-July 09
    • Gender:Male

    Posted 27 August 2009 - 03:51 PM

    Why are you calling it yours if someone is going to code it for you?

    Ehm i dont know where you got that impresion from - it's not like im gonna release it or anything claiming i made it. Im plainly intereseted in how game editors like this are working, so that i could one day maybe code my own one. For today im only experimenting, now i just want to see how Dakote modified that code from working on Prototype to this game. :) Hopefully Dakote will show us 2moro.

    #10 Rogue Modder

    Rogue Modder

      Class of 2008

    • VIP

    • 1,328 posts
    • Joined: 02-January 09
    • Gender:Male
    • Location:London, UK

    Posted 27 August 2009 - 04:11 PM

    I can't find the values... That's not the correct offsets.

    #11 zzz

    zzz

      Apprentice Grade 1

    • Members+

    • 9 posts
    • Joined: 20-July 09
    • Gender:Male

    Posted 27 August 2009 - 05:40 PM

    Well im not really sure if this is correct way to find offsets- what i did is just moved the mouse to the line where the gald value is, and it just showed the offset. is this the correct way of finding it ? (look at the pic)

    Also could this be a problem because the value streches over 2 offsets (The highlited hexvalue is 999999 in the pic) and as you can see it goes from 70335 down to 70362 offset.
    What can i do more to help ? sry for noobish questions :X
    P.s for saves to work on the game i need to use hash block calc - is it possible to include such feature into apps like this, so that it i'll be like all in one?

    Attached Thumbnails

    • asdsa.png


    #12 Rogue Modder

    Rogue Modder

      Class of 2008

    • VIP

    • 1,328 posts
    • Joined: 02-January 09
    • Gender:Male
    • Location:London, UK

    Posted 27 August 2009 - 06:07 PM

    Yeah, sorry. I was looking for unicode or ASCII. it's in hexadecimal.

    And no, that Hash Block Calc is Supermoders work. I don't have permission to use his rehashing method.

    Edited by Dakote, 27 August 2009 - 06:16 PM.


    #13 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 28 August 2009 - 11:25 AM

    Why are you calling it yours if someone is going to code it for you?


    lol.. cough...

    #14 SotG Caboose

    SotG Caboose

      TheMasterSnails Pimp!

    • Donors+

    • 827 posts
    • Joined: 29-May 08
    • Gender:Male

    Posted 28 August 2009 - 12:55 PM

    lol.. cough...

    :awesome:

    #15 zzz

    zzz

      Apprentice Grade 1

    • Members+

    • 9 posts
    • Joined: 20-July 09
    • Gender:Male

    Posted 28 August 2009 - 04:21 PM

    Any news Dakote?

    #16 miinaturvat

    miinaturvat

      miiinaturvat

    • Donors+

    • 927 posts
    • Joined: 09-April 08
    • Gender:Male
    • Location:Dragon Shores!

    Posted 29 August 2009 - 08:13 AM


    lol.. cough...

    :awesome:

    :awesome:

    #17 zzz

    zzz

      Apprentice Grade 1

    • Members+

    • 9 posts
    • Joined: 20-July 09
    • Gender:Male

    Posted 31 August 2009 - 05:28 PM

    bump ?

    #18 unknown v2

    unknown v2

      Corporal Grade 1

    • Members+

    • 153 posts
    • Joined: 14-July 08

    Posted 06 September 2009 - 12:41 AM

    Two things:
    1) it's not a byte, it's a int32. ( {int.parse()})
    2) you have to write in big endian for 360 games