[Tutorial] Creating a Basic Mutator

  • 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/

FluX

Grizzled Veteran
Oct 26, 2010
5,394
234
63
www.fluxiserver.co.uk
Solved texture errors, verified game integrity, still having issues with it not compiling.

Code:
del "C:\Program Files (x86)\Steam\steamapps\common\killingfloor\System\AddHealthRegen.u"
"C:\Program Files (x86)\Steam\steamapps\common\killingfloor\System\UCC.exe" make
del "C:\Program Files (x86)\Steam\steamapps\common\killingfloor\System\steam_appid.txt"
pause
UPDATE:

Solved the problem of it not recognizing the mut, I didn't know that I couldnt seperate it from the main string to identify it as custom with
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
EditPackages=AddHealthRegen
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

You still don't have the WHOLE Compiler.bat :p

Code:
"C:\Program Files (x86)\Steam\steamapps\common\killingfloor\System\UCC.exe" Dumpint AddHealthRegen.u
is needed still underneath the UCC Make command. I hope this fixs it.
 
Last edited:

RuneHarle

FNG / Fresh Meat
Jan 5, 2011
316
49
0
On Steam: VelvetHarle
You still don't have the WHOLE Compiler.bat :p

Code:
"C:\Program Files (x86)\Steam\steamapps\common\killingfloor\System\UCC.exe" Dumpint AddHealthRegen.u
is needed still underneath the UCC Make command. I hope this fixs it.


Added, thank you for responding, new error and old error
Spoiler!
 

FluX

Grizzled Veteran
Oct 26, 2010
5,394
234
63
www.fluxiserver.co.uk
It can't actually find the file you are trying to "dumpint". It says it can't find the packages "Dumpint" and "AddHealthRegen.u" :confused:
The EditPackages=AddHealthRegen is definitly added to KillingFloor.ini yes?
 

RuneHarle

FNG / Fresh Meat
Jan 5, 2011
316
49
0
On Steam: VelvetHarle
yes it is >.<

Code:
EditPackages=UTV2004s
EditPackages=ROEffects
EditPackages=ROEngine
EditPackages=ROInterface
EditPackages=Old2k4
EditPackages=KFMod
EditPackages=KFChar
EditPackages=KFGui
EditPackages=GoodKarma
EditPackages=KFMutators
EditPackages=AddHealthRegen
 

FluX

Grizzled Veteran
Oct 26, 2010
5,394
234
63
www.fluxiserver.co.uk
Mate just a thought. Have you got the compiler INSIDE your KF/System folder? This is probably how I don't have to use my locations inside the file configuration.

If you haven't, put it inside there and use the compiler.bat I use (so without the locations) and try it.
 

shadowevil

FNG / Fresh Meat
Jan 17, 2011
6
1
0
Make sure this isn't in your system folder: "myMutator/classes/"
Move it to the folder above system, and try running it.

So it should be here:

C:/Program Files/Steam/steamapps/common/killingfloor/

NOT HERE:

C:/Program Files/Steam/steamapps/common/killingfloor/system/
 

Qon

Member
Jan 14, 2012
194
15
18
So I followed the guide, but I am missing the kinda important file "ucc.exe"
I verified the game cache through the steam client and it told me that everything was ok.
I also searched through the whole KF folder for ucc.exe, it doesn't exist...
and I don't want to redownload the whole game to get that tiny file :Q

Help me fast and I'll bring the qommunity awesome muts!!! :)
 

Dinamix

FNG / Fresh Meat
Mar 23, 2012
199
1
0
So I followed the guide, but I am missing the kinda important file "ucc.exe"
I verified the game cache through the steam client and it told me that everything was ok.
I also searched through the whole KF folder for ucc.exe, it doesn't exist...
and I don't want to redownload the whole game to get that tiny file :Q

Help me fast and I'll bring the qommunity awesome muts!!! :)
You need to downlaod Killing floor SDK via Steam Tools
 

Qon

Member
Jan 14, 2012
194
15
18
Arigatou! :)
Should be added to the guide methinks... this is the first step as a KFMut dev for people, and it isn't obvious that the sdk isn't part of the vanilla download. :eek:
 

Benjamin

Grizzled Veteran
May 17, 2009
3,650
635
113
France
Good point, I'll give it an update when I have a regular internet connection again (problems with the phone line at the moment, posting from my sister's place).
 

Ezebassi1

FNG / Fresh Meat
Aug 13, 2012
26
0
0
[Tutorial] Mutator Essentials

[Tutorial] Mutator Essentials

This Mutator work?
What should I set for it to work properly?

class SpawnPlayers extends Mutator;

function PostBeginPlay()
{
______SetTimer(210, True);
}

function Timer()
{
______local KFHumanPawn Player;

______foreach DynamicActors(class 'KFHumanPawn', Player);
__________:
__________:_____if (Player.Life + 1 <= Player.LifeMax) Player.Life += 1;
__________:_____else Player.Life = Player.LifehMax;
__________:_____:
__________:_____:_____GiveMessage(Player);
__________:_____:_____Player.ClientMessage ("You have Relive in 3.30 minutes!");
__________:_____:
__________:
}
defaultproperties
{
_____GroupName="KFRevivingPlayers"
_____FriendlyName="Player Reviving"
_____Description="Reviving In 3.30 Minutes."
}
 
Last edited:

Josko

FNG / Fresh Meat
Nov 2, 2012
107
0
0
You can simply change a 'defaultproperties' variable of the relevant class when the mutator is loaded (in the PostBeginPlay function), like so:

Code:
class'ZombieBoss'.default.HealthMax = 9999;

This way when an enemy of this class is spawned (in this case the patriarch) it will use this value by default. Have a look in the KFChar folder for the specimen class files, and figure out what you can change by looking at the defaultproperties section. Also see this thread.


I tried this and it didn't work. Here is my code:


class ExampleMutator extends Mutator;

function PostBeginPlay()

{

class'ZombieBoss'.default.HealthMax = 50000;

}

defaultproperties

{

GroupName="KFExampleMutator"

FriendlyName="Example Mutator"

Description="Extends Patriarch's health to 50k"

}

It compiled fine, found it in mutator list in solo, tried it in beginner short, patty dies very quick for having 50k health so im guessing it didn't work :p

Something must be wrong with my code! D:
 

Josko

FNG / Fresh Meat
Nov 2, 2012
107
0
0
You need to also change the Health variable. I'm writing an example for replacing weapons with altered ones, by the way. I'll PM you it as soon as it's done.


Oh thank you thank you! :D You are the best! Btw will that example work in multiplayer without any fuss like clients getting changed values and such? There has to be a way around that.


But what do you mean with health variable?

[EDIT]:

I figured it out, all I had to do was to add class'ZombieBoss'.default.Health = 50000; too and it worked! Awesome. I couldn't beat patty on beginner ^^ Will this mutator work in multiplayer or will it give clients wrong values like with weapons?
 
Last edited:

Dr_Killjoy

FNG / Fresh Meat
Sep 30, 2012
260
0
0
Oh thank you thank you! :D You are the best! Btw will that example work in multiplayer without any fuss like clients getting changed values and such? There has to be a way around that.


But what do you mean with health variable?

[EDIT]:

I figured it out, all I had to do was to add class'ZombieBoss'.default.Health = 50000; too and it worked! Awesome. I couldn't beat patty on beginner ^^ Will this mutator work in multiplayer or will it give clients wrong values like with weapons?
If the function where you change this value, is replicated from server to client, this will work.
 

kiki33

FNG / Fresh Meat
Dec 29, 2011
43
0
0
Dont work:

My code:

Code:
class hud extends Mutator;

function PostBeginPlay()
{
	SetTimer(1, true);
}

function Timer()
{
	local KFHumanPawn Player;
	
	foreach DynamicActors(class 'KFHumanPawn', Player)
	{
		if (Player.Health + 2 <= Player.HealthMax) Player.Health += 2;
		else Player.Health = Player.HealthMax;
	}
}

defaultproperties
{
    GroupName="KFhud"
    FriendlyName="Example Mutator"
    Description="Mutator description here"
}

file location:killingfloor\hud\Classes\hud.uc

error:

Unrecognized type 'KFHumanPawn'

Pics:

felt_lteni_www.kepfeltoltes.hu_.png