Collada plugin for After Effects

More info here
Unreal Turret Tutorial - UDK notes

This is a collection of notes for using the Turret project from the Mastering Unreal Script Book Chapter 11 in the Unreal Development Kit(UDK). The original text was made for the Unreal Tournament 3(UT3) editor. The chapter for the book can be found on the UDN website here. The Turret skeletal mesh found in the TurretContent.upk package downloaded from UDN is flawed in that the Turret joints are not aligned properly and the particle system that shows damage is missing. The "DM-CH_11_Turret.ut3" map file uses static meshes from UT3 that are not available in the UDK, so I threw together a map made with UDK static meshes. It's not pretty, but it works. The new turret mesh uses a random material I found in the UDK packages, so it's not pretty either.

This process was used on the UDK October 2010 beta release installed to drive C.


Download links:

Prepare the UDK folders and ini files:

Create the folder for the uc class files here - C:\UDK\UDK-2010-10\Development\Src\MasteringUnrealScript\Classes

Copy TurretContent.upk to the preexisting folder here - C:\UDK\UDK-2010-10\UDKGame\Content\TestPackages\MasteringUnreal

Copy the sample chapter 11 map to C:\UDK\UDK-2010-10\UDKGame\Content\Maps and rename the extension from ut3 to udk or better yet use the map supplied on this page.

The following steps are based on a forum post on the UDN here.

  1. The first step in the compiling process is to add the MasteringUnrealScript package to the list of ModPackages in the UDKEditor.ini file. Without performing this step, the compiler will not know to look for our new scripts and they will not be compiled.

    Navigate to the following directory:

    C:\UDK\UDK-2010-10\UDKGame\Config
  2. Locate the DefaultEditorUDK.ini file and open it in Notepad or some other text editor so that it can be edited. It is usually write protected so change it's permissions. In notepad++ you can do menu item - Edit - Clear Read Only flag
  3. Find the section of the .ini file with the [ModPackages] heading. A simple way to find this section is to search the file for ModPackages.
  4. change ModPackagesInPath=..\..\UDKGame\Src to ModPackagesInPath=..\..\Development\Src
  5. Place the cursor at the end of the following line and press Enter.

    ModOutputDir=..\UDKGame\Unpublished\CookedPC\Script
  6. Add this line to add the MasteringUnrealScript package to the list of packages to be compiled.

    ModPackages=MasteringUnrealScript
  7. Save the DefaultEditorUDK.ini file and close it.
  8. Open DefaultEngineUDK.ini in the same folder and under [UnrealEd.EditorEngine]

    change the line ;ModEditPackages=MyMod to

    ModEditPackages=MasteringUnrealScript

    Save and close the .ini file.
  9. Delete all the UDK*.ini files which will be replaced by copies of the corresponding Default*ini files at compile time.

Before each compile I delete the u file - C:\UDK\UDK-2010-10\UDKGame\Unpublished\CookedPC\Script\MasteringUnrealScript.u because I don't think there is anything in Unreal Frontend that automatically deletes the old u files from any previous compiles.

I'm using ConTEXT so I set it up for hard tabs, tab space=4 and smart tabs off for a better experience.

I added -log to the shortcut so i could see the log as it is written: D:\UDK\UDK-2010-10\Binaries\UDKLift.exe editor -log. This way I can use a command like `log("This will add a line to the log output"); in the script to debug it.

Corrections and changes to the web page text and uc script code:

Tutorial 11.8 step 10: change TurretRotRate=128000 to MaxTurretRotRate=128000

Tutorial 11.8 step 5: change DestroyedEffect=ParticleSystemComponent1 to DestroyEffect=ParticleSystemComponent1

Tutorial 11.12 step 4: change
FClamp(1-Float(TurretHealth)/Float(MaxTurretHealth)),0.0,1.0)
to
FClamp(1-(Float(TurretHealth)/Float(MaxTurretHealth)),0.0,1.0)

Add MinTurretRotRate=8192 to the default properties. This line is missing from the web text.

I made the following change to the Defend state, because I was getting divide by zero errors:

//RotationAlpha = FClamp(ElapsedTime / TotalInterpTime,0.0,1.0);
if(TotalInterpTime == 0)
RotationAlpha = 1.0;
else
RotationAlpha = FClamp(ElapsedTime / TotalInterpTime,0.0,1.0);


Default properties change to use the new skeletal mesh:

//SkeletalMesh=SkeletalMesh'TurretContent.TurretMesh'
SkeletalMesh=SkeletalMesh'TurretContent.TurretActor'


Tutorial 11.8 step 7
, Change to use sounds available in UDK:

TurretSounds={(
//FireSound=SoundCue'A_Weapon_Link.Cue.A_Weapon_Link_FireCue',
//DamageSound=SoundCue'A_Weapon_Stinger.Weapons.A_Weapon_Stinger_FireImpactCue',
//SpinUpSound=SoundCue'A_Vehicle_Turret.Cue.AxonTurret_PowerUpCue',
//WakeSound=SoundCue'A_Vehicle_Turret.Cue.A_Turret_TrackStart01Cue',
//SleepSound=SoundCue'A_Vehicle_Turret.Cue.A_Turret_TrackStop01Cue',
//DeathSound=SoundCue'A_Vehicle_Turret.Cue.AxonTurret_PowerDownCue'
FireSound=SoundCue'A_Weapon_Link.Cue.A_Weapon_Link_FireCue',
DamageSound=SoundCue'A_Weapon_Link.Cue.A_Weapon_Link_ImpactCue',
SpinUpSound=SoundCue'A_Weapon_Link.Cue.A_Weapon_Link_RaiseCue',
WakeSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Start',
SleepSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Stop',
DeathSound=SoundCue'A_Weapon_Link.Cue.A_Weapon_Link_LowerCue'
)}


Tutorial 11.8 step 8
, Use new custom emitter and other emitters available in UDK:

TurretEmitters={(
DamageEmitter=ParticleSystem'TurretContent.P_TurretDamage',
//MuzzleFlashEmitter=ParticleSystem'WP_Stinger.Particles.P_Stinger_3P_MF_Alt_Fire',
//DestroyEmitter=ParticleSystem'FX_VehicleExplosions.Effects.P_FX_VehicleDeathExplosion',
//DamageEmitter=ParticleSystem'Envy_Effects.Vehicle_Damage.P_Vehicle_Damage_1_Scorpion',
MuzzleFlashEmitter=ParticleSystem'VH_Scorpion.Effects.PS_Scorpion_Gun_MuzzleFlash_Red',
DestroyEmitter=ParticleSystem'Envy_Effects.VH_Deaths.P_VH_Death_SMALL_Near',
DamageEmitterParamName=DamageParticles
)}

And that's it. It should be possible to follow the original tutorial using the information and downloads on this page.

I plan to setup ConTEXT to compile the scripts for the next project since manually deleting the u file is an inconvenient step.