Official Halo 2 Vista Research Thread
Posted: Wed Jan 09, 2008 11:46 pm
				
				I know there are a cuple apps out there that can do some modding of the Halo 2 Vista maps, but I havent found a good one yet and decided why not make one. Im just gunna through some basic stuff down, even though with a few exceptions it is basicly the same as the Halo 2 Xbox map file. So far I got most of the header figured out, I avent made a app yet gunna eat dinner then do it. I will post source for it. Also gunna do the Index wich is kinda wierd, Tags, SID's, and Unicode layouts.
Header
Header Size = 2048 bytes
Index Header
Header Length = 32
Tag Struct
Unicode
String ID's
I almost have Bitmap raw except for the actaul decoding process. I will post that when it is complete.
			Header
Header Size = 2048 bytes
Code: Select all
    public struct MapHeader
    {
        public char[4] head;
        public int Version;
        public int MapSize;
        public byte[4] null;
        public int IndexOffset;
        public int MetaStart;
        public int MetaSize;
        public int IndexSize;
        public int Unkown;
        public char[30] BuildDate;
        public int MapType;// 0 = SP 1 = MP 2 = MM 3 = S 4 = SPS - int32
        public int Unknown;
        public int always1;
        public int SIDMetaTableOffset;
        public int SIDCount;
        public int SIDTableLength;
        public int SIDIndexOffset;
        public int SIDTable1Offset;
        public int Unknown;// SID related??
        public int Unknown;// Geometry/Cache related?? 
        public int Unknown;// Geometry/Cache related??
        public int Unknown;// Geometry/Cache related??
        public int Unknown;// Geometry/Cache related??
        public int Unknown;// Geometry/Cache related??
        public int Unknown;// Geometry/Cache related??
        public char[35] MapName;
        public char[80] MapScenario;
        public int ObjectCount;
        public int  FileTableOffset;
        public int Unknown;// FileTableSize?
        public int FileTableIndexOffset;
        public int IndexToSomething;
        public int Unknown;// 252 in MP null in all others
        public int Unknown;
        public int OffsetToSomething;
        public int Unknown;
        public char[4] Foot;
    }
Header Length = 32
Code: Select all
    public struct IndexHeader
    {
        public int IndexHeaderLength;
        public int Const 120;
        public int Const1472;
        public int TagStart = IndexHeaderLength  + IndexOffset;
        public int MapMagic - (IndexOffset + 32); 
        public int ObjectCount;
        public int TagStart; 
        TagStart = TagStart + 8 
        SecondaryMapMagic = TagStart - (IndexOffset + IndexSize)
    }
Code: Select all
    public struct H2Tag
    {
        public string TagPath;
        public string TagClass;
        public int MetaOffset;
        public int MetaSize;
        public int TagID;
    }
    public struct TagInfo
    {
        public char[4] TagClass;
        public int TagID;
        public int TagMetaOffser;
        public int TagMetaSize;
    }
Code: Select all
public struct Unicode
    {
        public int Offset;
        public int ID;
    }
public enum Languages //only 5 for vista
        {
            English,
            German,
            French,
            Spanish,
            Itlian
        }
public struct UnicodeValuesinMatgMeta
    {
        //Start at Offset + 392
        public int StringCount;
        public int IndexSize;
        public int IndexOffset;
        public int FileTableOffset;
        public int Unknown;
        public long Null; //I think I did that right long = 8 bytes???
    }Code: Select all
//StringIDs now have a block of meta after the name, what that meta is/does I dont know
public struct SIDBlock
        {
            public int Offset;
            public string FirstName;
            public string SecondName;
            public byte Length;
            public short Index;
            public byte[] Meta;
        }
