Skip to content

Setting up UDK to compile XCOM scripts

wghost edited this page Sep 30, 2014 · 1 revision

###Programs

  1. September 2011 UDK: http://www.nexusmods.com/xcom/mods/485
  2. UE Explorer by Eliot van Uytfanghe: http://eliotvu.com/portfolio/view/21/ue-explorer
  3. Notepad++: http://notepad-plus-plus.org/
  4. Unrealscript syntax highlighter for n++: http://sites.google.com/site/romerogames/userDefineLang_UnrealScript.xml (the theme is too dark for my taste, you can edit the colors to your likings, as I did)

By default Unreal Frontend compiles script packages in release mode, stripping off all the log messages, which can be immensely helpful in debugging your work. You can compile scripts in debug mode by adding -DEBUG option to make comandlet. To make things easier, create a shortcut on your desktop with the following link:

<Path-To-UDK>\Binaries\Win32\UDK.exe make -DEBUG

<Path-To-UDK> is a path you've installed September 2011 UDK into. Now, you can compile all your scripts in debug mode by clicking this shortcut.

###Folder tree

Navigate to <Path-To-UDK>\Development\Src folder and create XComGame folder and XComStrategyGame folder. Create Classes folders both inside XComGame and XComStrategyGame. Folder tree should look like:

<Path-To-UDK>\Development\Src\XComGame\Classes
<Path-To-UDK>\Development\Src\XComStrategyGame\Classes

Clone XCOM-Mutator project if you haven't already done it.

Copy XComMutator folder from inside Src folder of the cloned project to <Path-To-UDK>\Development\Src:

<Path-To-UDK>\Development\Src\XComMutator\Classes

Navigate to <Path-To-UDK>\UDKGame\Config, open DefaultEngine.ini with n++, find [UnrealEd.EditorEngine] section and append newly created XCOM projects there:

[UnrealEd.EditorEngine]
+EditPackages=UTGame
+EditPackages=UTGameContent
+EditPackages=XComGame
+EditPackages=XComStrategyGame
+EditPackages=XComMutator

You are now ready to write your first XCOM script. :)

###Creating your own script package

To create your own script package, you need to create source folder and add this new folder to DefaultEngine.ini.

Name you project. Like MyXComMutator. Create a source folder(s):

<Path-To-UDK>\Development\Src\MyXComMutator\Classes

Create a new class:

<Path-To-UDK>\Development\Src\MyXComMutator\Classes\MyXComMutator.uc

Add a following code to MyXComMutator.uc:

class MyXComMutator extends XComMutator;

Add your package to DefaultEngine.ini as described above:

[UnrealEd.EditorEngine]
+EditPackages=UTGame
+EditPackages=UTGameContent
+EditPackages=XComGame
+EditPackages=XComStrategyGame
+EditPackages=XComMutator
+EditPackages=MyXComMutator

Run either shortcut you created or Unreal Frontend to compile the package. After successful compilation, you will find MyXComMutator.u package under <Path-To-UDK>\UDKGame\Script folder.

Clone this wiki locally