Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Or: How to create, compile, brew, and run a custom GameInfo or Mutator mod

...

 

1. Create new .uc file(s)

  • If creating a new game mode, create a new GameInfo class that extends KFGameInfo (or one of its derivatives)
  • If creating a mutator, create a new Mutator class that extends KFMutator

2. Save your file(s) to your "My Games" folder

a. Make a new directory called "Src" in <drive:>\Users\<user>\Documents\My Games\KillingFloor2\KFGame. This is specified in KFEditor.ini, [ModPackages], ModPackagesInPath

...

d. Put your mod source files in Classes directory (e.g. KFGame\Src\MyMod\Classes\MyMod.uc)

3. Add a ModPackage entry for each package that your mod uses

In KFEditor.ini:

[ModPackages]

...

ModPackage=MyMod1
ModPackage=MyMod2

4. Compile your file(s)

a. Open the command prompt and navigate to your Steam Killing Floor 2 binaries directory (<drive:>\Steam\SteamApps\common\killingfloor2\Binaries\Win64)

        - or, navigate to that directory in Windows Explorer, shift+right-click and select "open command window here"

b. Type "kfeditor .exe make -full"c. Hit enter (this will put the " and hit enter. The compiled .u file (e.g. MyMod.u) can then be found in your My Games directory (My Games\KillingFloor2\KFGame\Unpublished\Unpublished\Unpublished\BrewedPC\Script)

5. Brew your file(s)

a. On the command prompt still, type "kfeditor brewcontent -platform=PC <compiled mod package>" (e.g. kfeditor brewcontent -platform=PC MyMod) and hit enter. You can brew more than one compiled file by separating each one with a space (e.g. MyMod1 MyMod2). Brewing will create a "Published" directory in My Games\KillingFloor2\KFGame, in which the brewed mod files need to live to be run.

NOTE: The brewer needs the compiled files to be in My Games\KillingFloor2\KFGame\Unpublished\BrewedPC\Script. By default, compiled files end up in My Games\KillingFloor2\KFGame\Unpublished\Unpublished\Unpublished\BrewedPC\Script [KNOWN ISSUE]

NOTE: Brewing doesn't do anything to compiled script files, so really this step just makes sure the compiled file ends up in the right location (Published dir). If brewing fails, you can manually move the compiled script files to My Games\KillingFloor2\KFGame\Published\BrewedPC\Script (you might need to create that path).

6. Run by adding a new parameter to the command line 

Info
titleHow to run a mod
  • If running with a GameInfo mod, add "?game=<packagename.scriptname>" to the command line (e.g. kf-

...

  • burningparis?game=mymod.mygameinfo)
  • If running with a Mutator mod, add "?mutator=<packagename.scriptname>" to the command line (e.g. kf-burningparis?mutator=mymod.mymutator). You can run with multiple mutators by separating them with commas (e.g. kf-burningparis?mutator=mymod.mymutator1,mymod.mymutator2)

 

...

5. Test your mod (by running as "unpublished")

Run your mod with an additional command-line parameter, "-useunpublished", to test it before brewing. Brewing will "publish" your content and put it in a Published directory, which the game needs when not using -useunpublished.

5. Brew your file(s)

On the command prompt, type "kfeditor brewcontent -platform=PC <compiled mod package>" (e.g. kfeditor brewcontent -platform=PC MyMod) and hit enter. You can brew more than one compiled file by separating each one with a space (e.g. MyMod1 MyMod2). Brewing will create a "Published" directory in My Games\KillingFloor2\KFGame

...

[KNOWN ISSUE] - The game won't be able to load the mod from the command line if the mod packages haven't been brewed or at least placed in the My Games\KillingFloor2\KFGame\Published directory.

...

, in which the brewed mod files need to live to be run.

6. Run your mod (as "published")

Now that your mod has been created, compiled, tested, and brewed, it can be run without the "-useunpublished" command-line parameter.

 

 

Troubleshooting

  • If you crash while running "make" or "brewcontent", try running again with the "-useunpublished" command-line parameter.

 

Filter by label (Content by label)
showLabelsfalse
max5
spacesKF2SW
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "KF2SW"
labelskb-how-to-article

...