Question about Tag Idents in the Halo 2 Map

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

Question about Tag Idents in the Halo 2 Map

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

Re: Question about Tag Idents in the Halo 2 Map

Post 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.
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: Question about Tag Idents in the Halo 2 Map

Post 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
Image
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Question about Tag Idents in the Halo 2 Map

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

Re: Question about Tag Idents in the Halo 2 Map

Post by XZodia »

Good work =)
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Post Reply