How to organize mesh import files

Prerequisites:
How to add custom meshes

Overview:
This page will show you a way to organize your mesh import files.  You may find that you prefer a different approach, but this is a clean method that the Deus Ex developers themselves used.

 

1. Create one or more "master" import .uc files

Instead of importing each mesh as a subclass of the Actor class, you can import all of your meshes and make them part of a subclass of the Object class.  Why would you want to do that?  Your goal in importing a mesh is really just to make it available for use in the properties of actor classes like weapons, pickup items, characters, etc.  So you can import your meshes without having them show up in the Actors list in UnrealEd.  You do that by creating a subclass of the Object (the highest level class) and making it an abstract class.  That just means that by itself it doesn't do anything.  Well, a mesh doesn't do anything by itself, so that's fine.

If you've exported all of the scripts (by using the Export All button in UnrealEd), you'll have a directory under your \DeusEx directory called \DeusExItems.  All of the .uc files in this directory are for importing the meshes and textures for things like weapons and pickups.  The AllWeapons.uc file contains the import statment for all of the weapon meshes and textures in the game.  It starts with this:

class AllWeapons expands Object
    abstract;

So you can make your own "master" import files for whatever categories you want.  If you don't have a huge number of meshes, perhaps you'll only use one.

 

2. Create individual .uc files for each actor (usable item)

You would then have an individual .uc file for each actor class.  Again, these would be things like weapons, pickup items, characters, decorations, and so on.

Here's an example of the sniper rifle class from the actual game.  Notice that as part of its properties it references meshes in the DeusExItems package, such as SniperRifle and SniperRiflePickup.

//=============================================================================
// WeaponRifle.
//=============================================================================
class WeaponRifle extends DeusExWeapon;

defaultproperties
{
    LowAmmoWaterMark=6
    GoverningSkill=Class'DeusEx.SkillWeaponRifle'
    NoiseLevel=2.000000
    EnviroEffective=ENVEFF_Air
    ShotTime=1.500000
    reloadTime=2.000000
    HitDamage=25
    maxRange=48000
    AccurateRange=28800
    bCanHaveScope=True
    bHasScope=True
    bCanHaveLaser=True
    bCanHaveSilencer=True
    bHasMuzzleFlash=False
    recoilStrength=0.400000
    bUseWhileCrouched=False
    bCanHaveModBaseAccuracy=True
    bCanHaveModReloadCount=True
    bCanHaveModAccurateRange=True
    bCanHaveModReloadTime=True
    bCanHaveModRecoilStrength=True
    AmmoName=Class'DeusEx.Ammo3006'
    ReloadCount=6
    PickupAmmoCount=6
    bInstantHit=True
    FireOffset=(X=-20.000000,Y=2.000000,Z=30.000000)
    shakemag=50.000000
    FireSound=Sound'DeusExSounds.Weapons.RifleFire'
    AltFireSound=Sound'DeusExSounds.Weapons.RifleReloadEnd'
    CockingSound=Sound'DeusExSounds.Weapons.RifleReload'
    SelectSound=Sound'DeusExSounds.Weapons.RifleSelect'
    InventoryGroup=5
    ItemName="Sniper Rifle"
    PlayerViewOffset=(X=20.000000,Y=-2.000000,Z=-30.000000)
    PlayerViewMesh=LodMesh'DeusExItems.SniperRifle'
    PickupViewMesh=LodMesh'DeusExItems.SniperRiflePickup'
    ThirdPersonMesh=LodMesh'DeusExItems.SniperRifle3rd'
    LandSound=Sound'DeusExSounds.Generic.DropMediumWeapon'
    Icon=Texture'DeusExUI.Icons.BeltIconRifle'
    largeIcon=Texture'DeusExUI.Icons.LargeIconRifle'
    largeIconWidth=159
    largeIconHeight=47
    invSlotsX=4
    Description="The military sniper rifle is the superior tool for the interdiction of long-range targets. When coupled with the proven 30.06 round, a marksman can achieve tight groupings at better than 1 MOA (minute of angle) depending on environmental conditions."
beltDescription="SNIPER"
    Mesh=LodMesh'DeusExItems.SniperRiflePickup'
    CollisionRadius=26.000000
    CollisionHeight=2.000000
    Mass=30.000000
}


Back to main page