• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

KFMutatorSummary code recommendation

ForrestMarkX

FNG / Fresh Meat
Jun 10, 2019
18
14
3
26
Texas
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.

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();
    }
}
 
  • Like
Reactions: duk6046

Yoshiro

In Soviet Russia, Yoshiro is a cake
Staff member
Oct 10, 2005
12,690
3,714
113
Added to our system for review.