Jump to content

  •  

  • iBotModz CBox


    Photo

    How do i do this in VB.net


    • Please log in to reply
    6 replies to this topic

    #1 jrjonanddad1

    jrjonanddad1

      Private

    • Members+

    • 36 posts
    • Joined: 17-June 08
    • Gender:Male
    • Location:inside the very depths of xboxlive

    Posted 20 August 2009 - 03:18 PM

    I was wanting to make a app that when you load the file into it, and you hit a button it atuomatically looks and changes the Value for the EP on a prototype save. Anyone know how i can make that happen?

    Mainly the reason i want to do this is because i am still learning and want to try something like this xD

    Thanks for the help ppl
    Jrjonanddad1

    #2 lostmodz26

    lostmodz26

      I am lostmodz26.

    • VIP

    • 1,153 posts
    • Joined: 12-March 09
    • Gender:Male
    • Location:Northern Louisiana

    Posted 20 August 2009 - 04:22 PM

    I'm a horrible VB programmer. But I think you have to set up a system that reads values in that type of file.

    Ask DarkSlipStream, he knows a lot about programming.

    #3 REDSTAR 105

    REDSTAR 105

      Insert Custom Title Here.

    • Donors+

    • 775 posts
    • Joined: 16-April 08
    • Gender:Male
    • Location:You know... over there.

    Posted 20 August 2009 - 05:58 PM

    Dark Slipstream is a VB god. No doubt.

    #4 Rogue Modder

    Rogue Modder

      Class of 2008

    • VIP

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

    Posted 20 August 2009 - 09:53 PM

    Or ask me, lmfao. I did code in VB for along time. :o

    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
    

    Source Download: http://ibotmodz.rogu...ded/example.rar

    #5 yungbol

    yungbol

      Firmware Expert

    • Global Mods

    • 1,461 posts
    • Joined: 09-April 08
    • Gender:Male
    • Location:Philly

    Posted 20 August 2009 - 10:30 PM

    I made an editor for this game a while ago in C#, but that is no help. Dakote's solution is legit. +1

    #6 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

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

    Posted 21 August 2009 - 01:42 AM

    Rogue's works well for beginners, use his. I didn't see this topic earlier lol...

    #7 Rogue Modder

    Rogue Modder

      Class of 2008

    • VIP

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

    Posted 21 August 2009 - 10:17 AM

    Yeah, i don't do Endian for VB, anyway for something this easy, BR/BW is good enough.

    Lmfao, yungbol +reps me, some random fag -reps me. hahaha. Halodude i bet.

    Funny story, when we were "friends" he would always get jealous that i could program and he couldn't, says 1 of his friends i still talk to. So that is a lol. :p

    Edited by Dakote, 21 August 2009 - 02:16 PM.