Transcript
Page 1: Programming UnrealScript

Programming UnrealScript

2009

Page 2: Programming UnrealScript

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

Page 3: Programming UnrealScript

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

Page 4: Programming UnrealScript

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

Page 5: Programming UnrealScript
Page 6: Programming UnrealScript

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

Page 7: Programming UnrealScript
Page 8: Programming UnrealScript

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

Page 9: Programming UnrealScript

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

Page 10: Programming UnrealScript

Class Extensions

• Nearly every Class you write will extend upon one of the Unreal Classes

• You first Class will extend the Class Mutator

Page 11: Programming UnrealScript
Page 12: Programming UnrealScript

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

Page 13: Programming UnrealScript

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

Page 14: Programming UnrealScript

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

Page 15: Programming UnrealScript

• 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

Page 16: Programming UnrealScript

Gary!!!


Top Related