{Tut} How to Use X360 Extractor Function

Mets08123 Jan 18, 2011

  1. Me

    Mets08123 Newbie BANNED
    45/47

    Joined:
    Nov 6, 2010
    Messages:
    15
    Likes Received:
    3
    Trophy Points:
    0
    Gender:
    Male
    Console:
    Xbox
    I will teach you how to extract a file from a file. For example extracting the Account file from your profile. In this tutorial I'll be using a PGR3 gamesave.

    Step 1:
    Add 1 Button and Name it Open

    Step 2:
    Above Public Class Form1 add this code:
    Code:
    Imports X360.STFS
    Imports X360.IO
    Then under Public Class Form1 add this code:
    Code:
     Dim Filepath As String
        Dim stfs As STFSPackage
        Dim item As FileEntry
    Step 3:
    Double click the open button and add this code:
    Code:
     Dim ofd As New System.Windows.Forms.OpenFileDialog()
            ofd.Filter = "profile.sav (*.*)|*.*"
            ofd.Title = "profie.sav"
            ofd.ShowDialog()
            stfs = New STFSPackage(ofd.FileName, Nothing)
            item = stfs.GetFile("profile.save")
            item.Extract(System.IO.Path.GetTempPath & "\profile.save")
            Me.Filepath = System.IO.Path.GetTempPath & "\profile.save"
            Me.Filepath = System.IO.Path.GetTempPath & "\profile.save"
    Now the ofd.Filter = "profile.sav (*.*)|*.*" just change the profile.sav to whatever the first file is named. Do the same for the ofd.Title = "profile.sav"
    For item = stfs.GetFile("profile.save") you have to change it to the EXACT name of the file you wanted extracted from the file you opened.
    You MUST change everything that says \profile.save to the file you want extracted.
    For Me.Filepath = System.IO.Path.GetTempPath this extracts the save to a temporary file location so you will have to change this to location you want it extracted to.

    Your Done!
     
  2. c0

    c0madr0ne Member
    45/47

    Joined:
    Jul 19, 2009
    Messages:
    895
    Likes Received:
    109
    Trophy Points:
    45
    Console:
    Playstation 3
    while you are grasping how to use it you need to add some error handling of your own...also i will simplify it a little more....

    Code:
     Dim ofd As New System.Windows.Forms.OpenFileDialog()
            ofd.Filter = "profile.sav (*.*)|*.*"
            ofd.Title = "profie.sav"
            ofd.ShowDialog()
      Me.Filepath = profie.sav
            stfs = New STFSPackage(ofd.FileName, Nothing)
     stfs.GetFile("profie.sav").Extract("profie.sav")'you can combine the two lines'
                Catch ex As Exception
                    MsgBox("NO FILE")'handles error ON YOUR OWN'
                               stfs.CloseIO()
    this will extract to your application startup path no need to get a temppath
     
    • Like Like x 1

Share This Page

Close