Killing Floor 2

Killing Floor 2

Server Extension
GenZmeY  [开发者] 2020 年 5 月 17 日 上午 4:33
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://psteamcommunity.yuanyoumao.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://psteamcommunity.yuanyoumao.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.
最后由 GenZmeY 编辑于; 2020 年 8 月 28 日 上午 1:30
< >
正在显示第 1 - 10 条,共 10 条留言
星云子/杏仁子 2020 年 8 月 14 日 下午 12:18 
CD commands don't work properly, huh
星云子/杏仁子 2020 年 8 月 15 日 上午 2:00 
When I use this with Controlled Difficulty, !cdr command doesn't work properly for whatever reason.
GenZmeY  [开发者] 2020 年 8 月 15 日 上午 3:45 
引用自 星云子&杏仁子
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
星云子/杏仁子 2020 年 8 月 15 日 上午 8:20 
引用自 GenZmeY
引用自 星云子&杏仁子
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  [开发者] 2020 年 8 月 15 日 上午 8:27 
引用自 星云子&杏仁子
...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 ¯\_(ツ)_/¯
星云子/杏仁子 2020 年 8 月 15 日 上午 9:27 
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...
最后由 星云子/杏仁子 编辑于; 2020 年 8 月 15 日 上午 9:28
GenZmeY  [开发者] 2020 年 8 月 15 日 上午 9:40 
引用自 星云子&杏仁子
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  [开发者] 2020 年 8 月 27 日 下午 11:36 
引用自 星云子&杏仁子
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.
最后由 GenZmeY 编辑于; 2020 年 8 月 27 日 下午 11:45
星云子/杏仁子 2020 年 8 月 29 日 下午 11:00 
Huh, Understood
Sellout 2022 年 5 月 1 日 上午 6:45 
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
< >
正在显示第 1 - 10 条,共 10 条留言
每页显示数: 1530 50