Unreal Tournament 3 marks the return of the world's première first-person shooter. It unleashes the full power of Unreal Engine 3, taking graphics, gameplay, and challenge to a whole new level. Players engage in intense battles with other human players online, or against Unreal artificial intelligence that sets the industry standard. With the most powerful futuristic weapons and vehicles available, this is FPS action at its best!

Report article RSS Feed Unreal Learning #1: My First Unreal Tournament 3 Mutator

A brief tutorial outlining how to write a simple mutator for Unreal Tournament 3. This is a relatively in depth and detailed tutorial, ideal for any budding Unreal Programmer who really wants to know how to get started.

Posted by ambershee on Nov 20th, 2007
Basic Server Side Coding.

So, you have your nice shiny new copy of Unreal Tournament 3. You've played through the entire singleplayer campaign, and had your fill of rocket-jockeying the internet. It's time for something new. But wait! Surely this game has some life in it yet?

Unreal Tournament 3 has a very flexible system that renders it an ideal platform to mod with. There are a few different types of mod for Unreal Tournament 3, the humble Mutator, the custom Game Mode, the almighty Total Conversion and the ever-popular custom Content.

This is where you come in, and today we will be focusing on the Mutator, a short snippet of code that can be run as a set of 'new rules' in any game type, either on a server or by yourself in Instant Action.

Mutators only ever make small changes to the game - and should only ever make small changes. Because they do this, many mutators may be used at the same time in combinations for all manner of wierd and wonderful effects - this is the benefit and the flexibility of the mutator.

Preparation

Before we get started, we need to know a bit about how Unreal Tournament 3 is set up - if we don't learn this, we'll never be able to work out anything!

Unreal Tournament 3 stores everything in packages - that includes everything from 3d models, sounds and in our case, unrealscript. Packages are collections of game resources, and generally have the extension .upk. Code packages however tend to have the extension .u, but this does not mean they necessarily contain only code. They can also contain things such as sounds and textures that the code depends on. Keeping these all in one package keeps things organised and easy to manage.

Unrealscript itself is an object-orientated scripting language, which means that whenever we want to make changes or additions, instead of writing a lot of new code, or changing old code, we can instead over ride or extend existing code to suit our needs. In fact, you should never modify the stock Unreal Tournament 3 script files - doing so will prevent you from playing online.

If you haven't done so already, you can conveniently download the script files here.

You will want to extract the files found in the 'exported scripts' folder to the correct directory - by default this is C:\Documents and Settings\My Documents\My Games\Unreal Tournament 3\UTGame\Src.

You may need to create this directory if it does not exist. Don't forget to supplant with your own windows user name. You will now create a folder to house your script code, to seperate it from the existing UT code - add a folder in Src called 'FirstMutator', and a second folder under that called 'Classes'.

You'll probably want a decent text editor to get working - you can use standard Notepad if you wish, however I strongly recommend Notepad++ as the weapon of choice. Later tutorials will discuss the differences and benefits of Notepad++ and dedicated Unreal IDE (Integrated Development Environments) for development in Unreal Tournament 3.

The Classes folder is where we will be keeping all our unrealscript that we're about to write - and we're just about ready to get started, but before we do we need to make sure that the game knows where to find our new code - so we need to find UTEditor.ini in our Unreal Tournament 3 directory (use the system search to find it - this is a very useful tool for finding files in Unreal Tournament 3, so get used to using it!) and once in the file, find the section marked [ModPackages].

Right at the end of this section, add ModPackages=FirstMutator - this tells the unrealscript compiler where to find your code. Hold on! Where is the unrealscript compiler?

If you look in the start menu, you'll notice that you have shortcuts to both the editor and the game. Look at their properties, and you'll notice something cunning - both shortcuts point to the same program. The editor is accessed by adding the editor command switch to the end of the target entry. We can access the unrealscript compiler the same way - copy the shotcut for UnrealEd and replace the editor command switch with make - the command used to tell the game to build the script. Name the shortcut something useful, and put it somewhere handy. I keep mine in the same directory as the script I'm working on.

Now we're ready to get scripting!

Writing the Mutator

We need to create our first script file. Create a new text file, and call it FirstMutator.uc. The .uc file extension is how the compiler recognised an unrealscript text file. This means you can keep code snippets and old code in your working directory by changing the file extension, and the compiler will ignore it. I like to use .OLD and .SNIP to keep things organised, but the choice is yours.

Open this text file, and it's time to write out first lines of code. Things are finally getting somewhere, huh?

uscript code:
class FirstMutator extends UTMutator;

DefaultProperties
{
}

Okay, this code doesn't do much - but it's important! class FirstMutator is the new unrealscript class you are writing. Always remember to give your class the same name as your text file - otherwise the compiler will tell you you have a class / filename mismatch and refuse to compile. The default properties are where you store the default values for any variable you might create for the mutator - it is not necessary to include this if you don't intend to include any (a rarity) - but it's just good programming practice.

Now we need to tell our mutator to do something. The mutator class that we are extending contains a lot of useful functions that allow us to change the way the game plays - find the file and open it - take a look at it, and you'll see a lot of code. If you've programmed before, take a read through it and get familiar with it. If you haven't programmed before, then you're probably going to find this a bit too difficult to understand right now, so don't worry about it.

In this mutator, we're going to make the Enforcers do more damage. Enforcers+1!

The first thing we're going to do, is stop the player from spawning with a normal Enforcer, and instead make them spawn with an Enforcer+1. A player will start with a defaultinventory - this is dictated by the class UTGame. You can have a look at that file if you're interested.

We create a function to over ride the InitMutator() function in the Mutator class - this means that this new function is used instead of the one in Mutator. Because we also want it to do everything that it does in Mutator, we add Super.InitMutator() at the end - the super keyword tells the unrealscript compiler to look at the class we extended and call the function after the keyword - nifty!

If you looked in UTGame, you'll have spotted that the player is gifted with two weapons in their defaultinventory - the Enforcer and the ImpactHammer. By changing the first element in the defaultinventory array, we change what they get - in this case we swap UTWeap_Enforcer for our shiny new UTWeap_EnforcerPlusOne.

But there is no EnforcerPlusOne! Don't worry, we haven't gotten to that yet, but we'll cover it in good time, so keep going!

uscript code:
class FirstMutator extends UTMutator;

function InitMutator(string Options, out string ErrorMessage)
{
if (UTGame(WorldInfo.Game) != None)
{
UTGame(WorldInfo.Game).DefaultInventory[0] = class'UTWeap_EnforcerPlusOne';
}

Super.InitMutator(Options, ErrorMessage);
}

This is great - the player will now start with the Enforcer+1 instead of the normal Enforcer. Ideally, this is really enough and will work - but suppose someone makes a map (because none of the default maps have it) that has Enforcer pickups in it? Then the player would be able to have both weapons - and we don't want that. This is where the CheckReplacement function comes in, and is probably the function you'll be using the most when writing mutators in future.

CheckReplacement literally goes through every single Actor object in the game (which is effectively every game object) - we can over ride this function to check what that actor is, and if it's something we don't like, we can get rid of it or replace it.

uscript code:
class FirstMutator extends UTMutator;

function InitMutator(string Options, out string ErrorMessage)
{
if (UTGame(WorldInfo.Game) != None)
{
UTGame(WorldInfo.Game).DefaultInventory[0] = class'FirstMutator.UTWeap_EnforcerPlusOne';
}

Super.InitMutator(Options, ErrorMessage);
}

function bool CheckReplacement(Actor Other)
{
if (Other.IsA('UTWeap_Enforcer') && !Other.IsA('UTWeap_EnforcerPlusOne'))
{
ReplaceWith(Other, "UTWeap_EnforcerPlusOne");
}

return true;
}

DefaultProperties
{
}

What happened there? We checked to see if our object was an Enforcer, but not an EnforcerPlusOne because our EnforcerPlusOne is going to extend the Enforcer class. If we did not check that we're not an EnforcerPlusOne, the CheckReplacement function would keep finding out first EnforcerPlusOne (which is still an Enforcer!), and replace it over and over again, leading the game to crash every time we try to run the mutator. Bad!

We then called the ReplaceWith function, replacing the Enforcer actors with our new ones. You could look up this function in the mutator class to see how it works if you are interested.

We're nearly done! All we need to do now is create an EnforcerPlusOne to replace all the Enforcers.

Create another new text file in your Classes directory, and call itUTWeap_EnforcerPlusOne.uc. Why not Plus1? Well, there's no technical reason not to, but the script compiler thinks that ending class names with numbers is a naughty thing to do and bad programming style. The code will compile perfectly fine, but you'll get a little yellow warning come up telling you not to do it again.

In that text file, we're going to write some simple code. Now would be a great time to look at the UTWeap_Enforcer class to see what's in it. Since we're extending it and only want it to do more damage, we don't need any fancy new functions, just a few changes to those default variables.

uscript code:
class UTWeap_EnforcerPlusOne extends UTWeap_Enforcer;

DefaultProperties
{
InstantHitDamage(0) = 50
InstantHitDamage(1) = 50
}

That's really all it is, two variable swaps. Note that InstantHitDamage(0) is the first fire mode and InstantHitDamage(1) is the second. You could also find other variables in UTWeap_Enforcer to customise - for example if you only want it to burst fire, you could change both FiringStatesArrays to WeaponBursting.

One last thing to do now, and that's compile it, and check it out.

Compiling the Code

Remember that little short cut we created to access the make switch command? Now is the time to use it. All you should need to do is simply run that, and the code should compile nicely without any errors or warnings. If you do get errors or warnings, you might want to step back and take a look at what they're telling you. Chances are you've made a small mistake, and it's easily rectified. If you really get stuck, try asking in the BeyondUnreal forums, or if heading to other sites isn't your cup of tea, the forums here on ModDB.

When you compile the code, the script compiler will automatically generate a package file with your compiled code in it and a configuration ini file if necessary. You'll find your package file in your Unreal tournament 3 directory, which by default is C:\Documents and Settings\My Documents\My Games\Unreal Tournament 3\UTGame\Unpublished\CookedPC\Script\FirstMutator.u

So what's left?

Only one last little thing remains before this mutator is really ready. You can already theoretically jump into the game, select FirstMutator from the menu and play with it. But it doesn't have a name, or a description that's any use, and you'll have to run the game with another command switch (the '-useunpublished' switch) in order for it to show up.

This is where that configuration ini file comes in. Use windows search to find the configuration file (hint, look for FirstMutator). Open it, and find the section [FirstMutator UIDataProvider_Mutator] - under that you should add (or alter if it is already there);

uscript code:
ClassName=FirstMutator.FirstMutator
FriendlyName=First Mutator
Description=My First Mutator!
GroupNames=
UIConfigScene=
bStandaloneOnly=False
bRemoveOn360=False
bRemoveOnPC=False
bRemoveOnPS3=False

This section of the ini file controls how your mutator will show up in the mutator menu.

Next, we need to look at the [UTWeap_EnforcerPlusOne UTUIDataProvider_Weapon] section, as there are some things in here that will deal with how it will appear in the weapon browser. Once again, add or alter your entry to look like so;

uscript code:
ClassName=FirstMutator.UTWeap_EnforcerPlusOne
AmmoClassPath=UTGame.UTAmmo_Enforcer
Flags=
FriendlyName=EnforcerPlusOne
Description=The Enforcer+1 is just plain better than the Enforcer.
MeshReference=UI_Weapons.Mesh.SK_UI_Weapons_Enforcer_3P
bRemoveOn360=False
bRemoveOnPC=False
bRemoveOnPS3=False

Now the weapon browser has a mesh reference, and knows to correctly display the Enforcer mesh, as well as some other details - but we still only know that we have an Enforcer in the normal game - how do we tell we have an Enforcer+1?

We also need to find the localisation file - which by default should have be found in; C:\Documents and Settings\My Documents\My Games\Unreal Tournament 3\UTGame\Unpublished\CookedPC\Localization\
We'll have to create that folder if we don't already have it.

Let's add a new file called FirstMutator.int, and we should find add the following lines to it:

uscript code:
[UTWeap_EnforcerPlusOne]
ItemName="Enforcer+1"
PickupMessage="Enforcer+1"

Now we will be told that we have an Enforcer+1 or have picked up an Enforcer+1 in the game, excellent.

Now we're ready to rumble! We can run the game by creating a new shortcut the same way we accessed the unrealscript compiler - by adding the command switch ' -useunpublished' - but this is no good if we want to give our mutators to someone.

Last thing we need to do, is move all our finished files - this is nice and easy. All of your files are currently in the Unpublished directory; just copy them all over (remembering to keep the same directory structure!) into the published directory, and you're done.

Enjoy destroying things with your new, uber Enforcer+1s!

Post comment Comments  (50 - 100 of 118)
MattHenley
MattHenley Apr 2 2008, 9:25am replied:

Woops, the previous comment replyed to the wrong comment ^^
First timer, dont flame. XD

+1 vote     reply to comment
spectre1989
spectre1989 Feb 3 2008, 10:15pm says:

I'm having a bit of a problem..

My code for the enforcer plus one is:

class UTWeap_EnforcerPlusOne extends UTWeap_Enforcer;

DefaultProperties
{
InstantHitDamage(0)=100.000000
InstantHitDamage(1)=100.000000
InstantHitMomentum(0)=10000.000000
InstantHitMomentum(1)=10000.000000
}

But the enforcers dont seem to be doing any more damage or momentum effect than usual. It still takes several shots to kill anyone, when in theory it should take 1, or 2 at most if they're pumped on the keg o health or something. Any ideas? The mutator shows up fine, and when I have enforcer "enforcer + 1" comes up on the screen, and it compiles fine.. So I'm really stumped...

HALP!

+1 vote     reply to comment
ambershee
ambershee Feb 5 2008, 3:29am says:

Tried to answer this yesterday, but ModDB conked out before I could post the response!

Anyway, your code above should work. Try pumping the values to super-high extremes just to double-check if things are working. When that fails, you'll want to check your logs (defaults to My Documents folder/UT Game folder / Logs) to see if there are any errors.

+1 vote     reply to comment
spectre1989
spectre1989 Feb 5 2008, 2:47pm says:

ah in the logs I found this:

Error: Error reading attributes for 'C:\Program Files\Unreal Tournament 3\Binaries\..\UTGame\ Unpublished\CookedPC\Script\FirstProperMutator.u'
Error: Error reading attributes for 'C:\Program Files\Unreal Tournament 3\Binaries\..\UTGame\ Unpublished\CookedPC\Script\HelloWorld.u'

(Forgive the spaces, avoiding the 50 character demons)

What could be causing that?

+1 vote     reply to comment
ambershee
ambershee Feb 6 2008, 4:09am says:

Sounds like it's not finding the package file, and this is probably because you're using the -nohomedir command switch. Find the .u file, and ensure that it's in the directory it's complaining it should be in.

+1 vote     reply to comment
spectre1989
spectre1989 Feb 7 2008, 9:19pm says:

Thanks a lot for the replies mate. Rightio well I'm not using the nohomedir switch, so it can't be that.. Though I copied the scripts from the documents\my games\unreal tournament 3 etc etc to the folder in program files that the game seemed to be looking for them in. This somewhat fixed the problem in that my hello world mutator started working (it sent hello world to the log file).

But the enforcer plus ones mutator still isnt working.. The code for my mutator is:

class FirstProperMutator extends UTMutator;

// === VARIABLES ===

// Set Defaults

DefaultProperties
{
}

// === FUNCTIONS ===

/*
Name: initMutator
Parameters: string, string
Purpose: Called when the mutator is "turned on", any setting up done here
*/

function initMutator(string Options, out string ErrorMessage) {

if(UTGame(WorldInfo.Game) != None) { // Make sure there is a valid game

UTGame(WorldInfo.Game).DefaultInventory[0] = class'UTWeap_EnforcerPlusOne';

}

loginternal( "Inited First proper mutator" );

Super.initMutator(Options, ErrorMessage);

}

/*
Name: CheckReplacement
Parameters: Actor
Purpose: Allows you to replace any object in the game with another, awesomes!
*/

function bool CheckReplacement(Actor Other) {

if(Other.IsA('UTWeap_Enforcer') && !Other.IsA('UTWeap_EnforcerPlusOne') ) {

loginternal( "Replaced an enforcer" );
ReplaceWith(Other, "UTWeap_EnforcerPlusOne");

}

return true;

}

The log "Inited First proper mutator" is sent to the log file, however "Replaced an enforcer" never gets sent to the log file, so the mutator appears to be sound, but it just isn't replacing the enforcers... Wth could this be?? I'm stumped..

+1 vote     reply to comment
spectre1989
spectre1989 Feb 7 2008, 11:19pm replied:

noticed a problem in initMutator:

UTGame(WorldInfo.Game).DefaultInventory[0] = class'UTWeap_EnforcerPlusOne';

I changed it to:

UTGame(WorldInfo.Game).DefaultInventory[0] = class'FirstProperMutator.UTWeap_EnforcerPlusOne';

Still no luck though...

+1 vote     reply to comment
ambershee
ambershee Feb 8 2008, 4:51am replied:

Not really a huge problem, unless you have another mutator that also has a class called UTWeap_EnforcerPlusOne - but yes, using fully qualified class names can be a good idea.

+1 vote     reply to comment
ambershee
ambershee Feb 8 2008, 5:44am replied:

Don't use 'one true brace' programming. Unrealscript wants parenthesis (squiggly brackets) always on their own lines!

+1 vote     reply to comment
spectre1989
spectre1989 Feb 8 2008, 3:48am says:

Okies I've posted a detailed list of what I've done and full source code on this thread Forums.beyondunreal.com if you have time I'm sure you're probably the most qualified to spot what's wrong with it!

Cheers
-Spec

+1 vote     reply to comment
ambershee
ambershee Feb 8 2008, 4:55am says:

Try putting the default properties at the bottom of the mutator class. I have a feeling that the compiler has to have these after the functions, and thus isn't reading the new values - which would explain why they are *always* at the bottom of the class.

This would mean that while you *are* getting an Enforcer+1, you're *not* seeing the changes made in Default Properties =]

Any luck?

+1 vote     reply to comment
Nemesisurvivorleon
Nemesisurvivorleon Feb 20 2008, 12:32am says:

I finally got my start in ut3 coding! THANK YOU!!!

+1 vote     reply to comment
ZippyDSMlee
ZippyDSMlee Feb 27 2008, 7:58am says:

Great tut I dug it. LOL

+1 vote     reply to comment
ZippyDSMlee
ZippyDSMlee Feb 27 2008, 8:39am says:

Stupid Q dose this tut change the name of the enforcers if not what code dose?

It helps me know things are working when I see the name of the cycled weapon be updated to what I replaced it with.

+1 vote     reply to comment
ambershee
ambershee Feb 27 2008, 11:04am says:

Yes, it changes the name of the weapons to Enforcer+1.

+1 vote     reply to comment
HairyTurkey
HairyTurkey Apr 6 2008, 6:46am says:

Hi,

I'm having the same problem as spectre1989 :

Error: Error reading attributes for 'C:\Program Files\Unreal Tournament 3\Binaries\..\UTGame\ Unpublished\CookedPC\Script\FirstMutator.u'

As him, "I'm not using the nohomedir switch, so it can't be that.. Though I copied the scripts from the documents\my games\unreal tournament 3 etc etc to the folder in program files that the game seemed to be looking for them in."

But for me it doesn't work, I still have the same error.

+1 vote     reply to comment
ambershee
ambershee Apr 6 2008, 5:34pm says:

Are you using one true brace, or putting the default properties somewhere other than the end of the file?

+1 vote     reply to comment
HairyTurkey
HairyTurkey Apr 7 2008, 6:34am says:

No, I used your code.

+1 vote     reply to comment
ambershee
ambershee Apr 7 2008, 8:03am says:

You're missing something small in the syntax or a config file somewhere - it's hard to pinpoint a specific error. I'd check over the tutorial again, and see if you're still running into problems.

+1 vote     reply to comment
ephemeratics
ephemeratics Apr 12 2008, 9:27pm says:

Just wondering - do any of these tutorials explain how one might go about embedding a mutator into a level, like you could in UT2.5? Thanks!

+1 vote     reply to comment
ambershee
ambershee Apr 21 2008, 4:04pm replied:

No, none of my tutorials cover that yet. I'm not sure it actually can be done.

+1 vote     reply to comment
phischphood
phischphood Apr 20 2008, 6:50pm says:

Theres a few things that aren't too clear here to me, could be I'm just stupid.

Firstly,
"You will want to extract the files found in the 'exported scripts' folder to the correct directory"
There is no 'exported scripts' folder, I presume you mean the extracted 'Development/Src' Directory.

Secondly,
"The Classes folder is where we will be keeping all our unrealscript that we're about to write\"
Which Classes folder? There are hundreds of them!

Lastly,
Which folder do we put the FirstMutator.uc file in? I presume this is the aforementioned Classes folder, but I don't know which one to use.

+1 vote     reply to comment
phischphood
phischphood Apr 20 2008, 6:53pm says:

oh yeah, I'm using the Steam version of UT3, don't know if this makes any difference

+1 vote     reply to comment
phischphood
phischphood Apr 20 2008, 8:03pm says:

ah, I think I've found the answer on the UDN website, it's clearer in their tutorial
Udn.epicgames.com
The classes folder should be Src\FirstMutator\Classes
Although, I'm still uncertain as to if I've extracted the source files to the right location

+1 vote     reply to comment
ambershee
ambershee Apr 21 2008, 4:06pm replied:

It asks you to extract the source you have from the downloadable file. In the original archive, it contained a single subfolder called 'ExportedScripts', with all the UT3 code in it. Newer versions might be different. I'll be updating all my tutorials soon, so this is something I'll look into, given that patch 1.3 is on the way and hopefully we'll get a new code drop for.

You create your folder in the scripts directory.

+1 vote     reply to comment
phischphood
phischphood Apr 21 2008, 5:54am says:

My enforcers + 1 isn't working, I'm getting the same log file problem

Error: Error reading attributes for 'c:\program files\steam \steamapps\common\unreal tournament 3\Binaries\.. \UTGame\Unpublished \CookedPC\Script \FirstMutator.u'
Why is there a .. in the path? You can't have a folder called '..', and if it means parent directory why not just say c:\program files\steam\steamapps\common\unreal tournament 3\UTGame\ Unpublished\CookedPC \Script\FirstMutator.u

+1 vote     reply to comment
ambershee
ambershee Apr 21 2008, 4:09pm replied:

The '..' just means that there is more in between the slashes, it's shortening it. It's annoying, but it does.

The directory looks incorrect though, why is it lookng in Binaries/ anything?

+1 vote     reply to comment
utN00b
utN00b Apr 28 2008, 6:50pm says:

Hi,
I must be doing something wrong. FirstMutator is not showing up in the menu. I extracted the latest ver 1.2 scripts to:
..\My Documents\My Games\Unreal Tournament 3\UTGame\Src\FirstMutator\Classes

I followed the tutorial. Ran make and it built FirstMutator.u with 0 errors and 0 warnings. It's also only 6K large.

I then run: ..Unreal Tournament 3\Binaries\UT3.exe" -useunpublished
But I don't see anything about FirstMutator.

Any idea of what I might be doing incorrectly?

(BTW, thanks for the tutorial!!!)

+1 vote     reply to comment
utN00b
utN00b Apr 28 2008, 8:31pm replied:

Oh, and I chose play offline, does that matter?

+1 vote     reply to comment
ambershee
ambershee Apr 29 2008, 9:21am says:

Playing offline should be fine. Are you sure you have an ini file for it / are definitely -useunpublished? Have you tried moving temporarily it to the program files / utgame / whatever / scripts directory, just to see if it comes up in the menus?

+1 vote     reply to comment
utN00b
utN00b Apr 29 2008, 4:01pm says:

1. Was an ini file created?
Yes, FirstMutator.ini in 'Documents and Settings\...\UTGame\Config
And I modified it as mentioned in the tutorial

2. Definitely using -useunpublished?
Yes, copied and pasted, this is what I'm calling:
"C:\Program Files\Unreal Tournament 3\Binaries\UT3.exe" -useunpublished

3. Tried temporarily moving it to program files?
I wasn't sure how to do this, so this is what I tried. There was no "Scripts" directory, so I copied my FirstMutator.u file to:
"C:\Program Files\Unreal Tournament 3\UTGame\CookedPC\Script\"
And I moved my FirstMutator.int to the Program Files Localization directory, and also moved my FirstMutator.ini into the Program Files config directory just in case. It still doesn't show up.
(N.B. You wrote "scripts" but I assume it's a typo as renaming it to scripts causes an error at startup if I run -useunpublished. Even if I don't run -useunpublished it still doesn't show up).

4. Perhaps my source unrealscripts weren't extracted to the correct place?
I've tried extracting all the subdirectories to be under FirstMutator\Classes, as well as directly under Src. I didn't preserve the path "Development\Src" portion of the extraction. Does this sound right?

I assume it's supposed to show up in the [Main Menu] screen where I see Campaign, Instant Action, Multiplayer...etc. I've checked out Instant Action and maps menus but it's not in there either.

+1 vote     reply to comment
utN00b
utN00b Apr 29 2008, 4:20pm replied:

Point 1 should have read: UTFirstMutator.ini

+1 vote     reply to comment
ambershee
ambershee Apr 30 2008, 5:19am says:

Easy way to check if things are in the right place.

Make some changes to your Enforcer files (like the damage). Then use UTFrontEnd.exe located in the program files / ut3/ binaries directory.

Use the Make button, and then copy and paste what it says here, so I can see it.

+1 vote     reply to comment
utN00b
utN00b Apr 30 2008, 1:09pm replied:

(Insignificantly modified b/c of the 50 char limit)

Running: UT3.exe make
[COMMANDLET STARTED]

Init: Version: 3543
Init: Epic Internal: 0
Init: Compiled: Feb 13 2008 20:45:17
Init: Command line:
Init: Base directory: C:\Program Files\
Unreal Tournament 3\Binaries\
Init: Character set: Unicode
Log: Executing Class Editor.MakeCommandlet
---Core - Release--------------------
---Engine - Release--------------------
---GameFramework - Release---------------
---Editor - Release--------------------
---UnrealEd - Release--------------------
---UnrealScriptTest - Release------------
---IpDrv - Release--------------------
---OnlineSubsystemGameSpy - Release------
---OnlineSubsystemLive - Release---------
---UTGame - Release--------------------
---UTEditor - Release--------------------
---UTGameContent - Release---------------
---UWeb - Release--------------------
---FirstMutator - Release----------------
Analyzing...
Parsing FirstMutator
Parsing UTWeap_EnforcerPlusOne
Compiling FirstMutator
Compiling UTWeap_EnforcerPlusOne
Importing Defaults for FirstMutator
Importing Defaults for UTWeap_EnforcerPlusOne
Scripts successfully compiled - saving package
'C:\Documents and Settings\jk\My Documents\
My Games\Unreal Tournament 3\Binaries\..\UTGame\
Unpublished\CookedPC\Script\FirstMutator.u'

Success - 0 error(s), 0 warning(s)

Execution of commandlet took: 3.39 seconds

[COMMANDLET FINISHED]

+1 vote     reply to comment
ambershee
ambershee May 1 2008, 5:49am says:

Ok, so that's one down - it's definitely compiling correctly, so your code is in the right place. Are you *sure* it's not appearing in the mutator menus?

+1 vote     reply to comment
utN00b
utN00b May 1 2008, 2:16pm replied:

Perhaps somehow I'm not looking in the right place?
When you said it was in the menu screen, I'm assuming you mean the main menu screen, where it asks if you want to play 'Campaign', 'Instant Action', 'Multiplayer' etc. As I said before I chose 'Instant Action' and looked through the sub-menus in there and still couldn't find it.
Am I looking in the right place? I don't see anything in the in-game menus either.

Is it a special menu that we bring up? (I lost my manual so I don't know if there are any special keys to bring it up).

If everything looks right to you and it should show up in the main menu, I'll try reinstalling. I removed my ut2 editor AFTER I installed UT3 which might have resulted in some badness.

+1 vote     reply to comment
ambershee
ambershee May 2 2008, 6:31am says:

Have you never actually played instant action with mutators?

Programming a mutator, but never having used one seems a bit silly to me =p

Anyway, start instant action, choose your game mode and map, other settings, and before you hit play, there is a tab at the bottom of the screen called 'Mutators', which will bring up a list of mutators you can enable / disable and sometimes configure.

+1 vote     reply to comment
utN00b
utN00b May 2 2008, 1:09pm replied:

I haven't. *hangs head in shame*
I've really just played BF and COD and just started to play UT Campaign and I thought this would be a fun side project (modding UT3). I recklessly jump into side projects on a whim without knowing really what I'm getting into. I'm sure there's counseling for something like this. :(
On the upside it works! Thanks so much!!!

+1 vote     reply to comment
avatar.tonic
avatar.tonic May 24 2008, 4:01pm says:

you might redirect that link for the ut scripts to the most recent update page on udn since they updated to 1.2 and to sort of future-proof it

+1 vote     reply to comment
ambershee
ambershee May 25 2008, 11:59am replied:

Could do. They're up to date on this site, with the correct link. I usually have a script dump well before the UDN does though; and update it to the official version when it's finally available.

+1 vote     reply to comment
thirdshift
thirdshift Jun 8 2008, 10:32pm says:

I tried the first part of this, but it won't compile, it keeps saying No files need to be compiled :(

+1 vote     reply to comment
ambershee
ambershee Jun 9 2008, 6:35am replied:

Read through it again. Make sure your code is in the right place, and that you have edited UTEditor.ini.

+1 vote     reply to comment
Mangopork
Mangopork Jul 28 2008, 5:12am says:

*waves*

+1 vote     reply to comment
Mangopork
Mangopork Jul 28 2008, 5:13am says:

Hey,

I have the steam version of UT3, so my directory structure is like this:

C:\Documents and Settings\Administrator\My Documents\My Games\Unreal Tournament 3\UTGame\Src\UTGame
(UTGame is empty here)

and

C:\Program Files (x86)\Steam\steamapps\common\unreal tournament 3\UTGame

(which contains folders: classes,FirstMutator, cooked pc, etc).

I coded my mutator and placed the scripts in the classes folder as well as the FirstMutator folder

then ran the shortcut, replacing 'editor' with 'make'

Unreal compiler says "no scripts need compiling"

It only searches the binaries folder.

Tried placing scripts in there, no dice.

Help!

+1 vote     reply to comment
PlainShooter
PlainShooter Jul 29 2008, 4:01pm says:

The tutorial says "in UTGame, you'll have spotted that the player is gifted with two weapons in their defaultinventory - the Enforcer and the ImpactHammer. By changing the first element in the defaultinventory array, we change what they get - in this case we swap: UTWeap_Enforcer for our shiny new UTWeap_EnforcerPlusOne." I tried searching for "defaultinventory" with the windows search system and manually but never found it. I looked in UTGame.ini but didnt find a single time that it says "defaultinventory" (im sure cos i used Ctrl+F). I looked in loads of other files and folders (including the folder called UTGame), and still didnt find it! So my question is: is "defaultinventory" a file/something in a file or is it simply that I need to put this code: "UTGame(WorldInfo.Game).DefaultInventory[0] = class'FirstMutator.UTWeap_EnforcerPlusOne';" into the .uc file I created (the one called FirstMutator.uc)). So please can you make it clear to me where i can find or what I need to do to achieve what the tutorial tells me??
Thanks in advance.

+1 vote     reply to comment
czlukas
czlukas Aug 1 2008, 7:45am says:

Im having a problem with compiling the script

When i run the compiling it send me this:
Init: Version: 3543
Init: Epic Internal: 0
Init: Compiled: Feb 13 2008 20:45:17
Init: Command line:
Init: Base directory: C:\Program Files \Unreal Tournament 3 \Binaries\
Init: Character set: Unicode
Log: Executing Class Editor.MakeCommandlet
No scripts need recompiling.

Success - 0 error(s), 0 warning(s)

Execution of commandlet took: 0.00 seconds

This means that unrealED dont know where to find my mutator but i already modified UTEditor.ini in C: \Documents and Settings \CZLukass \Dokumenty \My Games \Unreal Tournament 3 \UTGame \Config and in C:\Program Files\Unreal Tournament 3 is no UTEditor.ini just DefaultEditor.ini and when compiling didnt worked i tryed every possible combination of settings

in both of them is setting like this:

[ModPackages]
ModPackagesInPath=..\UTGame\ Src
ModOutputDir=..\UTGame \Unpublished\ CookedPC\Script
ModPackages=FirstMutator

so what im doing wrong ?

+1 vote     reply to comment
MrBCut
MrBCut Aug 22 2008, 12:42pm says:

Success - 0 error(s), 0 warning(s)

Ambershee you're the man! Thank you my friend

MrBCut

+1 vote     reply to comment
MrBCut
MrBCut Aug 22 2008, 3:20pm replied:

Hey wait a minute! Upon further inspection I am also getting the same results as czlukas. Please advise.

MrBCut

+1 vote     reply to comment
MrBCut
MrBCut Aug 22 2008, 1:38pm says:

Does anyone know how to open the command line in game? It's not F10 is it? when I pressed that, a prompt line appeared and I entered:

'-useunpublished' switch

but I didn't see a result.

Thanks all!

MrBCut

+1 vote     reply to comment
MrBCut
MrBCut Aug 23 2008, 3:04am replied:

Oh never mind! Last comment, promise - it works!

Followed your instructions literally and carefully and got it. For those that are new and may ask about -useunpublished, he says very clearly, set it up the same way you did with ucc make and when you launch, in the Mutators option you'll see your FirstMutator in the Mutator type list.

As for the czlukas problem, I think where I went wrong was extracting the script files incorrectly. If you do this successfully, with all else correctly in place, it appears the ucc make compile has no choice but to compile everything and make the package.

So I am very psyched, thank you, and everyone else for your comments, and I am on to lesson 2...

MrBCut

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Unreal Tournament 3
Platforms
Windows, PS3, X360
Developer
Epic Games
Publisher
Midway Games
Contact
Send Message
Official Page
Unrealtournament3.com
Release Date
Released Nov 18, 2007
Game Watch
Track this game
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
Unreal Tournament 3
Unreal Tournament 3 Single & Multiplayer First Person Shooter
Related Engines
Unreal Engine 3
Unreal Engine 3 Commercial Released Aug 31, 2007
Related Groups
Epic Games
Epic Games Developer & Publisher
Shee Labs Game Development
Shee Labs Game Development Developer & Publisher with 14 members
Unreal Tournament 3 Mod Developers
Unreal Tournament 3 Mod Developers Fans & Clans group with 232 members