This is a guide to using the hideTags option with CoD4 Viewhands in CoD weapon files.


The hideTags option is for hiding meshes which are bound to tags (joints) on your gun. For instance, typically IW and Treyarch export their MP viewmodel with every single attachment placed on it at once (see Fig 1).

Figure 1


If you wanted a Thompson with only the Aperture Sight, one might accomplish this by

While this does work, this is a complete waste of asset room (and time, until you master this process). The same effect can be accomplished by using hideTags on the original mp model!

Using hideTags

Finding the xmodelparts file

First, you will need to know what tags the weapon viewmodel rig contains. There are a couple programs that will generate a list for you, but in this tutorial we will do this manually.

Navigate to *root/raw/xmodel.

Near the beginning of the file, you will see some gibberish that looks similar to 'F¼Á¸F¼Á¸F¼Á¸F¼A¸F¼A¸F¼A'. Shortly after this, you will see some readable text. This is the name of the xmodelparts file we need. Copy it to clipboard or memorize it. See Fig. 2.

Figure 2

Figure 2

Navigate to *root/raw/xmodelparts.

Finding the tags list

After you open the xmodelparts file with Notepad, you will see some gibberish again, but if you look in the right place you will find the list of joints for the viewmodel! See Fig 3, the tags are highlighted in yellow for emphasis.
Figure 3

Figure 3

Organizing the tags list

Now that you have the list of joint tags from the xmodelparts file,

Here is a correctly-organized list of tags for viewmodel_mp_thompson:


Using hideTags

Here's the part where it gets tricky. Follow exactly what I say here and it will work for you. The hideTags weaponfile setting works by hiding the tag which comes alphabetically before the one you specify in the weapon file. This may sound confusing, but after a few examples you should be able to understand:

At this point you may be thinking "What the hell? How come Treyarch can hide tag_silencer by using tag_silencer in their mp weaponfile but I have to use a different tag"? That's a good question, and the best answer I can come up with is that hideTags is not implemented correctly for the SP/Coop engine of World at War. The Multiplayer aspect of World at War as a different exe and therefore has different engine functionalities and functions that may handle hideTags properly. This is the best explanation I have at this time and I have not had time to prove it.

Hiding the last tag in the list

Now if you're following my logic so far, you may ask "How do I hide the last tag in the list? There is no tag which comes after it alphabetically in the list? This part is annoying. You will need to create a new tag in the model which comes alphabetically after the previously last tag in the list. So if your last tag is tag_silencer, you will need to create a "dummy" tag named tag_sz (or any other letter combination that would come after "silencer" alphabetically) and then use that tag as your hideTags setting. The "dummy" tag is just a regular joint in Maya that does not need to be bound to anything; it just needs to be part of the joint hierarchy.

Inputting tag names into weaponfiles