Skip to content

Commit 827c579

Browse files
committed
[release] v2.2 Public Release
1 parent fbaf89d commit 827c579

File tree

4 files changed

+54
-45
lines changed

4 files changed

+54
-45
lines changed

MutLoader/Classes/MutLoader.uc

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
class MutLoader extends Mutator Config(MutLoaderV2);
99

10-
// Normal Vars
10+
// Local Vars
1111
var string sServerName;
12-
var bool bKeepServerNameDefault;
12+
var bool AppendFaked, UpdateServerName;
1313
var KFGameType KF;
1414

1515
function PreBeginPlay()
@@ -20,24 +20,25 @@ function PreBeginPlay()
2020
local array<string> Names;
2121
local int i;
2222

23-
//////////////////// Essence & Vel-San ///////////
2423
Names=Class'MutLoaderObject'.Static.GetPerObjectNames("MutLoaderV2");
2524
for(i=0; i<Names.Length; i++) MutLoaderRecords[i]=New(None, Names[i]) Class'MutLoaderObject';
2625
for(i=0; i<MutLoaderRecords.Length; i++)
2726
{
28-
if (
29-
MutLoaderRecords[i].GameTypeName==string(Level.Game.Class.Name)
30-
&& MutLoaderRecords[i].GameDifficulty==Level.Game.GameDifficulty
31-
)
27+
if( MutLoaderRecords[i].sGameTypeName==string(Level.Game.Class.Name)
28+
&& MutLoaderRecords[i].fGameDifficulty==Level.Game.GameDifficulty)
3229
{
33-
MutLog("-----|| Using MutLoader Config # [" $i$ "]; Total Configs Found: " $MutLoaderRecords.Length$ " ||-----");
3430
MutatorList=MutLoaderRecords[i].Mutator;
35-
if (MutLoaderRecords[i].ServerName != "") sServerName = MutLoaderRecords[i].ServerName;
36-
else bKeepServerNameDefault = True;
31+
MutLog("-----|| Adding [" $MutatorList.Length$ "] Mutators found in MutLoader Config # [" $i$ "]; Total Configs Found: " $MutLoaderRecords.Length$ " ||-----");
32+
if (MutLoaderRecords[i].bUpdateServerName)
33+
{
34+
sServerName = MutLoaderRecords[i].sServerName;
35+
UpdateServerName = true;
36+
}
37+
if (MutLoaderRecords[i].bAppendFaked) AppendFaked = true;
3738
Break;
3839
}
3940
}
40-
//////////////////////////////////////////////////
41+
4142
for(i=0; i<MutatorList.Length; i++)
4243
{
4344
if (
@@ -57,33 +58,31 @@ function PreBeginPlay()
5758

5859
function PostBeginPlay()
5960
{
60-
SetTimer(1, False);
61+
SetTimer(1, false);
6162
}
6263

6364
function Timer()
6465
{
6566
KF = KFGameType(Level.Game);
6667
TimeStampLog("-----|| Default ServerName: " $Level.GRI.ServerName$ " ||-----");
67-
TimeStampLog("-----|| 'MutLoader' ServerName: " $sServerName$ " ||-----");
6868

69-
CheckMutators(sServerName);
69+
// Check for FakedPlus
70+
if (AppendFaked) CheckMutators(sServerName);
7071

71-
if(!bKeepServerNameDefault)
72+
// Update Server Name
73+
if(UpdateServerName)
7274
{
75+
TimeStampLog("-----|| New ServerName: " $sServerName$ " ||-----");
7376
Level.GRI.ServerName = sServerName;
74-
TimeStampLog("-----|| New ServerName: " $Level.GRI.ServerName$ " ||-----");
7577
}
7678
else TimeStampLog("-----|| Keeping Default Server Name ||-----");
7779
}
7880

79-
// Special Function to detect Faked Mutator and append XF to ServerName
81+
// Detect FakedPlus Mutator and append 'xF' to ServerName
8082
function CheckMutators(out string ServerName)
8183
{
8284
local Mutator M;
8385

84-
// Do not append anything or change the ServerName, if empty ServerName detected in Config
85-
if(bKeepServerNameDefault) return;
86-
8786
for ( M = KF.BaseMutator; M != None; M = M.NextMutator ) {
8887
if(M.IsA('Faked_1')) ServerName $= " | 1F";
8988
if(M.IsA('Faked_2')) ServerName $= " | 2F";
@@ -107,6 +106,6 @@ function MutLog(string s)
107106
defaultproperties
108107
{
109108
GroupName="KF-MutLoaderV2"
110-
FriendlyName="MutLoader - v2.1"
111-
Description="seamlessly load mutators With optimized config (Difficulty, ServerName, Several GameTypes); By Flame, Essence & Vel-San"
109+
FriendlyName="MutLoader - v2.2"
110+
Description="Seamlessly load mutators based on Game Difficulty & Game Type; By Flame, Essence & Vel-San"
112111
}
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Class MutLoaderObject extends Object PerObjectConfig Config(MutLoaderV2);
22

3+
// List of Mutators
34
var config array<string> Mutator;
4-
var config string GameTypeName;
5-
var config float GameDifficulty;
6-
var config string ServerName;
5+
// GameType
6+
var config string sGameTypeName;
7+
// Game Difficulty
8+
var config float fGameDifficulty;
9+
// Custom Server Name with every MapVote
10+
var config string sServerName;
11+
// ServerName Features
12+
var config bool bAppendFaked, bUpdateServerName;

Sample_Config/MutLoaderV2.ini

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
[MutLoaderV2.MutLoader]
22

33
[Settings1 MutLoaderObject]
4-
GameTypeName=KFGameType # Can be any gametype you want
5-
GameDifficulty=4.0 # Important if you want to make 2 configs of the same GameType, with different difficulties
6-
ServerName=This is a test server - Diff 4.0 # ServerName will change to this
4+
sGameTypeName=KFGameType # Can be any gametype you want
5+
fGameDifficulty=4.0 # Important if you want to make 2 configs of the same GameType, with different difficulties
6+
bAppendFaked=false # Adds 1F, 2F, 3F etc... if true & FakedPlus mutator is enabled
7+
bUpdateServerName=true # If true, updates server name to sServerName below
8+
sServerName=This is a test server - Diff 4.0 # ServerName will change to this if bUpdateServerName is true
79
Mutator=Mut1.Mut1
810
Mutator=Mut1.Mut2
911
Mutator=Mut1.Mut3
1012

1113
[Settings2 MutLoaderObject]
12-
GameTypeName=KFGameType
13-
GameDifficulty=7.0
14-
ServerName=This is a test server - Diff 7.0
14+
sGameTypeName=KFGameType
15+
fGameDifficulty=7.0
16+
bAppendFaked=false # Adds 1F, 2F, 3F etc... if true & FakedPlus mutator is enabled
17+
bUpdateServerName=true # If true, updates server name to sServerName below
18+
sServerName=This is a test server - Diff 7.0
1519
Mutator=Mut1.Mut1
1620
Mutator=Mut1.Mut2
1721
Mutator=Mut1.Mut3

Steam_WorkShop_Description/Workshop-text

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
Optimized version of 'MutLoader' originally made by Flame &amp; Essence, slightly modified by Vel-San;
1+
Optimized version of 'MutLoader' originally made by Flame, Essence & Modified by Vel-San;
22

33
- If your server is crashing because your 'Server Launch Command' has a lot of mutators, or MapVoteV2 is crashing as well, then this mutator is for you
44

55
[b]Changes from the original version[/b]
66

77
- Better support with MapVoteV2
8-
- ServerName change with every config
9-
- If ServerName is given (not empty), Mutator will also check if you have Faked Mutator installed (1, 2, 3, 4, 5, Custom) and will automatically append XF to your server name
8+
- ServerName change with every config (Optional)
9+
- Detects FakedPlus mutator and adds prefix to ServerName (Optional)
1010

1111
[h1][b][u]Notes[/u][/b][/h1]
1212

@@ -22,17 +22,21 @@ Optimized version of 'MutLoader' originally made by Flame &amp; Essence, slightl
2222
[MutLoaderV2.MutLoader]
2323

2424
[Settings1 MutLoaderObject]
25-
GameTypeName=KFGameType # Can be any gametype you want
26-
GameDifficulty=4.0 # Important if you want to make 2 configs of the same GameType, with different difficulties
27-
ServerName=This is a test server - Diff 4.0 # ServerName will change to this, set to empty if you want to disable
25+
sGameTypeName=KFGameType # Can be any gametype you want
26+
fGameDifficulty=4.0 # Important if you want to make 2 configs of the same GameType, with different difficulties
27+
bAppendFaked=false # Adds 1F, 2F, 3F etc... if true & FakedPlus mutator is enabled
28+
bUpdateServerName=true # If true, updates server name to sServerName below
29+
sServerName=This is a test server - Diff 4.0 # ServerName will change to this if bUpdateServerName is true
2830
Mutator=Mut1.Mut1
2931
Mutator=Mut1.Mut2
3032
Mutator=Mut1.Mut3
3133

3234
[Settings2 MutLoaderObject]
33-
GameTypeName=KFGameType
34-
GameDifficulty=7.0
35-
ServerName=This is a test server - Diff 7.0
35+
sGameTypeName=KFGameType
36+
fGameDifficulty=7.0
37+
bAppendFaked=false # Adds 1F, 2F, 3F etc... if true & FakedPlus mutator is enabled
38+
bUpdateServerName=true # If true, updates server name to sServerName below
39+
sServerName=This is a test server - Diff 7.0
3640
Mutator=Mut1.Mut1
3741
Mutator=Mut1.Mut2
3842
Mutator=Mut1.Mut3
@@ -65,8 +69,4 @@ No need to put any other mutators in the list of MapVoteV2. What's important is
6569

6670
[h1][b][u]Manual Download Links (Recommended)[/u][/b][/h1]
6771

68-
You can find it under 'Whitelisted' folder named 'KF-Mutloader-v2.1'
69-
70-
- MEGA Link: https://mega DOT nz/folder/YDoEmKiC#s6FGAtgh40-TvB4bHsLaMQ
71-
72-
- Github: https://github.com/Vel-San/KF-Mutloader/releases/tag/v2.1
72+
- Github: https://github.com/Vel-San/KF-Mutloader/releases/tag/v2.2

0 commit comments

Comments
 (0)