Raw Injection

Post Reply
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Raw Injection

Post 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?
Image
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Raw Injection

Post 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.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Raw Injection

Post 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.
Image
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Raw Injection

Post 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.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
Prey
Posts: 129
Joined: Sat Dec 29, 2007 5:06 pm
Location: UK

Re: Raw Injection

Post by Prey »

Use the UberAnalyzeTool by TF6 to see the layout of a map file:

Image

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.
Attachments
uber_analyze_tool.zip
Compatibility note: disable desktop composition
(329.02 KiB) Downloaded 276 times
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Raw Injection

Post 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.
Image
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Raw Injection

Post 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.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
Prey
Posts: 129
Joined: Sat Dec 29, 2007 5:06 pm
Location: UK

Re: Raw Injection

Post 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.
Post Reply