What's new

VB.NET Game save help.

  • Thread starter rebelxpower
  • Start date
  • Views 986
R

rebelxpower

Enthusiast
Messages
69
Reaction score
7
Points
55
Sin$
0
Well thanks for checking out this thread anyways, I know VB.Net well. However I am almost a Beginner to HEX and HEX topics. about the only experience I've done with hex/hex-editing is cracking software HWID's anti leak protection.

Please someone help me understand this. I'm making a Fallout New Vegas mod tool, I know there are tools already out there for this, but I wanted to make my own to start understanding Hex and making my own game saves to contribute to the community.

So I got source code from various threads. Everything works except the most important part. The hex part.

"Money = ScanForString(FilePath, "4A44", 62, 0, 0)"

Ultimately I want it to find the caps in the gamesave, and put the amount in textbox1.text.

Code:
    Private Sub ReadFile(ByVal FilePath As String)
Try
Dim reader As New PackageIO.Reader(FilePath, PackageIO.Endian.Big)
Money = ScanForString(FilePath, "4A44", 62, 0, 0)
Money += 20
reader.Position = Money
reader.ReadString(4)
UseWaitCursor = False
reader.Close()
textbox1.text = reader.readint32
Catch ex As Exception
MsgBox("Error", MsgBoxStyle.Critical)
End Try

End Sub

I do not understand the code below.
Code:
Money = ScanForString(FilePath, "4A44", 62, 0, 0)
Money += 20

"4A44" is supposed to be the HEX value of "money" at least I think even so it shows up 0 in textbox1.text no matter what I put for the "4A44".

"62" is a mystery to me.

Money += 20 Is also a mystery to me.

208xr8i.png


If someone could download the game save and tell me what I need to change for,
Code:
    Private Sub ReadFile(ByVal FilePath As String)
Try
Dim reader As New PackageIO.Reader(FilePath, PackageIO.Endian.Big)
Money = ScanForString(FilePath, "4A44", 62, 0, 0)
Money += 20
reader.Position = Money
reader.ReadString(4)
UseWaitCursor = False
reader.Close()
textbox1.text = reader.readint32
Catch ex As Exception
MsgBox("Error", MsgBoxStyle.Critical)
End Try

End Sub

I would be so pleased.

Gamesave:http://www.2shared.com/file/9IupAYqM/Save_12___JD__Mojave_Wasteland.html

Basic stats:
Code:
Level 10
Caps 3249
EXP 7325/8750
AP 92/92   
HP 160/245
WG 198/250
 
R

rebelxpower

Enthusiast
Messages
69
Reaction score
7
Points
55
Sin$
0
Thank you for contributing that bit but im still stumped. <_<
 
R

rebelxpower

Enthusiast
Messages
69
Reaction score
7
Points
55
Sin$
0
Anyone else willing to help me :frown:

Is my main issue.
"4A44" = The offset.
62 = ????????? How do i figure out 62.
Money = ScanForString(FilePath, "4A44", 62, 0, 0)
 
0wl

0wl

Enthusiast
Messages
36
Reaction score
6
Points
55
Sin$
0
Well thanks for checking out this thread anyways, I know VB.Net well. However I am almost a Beginner to HEX and HEX topics. about the only experience I've done with hex/hex-editing is cracking software HWID's anti leak protection.

Please someone help me understand this. I'm making a Fallout New Vegas mod tool, I know there are tools already out there for this, but I wanted to make my own to start understanding Hex and making my own game saves to contribute to the community.

So I got source code from various threads. Everything works except the most important part. The hex part.

"Money = ScanForString(FilePath, "4A44", 62, 0, 0)"

Ultimately I want it to find the caps in the gamesave, and put the amount in textbox1.text.

Code:
    Private Sub ReadFile(ByVal FilePath As String)
Try
Dim reader As New PackageIO.Reader(FilePath, PackageIO.Endian.Big)
Money = ScanForString(FilePath, "4A44", 62, 0, 0)
Money += 20
reader.Position = Money
reader.ReadString(4)
UseWaitCursor = False
reader.Close()
textbox1.text = reader.readint32
Catch ex As Exception
MsgBox("Error", MsgBoxStyle.Critical)
End Try

End Sub

I do not understand the code below.
Code:
Money = ScanForString(FilePath, "4A44", 62, 0, 0)
Money += 20

"4A44" is supposed to be the HEX value of "money" at least I think even so it shows up 0 in textbox1.text no matter what I put for the "4A44".

"62" is a mystery to me.

Money += 20 Is also a mystery to me.

208xr8i.png


If someone could download the game save and tell me what I need to change for,
Code:
    Private Sub ReadFile(ByVal FilePath As String)
Try
Dim reader As New PackageIO.Reader(FilePath, PackageIO.Endian.Big)
Money = ScanForString(FilePath, "4A44", 62, 0, 0)
Money += 20
reader.Position = Money
reader.ReadString(4)
UseWaitCursor = False
reader.Close()
textbox1.text = reader.readint32
Catch ex As Exception
MsgBox("Error", MsgBoxStyle.Critical)
End Try

End Sub

I would be so pleased.

Gamesave:http://www.2shared.com/file/9IupAYqM/Save_12___JD__Mojave_Wasteland.html

Basic stats:
Code:
Level 10
Caps 3249
EXP 7325/8750
AP 92/92   
HP 160/245
WG 198/250


I could be wrong, but from what I can tell:

This program and its method of finding the value of money is for RedDeadRedemption, so
-"4A44" is probably a string in the gamesave that, exactly 20 characters after it lies the offset for the money.
-62 is the offset that it starts looking for the string from, and not before this (probably to exclude any user inputted names that could contain that string?)

Code:
Money = ScanForString(FilePath, "4A44", 62, 0, 0)
is saying that the long int "Money" will = the what the method "ScanForString" returns. Since the method takes the arguments:
Code:
(Filepath as String, Str As String, StartOffset As Integer, CaseSensitive As Boolean, UseUnicodeEncoding As Boolean)
I think we can assume the method will: look at FilePath for the string "4A44" starting at the 62 character, isn't case sensitive, isn't unicode.
Code:
Money += 20
just adds 20 to Money.

From the Fallout NV gamesaves ive looked at, it looks the like variables aren't in a static location, they change for each profile. ( I guess you would have to find a constant string in the save, in relation to the bottle cap count, or any other item you wanted to change, then just adjust for the distance like the RDR program does).

However, you could try something like looking for the value you currently have then replacing it, although that may not always work.
 
Top Bottom
Login
Register