Although you could use this for Halo2 tag definitions (they would have to have the same file structure as Halo1 source tag definitions), more people would probably end up using it for CE, so I just posted it here.TagInterface .NET Library by Kornman00
TagInterface.dll - v1.0.6 : .NET 1.1
TagInterfaceV2.dll - v2.0.0 : .NET 2
This provides a generic way to interface with blam engine tags.
The TagInterface assemblies hold the code for loading\saving things.
This is a modeified version of the code I started using
in my personal halo IDE tool almost a year ago (removed loading from map files code)
TagInterfaceDoc.chm has the current info of all the types in TagInterface.dll.
Only 2 or 3 method signatures have changed when upgrading to .NET 2, so I didn't
see the need to create a whole new chm file for it. Also V2.dll hasn't been offically tested, though
no functionality code has been changed drasticly so it should be OK.
Also added a new field called 'Skip' to work with non-byte swapped fields
BlamInterface .NET Library by Kornman00
BlamInterface.dll - v0.2.0.0 : .NET 1.1 (need to build the project to get this DLL)
BlamInterface has some examples of setting up the Tag group collections for a certain game, and defining
tag group definitions for a certain game. The csproj file for this class library was made with VS.NET 2003, but
like always, can be upgraded to the newest verion of VS.NET
Included Tag Groups:
-bitmap
-gbxmodal (although refered as model in the code)
-model_collision_geometry
-model_animation
-sound
-unicode\string_list
-structure_bsp*
* Note: There is bad definition data in this group. Appeas to be a few bytes off in the main definition data (child blocks should be fine though)
Sample code for loading a tag definition:
Code: Select all
static void Main(string[] args)
{
BlamInterface.Halo1.model_group model = new BlamInterface.Halo1.model_group();
Console.WriteLine("Loading...");
TagInterface.EndianReader tagdef = new TagInterface.EndianReader(@"C:\Program Files\Microsoft Games\Halo Custom Edition\tags\untitled tag.gbxmodel", TagInterface.EndianState.Big);
tagdef.Position += 64;
model.Load(tagdef);
Console.WriteLine("Done");
Console.WriteLine(model.GetShader(0).Shader.Value);
Console.ReadLine();
}
I got tired of all the hacks people made in their code for accessing tags, decided it was time to set somethings straight.