Killing Floor 2

Killing Floor 2

Server Extension
GenZmeY  [developer] May 17, 2020 @ 4:33am
Using RPG with other mutators (Examples)
RPG + ZedVarients
1. Install RPG and ZedVarient mutators
2. Create the file <KF2_DIR>\KFGame\Config\KFZedVarient.ini with the contents of this topic:
https://steamcommunity.com/workshop/filedetails/discussion/938683482/2765630416810497076/
3. Replace KFxMapVote.ini → [ServerExtMut.xVotingHandler] → GameModes with this string:
GameModes=(GameName="Killing Floor",GameShortName="KF",GameClass="KFGameContent.KFGameInfo_Survival",Mutators="ZedCustom.ZedCustomMut",Options="Difficulty=2?GameLength=2",Prefix=)
4. The server startup string will look like this:
KF-BioticsLab?Difficulty=2?GameLength=2?Mutator=ServerExtMut.ServerExtMut,ZedCustom.ZedCustomMut

RPG + Controlled Difficulty
1. Install RPG mutator;
2. Install Controlled Difficulty - Blackout Edition Or/And Controlled Difficulty - Eternal Edition
3. Replace KFxMapVote.ini → [ServerExtMut.xVotingHandler] → GameModes
with this string (For CD Blackout - Survival mode):
GameModes=(GameName="Killing Floor",GameShortName="KF",GameClass="ControlledDifficulty_Blackout.CD_Survival",Mutators=,Options="Difficulty=2?GameLength=2",Prefix=)
or with this string (For CD Eternal - Survival mode):
GameModes=(GameName="Killing Floor",GameShortName="KF",GameClass="ControlledDifficulty_Eternal.CD_Survival",Mutators=,Options="Difficulty=2?GameLength=2",Prefix=)
or with this string (For CD Eternal - Endless mode):
GameModes=(GameName="Killing Floor",GameShortName="KF",GameClass="ControlledDifficulty_Endless.CD_Endless",Mutators=,Options="Difficulty=2?GameLength=2",Prefix=)
4. Customize Controlled Difficulty:
The easiest way to increase difficulty is to increase zed's health.
You must change *HPFakes parameters for this (they can vary in the range of 0-32).
They are located in these configuration files:
  • KFControlledDifficulty_Blackout.ini - CD Blackout - Survival settings
  • KFControlledDifficulty.ini - CD Eternal - Survival settings
  • KFControlledDifficulty_Endless.ini - CD Eternal - Endless settings
If you want a more detailed setup, there is documentation for Controlled Difficulty:
https://github.com/Treedestroyed/kf2-controlled-difficulty/blob/master/readme.md

It might be useful to apply this fix if you have problems with bugsplats:
https://steamcommunity.com/workshop/filedetails/discussion/2050370803/2259060348501938096/

5. The server startup string will look like this:
CD Blackout - Survival:
KF-BioticsLab?Difficulty=2?GameLength=2?Game=ControlledDifficulty_Blackout.CD_Survival?Mutator=ServerExtMut.ServerExtMut
CD Eternal - Survival:
KF-BioticsLab?Difficulty=2?GameLength=2?Game=ControlledDifficulty_Eternal.CD_Survival?Mutator=ServerExtMut.ServerExtMut
CD Eternal - Endless:
KF-BioticsLab?Difficulty=2?GameLength=2?Game=ControlledDifficulty_Endless.CD_Endless?Mutator=ServerExtMut.ServerExtMut

P.S.: And of course, you can specify Map/Difficulty/GameLength/etc as you want.

P.P.S: Some CD commands don't work correctly with ServerExt. One of them is !cdready. Therefore, I advise you to set AutoPause=False in CD config to prevent the trader infinite time.
Last edited by GenZmeY; Aug 28, 2020 @ 1:30am
< >
Showing 1-10 of 10 comments
星云子/杏仁子 Aug 14, 2020 @ 12:18pm 
CD commands don't work properly, huh
When I use this with Controlled Difficulty, !cdr command doesn't work properly for whatever reason.
GenZmeY  [developer] Aug 15, 2020 @ 3:45am 
Originally posted by 星云子&杏仁子:
When I use this with Controlled Difficulty, !cdr command doesn't work properly for whatever reason.
I don't know how to make controlled difficulty commands work, but I solved the problem with the trader like this:
In the controlled difficulty config, set the parameter:
AutoPause=False

Then the trader time will work as in the original game and therefore the !cdr command will not be needed anymore
Originally posted by GenZmeY:
Originally posted by 星云子&杏仁子:
When I use this with Controlled Difficulty, !cdr command doesn't work properly for whatever reason.
I don't know how to make controlled difficulty commands work, but I solved the problem with the trader like this:
In the controlled difficulty config, set the parameter:
AutoPause=False

Then the trader time will work as in the original game and therefore the !cdr command will not be needed anymore
...But I need the trader to be paused in order to let my buddies to ready up as needed
GenZmeY  [developer] Aug 15, 2020 @ 8:27am 
Originally posted by 星云子&杏仁子:
...But I need the trader to be paused in order to let my buddies to ready up as needed
I have no solution for this situation ¯\_(ツ)_/¯
reliable client event TeamMessage( PlayerReplicationInfo PRI, coerce string S, name Type, optional float MsgLifeTime ) { //if( ( ( Type == 'Say' ) || (Type == 'TeamSay' ) ) && ( PRI != None ) ) // SpeakTTS( S, PRI ); <- KF built without TTS... // since this is on the client, we can assume that if Player exists, it is a LocalPlayer if( Player!=None ) { if( ( ( Type == 'Say' ) || ( Type == 'TeamSay' ) ) && ( PRI != None ) ) S = PRI.GetHumanReadableName()$": "$S; LocalPlayer( Player ).ViewportClient.ViewportConsole.OutputText( "("$Type$") "$S ); } if (MyGFxManager != none && MyGFxManager.PartyWidget != none) { if( !MyGFxManager.PartyWidget.ReceiveMessage(S) ) //Fails if message is for updating perks in a steam lobby return; } if( MyGFxHUD != none ) { switch( Type ) { case 'Log': break; // Console only message. case 'Music': MyGFxHUD.MusicNotification.ShowSongInfo(S); break; case 'Event': MyGFxHUD.HudChatBox.AddChatMessage(S, class 'KFLocalMessage'.default.DefaultColor); break; case 'DeathMessage': //MyGFxHUD.HudChatBox.AddChatMessage(S, "FF0000"); // Console message only. break; case 'Say': case 'TeamSay': if( ExtPlayerReplicationInfo(PRI)!=None && ExtPlayerReplicationInfo(PRI).ShowAdminName() ) MyGFxHUD.HudChatBox.AddChatMessage("("$ExtPlayerReplicationInfo(PRI).GetAdminNameAbr()$")"$S, ExtPlayerReplicationInfo(PRI).GetAdminColor()); else MyGFxHUD.HudChatBox.AddChatMessage(S, "64FE2E"); break; case 'Priority': MyGFxHUD.HudChatBox.AddChatMessage(S, class 'KFLocalMessage'.default.PriorityColor); break; case 'CriticalEvent': PopScreenMsg(S); // HIGH|Low|Time break; case 'LowCriticalEvent': MyGFxHUD.ShowNonCriticalMessage(S); break; default: MyGFxHUD.HudChatBox.AddChatMessage(class'KFLocalMessage'.default.SystemString@S, class 'KFLocalMessage'.default.EventColor); } } }
I suspect it's this part of code in ServerEXT.u that's responsible for the situation...
Last edited by 星云子/杏仁子; Aug 15, 2020 @ 9:28am
GenZmeY  [developer] Aug 15, 2020 @ 9:40am 
Originally posted by 星云子&杏仁子:
I suspect it's this part of code in ServerEXT.u that's responsible for the situation...
I'll see what can be done about it, but I can't promise that it will be fast.

However, if you find a solution before me, you can make a pull request: https://github.com/inklesspen1scripter/KF2-Server-Extension
GenZmeY  [developer] Aug 27, 2020 @ 11:36pm 
Originally posted by 星云子&杏仁子:
I suspect it's this part of code in ServerEXT.u that's responsible for the situation...

Here is the right place (CD_Survival.uc, line 1102[github.com] ):
private function ReadyUp(Actor Sender) { local KFPlayerController KFPC; local CD_PlayerController CDPC; local name GameStateName; GameStateName = GetStateName(); KFPC = KFPlayerController(Sender); CDPC = CD_PlayerController(Sender); if (CDPC != none) { ... } }

CD and ServerExt have their own player controller class which inherits from KFPlayerController.

ServerExt is loaded after CD, so the player controller class from ServerExt is used. Because of this, CDPC is none and the code after the condition is not executed.

I doubt that this can be fixed without combining the two mutators into one.
Last edited by GenZmeY; Aug 27, 2020 @ 11:45pm
星云子/杏仁子 Aug 29, 2020 @ 11:00pm 
Huh, Understood
Sellout May 1, 2022 @ 6:45am 
i installed controlled difficulty and did the startup steps as shown but it won't run, when i run the command it won't work, and when i access it through the map selection menu, it crashes as soon as i start the round
< >
Showing 1-10 of 10 comments
Per page: 1530 50