Page 1 of 1
Raw Injection
Posted: Sat Jun 02, 2012 5:23 pm
by Click16
Hey all. I am just trying some halo 2 programming, and I want to know how to inject raw data. I know that the files need to be converted to halo's raw format before injection, but I would like someone to tell me the proper way to allocate data for bitmap model and animation raw. Since I have no clue, I'm going to just ask if it gets added to the end of the map, so where does the raw that gets injected go?
Re: Raw Injection
Posted: Sat Jun 02, 2012 5:33 pm
by XZodia
To properly inject raw you should put it at the end of the appropriate raw table.
eg. new bitmap raw goes at the end of the bitmap raw table.
You also need to ensure the raw is correctly padded and that any pointers to data which has moved as a result of the injection are updated.
Re: Raw Injection
Posted: Sun Jun 03, 2012 1:21 am
by Click16
XZodia wrote:To properly inject raw you should put it at the end of the appropriate raw table.
eg. new bitmap raw goes at the end of the bitmap raw table.
You also need to ensure the raw is correctly padded and that any pointers to data which has moved as a result of the injection are updated.
I understand that it belongs in the type's table, but what order does everything in the map occur? like example:
header
index
file list
meta
So where is the raw types in this. However, I believe the model raw comes right after the header.
Re: Raw Injection
Posted: Sun Jun 03, 2012 2:43 pm
by XZodia
I can't remember everything but some I do know are:
Header
Sound Raw
~Something
BSP Raw
~Something
Unicode Raw (I think)
~Something
Bitmap Raw
Index
etc
I know Sound is first and Bitmap is last.
Re: Raw Injection
Posted: Sun Jun 03, 2012 4:35 pm
by Prey
Use the UberAnalyzeTool by TF6 to see the layout of a map file:
The lower down the assets are injected into the map file, the less stuff that gets broken. So injecting/internalising textures is generally the easiest thing to do.
You can also 'improperly' inject new assets, where you add a new asset (ie. a sound) where you would inject a new texture: there are some apps that I remember did this iirc, and I don't think it broke the map. The only way it would break the map is if the blam engine loads all model or sound or etc data in one large chunk, but I think it just streams stuff off the disc when it needs it so may not be a problem. SBSP data is different though (again, iirc) as you need that upfront.
Improper injection means you break less stuff, so you can have a working program faster, and the user doesn't have to wait so long for your program to fix everything.
Re: Raw Injection
Posted: Sun Jun 03, 2012 5:16 pm
by Click16
Fantastic! This program is pretty cool. I have a few questions though.
What is "Unicode Table" and "Unicode Index"
Is BSP (not raw) what is shown when you look at the sbsp tag in a meta editor?
What is BSP Raw 1 and BSP Raw 2 and how are they related?
I have heard about Crazy, but I have absolutely no clue what it is.
When I looked at a SP map, I noticed CocoModel and I don't know what that is.
Re: Raw Injection
Posted: Sun Jun 03, 2012 7:26 pm
by XZodia
Unicode is string data.
Yes, BSP is the sbsp meta, I dont know what the raw's are.
No one knows what crazy is, it doesn't seem to have a purpose.
CocoModel is something to do with sound.
Re: Raw Injection
Posted: Mon Jun 04, 2012 1:43 am
by Prey
Yes Xzodia is right, all in all:
Unicode Table: Every map file contains all the text displayed when playing that map in-game (ie. '[name] picked up the sniper rifle') in all the languages Halo2 supports. Each language has it's own table.
Unicode Index: For every table entry, the index will contain the entry's start offset in the table.
BSP is the sbsp meta data yes, it is located apart from the rest of the tag data.
BSP Raw: This is where the maps vertex data and other associated data (indices, normals, UVs) is stored. Can't remember why the data is split into model1, model2 etc. I think it's to do with some logical breaks in the map geometry.
Crazy: Just some overwritten, useless data. You can overwrite the actual data and it doesn't do anything to the map. Likely a byproduct of Bungie not re-compiling their maps after every little change, but instead just overwriting old data with the new.
CocoModel: The ugh! tag has a reflexive that links to all the sound assets, and it also has a reflexive to this 'coconuts model' which contains extra info about playing of the sounds iirc.