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

Code [Tutorial] Creating a Basic Mutator

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:
Upvote 0
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!
 
Upvote 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!!! :)
 
Upvote 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
 
Upvote 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:
Upvote 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:
 
Upvote 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:
Upvote 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.
 
Upvote 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
 
Upvote 0