Scripting Crash Course

IDE
I've been using Unreal X Editor, but I recommend finding another one: nFringe (must have MS Visual Studio installed) or WOTgreal.

Note that if you download Unreal X Editor, you have to point it to your existing UDK installation or it won't compile anything. After you do that, though, clicking 'compile' will execute a commandlet that makes all of the game files for you. Also, don't try to compile any scripts while the UDK Editor is open because it will always throw errors.

Finally, here's the command to compile/build all your files from the command line if you so desire:

\Binaries\Win32\udk.com make

Note that it is NOT udk.EXE, but udk.COM.

Class Hierarchy/Creating Classes
In UDK, there is a specific layout for your classes that must be followed in order for your game to run properly. Place all of your Unreal Scripts for a given package (.uc) inside of the \Development\Src\ \Classes folder.

Also, note that your class name and the file name must be exactly the same.

Registering Your Packages with UDK
In order to register your packages with UDK (so they can be used in the UDK Editor), you need to edit the UDKEngine.ini file located inside of \UDKGame\Config\.

Open the UDKEngine.ini file, find the section marked "[UnrealEd.EditorEngine]", scroll to the bottom, and insert the line ModEditPackages= underneath the other text there. UDK will now pick up your class files and they can be used inside of UDK (they will be listed under the 'uncategorized' classes in the content browser).

GameInfo Class
The GameInfo class controls the parameters of the game that you create inside UDK. Here is an example GameInfo class that assigns the class used for each (human) player controller:

class ItemCreationGame extends GameInfo;

defaultproperties {   PlayerControllerClass=class'ItemCreationPlayerController' }

Checking out the GameInfo class itself is instructive--I recommend taking a look at it to see what kinds of variables and functions are in it.

Mutator Class
I'm not sure exactly what the differences are between the GameInfo and Mutator classes, but the Mutator class can also be used to modify UDK's default game type.

Running Your Custom Game
Navigate to /Binaries/Win32 and type the following command:

udk ? .

So, for example, I created a package called "ItemCreation" with a class called "ItemCreationGame" that extends the GameInfo class. Furthermore, I am just loading the example map that comes with UDK. My command will be this:

udk ExampleMap?game=ItemCreation.ItemCreationGame

The game will now run based on your ItemCreationGame class.

Miscellaneous
An intro to UDK scripting can be found here: Check out the bottom of that page for more scripting tutorials.