• 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

[GUIDE] Compiling stuff, a general howto before official support is released

FZFalzar

FNG / Fresh Meat
May 11, 2011
128
3
0
UCC.exe
After alot of experimentation and tinkering, I managed to find out how to get KFEditor to make some magic. Why do this? Because KF is mod-driven. This guide is meant to kickstart creativity and mods. Early Access is the best time to test and find bugs, so by the time the full game is out, we already have polished mods. TWI, please. Some logic required.

Without further ado, here's the research/explanation.

Problem #1: KFEditor make
KFEditor is written in a way to only allow a few default commandlets to run. All others would slap a giant STEAM is required error on your screen. That being said, "make" is also in a sense blacklisted and prevented from executing.

However, you can run "KFEditor.exe UnrealEd.Make". This will enable you to execute the commandlet and make it do your bidding. Then you'll come to a point where you just see a "No scripts need compiling". Doing "make -full" will give you a nice crash and your log will say "Couldn't find shipping package BLAH". Which brings us to problem #2.

Problem #2: Folder Directories, BrewedPC and CookedPC
With UE3, folder structure for projects has changed quite abit. No longer do you throw everything within your install folder and compile. What happens now is, most of the magic happens within your "My Documents\My Games\KillingFloor2" folder.

Within here, KFEditor and KFGame reads the various configurations (not in your install folder anymore), and writes logs, caches downloads, etc. We will come back here later. The game data files from your install directory is somehow "merged" with the directories here to form a virtual directory of sorts containing links across your drives/folders.

Also, KF2 now uses a "brew" system to reduce update sizes, similar to RO2. THIS, is problematic because the compiler doesn't see this folder when it's supposed to look for the shipping packages as I mentioned earlier. For those who are more well-versed in UE3, you'd notice that the game files are usually stored within a CookedPC folder, not a BrewedPC folder. We'll fix this later.

Problem #3: EditPackages vs ModPackages
In UE3, EditPackages is now reserved for engine/core packages. ModPackages is for all your other mods, mutators and stuff that pertain to the game itself. Hence, for mutators and stuff, ModPackages will be where you frequent alot.

GUIDE TIME!

Directory Setup
Code:
- Browse to your Documents\My Games\KillingFloor2\KFGame directory
- Create a folder named Src. This is where your mutator classes will be going to. To make a new mutator, create a new folder with the name of your mutator, e.g MutFreeDosh. Then, create a folder named Classes within it. Now, within this Classes folder, you can put your UScript files here.
-EDITED 15/05/15
-Locate KFEngine.ini
-SeekFreePCPaths=..\..\KFGame\CookedPC
Change to:
SeekFreePCPaths=..\..\KFGame\BrewedPC
- (NO LONGER REQUIRED) Browse to your install folder for KF2. Go inside the KFGame folder and copy the entire BrewedPC folder. Paste it within KFGame and rename it to CookedPC. So now you have a CookedPC and BrewedPC folder containing all the game files. (REFER TO PREVIOUS STEP)
Configurations
Code:
- Browse to KillingFloor2\KFGame\Config\KFEditor.ini
- Locate the section [ModPackages]
- For each mutator project/package, add a new line with your project/package name. ModPackages=MutFreeDosh
- Next, configure the file paths. ModPackagesInPath will be where your source files are read from, and ModOutputDir is where your compiled U will appear. 

+For ModPackagesInPath, ModPackagesInPath=..\..\KFGame\Src
+For ModOutputDir, ModOutputDir=..\..\KFGame\Script
(NOTE) These 2 paths will expand to your corresponding "Script" and "Src" folders within Documents\My Games\KillingFloor2\KFGame.

The final result of your KFEditor.ini should look like this:
[ModPackages]
ModPackagesInPath=..\..\KFGame\Src
ModOutputDir=..\..\KFGame\Script
ModPackages=MutMyMut
--------------------------------------------------------------------------------------------------
OPTIONAL! Enabling more verbose output in log/console
- Browse to KillingFloor2\KFGame\Config\KFEngine.ini
- Locate [Core.System]
- Under each of the Suppress lines, comment them out with # or ;.
When these are done, run "KFEditor.exe UnrealEd.Make" from your install folder. Of course, there's another way to bypass that STEAM error thing, but due to the EULA, I can't make it public. PM me or drop a message on my steam if you are curious.

Proof, for the sceptics:


Good luck to all you modders out there, make KF2 more awesome.
-Falzar
 
Last edited:
  • Like
Reactions: Pharrahnox

Dragonblade_902

FNG / Fresh Meat
Feb 20, 2012
57
0
0
Soon Canada
Welp time to test this on my 1st project. I will post my results after :3

Update 1: It crashes at the start of rebuilding. Pretty sure there is something I missed or more importantly messed up on.
 
Last edited:

FZFalzar

FNG / Fresh Meat
May 11, 2011
128
3
0
UCC.exe
If you're crashing without seeing anything on console it probably means you're missing some of the packages.

- Check your logs within MyDocs\MyGames\KillingFloor2\KFGame\Logs. Also, ensure that all other instances of editpackages that you might have put in is removed from your KFEngine.INI and KFEditor.ini, as well as those within your KF2install, namely the DefaultEngone.ini and DefaultEditor.ini. The only line you should be adding are the ModPackages one.
Having a spare line of editpackages can cause the compiler to crash due to not being able to find the shipping package for it.

- Don't forget to clone the BrewedPC folder (all 8GB) within your KF2Install inside steamapps/common/killingfloor2 and rename to CookedPC

EDIT:
There is NO NEED to run make with the -full flag. If you are trying to do it you're doing it wrong. Make should autodetect changes within your code and compile accordingly assuming you set up the directory and configs correct. If you're still encountering crashing I suggest to backup your work and do a reinstall of KF with the default configs.
 
Last edited:

Dragonblade_902

FNG / Fresh Meat
Feb 20, 2012
57
0
0
Soon Canada
I'll give the reinstalling everything a try. So I can start fresh and see if it was something I missed. I'll report back after I have done so.

Edit: Alright so I tried it again after a fresh install and still got the same issue. Here is the error log

Code:
Log: Log file open, 05/04/15 14:05:59
Init: WinSock: version 1.1 (2.2), MaxSocks=32767, MaxUdp=65467
Log:  ... running in INSTALLED mode
DevConfig: GConfig::Find has loaded file:  ..\..\Engine\Config\ConsoleVariables.ini
Init: Version: 10897
Init: Epic Internal: 0
Init: Compiled (64-bit): Apr 23 2015 12:44:02
Init: Changelist: 1532151
Init: Command line: editor -useunpublished -NoLoadStartupPackages
Init: Base directory: C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\Binaries\Win64\
[0000.41] Init: Computer: DRAGONBLADE
[0000.41] Init: User: Robert
[0000.41] Init: CPU Page size=4096, Processors=8
[0000.41] Init: High frequency timer resolution =14.318180 MHz
[0000.41] Init: Memory total: Physical=8.0GB (8GB approx) Pagefile=10.3GB Virtual=131072.0GB
[0000.41] Log: Steam Client API Disabled!
[0000.41] Init: Presizing for 0 objects not considered by GC, pre-allocating 0 bytes.
[0000.41] Init: Object subsystem initialized
[0000.41] Warning: Warning, Unknown language extension . Defaulting to INT
[0000.44] Log: CachePaths() took 0.03 Seconds
[0000.44] DevDataBase: Connection to "Provider=sqloledb;Data Source=production-db;Initial Catalog=EngineTaskPerf;Trusted_Connection=Yes;Connection Timeout=2" or "10.1.20.20" failed
[0000.44] Log: SystemSettings based on: SystemSettings
[0000.45] Log: Found D3D11 adapter 0: AMD Radeon R9 200 Series
[0000.45] Log: Adapter has 3051MB of dedicated video memory, 0MB of dedicated system memory, and 3840MB of shared system memory
[0000.46] Log: Found D3D11 adapter 1: Microsoft Basic Render Driver
[0000.46] Log: Adapter has 0MB of dedicated video memory, 0MB of dedicated system memory, and 256MB of shared system memory
[0000.46] Log: Shader platform (RHI): PC-D3D-SM5
[0008.72] Log: Executing Class UnrealEd.MakeCommandlet
[0008.77] Heading: --------------------Core - Release--------------------
[0008.77] Critical: appError called: Missing shipping script package Core
[0008.77] Critical: Windows GetLastError: The system cannot find the path specified. (3)
[0011.29] Log: === Critical error: ===
Missing shipping script package Core

Address = 0x45355bf8 (filename not found) [in C:\Windows\system32\KERNELBASE.dll]
Address = 0xc38f4b95 (filename not found) [in C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\Binaries\Win64\KFEditor.exe]
Address = 0xc38b205b (filename not found) [in C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\Binaries\Win64\KFEditor.exe]
Address = 0xc48bdf1d (filename not found) [in C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\Binaries\Win64\KFEditor.exe]
Address = 0xc4e9fffe (filename not found) [in C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\Binaries\Win64\KFEditor.exe]
Address = 0xc4ea0e87 (filename not found) [in C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\Binaries\Win64\KFEditor.exe]
Address = 0xc4ea0fda (filename not found) [in C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\Binaries\Win64\KFEditor.exe]
Address = 0xcffd0574 (filename not found) 
Address = 0xcff7da68 (filename not found) 
Address = 0x2f59225a (filename not found) [in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll]
Address = 0xcffd00ee (filename not found) 
Address = 0x10a2628  (filename not found) 
Address = 0xc36c0000 (filename not found) [in C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\Binaries\Win64\KFEditor.exe]

[0011.29] Exit: Executing UObject::StaticShutdownAfterError
[0011.29] Exit: Executing UWindowsClient::ShutdownAfterError
[0011.30] Log: Shutting down FaceFX...
[0011.30] Log: FaceFX shutdown.
[0011.30] Log: appRequestExit(1)
 
Last edited:

FZFalzar

FNG / Fresh Meat
May 11, 2011
128
3
0
UCC.exe
@Dragon
The missing shipping script package error is because the game can't find Core.u and it probably won't see the other packages as well. Did you do the step of copying your BrewedPC folder and renaming it to CookedPC within steamapps\common\kf2\? It should be close to 8gb worth of files to be copied

@Gartley
I'd love to but I don't really have a proper workspace to do so atm. Also I don't think they want to release/endorse code support that fast in Early Release. I'll see what I can do this weekend.
 
Last edited:

Dragonblade_902

FNG / Fresh Meat
Feb 20, 2012
57
0
0
Soon Canada
@Falzar Yeah I did. It should be 8.25GB if I remember right. That's what is there and it's renamed CookedPC. I wonder if it's because I'm trying to compile KFGame itself since it's to do with the music project I started some time ago.
 

Marco

Active member
May 23, 2009
644
230
43
Finland
Well you can actually skip the step with coping over all of game contents to CookedPC by editing KFEngine.ini:
SeekFreePCPaths=..\..\KFGame\CookedPC
Change to:
SeekFreePCPaths=..\..\KFGame\BrewedPC
 

dirtybugs2

FNG / Fresh Meat
Jun 6, 2013
6
0
0
Cool nice work. Worked 1st time for me, up to the point that I tried to inherit from an external class.

#exec OBJ LOAD FILE="SOMECLASS.U"

Doesnt work anymore (Unless im missing something). What is the appropriate way to do this with UE3. Ive looked through the UE3 docs and cant find any info on inheriting from external packages. Im sure its a config/scope issue

I assume there is a search path for includes and libs as there is in C/C++ just cant find them yet. The path settings ive tried so far havent made any difference

:D
 
Last edited:

xmrmeow

Active member
Mar 23, 2015
1,005
7
38
Anyone here know how I can edit stuff in KFGame, compile it, and get it to run in game?

For anything in KFGameContent I can copy paste any class from the source code into my MyGames/Killingfloor2/KFGame/Src/KFGameContent/Classes folder and edit it to my liking, then compile it and run it in game just fine.

When I try to do this with anything from KFGame, I can compile it just fine, but the game just crashes every time I try to run it when I replace my original KFGame.u file with my modded one.

Anyone know how I can fix this? There's a ton of changes I want to make to things in KFGame such as syringe changes, perk changes, zed teleporting changes, etc but none of them work in game for reasons I don't understand :/
 

Slie

FNG / Fresh Meat
Dec 16, 2010
270
5
0
We don't have access to the engine, if you change something that relies on native code (c++), you'll run into problems.

If you change something that other parts of the game relies on, you'll run into problems.

Every time a patch is released, you'll run into problems.

I doubt anyone is going to try and figure out why you can't modify core files when you're not supposed to.
 

nateku2

FNG / Fresh Meat
Jan 1, 2010
87
0
0
I can't compile since the new patch, Did anything change? By can't compile I mean using KFEditor.exe opens the game and doesn't even check my src.