Download - Programming UnrealScript
Programming UnrealScript
2009
File Types – Storage Location.uc – UnrealScript Files [Package Name]\Classes
.u Compiled Code System
.ukx – Animated Mesh Files Animations
.usx – Static Mesh Files StaticMeshes
.utx – Texture Files Textures
.ut2 – Map Files Maps
.ogg – Music Files Music
.uax – Sound Files Sounds
.log – Log Files System
.ucl – Unreal Cache List Map/Classes
System
.int – References to Package System
.upl – Unreal Player Information System
Object Storage
• Unreal is partitioned using Packages
• Each package can contain all of the files listed before
• Almost all objects in unreal are stored in groups.
• You can see how objects are stored in UnrealEd
Compiler
• UCC is a Command Line Compiler• To Compile use ‘Ucc make’• To compile using a custom config use
Ucc make –ini=‘<ini file>’- Useful to avoid recompiling too much code,
and reducing includes
• .ucl, .u file in System Folder• UnrealScript runs at about 1/20th the
speed of C++ Code
Compiling the fast way
• Don’t Forget the ucc.log file in the Unreal System Directory– It WILL save you loads of time when things
get weird
Editors
• UltraEdit– Text Based Editor, Manage your own
compiling, Classes, Files, etc– Fantastic File Search abilities
• Wotgreal– All in one, compiler, editor, class manager
Setting Up UltraEdit:
http://wiki.beyondunreal.com/wiki/UltraEdit
Engine Structure
• Object Oriented• Massive Class Hierarchy
– Almost everything in Unreal is a sub class of the class Actor
– Actor is an extension of the Native Class Object
• Native Classes are permanent, and you shouldn’t need to try to override them
– Every visible object in the game world is an Actor, or sub class of
Class Extensions
• Nearly every Class you write will extend upon one of the Unreal Classes
• You first Class will extend the Class Mutator
Types of Mods
• Mutator– Minor Changes in Gameplay
• The only classes you can inherit from are Mutator, Info, and Actor
– You can reference other classes, but more advantageous modders should consider a TC Mod
• Total Conversion (TC Mod)– Can vary between minor changes, to a
completely new game type– Classes can be extended from everywhere
Running Mods
• Muators appear automatically under the Mutator list in Unreal
• TC Mods:– -mod=[Your Mod]
• Log file view– Execute Unreal using ‘ut2004 –log’
• Mod .ini file– DefaultProperties in your mod.uc file will
override the Ut2k4mod.ini file
Keeping your code separate
• UCC make –mod=– Only works when your mod has a
UT2k4mod.ini file– Compiled files are stored in Mod\System
Folder– You need to create a Default.ini and
DefUser.ini in the Mod\System folder– For mutators to show up in the Mutator
browser a .ucl file is required
• You’ll also need to remove the MyMod.ini and MyModUser.ini files when you recompile your mod
• For a Simple Mutator this is excessive, and complicated
• When you are building a TC Mod, this is Ideal– It makes you mod Portable, and easy for
people to Play
Gary!!!