Halo 3 Retail Game Research

Discussion about modding Halo 3.
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 »

h4x.
DWells55





Posts: 1445
Joined: Mon Dec 27, 2004 7:47 am

Post by DWells55 »

Wow, gotta say this is pretty awesome, can't believe I missed this. As others have mentioned, it is most likely there was no .xex editing involved here since there's nothing capable of launching an unsigned retail executable. In the event korn invented a way to do this, I think he probably would've focused on that and it's be al over the front page of X-S.
Digital Marine





Posts: 50
Joined: Mon Dec 27, 2004 7:02 am

Post by Digital Marine »

DWells, I agree with you. If Korn (or Anthony, as I hear?) did successfully mod the default.xex they'd be all over XS and XboxHackers and all. Most likely it was just something in the map they fixed. Perhaps they did decompile the .xex (which I don't even know if its possible now-a-days?) and extract a private key and used it to resign the "hash". I don't know, I'm tired of people keeping secrets...

Okay, keeping back on track with what this thread is about...researching, not bragging (although nobody said "I CAN DO THIS", I see the quote below as a brag).... Prey, would you mind posting any information on what you think you found with the raw data? I'm curious to look at that...even if it's just the local map...
Making my shotgun shoot beam projectiles and making the world gravity half that of earth tickled my fancy. Too bad(?) my camcorder can't pick up the output from my TV, could have tickled your fancy as well. Oh well, time to get rid of those *** kill volumes.
Last edited by Digital Marine on Mon Oct 29, 2007 2:48 pm, edited 1 time in total.
User avatar
Tural




Conceptionist Acolyte Bloodhound Recreator
Socialist Connoisseur Droplet Scorched Earth
Grunge

Posts: 15628
Joined: Thu Jun 16, 2005 3:44 pm
Location: Lincoln, NE
Contact:

Post by Tural »

Yes, with the local raw, we could get some cubemaps at least. =p
User avatar
Prey




Connoisseur Snitch! Pyre Articulatist 500

Posts: 1026
Joined: Wed Dec 27, 2006 6:49 am
Location: UK
Contact:

Post by Prey »

Well, heres what I've got so far then:

1. Follow the 0x58 reflexive pointer in the zone meta to reach the raw table, as shade has already said, and from there you have a list of 64 byte long chunks. I've got the following on their format..

Code: Select all

Zone Raw Chunk
----------------
00 TagRef
16 Identifier
20 + OFFSET 24 = NEXT OFFSET 20
24 Unk
28 Sometimes FFFFFFFF
32 Unk
36 Unk
40 Chunk Count?
44 Pointer1
48 Always Zero
52 Chunk Count?
56 Pointer2
60 Always Zero
Translating the first pointer brings you to a 'Raw Header' I guess, which is 24 bytes long. And I've got the following on that..

Code: Select all

Raw Header
----------------
00 Map - 12: Internal; 20: Unk; 40: Unk
04 Unk
08 Unk
12 Unk
16 Unk
20 Unk
You might as well have the Johnson I'm using as well right now, I've just called it 'Assets Mod', not meant to be a release but w/e: Binary, Source. The Assets tab's list will now sort the items from their Pointer1, and the selected item's Raw Header Info is displayed as well.

Now someone expand on that.. =x

Edit: The 'map' is just a guess, and also I translated the pointers by subtracting the MapMagic.
Halo 2 Prophet - Skin with ease with the simple 3D point and click interface.
Halo 3 Research Thread - Contribute to the research into Halo 3.
Digital Marine





Posts: 50
Joined: Mon Dec 27, 2004 7:02 am

Post by Digital Marine »

Interesting...we've got somewhat a different format. I thought you've located the raw. I was excited for a second. :)

This is what I've found:

Code: Select all

00 TagRef
16 Raw Ident
20 Raw 1 Size or Offset?
24 Unk - Constant within bitm
28 Raw 2 Size or Offset? (If no raw it's FFFFFFFF)
32 Flag (Dec1=OneRaw, Dec3=TwoRaws)
34 Unk (Constant unless it's nulled...)
36 Unk
40 Reflexive
52 Reflexive
Basically anything after Offset 36 is constant based on the type. So every bitm has the same reflexives and all the modes have the same reflexives (or pointers).

What do you mean by "+ OFFSET 24 = NEXT OFFSET 20"??

EDIT:
Okay, I see what you mean by that " + offset 24..." stuff. I wonder why that is??
Last edited by Digital Marine on Mon Oct 29, 2007 7:24 pm, edited 1 time in total.
StephenMalone





Posts: 9
Joined: Tue Oct 02, 2007 4:22 pm
Location: ATL
Contact:

Post by StephenMalone »

Prey wrote:Well, heres what I've got so far then...
I downloaded your binary application tosee the changes made from johnson. I believe that your assets tab is messed up. idk if it is just in the binary or not but take a look. :)
Digital Marine





Posts: 50
Joined: Mon Dec 27, 2004 7:02 am

Post by Digital Marine »

Okay, I believe I found out that the raw size for bitmaps is not in the RawTable but in the tag itself.

For example, lets use "objects\weapons\grenade\frag_grenade\bitmaps\frag_grenade" out of salvation.map. The meta offset would be 75379820 (dec). Go 0x60 bytes over and you have the chunk count, following the pointer (subtract the magic) and you get:
1 chunk, 0x047E3434, Size: 48

Then from there you have:

Code: Select all

00 Class
04 Width
06 Height
08 Unk (Flags?)
10 Type ?
12 Format (16 = DXT5)
14 MipMapCount ?
16 - 36 Unk
36 RawSize
40 Unk
44 Unk
I would make a plugin for it...but the only program I know that would use the plugin right now is Engineer and it acts goofy when I make plugins sometimes...

If you were to follow the second reflexive out of the frag meta at offset 0x8C you would have:
1 chunk, 0x047E3464, Size: 8

Code: Select all

00 Raw Ident
02 Raw Index (take this and multiply it by 64...)
04 Unk - Null?
Yeah, this seems like a big post for something that should be easy...but oh wells. How would you find the raw offset for the bitmaps, and what about the raw size for other formats (such as .mode)??

Oh, if you're wondering why I always choose salvation as a map, it's because the magic is easy to remember. :) BADEE000 :) :)
User avatar
shade45




Translator Artisan Enthraller Logistician
Stylist Wave Firestorm New Age

Posts: 2270
Joined: Fri Apr 01, 2005 1:04 pm

Post by shade45 »

Guys I'm gonna release an unofficial build of the next version of Engineer so you all can start using the new plugin system its alot more reliable and you can even execute C# code within the plugin! Not every thing is completed so dont complain if something isnt working properly.

If you find a bug or have a problem dont post here PM me. This thread is for research not bug reports.

This plugin system was created by Anthony he's letting me use it in my app so give him some props :D

Heres an example of a trak plugin.

Code: Select all

using System;
using System.Collections.Generic;
using System.Text;
using Halo3Map.IO;
using Halo3Map.Data;

namespace Halo3Map.Tags.Layouts
{
    [Tag("Anthony", "trak", 1.0)]
    public class trak : H3Tag
    {
        [Size(4)]
        public byte[] unused;

        public H3Reflexive<ControlPoints> controlPoints;
        [Size(28)]
        public class ControlPoints : Chunk
        {
            public float PosI;
            public float PosJ;
            public float PosK;
            public float OrientationI;
            public float OrientationJ;
            public float OrientationK;
            public float OrientationW;
        }

        [Size(4)]
        public byte[] unused2;
    }
}
Basically its a C# source file outlining the structure of the tag.

Theres only a few things you need to know.

byte[], char[], string, and reflexive values must always have a size attribute declared.

ex.

Code: Select all

[Size(4)]
public char[] name;

[Size(32)]
public byte[] unused;

[Size(32)]
public string name;
a tag reference will look like this

Code: Select all

public TagReference tag;
or for a lone id add this attribute

Code: Select all

[ID(IdType.LoneID)]
public TagReference tag;
Only public declarations will get compiled!

The save function might not always save properly but 90% of the time it works. Will be fixed in version 1.0

Image

Hopefully this helps with tag research! Version 1.0 coming soon!

Download: http://www.sendspace.com/file/d4pe8c
OwnZ joO




Articulatist 500

Posts: 980
Joined: Thu Nov 10, 2005 4:24 pm

Post by OwnZ joO »

I really like the plugin system. I though about implementing plugins like this in a program a while back, but didn't think about doing it like this, I like this better than how I would have done it. Maybe I'll actually do some work with plugins if I actually get halo 3 and mod it, I'd be much more comfortable with this format since I code in C# anyway. Good work Anthony.
Tanasoo




Literarian 250

Posts: 298
Joined: Sat Jan 01, 2005 7:15 pm

Post by Tanasoo »

:O This is getting me all excited!

I need to check these new releases out tomorrow!

@Digital Marine: For the bitmaps, you have 12 labeled the "format", you might want to change it to bits per pixel. There are one or two different formats that have the same bits per pixel... Unless that's what you have the type for? Also, what are some values you see for 14? I don't think the beta bitmaps had mipmaps, and even if the retail ones did, it doesnt seem like a value that would be stored, because it would always be the same for each size.
User avatar
xzodia




Translator Connoisseur Coagulator

Posts: 1981
Joined: Sun May 15, 2005 10:31 am
Location: UK
Contact:

Post by xzodia »

i can't say i like the new plugin system....ents are just so much easier to write....
Image
Halo 2 Plugins | Lock-on To Just About Anything | My Sites | Snow Hog
Old Plugins you have, upgrade you must...
Always Maintain a High Quality-To-Crap Ratio.
User avatar
Prey




Connoisseur Snitch! Pyre Articulatist 500

Posts: 1026
Joined: Wed Dec 27, 2006 6:49 am
Location: UK
Contact:

Post by Prey »

Digital Marine wrote:[...]

Code: Select all

[...]
32 Flag (Dec1=OneRaw, Dec3=TwoRaws)
[...]
[...]
Ah good find there.
StephenMalone wrote:I downloaded your binary application tosee the changes made from johnson. I believe that your assets tab is messed up. idk if it is just in the binary or not but take a look. :)
No. That is exactly how it is meant to be.
Digital Marine wrote:Okay, I believe I found out that the raw size for bitmaps is not in the RawTable but in the tag itself.

For example, lets use "objects\weapons\grenade\frag_grenade\bitmaps\frag_grenade" out of salvation.map. The meta offset would be 75379820 (dec). Go 0x60 bytes over and you have the chunk count, following the pointer (subtract the magic) and you get:
1 chunk, 0x047E3434, Size: 48

Then from there you have:

Code: Select all

[...]
36 RawSize
[...]
Meh, perhaps.
Digital Marine wrote:If you were to follow the second reflexive out of the frag meta at offset 0x8C you would have:
1 chunk, 0x047E3464, Size: 8

[...]
Interesting.
shade45 wrote:Guys I'm gonna release an unofficial build of the next version of Engineer so you all can start using the new plugin system its alot more reliable and you can even execute C# code within the plugin! Not every thing is completed so dont complain if something isnt working properly.
Nice, perhaps update that About now?.. =P

It seems we are getting somewhat closer now to finding this raw.. =x
Halo 2 Prophet - Skin with ease with the simple 3D point and click interface.
Halo 3 Research Thread - Contribute to the research into Halo 3.
User avatar
Anthony




Translator Connoisseur New Age ONI

Posts: 1001
Joined: Thu Jul 06, 2006 10:19 pm
Location: Whittier, CA
Contact:

Post by Anthony »

xzodia wrote:i can't say i like the new plugin system....ents are just so much easier to write....
and its even easier to write a simple converter :P
Tanasoo




Literarian 250

Posts: 298
Joined: Sat Jan 01, 2005 7:15 pm

Post by Tanasoo »

I was thinking of making a plugin authoring tool. I could have it export ent style or the new one. I don't know if anyone would find it useful =\
User avatar
Anthony




Translator Connoisseur New Age ONI

Posts: 1001
Joined: Thu Jul 06, 2006 10:19 pm
Location: Whittier, CA
Contact:

Post by Anthony »

Tanasoo wrote:I was thinking of making a plugin authoring tool. I could have it export ent style or the new one. I don't know if anyone would find it useful =\
actually I think it would. not sure if I would use it. but it would be great for exporting as different formats

if you want I can help you
Tanasoo




Literarian 250

Posts: 298
Joined: Sat Jan 01, 2005 7:15 pm

Post by Tanasoo »

OK, I'll do some work on it. I'll IM you if I need any help, thanks :)
Evan





Posts: 105
Joined: Fri Oct 26, 2007 1:26 pm
Location: Indiana

Post by Evan »

Wow, I'm liking the new plugin system, looks it could be a very useful plugin system once some more functions are added. Looks like a big time saver for the programmer too :P

Great job on this. If i find some reason to get back into Halo modding this will most likely prove it's self useful.

What other functions could you implement into this system Anthony?
User avatar
Anthony




Translator Connoisseur New Age ONI

Posts: 1001
Joined: Thu Jul 06, 2006 10:19 pm
Location: Whittier, CA
Contact:

Post by Anthony »

Evan wrote:Wow, I'm liking the new plugin system, looks it could be a very useful plugin system once some more functions are added. Looks like a big time saver for the programmer too :P

Great job on this. If i find some reason to get back into Halo modding this will most likely prove it's self useful.

What other functions could you implement into this system Anthony?
pretty much anything that anyone needs want unicode string support?!?! you got it! lol
User avatar
LuxuriousMeat





Posts: 824
Joined: Thu Nov 03, 2005 6:43 pm
Location: zzzzzzzzzzzzzzzz
Contact:

Post by LuxuriousMeat »

Anthony wrote:
Evan wrote:Wow, I'm liking the new plugin system, looks it could be a very useful plugin system once some more functions are added. Looks like a big time saver for the programmer too :P

Great job on this. If i find some reason to get back into Halo modding this will most likely prove it's self useful.

What other functions could you implement into this system Anthony?
pretty much anything that anyone needs want unicode string support?!?! you got it! lol
Yea, I was talking to Anthony about this, he said if you need to do a specific function for a certain tag you can write your own function in a plugin!
Image
Post Reply