Skip to content

Commit e53e588

Browse files
committed
[release] v2.0 Public Release (initial)
1 parent f1f95c6 commit e53e588

File tree

5 files changed

+188
-1
lines changed

5 files changed

+188
-1
lines changed

MutLoader/Classes/MutLoader.uc

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
///////////////////////////////////////////////////
2+
// Modified version of MutLoader with multiple
3+
// Settings support, GameTypes, GameDifficulty &
4+
// Server Name change
5+
// By Flame, Essence & Vel-San
6+
///////////////////////////////////////////////////
7+
8+
class MutLoader extends Mutator Config(MutLoaderV2);
9+
10+
var config bool bDebug;
11+
var string sServerName;
12+
13+
function PreBeginPlay()
14+
{
15+
// Vars
16+
local array<MutLoaderObject> MutLoaderRecords;
17+
local array<string> MutatorList;
18+
local array<string> Names;
19+
local int i;
20+
21+
Super.PreBeginPlay();
22+
23+
//////////////////// Essence & Vel-San ///////////
24+
Names=Class'MutLoaderObject'.Static.GetPerObjectNames("MutLoaderV2");
25+
for(i=0; i<Names.Length; i++) MutLoaderRecords[i]=New(None, Names[i]) Class'MutLoaderObject';
26+
for(i=0; i<MutLoaderRecords.Length; i++)
27+
{
28+
if (
29+
MutLoaderRecords[i].GameTypeName==string(Level.Game.Class.Name)
30+
&& MutLoaderRecords[i].GameDifficulty==Level.Game.GameDifficulty
31+
)
32+
{
33+
MutLog("-----|| Using MutLoader Config # [" $i$ "]; Total Configs Found: " $MutLoaderRecords.Length$ " ||-----");
34+
MutatorList=MutLoaderRecords[i].Mutator;
35+
if (MutLoaderRecords[i].ServerName != "") sServerName = MutLoaderRecords[i].ServerName;
36+
Break;
37+
}
38+
}
39+
//////////////////////////////////////////////////
40+
for(i=0; i<MutatorList.Length; i++)
41+
{
42+
if (
43+
MutatorList[i]==""
44+
|| MutatorList[i]==string(Self.Class)
45+
)
46+
{
47+
Continue;
48+
}
49+
else
50+
{
51+
Level.Game.AddMutator(MutatorList[i], True);
52+
if(bDebug) MutLog("-----|| Mutator Added =>"@MutatorList[i]$ " ||-----");
53+
}
54+
}
55+
}
56+
57+
function Tick(float DeltaTime)
58+
{
59+
if(bDebug)
60+
{
61+
TimeStampLog("-----|| TICK - Default ServerName: " $Level.GRI.ServerName$ " ||-----");
62+
TimeStampLog("-----|| TICK - 'MutLoader' ServerName: " $sServerName$ " ||-----");
63+
}
64+
Level.GRI.ServerName = sServerName;
65+
if(bDebug) TimeStampLog("-----|| TICK - Updated Default ServerName: " $Level.GRI.ServerName$ " ||-----");
66+
Disable('Tick');
67+
}
68+
69+
function TimeStampLog(coerce string s)
70+
{
71+
log("["$Level.TimeSeconds$"s]" @ s, 'MutLoaderV2');
72+
}
73+
74+
function MutLog(string s)
75+
{
76+
log(s, 'MutLoaderV2');
77+
}
78+
79+
defaultproperties
80+
{
81+
bDebug=True
82+
GroupName="KF-MutLoaderV2"
83+
FriendlyName="MutLoader - v2.0"
84+
Description="seamlessly load mutators With optimized config (Difficulty, ServerName, Several GameTypes); By Flame, Essence & Vel-San"
85+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Class MutLoaderObject extends Object PerObjectConfig Config(MutLoaderV2);
2+
3+
var config array<string> Mutator;
4+
var config string GameTypeName;
5+
var config float GameDifficulty;
6+
var config string ServerName;

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
# KF-MutLoader
2-
Optimized version of 'MutLoader' originally made by Flame &amp; Essence
2+
3+
Optimized version of 'MutLoader' originally made by Flame &amp; Essence, slightly modified by Vel-San;
4+
5+
- Usage with KFMapVoteV2
6+
7+
```unrealscript
8+
GameConfig=(GameClass="KFMod.KFGameType",Prefix="KF",Acronym="KF",GameName="Easy",Mutators="MutLoader.MutLoader",Options="Difficulty=1")
9+
GameConfig=(GameClass="KFMod.KFGameType",Prefix="KF",Acronym="KF",GameName="Normal",Mutators="MutLoader.MutLoader",Options="Difficulty=2")
10+
```
11+
12+
No need to put any other mutators in the list of MapVoteV2. What's important is the GameType + Difficulty.
13+
14+
## Changes from the original version
15+
16+
- Better support with MapVoteV2
17+
- ServerName change with every config

Sample_Config/MutLoaderV2.ini

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[MutLoaderV2.MutLoader]
2+
bDebug=True
3+
4+
[Settings1 MutLoaderObject]
5+
GameTypeName=KFGameType # Can be any gametype you want
6+
GameDifficulty=4.0 # Important if you want to make 2 configs of the same GameType, with different difficulties
7+
ServerName=This is a test server - Diff 4.0 # ServerName will change to this
8+
Mutator=Mut1.Mut1
9+
Mutator=Mut1.Mut2
10+
Mutator=Mut1.Mut3
11+
12+
[Settings2 MutLoaderObject]
13+
GameTypeName=KFGameType
14+
GameDifficulty=7.0
15+
ServerName=This is a test server - Diff 7.0
16+
Mutator=Mut1.Mut1
17+
Mutator=Mut1.Mut2
18+
Mutator=Mut1.Mut3
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
Optimized version of 'MutLoader' originally made by Flame &amp; Essence, slightly modified by Vel-San;
2+
3+
- 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
4+
5+
[b]Changes from the original version[/b]
6+
7+
- Better support with MapVoteV2
8+
- ServerName change with every config
9+
10+
[h1][b][u]Notes[/u][/b][/h1]
11+
12+
- Credits to Flame & Essence for their work too.
13+
14+
[h1][b][u]Number Of Files[/u][/b][/h1]
15+
16+
- 3
17+
18+
[h1][b][u]Sample Config[/u][/b][/h1]
19+
20+
[code]
21+
[MutLoaderV2.MutLoader]
22+
bDebug=True
23+
24+
[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
28+
Mutator=Mut1.Mut1
29+
Mutator=Mut1.Mut2
30+
Mutator=Mut1.Mut3
31+
32+
[Settings2 MutLoaderObject]
33+
GameTypeName=KFGameType
34+
GameDifficulty=7.0
35+
ServerName=This is a test server - Diff 7.0
36+
Mutator=Mut1.Mut1
37+
Mutator=Mut1.Mut2
38+
Mutator=Mut1.Mut3
39+
[/code]
40+
41+
[h1][b][u]File Names[/u][/b][/h1]
42+
43+
- \System\MutLoader.u
44+
- \System\MutLoader.ucl
45+
- \System\MutLoaderV2.ini
46+
47+
[h1][b][u]Usage[/u][/b][/h1]
48+
49+
1- Subscribe or download manually (Recommended)
50+
2- Launch the game and wait to see 'Completed'
51+
3- Restart the game and you can see the mutators in your list
52+
53+
[h1][b][u]Class Names[/u][/b][/h1]
54+
55+
- Mut: MutLoader.MutLoader
56+
57+
[h1][b][u]Manual Download Links (Recommended)[/u][/b][/h1]
58+
59+
You can find it under 'Not-Whitelisted' folder named 'KF-Mutloader-v2.0'
60+
61+
- MEGA Link: https://mega DOT nz/folder/YDoEmKiC#s6FGAtgh40-TvB4bHsLaMQ
62+
63+
- Github: https://github.com/Vel-San/KF-ServerTools/releases/tag/v1.2r

0 commit comments

Comments
 (0)