Halo 3 [Beta] Mod Discussion

Discussion about modding Halo 3.
Locked
User avatar
Veegie[Temp]




Firestorm

Posts: 2849
Joined: Thu Jan 29, 2004 11:30 pm
Location: Logan
Contact:

Post by Veegie[Temp] »

Start finding vertex locations! :D
Image
Hijikata wrote:The fact you love Jesus doesn't change the fact you're a fucking mental patient. It just means you're a mental patient with a great imaginary friend.
User avatar
Prey




Connoisseur Snitch! Pyre Articulatist 500

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

Post by Prey »

Tanasoo wrote:Yeah, but I have no clue about bitmaps, that's why I'm working on models. =D I may not figure out much, but it will be more than bitmaps, that's for sure!
Ok, well heres how you find the raw..

1. The 'zone' tag first has a reflexive at offset 38, this points to a list of chunks each 96 bytes in length.

2. We need to find the models chunk, so open up a mode's meta in a hex editor, traverse to offset 226 and you will find the chunk index in the immediate short.

3. Now we can get to the models chunk (chunk index * 96) within the raw list. From here there are 3 things we need: The offset of the raw, the size, and the map it is located within.

4. The map can be found at offset 38 in the form of a short; 0 means within the shared map, else -1 means within the current map. The next long is the offset, followed by the size, also long.

5. From here you can obviously find the raw, and do whatever research you want. It is probably worth noting here that more information is probably contained with the models meta, like with the bitmaps, although lack of time on my part has kept me from realizing this possibility.

For 'bitm' tags, there is a reflexive found at offset 98 which chunks contain, apart from other relevant information, a chunk index at offset 50.

For 'snd!' tags, a chunk index can be found at offset 22.

The 'sbsp' tag contains a chunk index which is found at offset 582, although i am quite sure that this is part of a chunk as a 2nd chunk index can be found at offset 906. Once again lack of time kept me away from researching this fully.

Other raw types such as 'jmad' are still something i have yet to look into.

@Darco: That is something i have implemented into my next release, as i showed you on AIM.
@XZodia: The meta editor should show bitmasks and enums, i was experimenting with a couple of things and so you now have to declare a size atrribute for them, e.g. <enum4.. would instead be <enum size="4".. . Apart from that, there is a known error with the current release as the prefs code is not 'in line' with the rest of things, and so hiding things may give you undesired results.. it most normally results in everything being hidden :? . Although this is something that i have already addressed in the current build of the new editor, due for release some time in the far-off future.
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 »

Prey wrote: 2. We need to find the models chunk, so open up a mode's meta in a hex editor, traverse to offset 226 and you will find the chunk index in the immediate short.
actually its a Int you are just reading the index which in reality it is a ID... so I guess that means your offset should be 224

you get the ID by getting the Salt which is believe is offset 0x16 inside the Raw Data chunk and performing this simple equation

Code: Select all

                
                int ident = salt;
                ident <<= 16;
                ident |= x;
where x is the index of that chunk
Prey wrote: 4. The map can be found at offset 38 in the form of a short; 0 means within the shared map, else -1 means within the current map. The next long is the offset, followed by the size, also long.
Ever map I seem to look at it looks as if its a Int so that means your new offset should be 36
Prey wrote: For 'bitm' tags, there is a reflexive found at offset 98 which chunks contain, apart from other relevant information, a chunk index at offset 50.
Should be a int ID so that means its at offset 48
Prey wrote: For 'snd!' tags, a chunk index can be found at offset 22.
Should be a int ID so that means its at offset 20
Prey wrote: The 'sbsp' tag contains a chunk index
again should be a ID not a "chunk index"


And too anyone that cares about how the Shared.map is setup, it is just raw data thrown int 1 big file

I took the time to write a function for H3Core (An app thats not yet released) that would output all the raw data offsets and sizes that the map references, combine them, and sort to map out the Shared.map

well here it is

http://halo-forge.net/anthony/rdm2.txt

If there should be any holes in it, it is because that data isn't referenced by any of the maps that Bungie has put out for us in this beta
Last edited by Anthony on Tue Jun 05, 2007 5:35 am, edited 2 times in total.
Shalted




Eureka Translator

Posts: 565
Joined: Wed Nov 17, 2004 8:41 am
Location: Vancouver, BC This is where people put their modding team because they feel important.
Contact:

Post by Shalted »

Ermmm, I don't fully understand what you're talking about, but here's how I've come to understand it.

Raw Data offsets are now cached into a single data block(tagblock) in the Zone Tag, which should follow roughly this format:

Code: Select all

#define RawMagic 0xE163
#define ZoneOffset 0x24
#define RawID(x) ((x&0xFFFF == (x>>16)-RawMagic )?x&0xFFFF:(-1))

typedef struct {
   char Class[4];
   char Parent[4];
   char GrandParent[4];
   uint32 TagID;
} TagRef;

typedef struct{
  TagRef Tag; //Tag this entry belongs to
  word Zero;
  word RawIDUpper; // This entry's data block number  | RawMagic << 16
  int32 Map; //0 for shared 2 for local ? not 100% sure
  uint32 Unknown_offset; //Something to do with data caching?
  uint32 Unknown_size;
  uint32 unknown[2];//Possibly Raw attribs or Zero
  uint32 RawOffset;
  uint32 RawSize;
  uint32 unknown2[2];
  uint32 RawOffset2;
  uint32 RawSize2;
  byte Dontcareyet[0x20];
}ZoneRaw;
(Note: The above may not be 100% accurate, I basically pulled it from memory)

Anyway, throughout the meta you should find "Raw Identities" which, like Tag Identities (which reference a tag entry), reference a Raw Entry. The Identity should be in this form:

Let x = Raw Chunk Index
ID = ((x + 0xE163)<<16)|(x&0xFFFF)

Note that the masking out of the higher bits shouldn't be necessary, but I placed it there just in case. Throwing an ID into the above mentioned Raw Macro should give you the index on a legal Raw ID, and -1 on a false ID.
:)

Edit: Anthony, are you sure you're rounding up the sizes properly? One of the sizes being 0xC740 shouldn't it be rounded up to the nearest 0x100 (or is it the nearest 0x200?)
Awaiting connection...
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 »

Shalted wrote: Let x = Raw Chunk Index
ID = ((x + 0xE163)<<16)|(x&0xFFFF)
yea does the same thing :P
Shalted wrote:Edit: Anthony, are you sure you're rounding up the sizes properly? One of the sizes being 0xC740 shouldn't it be rounded up to the nearest 0x100 (or is it the nearest 0x200?)
yea thats if I want to include the padding but since it technically isn't part of the raw data itself I didn't include it
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 »

Code: Select all

                int ident = salt; 
                ident <<= 16; 
                ident |= x; 
Doing a logical and of 0xFFFF will be a little more efficient than what you're doing now ;P
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 »

xbox7887 wrote:

Code: Select all

                int ident = salt; 
                ident <<= 16; 
                ident |= x; 
Doing a logical and of 0xFFFF will be a little more efficient than what you're doing now ;P
you mean to mask out the higher bits like Shalted is doing?
User avatar
kornman00




ONI New Age

Posts: 146
Joined: Fri Dec 12, 2003 6:30 pm
Contact:

Post by kornman00 »

If your going to correct someone, at least fully correct them. They're called 'datum index'es. Just a some-what (skips the pepper) fancy indexer to a data array of some sort. A nice way to avoid having shit loads of pointers that have to be fixed when things change.
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 »

kornman00 wrote:If your going to correct someone, at least fully correct them. They're called 'datum index'es. Just a some-what (skips the pepper) fancy indexer to a data array of some sort. A nice way to avoid having **** loads of pointers that have to be fixed when things change.
yea now that I really think about it, it should make modding alot easier when it comes to adding tags to the map, you won't have to goto each meta and shift its raw, you can just loop thorugh all the raw data chunks and check if its offset is after the data you have shifted
User avatar
kornman00




ONI New Age

Posts: 146
Joined: Fri Dec 12, 2003 6:30 pm
Contact:

Post by kornman00 »

Pay attention to the teacher and not the computer screen Ant :evil: .

If you're adding new things, just append them to the tag buffer... :?
Lestatfreak




Articulatist 100

Posts: 159
Joined: Fri Sep 23, 2005 11:46 am

Post by Lestatfreak »

Um... anyone wonder if this is all going to go to waste if Bungie puts a signature and not a checksum on the maps? By the Xbox360 standards I've seen thus far, they will likely be signed, even if they are not in the Beta (Because they are already in a signed package). One of Bungie's biggest gripes about online Halo 2 was modding so I'll be suprised if it is easy to re-sign maps.

*sigh* Anyways, I've got the maps and a hex editor so if anyone has anything specific they want me to do, let me know.
Visit MorrowindX for the latest in Morrowind for Xbox.

1:Map File Format Discovered
2:Custom Sound Achieved.
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 »

Lestatfreak wrote:Um... anyone wonder if this is all going to go to waste if Bungie puts a signature and not a checksum on the maps? By the Xbox360 standards I've seen thus far, they will likely be signed, even if they are not in the Beta (Because they are already in a signed package). One of Bungie's biggest gripes about online Halo 2 was modding so I'll be suprised if it is easy to re-sign maps.

*sigh* Anyways, I've got the maps and a hex editor so if anyone has anything specific they want me to do, let me know.
figure out how the model raw works that way we dont have to :)
Lestatfreak




Articulatist 100

Posts: 159
Joined: Fri Sep 23, 2005 11:46 am

Post by Lestatfreak »

Anthony wrote:
figure out how the model raw works that way we dont have to :)
I know you are being sarcastic but okay. Just give me a quick rundown. I'll bet they are in some new form of the .x models from the XDK and now XeXDK.

BTW, any crazy data in these?
Last edited by Lestatfreak on Tue Jun 05, 2007 2:02 pm, edited 1 time in total.
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 »

Lestatfreak wrote:
Anthony wrote:
figure out how the model raw works that way we dont have to :)
I know you are being sarcastic but okay. Just give me a quick rundown. I'll bet they are in some new form of the .x models from the XDK and now XeXDK.
well no I wasent being sarcastic you made it sound like you were up for something

there really isnt a quick rundown I can give you as we haven't really had time to look at models other then what points to the raw data

so look inside this layout I posted a while ago and find some model raw to mess with

http://halo-forge.net/anthony/rdm2.txt

and crazy im not sure about because I havent seen it yet but I havent done much looking
Lestatfreak




Articulatist 100

Posts: 159
Joined: Fri Sep 23, 2005 11:46 am

Post by Lestatfreak »

Anthony wrote:
well no I wasent being sarcastic you made it sound like you were up for something

there really isnt a quick rundown I can give you as we haven't really had time to look at models other then what points to the raw data

so look inside this layout I posted a while ago and find some model raw to mess with

http://halo-forge.net/anthony/rdm2.txt

and crazy im not sure about because I havent seen it yet but I havent done much looking
Alright, I'll get started. :)
Visit MorrowindX for the latest in Morrowind for Xbox.

1:Map File Format Discovered
2:Custom Sound Achieved.
AGhost





Posts: 38
Joined: Thu Oct 16, 2003 3:02 pm

Post by AGhost »

So is the raw data inside shared.map encrypted/compressed? or are we just not sure what file format the models/bitmaps are in?

AGhost
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 »

AGhost wrote:So is the raw data inside shared.map encrypted/compressed? or are we just not sure what file format the models/bitmaps are in?

AGhost
they are not encrypted nor compressed

its just a bit different from how halo 2 worked
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 »

Lestatfreak wrote:Um... anyone wonder if this is all going to go to waste if Bungie puts a signature and not a checksum on the maps? By the Xbox360 standards I've seen thus far, they will likely be signed, even if they are not in the Beta (Because they are already in a signed package). One of Bungie's biggest gripes about online Halo 2 was modding so I'll be suprised if it is easy to re-sign maps.

*sigh* Anyways, I've got the maps and a hex editor so if anyone has anything specific they want me to do, let me know.
Resigning should be possible, but rebalancing is totally out of the question considering the complexity of the new hashing algorithm. Essentially we end up killing two birds with one stone, modded map files without the ability to cheat on live...assuming bungie checks for original sigs after validation, which I'm sure they would ;)
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 »

Alright great thanks for all the raw info Anthony I found all the height and width values for the bitmaps(follow the first reflex in the bitmap tag then the shorts at offset 4 and 6 are height and width) I'm sure you knew that already ;)

But my question is are they still using DXT Compression? Or are they a different format now like maybe TGA or TIFF?
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 »

They still use DDS formats.
Locked