Advanced Models SDK

Additional UT (non-AMS) model options

Relevance

This page is relevant to:
Authors of custom player models either using Advanced Model Support or built-in UT classes; larger mod programmers using direct or indirect subclasses of Botpack.Bot and Botpack.TournamentPlayer

You will need

A working Unreal Tournament model.

Sound

To change the sounds used by your new player class, change the various default properties associated with sound.

The best way to supply new sounds for a model is to put them in a Sounds subfolder of the folder for your model, then embed them in the .U file using this #exec command:

#exec AUDIO IMPORT FILE="Sounds\(filename).wav" NAME="(name)" GROUP="(category)"

As before, only put #exec commands in the player class, not the bot class.

You can then use these default properties to tell the model script to use these sounds. You need to add these to both the player class and the bot class.

Example of syntax:

#exec AUDIO IMPORT FILE="Sounds\jumpsnd.wav" NAME="MMJump" GROUP="MyModelSnd"
...
defaultproperties
{
     ...
     Jump=Sound'MyPackage.MMJump'
     ...
}

When specifying a Sound'', only ever include the package name (the first component) and the sound name (the last component). Never include group names - for some reason, UCC and UnrealEd don't seem to recognise these. For example, in the code above, Sound'MyPackage.MMJump' works but Sound'MyPackage.MyModelSnd.MMJump' doesn't.

You can also load sounds from any other UT package, which will usually be a *.U or *.UAX file.

To do this, you might need another #exec command to load the appropriate file if it's not already in your EditPackages, like this:

...
#exec OBJ LOAD FILE=..\System\MyOtherPackage.u PACKAGE=MyOtherPackage
#exec OBJ LOAD FILE=..\Sounds\MySoundFile.uax PACKAGE=MySoundFile
...
defaultproperties
{
...
Deaths(0)=Sound'MyOtherPackage.Scream'
Jump=Sound'MySoundFile.JumpSound'
...
}

If you are using Advanced Model Support, you can preset most sounds by subclassing the GenericMale, GenericFemale and GenericRobot classes, and their bot equivalents, which set the sounds to the same ones used by the base UT models. Since you need to do this anyway to use AMS, you'll always have a complete set of sounds unless you specifically set them to None.

If you're not using Advanced Model Support, TournamentMale, TournamentFemale and TBoss, and their bot equivalents, do much the same thing.

Cubic Man looks stupid, so I thought he should make appropriately silly noises. So, off I went to the UnrealEd sound browser to find some dumb death noises for him to make. Here's what I ended up with:

...
defaultproperties
{
...
Deaths(0)=Sound'UnrealShare.injured1tn'
Deaths(1)=Sound'UnrealShare.injured1tn'
Deaths(2)=Sound'UnrealShare.death2tn'
Deaths(3)=Sound'UnrealShare.Death2m'
Deaths(4)=Sound'UnrealShare.Death2br'
Deaths(5)=Sound'UnrealShare.Death1br'
}

I didn't use any extra sounds not already in UT, and UnrealShare.u is already in the EditPackages, so I didn't need any extra #exec commands.

The "Status Doll"

This refers to the status icon in the top right corner of the screen. UT only has three of these (male, female and Xan), but you can add a new one for your model if these aren't appropriate.

Creating a custom HUD status doll for your player model is quick and easy, yet adds much to the look of your model in game. All that is needed is two extra lines of code in for model's main .uc file, and two additional textures. So, let's get on with it! I suggest exporting the original UT status dolls through UnrealEd to get a good handle of what is going on.

First, create a new RGB bitmap 256 pixels in height and 128 pixels in width. On this bitmap, create a silhouette image of your player model. For best results, use the same methods as Epic: that is, having the silhoutte filled with grey (RGB 90,90,90), with a grid of lighter grey lines (RGB 138,138,138), and an outline of the silhouette, and the edges of armour and boots picked out in pure white (RGB 255,255,255).

Take care where you place the chest armour, thigh armour and jump boots on the silhouette, as they must appear in certain parts of the bitmap. The main armour must appear in the top 64 pixels (i.e. pixel rows 0 to 63) of the bitmap, the thigh pads in the next 64 (pixels 64 to 127), and the jump boots in the next 64 (pixel rows 128 to 191). The bottom 64 pixels are unused, although you could put your model's name or some sort of logo there.

[Note: the pixel numbers used here are not precisely the same as those in Burnt Kona's original tutorial. The original tutorial is wrong. I've checked the UT HUD source code, and it works in multiples of 64 as documented here --Psychic_313]

As you can see in-game, there was a mistake with the Xan HUD doll, so that the main armour never completely fills in when it is picked up... the bottom part of the main armour is displayed when thigh armour is picked up.

Anyway, save a copy of this bitmap as an rgb image; we'll need it later.

Right, with a copy of that bitmap safely tucked away, it's time to start cutting up the original. Get rid of everything but the boots and armour parts. Adjust the balance/levels or just repaint, so that the grey fill-in is now RGB 171,171,171 and the gridline grey is RGB 194,194,194. Save an RGB copy of this new bitmap.

Create a new blank bitmap, 256 by 256 pixels, and paste the first bitmap you created (the full silhouette) on the left side of the blank bitmap, and the armour/boots bitmap on the right. Convert this bitmap to a greyscale image, then to 8-bit index coloured. Save it as a .pcx file called yourmodelnameDoll.pcx in a directory called 'textures' in your model's working folder (so you now have 'models', 'classes' and 'textures' folders in your model's working directory)

Now there's one last bitmap to create. Start a new bitmap, with a width of 128 and a height of 256. What you want to do on this bitmap is create the outer glow of the shieldbelt. It should be pure white on the inside, but soften the outside edges a bit. Again, convert it to a greyscale image, then to 8-bit index coloured. Save as a .pcx file called yourmodelnameBelt.pcx in your model's textures directory.

Now you just need a couple of #exec lines and some defaultproperties, like this:

...
#exec TEXTURE IMPORT NAME=yourmodelnameDoll FILE=TEXTURES\yourmodelnameDoll.pcx GROUP="Icons" MIPS=OFF
#exec TEXTURE IMPORT NAME=yourmodelnameBelt FILE=TEXTURES\yourmodelnameBelt.pcx GROUP="Icons" MIPS=OFF
...
defaultproperties
{
StatusDoll=Texture'YourPackageName.Icons.YourModelNameDoll'
StatusBelt=Texture'YourPackageName.Icons.YourModelNameBelt'
...
}

As usual, the #exec lines need to go in the player class only, and the defaultproperties lines need to go in both player and bot classes.

Previous page

AMS scripted skins

Next page

Using a separate selection mesh

Back to index


AMSDK compiled by Simon `Psychic_313' McVittie, http://www.pseudorandom.co.uk
This page by Simon `Psychic_313' McVittie (sound) and Burnt Kona (status dolls)