playerModel Definitions

As of the 1.1 Beta patch and higher, Quake 4's player models use a slightly different .def file structure. This allows for custom models to be selected from the in-game selection menu (previously possible only by overwriting the main player.def file) and addresses an issue with head attachments. You can convert your models to support 1.1+ with just a few quick changes.

The playerModel

Your new .def file will look something like this:

playerModel model_player_marine_cortez {
        "model"         "model_player_marine"
        "def_head"              "char_marinehead_cortez_client"
        "def_head_ui"   "char_marinehead_cortez_mp"
        "skin"                  "skins/multiplayer/marine"
        "team"                  "marine"
        "description"   "#str_108006"

The definition is set up just as it was before, only it is now prefixed with "playerModel" instead of "entityDef" - all playerModel entities are loaded for the MP menu when the game is loaded.

Client-side Heads

Heads are the only other change to the playerModel definition. If your model has interchangeable heads, you'll also need to make a quick adjustment to use new client-side heads. Using the example of the Cortez model above, we've moved the old "def_head" entry to "def_head_ui". This will only be used in the MP selection menu.

Creating the client head is as simple as inheriting the original head and changing the spawnclass to "rvClientAFAttachment," as seen here:

entityDef char_marinehead_cortez_client {
        "inherit"                                       "char_marinehead_cortez_mp"
        "spawnclass"                                    "rvClientAFAttachment"

And that's it. Your custom model can now be inserted straight into the selection menu.

Back to ArtReference

ArtReference playerModels (last edited 2006-02-22 20:26:08 by AndrewWeldon)