Main
Tutorials











 

Basic Coding Part 1

Coding is something that is not that easy to teach someone who has never learned any programming languages (and no, HTML does not count :p ). This basic tutorial assumes you have no knowledge of programming at all, and will take you through all the steps to get set up for coding and make a simple weapon modification. Let's get started!

Setting Up For Coding

Where do we even get started? You would think that the editor would be a good place to start, but we don't even need the editor to get into coding. All we need right now is the latest Unreal source code, which can be downloaded at The Unreal Developer Network in the Downloads section. Just look for "UT2k3/4 Source", new packages are released as patches come out. Create a new folder in your UT2k3/4 folder and name it "Scripts", and unzip all of the folders in the source to this folder. You don't want to place them directly in the UT2k3/4 folder, the compiling program might accidentally recompile Epic's code if you save over something accidentally, and you will have to reinstall the game. Now that we have the scripts let's take a look at what we can mess around with!



The ones I have highlighted are where the majority of your time learning the code will be spent.

BonusPack - The new GameTypes and Combos can be found here which you can use.
SkaarjPack / SkaarjPack_rc - All of the Invasion monsters can be found here along with their weapons.
UnrealGame - If you get into making Game Types you will be spending some time here, there is also some Mutator code as well.
UTClassic - All of the classic UT weapons can be found here.
Vehicles - If you are looking to create your own vehicles, this is your new home.
XEffects - Look here for xEmitter effects such as explosions, muzzle flashes and projectile trails like smoke.
XGame / XGame_rc - More Game Type and mutator code, as well as code for making your own Adrenaline Combos.
XInterface - This is where you would look for making your own HUD and Ladder.
XPickups / XPickups_rc - Things like Adrenaline and Health Packs can be found here.
XWeapons / XWeapons_rc - Look here for creating your own weapons, which we will be doing in this tutorial.

In order to make our own code, we need to set up a directory for it. All scripts that we want compiled must have their main folder in the UT2k3/4 folder with a subdirectory organized like this:



The "PackageName" folder is what we will name our project, for example with my Repentance mutator the folder is called Repentance. Any sounds or textures that we will import into our code are put into their respective folders. If there are none we don't need to make the folders for them, but the Classes folder is required, that is where the scripts for our code go. Each new mutator we make will have its own folder in the UT2k3/4 folder, so it can get crowded pretty quickly as you make more. Be sure you give it a distinct name so you can tell them apart, and try to avoid names that sound like they would be a part of the game normally.

There is a program you can use for code editing called WOTGreal, although some prefer to simply use Notepad, and that is what I will be using here.

In part two of this tutorial we will take a look at how weapons work and create our own weapon mod. Let's keep going!

Continue to Part Two of this tutorial