Map Resigning tutorial (Visual Basic)

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Locked
User avatar
jebmodillion
Readers Club





Posts: 41
Joined: Sun Apr 08, 2007 9:43 pm

Map Resigning tutorial (Visual Basic)

Post by jebmodillion »

Now I know everyone (for the most part) knows how to make a map resigner but some do not. In this tut you will learn how to make a halo 2 map resigner... duh

-note-
Please type this and not copy and paste because you will learn more.

Any ways lets get started:

First:
-Open up visual basic and start a new project.
-Name it what ever you want.

Second:
You need to add one button... Yep one button
Then make it look all pretty
And finaly add a open file dialog and rename it ofd.

Third:
We need to import System.IO so go to the forms code page and at the top type the following line of coding:


"This opens up the Binary reading and writing so we can use it
"It also does more but you don't need to now that for this

Imports System.IO



Next

Go back to the form design page and go to the code page of your button that you added.

Type this code:

"This filters out any file besides a halo/halo2 map

ofd.Title = "Open a Map"
ofd.Filter = "Map (*.map)|*.map"


Then this code:

"Basicaly this say if all of the above worked then procced.

If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then

Next this code:
"This lets us read and write inside our selected map

Dim BR As New BinaryReader(New FileStream(ofd.FileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
Dim BW As New BinaryWriter(New FileStream(ofd.FileName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))


After that this code:

"This is how our program finds the signature of the map

Dim Signature As Int32 = 0
Dim MapSize As Long = BR.BaseStream.Length
BR.BaseStream.Position = 2048
For i As Integer = 2048 To MapSize - 4 Step 4
Signature = Signature Xor BR.ReadInt32
Next


Then this:

"This tell our program where to write the signature

BW.BaseStream.Position = 720
BW.Write(Signature)
BR.Close()
BW.Close()

After all that top it off with a measage box:

"This is a msg box that lets you know when it is done.

MsgBox("Your words here! New signature is 0x" & Hex(Signature))

Finish it off with this:

End If




Well thats the tutorial!

Very simple

Have fun with it

If you have any questions just post them

Please leave feed back if you used this tut.

Thanks alot and once again have fun
Last edited by jebmodillion on Fri May 25, 2007 12:16 pm, edited 2 times in total.
User avatar
xbox7887




Socialist Coagulator Decryptor Advisor
Eureka Commentator Wave Scorched Earth

Posts: 2160
Joined: Mon Dec 27, 2004 6:19 pm
Location: New Lenox, Illinois
Contact:

Post by xbox7887 »

Maybe you should explain what it does and how it actually works. You leave them no option other than to copy and paste...comments are key :X
User avatar
kibito87




Stylist Connoisseur Advisor Bloodhound
Droplet Articulatist 500

Posts: 3461
Joined: Mon Feb 21, 2005 7:49 pm
Location: Ohio
Contact:

Post by kibito87 »

xbox7887 wrote:Maybe you should explain what it does and how it actually works. You leave them no option other than to copy and paste...comments are key :X
My thoughts exactly.
Image
User avatar
jebmodillion
Readers Club





Posts: 41
Joined: Sun Apr 08, 2007 9:43 pm

Post by jebmodillion »

Yeah I was planing on it but I was in a rush jast knight.
Ill fix it up in a minute becuase I have some stuff to do.
Patrickssj6




Pi Collaborator

Posts: 5426
Joined: Sat Jul 24, 2004 12:12 pm
Location: I'm a Paranoid
Contact:

Post by Patrickssj6 »

You copied this tutorial.It's already on this forum by xXAntmanXx
...left for good
Locked