Page 1 of 1

Question about Tag Idents in the Halo 2 Map

Posted: Fri Jul 18, 2014 10:28 pm
by Click16
Hello, I have a question that hopefully some of you can answer. I'm making a tag-duplicator, and I am trying to create a new Tag Ident for the tag being duplicated. From looking at the existing idents, I came to this conclusion:

short Index = (short)(Ident & 0xFFFF0000);
short hiwordId = (short)((Ident & 0x0000FFFF) >> 16);

You can calculate the next ID by
int nextID = ObjectCount | (0xE175 + ObjectCount) << 16);

tell me if I'm doing anything wrong here, because I'm not too sure about this...

EDIT: I looked at a map after duplicating a tag with entity, and Entity actually inserts the new index entry before the Ugh! entry. so the new tag's offset is at the Ugh! tag's offset, and the Ugh! tag gets bumped forward in the meta and the index. Does it really matter that it's the last tag in the map?

Re: Question about Tag Idents in the Halo 2 Map

Posted: Sat Jul 19, 2014 12:02 am
by XZodia
Not sure about the tag ids but if your doing things properly, ugh! should be last, even if the only reason is that most map editors expect it to be.

Re: Question about Tag Idents in the Halo 2 Map

Posted: Sat Jul 19, 2014 12:46 am
by Click16
OK well does anyone know off the top of their heads what tags reference the Ugh! tag? I noticed a reference to in "globals/globals" but I don't know where else it's referenced, if it is referenced elsewhere. If I'm going to make the Ugh! tag the last in the map, I'm going to need to update the idents that reference it

Re: Question about Tag Idents in the Halo 2 Map

Posted: Sat Jul 19, 2014 1:45 am
by Click16
Well, I changed the "Resources" ID Reference(s) in the 'matg - globals\globals' tag to the new ugh! tag ident. I also changed the pointers when bumping the ugh! meta up, and the map loads now! Now I have to handle a tag name that requires the file name table to be expanded...

Image
According to UberAnalyzeTool, if I were to expand the FileNamesTable, the FilesIndex, various Unicode index, and unicode tables, crazy, bitmap, index, and meta will all need to be shifted forward... The index and meta is easy, bitmap is going to be a little bit of a pain, and I don't even know how to get these unicode index and unicode table offsets.

EDIT: Well after a bit of searching, I found where the unicode pointers are located, however, my bitmap raw shift didn't quite work...

Image

EDIT again: I was writing the new Japanese Index and table offsets to the wrong location, I fixed that and it fixed everything.

Re: Question about Tag Idents in the Halo 2 Map

Posted: Sat Jul 19, 2014 1:02 pm
by XZodia
Good work =)