This page is relevant to:
Programmers compiling a skeletal or vertex model without Advanced Model Support, or as a non-TournamentPlayer
By the time you get here, you need to have all this lot:
As you're not using AMS, I have no idea what you're doing with your model. For this tutorial I'll assume you want a decoration which can be placed in a UT map using UnrealEd, but won't interact with anything.
If you're making anything more complicated than a simple decoration, you should look at Advanced Models notes for mod makers, which, among other things, explains a UT bug concerning skeletal models and how to get round it.
Here is the generic UnrealScript from which you can make anything you like:
//============================================== // (comment describing what the class does) //============================================== class (class name) extends (base class); // put #exec commands here // define variables here // write functions here defaultproperties { (name)=(value) (name)=(value) (name)=(value) }
First fill in your class name after "class". Next, decide what built-in class your class "extends" (very loosely, "is a sort of") and fill that in after "extends".
For example, I want to make a statue of CubicMan as a decoration to go in a level. Engine.u has a class called Decoration for this purpose, so I could put "class AMS_CubicManStatue extends Decoration". However, there is a subclass (loosely, "more specific sort") of Decoration called UT_Decoration, so I'll use that instead, since I'm working in UT.
The script so far is:
//============================================== // A statue of Cubic Man //============================================== class AMS_CubicManStatue extends UT_Decoration; defaultproperties { }
Next paste in your #exec script, which you probably have already.
The script so far is:
//============================================== // A statue of Cubic Man //============================================== class AMS_CubicManStatue extends UT_Decoration; #exec MESH MODELIMPORT MESH=AMS_CubicManStatue MODELFILE=models\CubicMan.PSK LODSTYLE=12 #exec MESH ORIGIN MESH=AMS_CubicManStatue X=0 Y=0 Z=135 YAW=192 // WEAPON has been omitted, because statues don't use weapons #exec MESHMAP SCALE MESHMAP=AMS_CubicManStatue X=0.3125 Y=0.3125 Z=0.3125 #exec MESH DEFAULTANIM MESH=AMS_CubicManStatue ANIM=EpicUTPS2MaleAnimation defaultproperties { }
Next declare any new variables or functions. Nothing for me to do here.
Finally, set default properties.
The Cubic Man statue needs a mesh, a skin and an animation sequence. If I was doing this properly, I'd make some skins, but I'm not, so I'll steal some from UT. GenEarth has some nice rock textures, so I'll use them.
Note the use of #exec OBJ LOAD to load up a package which isn't in my EditPackages.
Cubic Man has several materials, so I use the MultiSkins array.
//============================================== // A statue of Cubic Man //============================================== class AMS_CubicManStatue extends UT_Decoration; #exec OBJ LOAD FILE=..\Textures\GenEarth.utx #exec MESH MODELIMPORT MESH=AMS_CubicManStatue MODELFILE=models\CubicMan.PSK LODSTYLE=12 #exec MESH ORIGIN MESH=AMS_CubicManStatue X=0 Y=0 Z=135 YAW=192 // WEAPON has been omitted, because statues don't have weapons #exec MESHMAP SCALE MESHMAP=AMS_CubicManStatue X=0.3125 Y=0.3125 Z=0.3125 #exec MESH DEFAULTANIM MESH=AMS_CubicManStatue ANIM=EpicUTPS2MaleAnimation defaultproperties { DrawType=DT_Mesh Mesh=SkeletalMesh'AMS_CubicManStatue.AMS_CubicManStatue' AnimSequence='Fighter' MultiSkins(0)=Texture'GenEarth.RockFac1' MultiSkins(1)=Texture'GenEarth.RockWal4' MultiSkins(2)=Texture'GenEarth.RockWal5' DrawType=DT_Mesh }
Open System\UnrealTournament.ini in Notepad and find the section headed "[Editor.EditorEngine]". Scroll down a bit until you see a list of EditPackages. Add all the packages your class depends on, in dependency order (if B depends on A, A must come before B), followed by the package you're about to compile. If you're working on a large mod, ask your programmer to do it.
If the package you're making already exists, delete it. The UnrealScript compiler won't recompile packages which already exist.
Now go to a DOS prompt and do the following:
C:\Windows>x: X:\>cd "\games\unrealtournament" X:\Games\UnrealTournament>cd system X:\Games\UnrealTournament\System>ucc make
Replace x with the drive you installed UT on and \games\unrealtournament with the path to your UT folder. If you have the "Command Prompt Here" powertoy, you can also go to your UT folder in Explorer, right-click on System, choose "Command Prompt Here" and type "ucc make".
Choose one of: