You are viewing our Forum Archives. To view or take place in current topics click here.
AC Brother Hood Mod Tool Source Code
Posted:

AC Brother Hood Mod Tool Source CodePosted:

TTG_Gold_Jake
  • TTG Destroyer
Status: Offline
Joined: Jun 25, 201013Year Member
Posts: 7,353
Reputation Power: 336
Status: Offline
Joined: Jun 25, 201013Year Member
Posts: 7,353
Reputation Power: 336

Imports PackageIO
Public Class Form1
    Private FilePath As String = Nothing
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DisableForm()
    End Sub
--------------------------------   
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
        FilePath = OpenFile()
        If Not FilePath = Nothing Then
            Try
                fValueBox.Value = Readf(FilePath)
                EnableForm()
            Catch ex As Exception
                StatusLabel1.Text = "Error Reading File!"
                MsgBox("Error Reading File!" & vbLf & vbLf & ex.Message, MsgBoxStyle.Critical, "Error")
            End Try
        End If
        StatusLabel1.Text = "Idle"
    End Sub
---------------------------------
    Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
        If Not FilePath = Nothing Then
            Try
                Writef(FilePath, fValueBox.Value)
                StatusLabel1.Text = "File Saved!"
                MsgBox("File Saved!", MsgBoxStyle.Information, "")
                fValueBox.Value = Readf(FilePath)
            Catch ex As Exception
                StatusLabel1.Text = "Error Writing File!"
                MsgBox("Error Writing File!" & vbLf & vbLf & ex.Message, MsgBoxStyle.Critical, "Error")
            End Try
        Else
            StatusLabel1.Text = "No File!"
            MsgBox("You must open a file first!", MsgBoxStyle.Exclamation, "")
        End If
        StatusLabel1.Text = "Idle"
    End Sub
----------------------------------
    Private Sub CloseToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseToolStripMenuItem.Click
        StatusLabel1.Text = "Closing..."
        If Not FilePath = Nothing Then
            DisableForm()
            ResetForm()
        Else
            If MsgBox("Are you sure?", MsgBoxStyle.YesNo, "Close") = MsgBoxResult.Yes Then
                Me.Close()
            Else
                Me.Show()
            End If
        End If
        StatusLabel1.Text = "Idle"
    End Sub
----------------------------------
    Private Sub AboutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem.Click
        MsgBox(Me.Text & vbLf & vbLf & _
               "How to Use:" & vbLf & vbLf & _
               "1) Click ""File"" then ""Open"" to browse for and open your Assassins Creed 2 gamesave." & vbLf & vbLf & _
               "2) Make any changes then click ""File"" then ""Save"" to save your gamesave." & vbLf & vbLf & _
               "3) Rehash and Resign your gamesave after editing.", MsgBoxStyle.Information, "About")
    End Sub
----------------------------------
Function OpenFile() As String
        StatusLabel1.Text = "Opening..."
        Dim open As New OpenFileDialog
        open.Title = "Open a file to continue..."
        open.Filter = "Assassins Creed 2 saves (*.*)|*.*"
        open.FileName = "ASSASSINSCREED2SAVEGAME"
        If open.ShowDialog = Windows.Forms.DialogResult.OK Then
            If VerifyFile(open.FileName) = True Then
                StatusLabel1.Text = "Valid File!"
                Return open.FileName
            Else
                StatusLabel1.Text = "Invalid File!"
                MsgBox("Invalid File!", MsgBoxStyle.Exclamation, "")
            End If
        End If
        Return Nothing
    End Function
----------------------------------
 Function VerifyFile(ByVal FilePath As String) As Boolean
        StatusLabel1.Text = "Verifying File..."
        Dim reader As New PackageIO.Reader(FilePath, Endian.Little, &H360)
        Dim TitleID As String = reader.ReadHexString(4)
        reader.Close()
        If TitleID = "5553083B" Then
            Return True
        Else
            Return False
        End If
    End Function
----------------------------------
    Function GetOffset(ByVal FilePath As String, Optional ByVal BeginOffset As Long = &HD000) As Integer
        StatusLabel1.Text = "Searching..."
        Dim reader As New PackageIO.Reader(FilePath, Endian.Little)
        Dim Value As String = "12997BF700000000000007000B"
        For i As Integer = BeginOffset To FileLen(FilePath)
            reader.Position = i
            If reader.ReadHexString(13) = Value Then
                Return (i + 13)
            End If
        Next
        reader.Close()
        Return Nothing
    End Function
----------------------------------
    Function Readf(ByVal FilePath As String) As Integer
        StatusLabel1.Text = "Reading File..."
        Dim reader As New PackageIO.Reader(FilePath, Endian.Little, GetOffset(FilePath))
        Dim buffer As Integer = reader.ReadInt32()
        reader.Close()
        Return buffer
    End Function
----------------------------------
 Sub Writef(ByVal FilePath As String, ByVal Value As Integer)
        StatusLabel1.Text = "Writing File..."
        Dim writer As New PackageIO.Writer(FilePath, Endian.Little, GetOffset(FilePath))
        writer.WriteInt32(Value)
        writer.Close()
    End Sub
----------------------------------
Sub EnableForm()
        StatusLabel1.Text = "Enable Form..."
        fValueBox.Enabled = True
        GroupBox1.Enabled = True
        StatusLabel1.Enabled = True
        StatusStrip1.Enabled = True
        StatusLabel1.Text = "Idle"
    End Sub
----------------------------------
Sub DisableForm()
        StatusLabel1.Text = "Disable Form..."
        fValueBox.Enabled = False
        GroupBox1.Enabled = False
        StatusLabel1.Enabled = False
        StatusStrip1.Enabled = False
        StatusLabel1.Text = "Idle"
    End Sub


    Sub ResetForm()
        StatusLabel1.Text = "Reset Form..."
        fValueBox.Value = 0
        FilePath = Nothing
        StatusLabel1.Text = "Idle"
    End Sub

End Class


Credit goes to jizzabeez something like that xD
#2. Posted:
JR33V3
  • TTG Undisputed
Status: Offline
Joined: Jul 14, 201013Year Member
Posts: 5,150
Reputation Power: 283
Status: Offline
Joined: Jul 14, 201013Year Member
Posts: 5,150
Reputation Power: 283
you should post the mod tool too.

what is the source? what was it coded in what language.
#3. Posted:
svencom
  • New Member
Status: Offline
Joined: Jan 04, 201014Year Member
Posts: 3
Reputation Power: 0
Status: Offline
Joined: Jan 04, 201014Year Member
Posts: 3
Reputation Power: 0
It is in VB.net And I Dont No But It is For Assassins Creed 2 not Brother Hood
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.