Visual Basic 2008 Express Version Mod Tool Making HELP!

KillerVidz Feb 21, 2012

  1. KillerVidz

    KillerVidz Rocky BANNED
    195/282

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,251
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One
    Hi,

    I Am Trying To Make a "Need For Speed Undercover" Mod Tool But After I Make And Mod It The Game Reads The File Is Damaged.

    If I Can get a correct code you will be in credits and have a Full Version Code!

    Btw that only means if it works.

    Thanks,

    KillerVidz.

    Sorce:

    Code:
    Imports PackageIO
    Public Class Form1
    	Dim Filepath As String
    
    
    	Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
    	End Sub
    
    	Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    		Dim Open As New OpenFileDialog
    		Open.Filter = "Gamesave (*.*)|*.*"
    		Open.Title = "Open Gamesave"
    		If Open.ShowDialog = Windows.Forms.DialogResult.OK Then
    			Filepath = Open.FileName
    			ReadFile(Filepath)
    		Else
    			Return
    		End If
    	End Sub
    
    	Public Sub ReadFile(ByVal FilePath As String)
    		Dim Reader As New PackageIO.Reader(FilePath, PackageIO.Endian.Big)
    		Reader.Position = 71185   'Decimal Not Hex
    		TextBox1.Text = Reader.ReadInt32
    	End Sub
    	Public Sub WriteFile(ByVal FilePath As String)
    		Dim Writer As New PackageIO.Writer(FilePath, PackageIO.Endian.Big)
    		Writer.Position = 71185 'Decimal Not Hex
    		Writer.WriteInt32((TextBox1.Text))
    	End Sub
    
    	Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    		Try
    
    			WriteFile(Filepath)
    			MsgBox(("File Saved!"))
    			ReadFile(Filepath)
    		Catch ex As Exception
    			MsgBox("Error", MsgBoxStyle.Critical, "")
    		End Try
    	End Sub
    
    
    ----------------------------------------------------------------------------------------------------------------------------------------------

    Ignore This Bit
    Code:
    Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
    		RichTextBox1.Text = "Non Working Mod Tool Made By KillerVidz At XpGamesaves"
    	End Sub
    End Class
    
     
  2. Bullet

    Bullet XPG Original Founder EST 2000 XPG Administrator XPG Founder
    550/564

    Joined:
    Jul 16, 2009
    Messages:
    20,982
    Likes Received:
    7,961
    Trophy Points:
    550
    Gender:
    Male
    Console:
    Xbox
    Topic moved to Programing.

    It may help if you post your source.
     
    • Like Like x 2
  3. KillerVidz

    KillerVidz Rocky BANNED
    0/47

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,251
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One
    KK Thanks
    Just Doing It Now
     
  4. slyfuldragon

    slyfuldragon 360Revolution Developer XPG Moderator
    195/282

    Joined:
    Nov 22, 2009
    Messages:
    1,770
    Likes Received:
    363
    Trophy Points:
    195
    Gender:
    Male
    Console:
    Xbox
    Why are you making the editor read in decimal and not hex? Just curious. (I haven't messed with Undercover, so Just trying to get to the bottom of it)

    Try something like this:
    Code:
    	 Public Sub ReadFile()
    		Dim Reader As New PackageIO.Reader(FilePath, PackageIO.Endian.Big)
    		Reader.Position = &H71185  
    		NumericUpDown1.Value = Reader.ReadInt32
    		Reader.Close()
    	 End Sub
    
    	 Public Sub WriteFile()
    		Dim Writer As New PackageIO.Writer(filepath, PackageIO.Endian.Big)
    		Writer.Position = &H71185
    		Writer.WriteInt32(NumericUpDown1.Value)
    		Writer.Close()
    	 End Sub
    
    	Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    		Try
    			WriteFile()
    			MsgBox(("File Saved!"))
    			ReadFile()
    		Catch ex As Exception
    			MsgBox("Error", MsgBoxStyle.Critical, "")
    		End Try
    	End Sub
    
    
    Making the reader/writer in Hex as well as pointing it to a NumericUpDown should not cause any problems with reading/writing. Textboxes can pose some issues when it comes to certain things like integers and strings.

    If it still comes up corrupted then there is an additional hash (checksum) that needs to be fixed after making changes to the save and before rehashing/resigning.
     
    • Like Like x 2
  5. KillerVidz

    KillerVidz Rocky BANNED
    0/47

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,251
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One

    Thanks Dude Gunna Try It Out Tomorrow.
    Ermm... I Couldent Get The Full Version To Work So I Could Only Put You In Credit's My Bad :(....

    ILL Send You The Download Link Tomorrow If You Wanna Download It.
     
  6. slyfuldragon

    slyfuldragon 360Revolution Developer XPG Moderator
    195/282

    Joined:
    Nov 22, 2009
    Messages:
    1,770
    Likes Received:
    363
    Trophy Points:
    195
    Gender:
    Male
    Console:
    Xbox
    lol I'm not worried about the credits. Just helping out.
    I saw your PM you sent, Delete those 2 instances Filepath located within Writefile() and Readfile() (Make it look like that and see if that works).
     
  7. KillerVidz

    KillerVidz Rocky BANNED
    0/47

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,251
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One
    Thanks!....

    Gunna Try It In A Bit Tell ya if it works :)
     
  8. slyfuldragon

    slyfuldragon 360Revolution Developer XPG Moderator
    195/282

    Joined:
    Nov 22, 2009
    Messages:
    1,770
    Likes Received:
    363
    Trophy Points:
    195
    Gender:
    Male
    Console:
    Xbox
    No problem, that should let you read, write and save properly now.
    If it does not continue to work as far as the changes to the save were saved but the save is corrupted upon loading it in the game, then there is an additional hash (Checksum) that is require to fix before rehashing/resigning.
     

Share This Page

Close