Renaming Tags

Tutorials for the Xbox version of Halo 2.
Post Reply
User avatar
StalkingGrunt911




Recreator Connoisseur Acolyte Coroner
Sigma Pyre

Posts: 3618
Joined: Wed May 24, 2006 12:30 pm
Location: Florida!
Contact:

Renaming Tags

Post by StalkingGrunt911 »

-Renaming Tags Tutorial-
This is a very easy thing to do.

~Key~
Red = Anything relating to File Table Offset,File Table Size, Tag Name Offset, or Offset From Table.
Blue = Anything related to tag's like [bipd] or objects\characters\masterchief\masterchief etc.
Green = Anything related to programs.
Orange = Map names.

What you will need.
Hex Editor... Preferably Hex Workshop 4.23 with 30 Day Trial
The program I have made to tell the offset of the tag.
SaveFile Link.
Rapidshare Link.
MegaUpload Link.
Sendspace Link.


Getting Started

Open up the program that I have attached to this post.
Image

Click File->Open.
Image

Now open up a Halo 2 map. I'll be using Lockout.
Image

The tags will load into the Tree View then just select your tag you would like to rename. I will be using objects\characters\masterchief\masterchief in the [bipd] tag.
Image

Now select the Tag Name Offset Text Box.
This is the exact offset that the tag's name is at, hence "Tag Name Offset". :wink:
Image

Now open up your Hex Editor.
I'll be using Hex Workshop.
Go to File>Open or Ctrl + O.
Open up your Halo 2 map that you had opened/have open.
Image

Now Edit>Goto... or just press Ctrl + G.
Image

A dialog titled Goto should show up.
Image

You then enter the Tag Name Offset that you copied in Find My Tag.
You may choose between Decimal or Hexadecimal.
Here is it in Dec and Hex. Once you have entered it click Go.
Image Image

You should now be at the Tag Name.
Remember I used objects\characters\masterchief\masterchief
Image

Now just to be sure how many letters we can type up to.
Go back to Find My Tag and look at the length of the tag. For the tag I'm using it's 42.
Image

Now back in your Hex Editor. Go to Edit>Select Block.
Image

Enter your tag length Decimal or Hexadecimal.
Image Image

If you are at the right tag or entered the right number for the length you should have selected the whole tag and it should have stopped at the period.
Image

You can now type your new Tag Name.
The tag that I typed was objects\characters\StalkingGruntWasHere =o.
I think it's a better idea to keep objects\characters so if you are decompiling things in H2Core etc they will be in the objects folder and there won't be a hundred different folders for each tag.
Typing something like objects\Mod1\weapon1\weapon1 for all new tags is a good idea too.
Image

Once you have completed renaming your tag.
Go to File>Save or just click Ctrl + S. (Yes, I know it says [headlong] as the file name).
Image

Now you can go back to Find My Tag and go to File>Close.
Image

Open up your same map once again and go to the tag that you had renamed.
It should have successfully renamed and will be something like this.
Image

You have now successfully renamed your tag and it was really easy wasn't it.

I know there are other options such as a tag renamer in a program but sometimes they can mess up your map.
I just think it's better to see what you are doing manually.

Additional Options
If you are lazy or just in a hurry you can do it faster.

Open up Find My Tag with your map that you want to rename a tag in.
Select the tag.
I'll be using objects\characters\elite_mp\elite_mp.
Once you have click just once on the Tag Name Textbox, it will select the whole Tag Name.
Image

Open up your Hex Editor, I'm using Hex Workshop.
Go to File>Open then select the map that you want to rename a tag in. All you need to do is go to Edit>Find.
Image

A dialog titled Find will show up.
Looks like this.
Image

In the Value is where you will want to type the name of your tag.
Make sure everything looks the same in your dialog. (Find All Instances and ASCII as string format).
Image

At the bottom of Hex Workshop all the results for the search will show up.
Make sure that you select the correct one, but most tags don't show up with two results.
Image

Once you click it you will be taken to where the tag lies in the map.
It should be highlighted in Yellow.
Image

You can now rename it that way as well then check in a program to see if it works just be sure not to go over the length of the original Tag Name.

Other Info
If you are wondering what File Table Offset,File Table Size, or Offset From Table are here is a little information about each.

File Table Offset
If you take the File Table Offset from any tag they will be the same because this is the offset where all the tag names are stored.
The File Table Offset usually starts with globals\globals which refers to the [matg] tag. It also usually ends with i've got a lovely bunch of coconuts which refers to the [ugh!] tag.
Here is a picture of it for Lockout.
Image

File Table Size
This number also will be the same for any tag you choose because this number is the number of bytes in the File Table. (Obviously :P)

Offset From Table
This is the number of bytes that the tag is stored away from the File Table starting offset.

Errors
This is just a little preview of what happens if you rename your tags over the length.
The last H is where the period is suppose to be.
Image

Once you try to open this program this happens.
Image

This is a user error the program has nothing to do with it.
You exceed the length you were suppose to stay under.
I have tried this with other programs even Entity and same thing happens.
Doesn't mean Entity sucks it means you weren't smart enough to read this tutorial right.

Credits
BPSoft - Hex Workshop
Microsft - Visual C# 2005 Express Edition for Find My Tag
Last edited by StalkingGrunt911 on Sat Aug 18, 2007 8:40 pm, edited 2 times in total.
User avatar
CptnNsan0




Stylist Snitch! Collaborator Commentator

Posts: 1904
Joined: Thu Jun 15, 2006 5:49 am
Location: Durham, NC

Post by CptnNsan0 »

fantastic tutorial.
Image
Not Removing This
User avatar
Zone 117




Pi Trickster Stylist Advisor
Snitch! Connoisseur

Posts: 799
Joined: Wed Nov 09, 2005 4:37 pm
Location: Want to be in Asia :'(

Post by Zone 117 »

Nice tut SG.
Also can't Insolence rename tags?
Image Thanks for the sig Xiion :P
[ AI Revision ][ Sewer ][ Boat Mod ][ Archaic ]
Remapped: Mod Archive and Forums.
User avatar
StalkingGrunt911




Recreator Connoisseur Acolyte Coroner
Sigma Pyre

Posts: 3618
Joined: Wed May 24, 2006 12:30 pm
Location: Florida!
Contact:

Post by StalkingGrunt911 »

Yeah it can as long as you keep the length exactly the same as the old one. I guess I forgot to say somewhere in the tutorial that I know there are programs out there that can do it I just think it's safer to do it manually and it don't take that long to do it either. I made the tutorial because I didn't want to think about what happen a few days ago.

But thanks for the feedback guys I thought I'd be flamed at for making this. :)
User avatar
Zone 117




Pi Trickster Stylist Advisor
Snitch! Connoisseur

Posts: 799
Joined: Wed Nov 09, 2005 4:37 pm
Location: Want to be in Asia :'(

Post by Zone 117 »

SG911 wrote:But thanks for the feedback guys I thought I'd be flamed at for making this. :)
Haha that's what I think every time I post here >_>

I think it's good if people used this method to rename tags, they would actually understand how it worked.
Image Thanks for the sig Xiion :P
[ AI Revision ][ Sewer ][ Boat Mod ][ Archaic ]
Remapped: Mod Archive and Forums.
User avatar
DJ_Gnomey




Connoisseur

Posts: 490
Joined: Sun Apr 15, 2007 9:31 am
Location: New York
Contact:

Post by DJ_Gnomey »

Great tutorial SG. I too love donig tag renaming manually. :lol:
Image
User avatar
Prey




Connoisseur Snitch! Pyre Articulatist 500

Posts: 1026
Joined: Wed Dec 27, 2006 6:49 am
Location: UK
Contact:

Post by Prey »

The only problem with renaming manually is that you can't actually make the string any longer, unless you like lots of works. The filetable is actually read by:
  • First going to the FileIndex which is just below the table.
  • Reading in all the offsets (they're one after the other).
  • ..and then adding the FileTableOffset to each bringing you to the start of each string in the table. The length of each string can then be found by subtracting the next string offset from the current. The final string offset is subtracted from the FileTableSize.
It makes the null terminator of each string rather redundant, but I'm pretty sure that's only included because that's how C-style strings work. Anyways...

Entity reads the table as described above, so even if you did overwrite the null terminator like at the end of your tut, entity can still open the map. It's only when you begin overwriting the fileIndex with your extra long string that everything begins to fuck up..

Nice work on the tutorial anyway, at least it explained some of what actually goes on behind the scenes. The app could do with a bit of sprucing up though, and clicking 'Renaming tag Tutorial' gives me an error. You may also want to try out Skater's freeware obfuscator as you don't get the annoying pop-up every time you start the app. Although it won't do as good a job at obfusticating. (still pretty good though in my opinion, but it's your choice.)

Anyway like I said good tutorial, perhaps now write one for manually making the strings longer :P
Halo 2 Prophet - Skin with ease with the simple 3D point and click interface.
Halo 3 Research Thread - Contribute to the research into Halo 3.
User avatar
StalkingGrunt911




Recreator Connoisseur Acolyte Coroner
Sigma Pyre

Posts: 3618
Joined: Wed May 24, 2006 12:30 pm
Location: Florida!
Contact:

Post by StalkingGrunt911 »

Prey wrote: Anyway like I said good tutorial, perhaps now write one for manually making the strings longer :P
Yeah I was actually going to start doing that, but right now I'm about to go to the beach. I used the .NET Reactor thing just so no one would steal the code because I was gonna release it later on in the next tutorial, if anyone actually wanted to use it, it didn't show anything when I clicked it until now. As for the "Renaming Tag Tutorial" link in the menu strip it doesn't give me an error. I'll fix it up later when I get back home thanks for the feedback Prey.
User avatar
SpecOp44




Advisor Recreator Snitch! Critic

Posts: 2008
Joined: Tue Jun 06, 2006 12:34 pm
Location: The Canadarm

Post by SpecOp44 »

ADI can rename pretty well. However if you rename it longer than the original it messes up in Entity. But renaming to something shorter or with the same number of characters works well.

Nice tutorial though. :P
Image
User avatar
Prey




Connoisseur Snitch! Pyre Articulatist 500

Posts: 1026
Joined: Wed Dec 27, 2006 6:49 am
Location: UK
Contact:

Post by Prey »

SpecOp44 wrote:ADI can rename pretty well. However if you rename it longer than the original it messes up in Entity. But renaming to something shorter or with the same number of characters works well.
Yea ADI can't lengthen tag paths, and it can only deal with shorter paths because it enters spaces to fill the gap. Entity can deal with longer paths, but is pretty slow. Insolence is the currently the best, as it can do it and it does it relatively fast too, but the process could actually be even faster. I've done it ;o>
Halo 2 Prophet - Skin with ease with the simple 3D point and click interface.
Halo 3 Research Thread - Contribute to the research into Halo 3.
OwnZ joO




Articulatist 500

Posts: 980
Joined: Thu Nov 10, 2005 4:24 pm

Post by OwnZ joO »

Prey wrote:
SpecOp44 wrote:ADI can rename pretty well. However if you rename it longer than the original it messes up in Entity. But renaming to something shorter or with the same number of characters works well.
Yea ADI can't lengthen tag paths, and it can only deal with shorter paths because it enters spaces to fill the gap. Entity can deal with longer paths, but is pretty slow. Insolence is the currently the best, as it can do it and it does it relatively fast too, but the process could actually be even faster. I've done it ;o>
I can't think of any public version of entity with tag renaming, besides mine, and I didn't implement lengthening of names in mine, it forces you to keep the same size or smaller, by changing the maxlength of textbox to the same size as the original string.
User avatar
Prey




Connoisseur Snitch! Pyre Articulatist 500

Posts: 1026
Joined: Wed Dec 27, 2006 6:49 am
Location: UK
Contact:

Post by Prey »

Wow. I started off right but my mind was on duplicating tags and I see to have trailed off in that direction.. whoops. Oh well remove the entity part and it's all good Image
Halo 2 Prophet - Skin with ease with the simple 3D point and click interface.
Halo 3 Research Thread - Contribute to the research into Halo 3.
Post Reply