[Source] Open Halo Parser

Halo modding and gaming related applications.
User avatar
Modzy
Green Beret
Posts: 3058
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

[Source] Open Halo Parser

Post by Modzy » Tue Jul 20, 2010 3:54 pm

What is it?
[/color]

The Open Halo Parser is what I use to power all of my Halo-based applications. It is a set of classes and methods for parsing Halo maps very quickly and easily, allowing you to get your application up and running in very little time.

This release is the first public version. It has been trimmed down and refined from previews demos (see dev forum for demos, if you've permission).

How Does it Work?
[/color]

Simply add the OHP folder to your REALBasic project, and you can start using it. You can use commands to start such as:

Code: Select all

//For this demo, f will be a folder item that has been pointed to a map file.
Dim new_map As New halo_map
new_map.load(f)
The code above will load all of the map information; all header data, index header data, tag offsets, names, lengths, sbsp information, etc.

The info of a loaded map can be used very easily. Like, displaying the scnr's name:

Code: Select all

//new_map is a halo_map that has been loaded
MsgBox new_map.tags(0).name //tag number 0 will always be the scnr, because it is the first tag in the map.
Or maybe display the very last tag's name?

Code: Select all

//new_map is a halo_map that has been loaded
MsgBox new_map.tags(new_map.tag_count - 1).name //tags() array is zero-based
Note: Things like arrays and dictionaries are zero-based, while tag counts and reflexive counts are one-based.

All of the basic map information can be gained from these methods. It is the very basic things all map editors have in common: map parsing. These methods are very light and fast, best there is in my opinion.
This source is free to be used in anyway the downloader likes. All I ask is for credit if it is used within an application.

User avatar
Amy
Green Beret
Posts: 3628
Joined: Mon Nov 17, 2008 6:22 pm
Location: Mota-Lev's house.
Contact:

Re: [Source] Open Halo Parser

Post by Amy » Tue Jul 20, 2010 6:12 pm

: D Great, thank you so much Modzy!
MGM Sig
Mota-Lev wrote:Its like watching an Asian girl crush a cats brain through its eye socket with high heels.. Its horrible but I just can't look away :/.

User avatar
Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

Re: [Source] Open Halo Parser

Post by Sparky » Wed Jul 21, 2010 12:22 am

any way to apply this to objective-c?
Either you are groping for answers, or you are asking God and listening to Jesus.

User avatar
Modzy
Green Beret
Posts: 3058
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

Re: [Source] Open Halo Parser

Post by Modzy » Wed Jul 21, 2010 1:03 am

Sparky wrote:any way to apply this to objective-c?
The concepts and such can be ported. It'll just take someone who knows how to code in Objective-C and has the time and is willing to do so. I'm only one of those three at this point in time.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests