I noticed that players are required to manually add a KFMutatorSummary to there KFGame.ini for a mutator to appear in the GUI. I created some code that will do this automatically for them when running the mutator once.
I recommend adding this code into KFMutator so that all mutators will automatically do this so that any modded UI or future TWI main menu will see the mutator.
I recommend adding this code into KFMutator so that all mutators will automatically do this so that any modded UI or future TWI main menu will see the mutator.
Code:
function PreBeginPlay()
{
local KFMutatorSummary MutatorSummary;
local array<string> Names;
local int i;
local bool bFoundConfig;
Super.PreBeginPlay();
GetPerObjectConfigSections(class'KFMutatorSummary', Names);
for (i = 0; i < Names.Length; i++)
{
if( InStr(Names[i], string(Class.Name)) != INDEX_NONE )
{
bFoundConfig = true;
break;
}
}
if( !bFoundConfig )
{
MutatorSummary = New(None, string(Class.Name)) class'KFMutatorSummary';
MutatorSummary.ClassName = PathName(Class);
MutatorSummary.SaveConfig();
}
}