This page is relevant to:
Modellers making a plugin player model using Advanced Model Support
By the time you get here, you need to have all this lot:
Before you go any further, write down a list of the materials you used, which ones are going to have team colours, and which ones are going to change when you change the face.
Continuing the Cubic Man example, my list is:
| What it's for | Team colours | Face ---------------------------------------------------- Skin00 | Body | Yes | No Skin01 | Head | No | Yes Skin02 | Limbs | Yes | No
To set up the skins you'll also need to work out what material IDs the exporter used. For all the current exporters, the material Skin00 is material 0, Skin01 is material 1, and so on up to material 3.
Next, choose the names you're going to use for the default skin(s). You need these:
Note that these are the names UT will refer to the skin by. The name you see in Player Setup can be completely different - you can set this later.
Rename MyModelSkinInfo.uc to (class name)SkinInfo.uc (it should match what you set the player's SkinInfo property to) and open it. The first line of code reads "class MyModelSkinInfo extends GenericSkinInfo;". Replace MyModel with whatever your class name is, to match the filename. Now go to the default properties.
Set HighestSkinNumber to the highest material ID you used (0 to 3).
For each material you used, set ChangesWithTeam(#) to 1 if there are team versions of that skin area, or 0 if it stays the same for all teams, replacing # with the material number. For example, the Male Soldier model's arms stay the same and its torso and legs have different team versions.
For example, here's Cubic Man's skin info script so far:
class AMS_CubicManSkinInfo extends GenericSkinInfo; // this is incomplete defaultproperties { HighestSkinNumber=2 // materials 0 and 2 change with team ChangesWithTeam(0)=1 ChangesWithTeam(1)=0 ChangesWithTeam(2)=1 ChangesWithTeam(3)=1 }
For each material used, set ChangesWithFace(#) to 1 if it should change depending on the model's face, or 0 if it stays the same for all faces, replacing # with the material number. There's probably only one face skin for most models.
For example, here's Cubic Man's skin info script so far:
class AMS_CubicManSkinInfo extends GenericSkinInfo; // this is still incomplete defaultproperties { HighestSkinNumber=2 // materials 0 and 2 change with team ChangesWithTeam(0)=1 ChangesWithTeam(1)=0 ChangesWithTeam(2)=1 ChangesWithTeam(3)=0 // only material 1 changes with face ChangesWithFace(0)=0 ChangesWithFace(1)=1 ChangesWithFace(2)=0 ChangesWithFace(3)=0 }
Set DefaultPackage to the name of the first skin package you intend to make, plus a dot, all in double quotes. This should usually be "(mesh name)Skins." (note the dot at the end - this is important!).
Set DefaultSkinName to the same skin package as DefaultPackage, plus a dot, plus the four-letter code you chose for one of the skins you're going to put in this package, all in double quotes, e.g. "MyMeshSkins.Dflt".
If your model uses faces, set DefaultFace to the short name you chose for one of the default skin's faces - for example, if you intend to make a face called MyFace for the skin MyMeshSkins.Dflt, you could set DefaultFace to "MyFace".
I intend to make a skin package called CubicManSkins containing a skin called Cube, with faces called Fred and Dave. I've chosen to make Fred the default.
So, here's Cubic Man's finished skin info script:
class AMS_CubicManSkinInfo extends GenericSkinInfo; defaultproperties { HighestSkinNumber=2 ChangesWithFace(0)=0 ChangesWithFace(1)=1 ChangesWithFace(2)=0 ChangesWithFace(3)=0 ChangesWithTeam(0)=1 ChangesWithTeam(1)=0 ChangesWithTeam(2)=1 ChangesWithTeam(3)=1 DefaultFace="Fred" DefaultSkinName="AMS_CubicManSkins.Cube" DefaultPackage="AMS_CubicManSkins." }
For each material you used, there are four possibilities for the textures you need.
This is the simplest situation - a fixed skin like Male Soldier's arms. Just make one texture called pqrs#, replacing pqrs with the 4-letter code for the skin, and # with the material number (0 for Skin00, 1 for Skin01 and so on).
This is a normal team-colour area, like Male Soldier's chest and legs. Make 5 textures called pqrs# (neutral), pqrs#T_0 (Red Team), pqrs#T_1 (Blue Team), pqrs#T_2(Green Team) and pqrs#T_3 (Gold Team), replacing pqrs and # in the same way as above.
This is a normal face area, like Male Soldier's head and hands. For each face, make a texture called pqrs#abcd, replacing pqrs and # in the same way as above, and replacing abcd with the short name you chose for the face.
This type of material doesn't exist in older models. For each face, make 5 textures called pqrs#abcd (neutral), pqrs#T_0abcd (Red Team), pqrs#T_1abcd (Blue Team), pqrs#T_2abcd(Green Team) and pqrs#T_3abcd (Gold Team), replacing pqrs and # in the same way as above, and replacing abcd with the short name you chose for the face.
Please note: unlike the older TournamentPlayer code, Advanced Model Support starts numbering at zero, so the material Skin00 becomes the texture pqrs0 (not pqrs1) and Skin03 becomes pqrs3 (not pqrs4).
Finally, you can add 64x64 pixel "talktextures" which appear when the player or bot talks. If the model has no face textures, you can either have one of these, called pqrsC ("C" for "Chat") or five including team colours (pqrsC plus pqrsCT_0 to pqrsCT_3). As before, replace pqrs with the 4-letter code you chose.
If the model has face textures, you can either make one talktexture per face (called pqrsCabcd), or 5 talktextures per face (pqrsCabcd plus pqrsCT_0abcd to pqrsCT_3abcd). As before, replace pqrs with the 4-letter code you chose and abcd with the face name.
Please note: AMS uses C in talktexture names (not 5 like the older TournamentPlayer code).
Each texture should be stored in a 256-colour BMP or PCX file named the same as the texture name above, plus ".bmp" or ".pcx". I usually store default skins in a new subfolder of the model's folder named after the UTX name.
For best results, I recommend saving your textures from your paint program as 24-bit (16 million colour, RGB) BMP files, then using the excellent utility Bright (by Epic Games' Eric de Neve) to convert these to 256-colour PCX files. Bright is slow (a few seconds per file) but it's worth using it, as its colour reduction is extremely good quality, better than Paintshop Pro or Photoshop. You can get it from Polycount's UT resources page. If you do this, be careful to import only the PCX files! (24-bit images either crash UnrealEd or look random)
After you've made the textures, import them. Run UnrealEd and open up the Texture Browser (it's the little picture of a landscape on the top toolbar). Choose File/Import, change the filter to "All Files (*.*)" if you used BMP files, and browse to the folder you saved the BMPs or PCXs to. In the Import dialog, select all of them using Shift+click and Ctrl+click, and press OK.
You will now get another dialog. Change Package to the skin package name you decided on (for example, MyMeshSkins) and change the Group to "Skins". Leave Name as it is - UnrealEd generates this from the filename - and untick Masked. If the texture currently being imported is a talktexture, untick "Generate Mipmaps", otherwise tick it. Click OK and repeat for all the textures (you should just need to change the Generate Mipmaps setting occasionally).
You should now see all your new textures. Right-click on one of them and select Properties. Go to Quality, change the LODSet property to LODSET_Skin for normal textures or LODSET_None for talktextures, and click OK. Repeat for all your textures. Yes, it's boring, sorry.
Finally, go to File/Save As... and save it in your UnrealTournament\Textures folder (not the Textures subfolder of your project) using the skin package name plus ".utx" as the filename (UnrealEd will usually fill this in automatically). Just to emphasise this, the name must start with your mesh name plus "Skins".
So you can see if there are going to be any skin problems, make at least two skins in different packages (UTX files). An easy way to make a second skin is to copy your first skin somewhere else, open it in a paint package and draw large magenta stripes on it (leaving enough of the original visible to identify team colours). It will now look really, really stupid and leave you in no doubt that you're not looking at the default skin. If the striped one works, and it's in a different UTX file, then any custom skins other UT players decide to make will work too.
For Cubic Man's default skin, I originally created a folder called F:\Games\UnrealTournament\AMS_DemoModels\AMS_CubicManSkins (no particular significance to the naming, it's just somewhere convenient to put them). I then made the following images in this folder:
I reduced these to 256 colour PCXs with Bright, imported them using UnrealEd and saved as AMS_CubicManSkins.utx.
I also made a test skin to make sure custom skins would work, by painting magenta stripes across the default textures. I saved these textures in F:\Games\UnrealTournament\AdvancedDemoModels\AMS_CubicManSkins_Test as these filenames:
Again, I imported these with UnrealEd, and saved as AMS_CubicManSkins_Test.utx.
The above is what I originally did. For the versions actually included in the SDK, I used scripted skin methods, which are documented later. This involves writing an extra script to do your importing, but you only have to write it once.