• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Tutorial: How to create a basic mutator that gives you a weapon + extra features!!

YoYoBatty

Grizzled Veteran
Dec 17, 2009
3,455
2,501
Canada
You only need one tool to complete this:
Notepad

First off, browser to the directory the KillingFloor.exe lays in, that being C:\Program Files\Steam\steamapps\common\killingfloor\System. Once you are there, right click and create a new notepad file, save it as Decomp.bat and duplicate that and save it as uccmake.bat. Now right click decomp.bat and click edit, now put this in the box:

IF NOT EXIST %~n1 ( mkdir %~n1\Classes )
ucc batchexport ExampleMutator.u class uc ..\ExampleMutator\Classes\
cd ..
pause

You may replace ExampleMutator with something else that you wish to decompile. What this does is extracts all the .uc files from it and send it to a folder with the same name as the .u file, in this case ExampleMutator, there will always be another folder inside it called Classes, this folder contains the .uc file that can edit and create and recompile to create a mutator.

Navigate back to the system folder and edit uccmake.bat and put this in the box:
ucc make
ucc dumpint ExampleMutator.u
pause

Ucc make compiles that folder and the "classes" or .uc files inside and converts it into a .u file that will work in game. It also create a .ucl file which allows the mutator and .u file to work. It basically causes the .u file to talk to the game engine and tell it that it is functions. ucc dumpint ExampleMutator.u simply creates a .int file that contains information about specific things in the .u file. It is not neccessary and won't change ANYTHING gameplay wise, but it makes you look a lot more proffesional. If you compiled a mutator class and the ucc dumpint .u action was called it would say this:

Loading ../System/ExampleMutator.u...
Exported 2 properties

It would show this in the .int file
[Exampl]
FriendlyName="Example Mutator"
Description="Example mutator test"

The friendly name and description can be set in the mutator classes default properties.


Now that thats outta the way, navigate to the main killingfloor folder (not system) and create a new folder and call it ExampleMutator, then go inside it and create another folder and call it Classes, then go inside that and make a notepad file and save it as ExampleMutator.uc, then open it with notepad and put this in:

class ExampleMutator extends Mutator;

function ModifyPlayer(Pawn Other)
{
Other.CreateInventory("KFMod.Bat");
Super.ModifyPlayer(Other);
}

defaultproperties
{
GroupName="KF-ExampleMutator"
FriendlyName="Example Mutator"
Description="Gives all players the broken pipe."
bAlwaysRelevant=True
RemoteRole=ROLE_SimulatedProxy
bAddToServerPackages=True
}

Save the file and navigate the system folder and launch the uccmake.bat, it will then launch a command prompt window saying all this random **** then eventually ur mutator will compile and press enter to close, then launch killing floor and add the example mutator to the current mutator list then if done correctly when you start a game you will appear with a broken pipe.
 
  • Like
Reactions: Olivier