Getting Started with Mapping (Killing Floor 2): Difference between revisions

From Killing Floor 2 Wiki
Jump to navigation Jump to search
No edit summary
Line 132: Line 132:
*Preferences > Editor Language
*Preferences > Editor Language
*View > Change Autosave Options > Autosave Interval
*View > Change Autosave Options > Autosave Interval
{{Warning| '''NEVER''' Group assets together. There is an option to do so using Ctrl+G, however this should be completely avoided as doing so will crash the game and possibly the editor when you try and play it.}}


<br />
<br />
==Your First Map==
==Your First Map==
===Naming===
===Naming===

Revision as of 02:42, 2 April 2022

Introduction

This page includes a comprehensive guide on getting started with the Killing Floor 2 SDK for creating Maps and uploading them to the Steam Workshop. It is recommended that any new Level Designer should begin by looking at Official Maps and seeing how they approach particular scenarios.


Installation and First Launch

To install the SDK:

  1. Open up Steam, hover over 'Library' and select the 'Tools' option.
  2. From here locate 'Killing Floor 2 - SDK' and install it as you would any game on Steam
  3. Once the download is complete, launch it as you would any other game.
!--T:1--> Note Note: If an opt-in Beta/preview is happening at the time, both the game and the SDK need to be on the same branch. Otherwise the SDK will crash on launch.
i.e. If you are in the opt-in Beta for an update, the SDK also needs to be on the opt-in Beta.


Interface Guide

!--T:1--> Important Important: The SDK Interface is very laggy on launch - using up a lot of resources on your computer. To prevent the UI lag, simply create an empty save file or open up an existing map
e.g. KF-TempMapName

First Launch and Glance

On first launch you may be prompted with a couple of dialogs. They are things that don't affect the editor or its performance so you can ignore and click past them. See Figures 3.1.

Past all the error dialogs your Editor should look something like Figure 3.2 below.

Figure 3.2: Default State of the Editor


!--T:1--> Note Note: For new users, I highly recommend reading the Startup Tips and not disabling the prompt, they often contain useful tips on how to use different aspects of the SDK.

Figure 3.1a: Checking will always result in error, so just ignore and wait a week
Figure 3.1b: Can safely ignore, you can put "-NoGADWarning" as the warning suggests into the Steam launch options for the SDK to suppress the warning
Figure 3.1c: Common error in the SDK, can safely ignore

SDK and Viewport Overview

Below is a breakdown of the core elements that you will be using in the SDK

Figure 3.3: Interface Overview

There are 2 crossed out buttons on the side menu:

  1. The Terrain Tool - Obsolete, use the Landscape tool instead.
  2. Foliage Paint Tool - Not supported, will crash the Editor when you build Lighting.

Content Browser Overview

The Content Browser is large enough to break it down in its own image. The Content Browser is where you will be grabbing all Assets (Actors, Meshes, Materials, Sounds, Decals, etc). It also serves as a tool for managing and organising your map's own individual assets, and also organising assets into Layers.

Common Hotkeys

Hotkey Function Hotkey Function
Left Click Select actor Spacebar Toggle between Movement/Rotation/Scaling
Right Click Open Context Menu ~ Toggle between World and Local space transforms
Ctrl + Left Click Multiple select N Toggle Pathnodes
Right Click + Scroll Wheel Change movement speed around viewport P Toggle Paths
Alt+Drag with Widget Duplicate and move with widget T Toggle Lanscape/Terrain
Ctrl+Z Undo O Toggle Volumes
Ctrl+Y Redo B Toggle Builder Brush
H Hide selected actors Alt+C Toggle Collision Wireframes
Shift + H Hide all but selected actors ] Increase grid snap size
Ctrl + H Unhide all actors [ Descrease grid snap size
G Toggle Game View mode in viewport Ctrl + number Set a bookmark
F4 Open actor properties number Snap to bookmark
Ctrl+B Find selected asset in the Content Browser

There are a lot more hotkeys for the editor, these are the main ones people usually have issue with when first starting out. You can check for others here: https://sites.google.com/site/lessonsdarrenmckinsey/udk-hotkeys

Additional Preferences

These are some additional options you may or may not want to use based on your personal preferences:

  • Preferences > Flight Camera Controls
    • Default is 'Use WASD for Camera Controls' - Standard FPS controls
    • 'Never use WASD for Camera Controls' - KF1 Editor Controls
  • Preferences > Highlight Objects Under Mouse Cursor
  • Preferences > Editor Language
  • View > Change Autosave Options > Autosave Interval
!--T:1--> Warning Warning: NEVER Group assets together. There is an option to do so using Ctrl+G, however this should be completely avoided as doing so will crash the game and possibly the editor when you try and play it.


Your First Map

Naming

Your first map can be named anything however a Killing Floor 2 map MUST be prefixed with 'KF-'. If it isn't, it cannot be played or recognized within the game.

Your map file name should also match your map's name.

If your map name has spaces, it is common naming convention to use UpperCamelCase. Avoid using underscores or dashes to represent spaces.You should also avoid publishing a map with numbers or 'versions' at the end, this can be a pain for server owners if they want to host your map on their server.

Map Name Good File Name Bad File Names
Burning Paris KF-BurningParis.kfm KF-Burning_Paris.kfm

KF-Burning-Paris.kfm

KF-Paris.kfm

Zed's Diner KF-ZedsDiner.kfm KF-Zeds_Diner.kfm

KF-Zeds-Diner.kfm

KF-ZesDinner.kfm

KF-ZedsDinerTestingV3.kfm

File Save Location

You can save and load your map from any location. However the best recommended location is:

C:\Users\UserName\Documents\My Games\KillingFloor2\KFGame\Unpublished\BrewedPC

The main reason is, when you plan to upload your map to the workshop, the Workshop Front-End will look specifically in only this location for files to upload. Additionally if you plan to cook your map, it needs to be in this location for it to successfully cook.

I would avoid placing your working map file under the steam game directory as well (C:\Program Files (x86)\Steam\steamapps\common\killingfloor2\KFGame\BrewedPC\Maps). This directory may confuse your editor if you plan to import, move, rename or edit assets within your map's own directory.

World Settings

World Settings can set important information for your map such as: Map Name, Map Author, Spawning Modifiers, Objectives and Collectibles, What game mode is played in the Editor, what in-game music the game uses and Optimization options.

To access it go to: View > World Properties.

For the moment, just leave most of the variables default, but you can:

  • Input your map name and your user name in the appropriate areas under the 'World Info' section.
  • Change the 'Default Game Type' and 'Game Type for PIE' to "KFGameInfo_Survival" under the 'Game Type' section.


Further information on World Info can be found here: Setting Up World Info (Killing Floor 2)

Important Tip Before Moving Forward

The SDK is stable for the most part, but it is not uncommon to encounter crashes at any point in its usage. In fact its something you need to be prepared for and goes without saying that:

!--T:1--> Important Important: YOU SHOULD SAVE AS FREQUENTLY AS POSSIBLE

While the auto-save function is useful for beginners, most users that become familiar opt to turn it off as it can interrupt workflow, bloat your game directory and also on large maps, take a long time to save.

Here are some recommended times to save:

  • After any minor, moderate to large changes done in any aspect to your map
  • Every 10 minutes
  • If you plan to step away from the computer for a bit (e.g. going to the toilet)
  • Before every Build (Lighting, Pathing, etc.)
  • Planning to use or work with BSP Brushes
  • Before importing new Assets (textures, meshes, sounds, etc.)
  • Before placing down any newly imported Mesh
  • Before moving/copying/duplicating assets in your map's directory
  • Before combining meshes and/or applying collisions from the Builder Brush

After losing significant progress once or twice, saving frequently will become second habit.

Placing Assets and Props

Using the Content Browser

The Content Browser is where you will get all the meshes, textures/materials and any other assets needed to make your map. The general process of using the content browser is drag and drop or selecting and asset and right clicking in the scene to place or replace assets.

The Content Browser can be located at "View > Browser Windows > Content Browser"

Figure 5.1: Default State of the Content Browser

The Important Tabs to other Windows in the image above is important to remember, you can quickly navigate between important windows that will aid in understanding maps.

Tab Description
Content Browser What you currently see
Actor Classes All placeable classes, usually if you need a specific KFActor to place in your scene you can look for it here.
Levels Will show the currently loaded level and its sublevels on official maps
Scene Contains all the actors/assets in the scene. If you are looking for a specific actor and cant find it look here.
Layers Works just like in Photoshop, allows you to assign specific assets to layers to organize and hide. A lot of official maps have some layers turned off (such as Skylights in Burning Paris) by default when you load the map. Simply turn them on to make the assets visible in the scene.


Most of the assets you see are default user interface and cosmetic items that cannot really be used for mapping. Assets for mapping are located in the Package/File Directory in the "KFGame > BrewedPC > Packages > Environment" subfolders.

!--T:1--> Note Note: Assets are not located in the "Maps" subfolder - with exception to Biolapse and Desolation assets which will be unusable for you project unless you migrate them into your map package


To load assets you wish to use in your project right click on the "ENV_" package and right click "Fully Load". This will take a second as the SDK loads in the assets into memory. If you want to use assets from maps simply locate the corresponding "ENV_" package and load it or alternatively open the map which will also load the assets and any other assets it uses not contained in its own ENV_ package. To get started fully load the "ENV_Modular_StaticSet" package.

!--T:1--> Warning Warning: It is usually not a good idea to fully load the entire "Environment" folder as it will often crash the Editor.


Using the Modular Static Mesh Set

All maps in KF2 start from and are built from the Modular Static Mesh Set instead of BSP Brushes like in traditional Unreal Engine maps. The meshes are very carefully modelled and texture unwrapped to work with tiling textures without any seams.

You can find resources on how to use the Modular kit here:

Comprehensive Wiki Guide: Setting Up Modular Static Set (Killing Floor 2)

Community Tutorial Playlist (by Kuebic): Killing Floor 2 SDK Tutorials

C:\SteamLibrary\steamapps\common\killingfloor2\KFGame\BrewedPC\Maps\SDK\Mod_Tools_Modular_Template
C:\SteamLibrary\steamapps\common\killingfloor2\KFGame\BrewedPC\Maps\SDK\Mod_Tools_Demo_Map
!--T:1--> Important Important: Tips for working with the Modular Kit
  • ALWAYS use snapping when using the modular kit. If you do not, it will be impossible align meshes correctly.
  • ALWAYS work in World Space.
    • You can toggle between World and Local space using ~
  • You DO NOT need to scale meshes for the modular kit, just add more segments
  • NEVER EVER rotate in Local Space. Even if you have angle snapping on, Local space has inaccurate decimal rounding and will always inaccurately rotate with snapped angles.
  • You only need to rotate walls or stairs. You usually do not need to rotate floors or ceilings, there are segments for every scenario you might have to avoid rotating these pieces (check the Mod_Tools_Modular_Template map for example).
    • Stick to 90 degree snap rotations for walls, there are specific walls available for 45 degree angles.
!--T:1--> Important Important: Advice from an Experienced Mapper
When you first start using the modular kit, you may feel compelled to have corners perfectly aligned with the corresponding Corner-In and Corner-Out pieces. But this is a waste of time. It is good to understand how these pieces work together, but in practice you often do not need to worry about them. When we start to add pillars, set-dressings and other assets to make the map visually interesting you will find that corners often get hidden. The time spent meticulously getting corners set up correctly is often wasted or never noticed by players; it is better to spend time elsewhere. If the corner is bare or where players will spend a lot of time, then it would be appropriate to use them correctly. But otherwise do not worry about it too much until you start to polish the map.


Changing Materials (Textures)

To change the look of the modular mesh pieces (or any mesh in the SDK), you apply a Material Instances onto them. A Material is a shader that combines the textures (diffuse, normal, specular, etc) so it can be applied onto a mesh within the editor.

The SDK already has a large library of materials that you have access to:

  1. Load up a Map or an ENV_ package, and find a Material Instance Constant (MIC)
    1. You can also right click the prop and select Materials > Find Instance in Content Browser to locate it in the packages.
  2. Drag and drop it onto the mesh you want it applied to.
    1. Alternatively, select the MIC in the Content Browser and right click the prop within the scene and select Materials > Assign from Content Browser.

You can also create custom variations of the MICs specifically for your map!

  1. Right click on the prop in the scene and select Materials > Create New Instance (Constant)
  2. Give it a new name and a new window will pop up
  3. Click the checkbox on the properties you want to change so it can be applied (See Figure 5.2).
    1. Depending on the MIC you selected you may be given a number of options to change the look of the Material. These usually allow you to change the tint of the texture, the UV scaling and even replacing the textures completely to different ones in the SDK or even ones you imported yourself.
  4. You should experiment to see what you can make!

You may notice that some props have more than one slot for a material, just experiment to see which areas the materials affect.

!--T:1--> Note Note: If you create a new MIC, you will need to have it used in your Map/Scene somewhere. If you do not, it will not be saved when you load the map the next time. This is a quirk of the Editor to reduce file size by dropping unused assets. This applies to all assets, not just MICs

Figure 5.2: Left: Original MIC from Volter Manor. Right: New Custom MIC, note the highlighted ticked sections that change the MIC scale and color


Creating Interesting Levels with Props

If you are just starting out, it is highly recommended that you go and spend some time looking at the official maps to see how they place props, materials and lighting around the level. You can mix and match and even copy+paste assets directly from those maps into yours. If you want a comprehensive guide on how to place props and change materials the video below does an amazing job:

Community Tutorial (by Seanchaoz): KF2 SDK - Guide to making interesting room geometry

!--T:1--> Note Note: When you copy objects in the Editor, it copies it as plaintext. You can paste this into notepad just in case the editor crashes when you load another level.
!--T:1--> Note Note: Some maps have locked the assets from being moved. You can disable locking by right clicking the assets and disabling "Transform > Lock Actor Movement"


Creating Landscapes

!--T:1--> Warning Warning: Currently Landscapes are bugged and official Materials and MIC are not working for custom maps and a workaround is required. This is a intermediate/advanced workaround and knowledge of a 3D Modelling program is required. More details are available in the link below.

If you are just starting out, I recommend making a map out of the modular kit first. The below guide will tell you everything about how to add one to your map if you wish to procede:

Comprehensive Wiki Guide: Setting Up Landscapes (Killing Floor 2)


World Lighting

If you have just been working with the Modular Kit you have most likely been in Unlit mode (Alt+3) which is unaffected by lighting. If you go to Lit mode (Alt+4), you will notice the scene is completely black. This is because there is no lighting set up in the map yet.

Adding Ambient Light - Skylights

To get basic environmental/ambient light we need to add SkyLights.

  1. Go to the "Actor Classes" Tab from the Content Browser
  2. Navigate to "Actor > Light > SkyLight"
  3. Drag and drop a Skylight into the scene (Do not use the SkyLightToggleable)

If you are in Lit Mode then you will see your scene light up. As a general rule, ambient lights should be rather subtle and not as powerful as the default value of '1'. Official Maps have values that range from 0.05 (Volter Manor) to 0.15 (Outpost) for their skylights. So values between 0.01 and 0.2 are good ranges.

So lets change the value to be what is usually more acceptable for KF2 maps:

  1. Select the SkyLight and Press F4 to open the Properties
  2. Under "Light > Light Component > Light Component > Brightness" (should be open by default), change the value to something like '0.1'
  3. You can also change the tint of the lighting to align with your map's mood by changing the "Light Color" under the Brightness setting
  4. If your ceilings are too dark you can change the "Light > Light Component > Sky Light Component > Lower Brightness" to something around '0.01'
    1. Again you want to use very low numbers here


KF2 Maps can have a total of 2 SkyLights; 1 for Outdoors and 1 for Indoors. You can select which SkyLight affects each area in the properties:

  1. Set "Light > Light Component > Light Component > Override Auto Lighting Channels" to True/Enabled
  2. Selecting which Channel to affect under "Light > Light Component > Light Component > Lighting Channels"
    1. Without the 'Override Auto Lighting Channels' property enabled, the SkyLight will default to whatever volume it is in. We just enable it to have greater control.

A secondary requirement for multiple Skylights is that you need a TWIndoorLightingVolume or TWOutdoorLightingVolume. The LightingVolumes tell the editor that the assets (Props and Lights) within this volume are either Indoor or Outdoors, and will build the lighting accordingly. Since Indoors are usually contained within Outdoor environments, in most cases we just need to specify an Indoor Volume to save time.

To create lighting volumes:

  1. Select the Builder Brush (The Red Wireframe Cube in the scene)
    1. Press 'B' if you cannot see it (it may be hidden)
  2. Move the Builder Brush somewhere indoors to test
  3. On the right toolbar select "Volumes > Add Volumes" and click a TWIndoorLightingVolume (See Figure 6.1)
  4. Move the Builder Brush somewhere and you will see a pink cube left behind - this is your Volume
  5. You can change the general size of the volume by clicking Geometry Mode (Shift+2) and selecting the Volume faces and moving them where you want them
    1. You can shift back into Camera Mode with Shift+1
  6. Press the Build Geometry button to recalculate the Volume (See Figure 6.1)
  7. Press the Build Lighting button, a prompt will appear but just click OK
  8. You should notice after the game has finished building that all the meshes that intersect the Indoor Volume should be lit by the Indoor SkyLight (if you had set them up already)
Figure 6.1: Building lighting volumes action locations


General Lighting

Lighting from this point onwards is pretty easy. There are 2 main types of light you can place into a scene. Both these lights have properties such as Brightness, Radius, Light Color which you can be creative with, you can even add flickering behaviors to them.

  • PointLights - Which provide light in a sphere like radius
    • You can place a light in the scene by holding 'L' and left clicking.
  • SpotLights - Which provide a cone of light in the direction it is facing
    • You can convert a PointLight to a SpotLight by right clicking the PointLight and selecting "Convert Light > SpotLights > SpotLight"


!--T:1--> Warning Warning: LIGHTING HAS THE LARGEST IMPACT ON PERFORMANCE
!--T:1--> Important Important: Tips for working with Lighting Performance:
  • ALWAYS Disable Cast Per Object Dynamic Shadows on PointLights.
    • This is Enabled by default and should ALWAYS be turned off.
    • This also does not work properly and has a SIGNIFICANT impact on performance
  • Dynamic Shadows are very expensive, try and use them very sparingly and only use them on SpotLights
  • As the radius of PointLights increase, the performance hit grows exponentially. Only have radii that is just enough for your scene
    • Performance really starts to drop once you get past a Radius of 1500
  • Try not to have a large density of lights overlapping each other. The more you overlap light radii, the larger the impact in performance
  • SpotLights perform better than PointLights. PointLights are made up of multiple SpotLights behind the scene and are 2x more costly to use. Try and use SpotLights as much as you can (eg: Ceiling Lights).

Lighting Documentation

Excellent Community Tutorial (by Seanchaoz): KF2 SDK Guide - Basic Lighting Tutorial

Shadow System Technical Documentation: Shadow System Technical Documentation (Killing Floor 2)


Building (Baking)

At this point you are probably putting down lots of props and lighting, but you may notice that objects are not looking correct within the editor. When we want to update the map after lots of edit, we have to 'Bake' or 'Build' our map. Building takes time and scales with size and complexity of your map. It is not required to do all the time, only when you need to update certain aspects of your map to verify and test. Figure 7.1 shows their location.

Figure 7.1: Yellow Highlight: Build Options from left to right: Build Geometry, Lighting, Paths, Splatter Maps and Build All. Orange Highlight: Publish/Cook Map - See Note below.

There are 5 sorts of Builds we are often concerned with:

  • Build Geometry - When we make any changes to Volumes or Brushes created with BSP Brushes/Geometry mode, the changes will not be updated until we actually rebuild the geometry
    • This is particularly important to remember when we are making/editing Blocking Volumes for Players and Zeds
  • Build Lighting - As we change Skylights, Pointlights and SpotLights in our scene, we want to check how they look, whether they accept the right lighting and specifically with this build, shadow map creation.
    • This will be the main build that we do to check for visual quality as we build our map
    • This build process takes the longest based on the map size
  • Build Paths - Used to build pathing that Zeds/AI/Trader Paths use
  • Build Splatter Maps - A KF2 specific build that generates unique maps for persistent blood on meshes as you play the game
  • Build All - Builds all of the above in one Bake


!--T:1--> Note Note: "Cooking" is another term you may hear. It is the same as Baking except it will package the map and some additional shader files in a non-editable Map file in C:\Users\username\Documents\My Games\KillingFloor2\KFGame\Published. It is done automatically by the SDK Upload Tool when you upload to the Workshop. It also has more advanced use when testing custom materials which required a packaged map. It is not recommended that you cook your map within the Editor. Stick with standard baking.


Common Errors and Issues from Building

Error Fix
Warning: Maps not built with production lighting This warning will always occur and you can safely ignore it. You cannot get rid or fix it.
Warning: Map should have KillZ set - set this to something sensible so that the player doesn't fall forever Set a value in "View > World Properties > Zone Info > Kill Z" to something like -10000
Warning: 'Actor' - CanBecomeDynamic Actor has BlockActors Enabled <PostLoad> Can safely ignore this warning. Pops up on Actors that usually get knocked around by Physics and Players. Does not impact gameplay.

If you really want to get rid of it, go to the actor's properties and disable the option at "Actor > Actor Component > Collision > Block Actors"

Error: No shadowmap generated for 'ActorName' of owner 'ActorName'. Check if mesh has lightmap UVs This occurs when actors that don't have Lightmap UVs (UV1) try and build Shadow maps. May not have a visual impact.

You can fix this by either creating new Lightmaps for the mesh in an external 3D Program or by Disabling "Actor > Actor Component > Lighting > Precomputed Shadows" or Disabling Shadow Casting entirely for it.

Warning: DecalActor : Decal actor does not have any overlapping actors Can safely ignore this warning, has no impact on performance or gameplay. Occurs when you have 2 or more Decals projecting ontop of each other.

You can try and fix it by adjusting Decals so they do not overlap.

Warning: Volume/Brush : Brush has non-coplanar polygons May cause gameplay issue and even SDK crashes. Occurs when a face of a Brush is not flat/planar from editing it at some point

Easiest fix is to delete it and rebuild the Brush

Performance: SkeletalMeshActor Skeletal Mesh component 'SkeletalMeshActor' not using a light environment or custom lighting channels - this will be inefficient and have incorrect lighting Can safely ignore, will unlikely to have an noticeable impact on performance

Can fix it by Enabling "Skeletal Mesh Actor > Light Environment Component > Enabled"

Error: PathNode : Navigation point not on valid base or too close to steep slope

Warning: PathNode : has no paths, and is not inside the navmesh! (If this is a destination or something for players only set bDestinationonly=TRUE)

Pathnode may be floating in air, too far from ground or cannot find adequate place to snap to, inside a mesh or blocked from other pathnodes. Just move it around until it is fixed
Warning: KFSpawnVolume ValidatePathingFromMarkers finished but there are no spawn positions! for KFSpawnVolume

Warning: KFSpawnVolume ValidatePathingFromMarkers: KFSpawnVolume can't find an anchor from marker 1

Spawn Volume cannot place spawn positions due to no ground being present or a prop blocking it from having enough space, just shift the volume or props around.
SDK Bugsplat when Building Lighting Could be a large number of things, but the most common issue is building lighting on BSP Brushes

To fix, select all Brushes in the Scene Window, delete them and rebuild Geometry. Save and try again.

If error continues, it could be something else. You can check the Crash Logs located at C:\Users\username\Documents\My Games\KillingFloor2\KFGame\Logs and try asking the community for help.


Using the BSP Brush and Creating Volumes

We used the Builder Brush when we created the Lighting Volumes earlier, but it is used for a lot more. Formally it is known as a BSP (Binary Space Partitioning) Brush and uses the CSG (Constructive Solid Geometry) modifiers located on the right tool bar. We can create a lot more than just cubes and rectangles as well.

When we are Geometry mode we get a dialog window that allows us to use the Edit or Extrude Modifier (See Figure 8.1). In extrude mode, if you select a face and drag it out with the transform gizmo, you can create additional space to the Brush. You can also grab the Edges of the Brush and move them. These actions will be enough to get you 95% of the way with using the BSP Brushes.

!--T:1--> Important Important: Remember to always rebuild the Geometry if you edit your Volumes before you test them in the Editor!

There are certain circumstances where you will need more unique shapes, such as shapes with a hole. To achieve such shapes we can use the CSG Add and Subtract Modifiers. These will create physical meshes within the Editor that you can interact with. We should not use these to make out maps and instead use them to create unique shapes for our Brush. When you have your unique Brush, you can use the Intersect Modifier to make a 'cage' of the Brush with the Builder Brush that you can use to add your volume. Using this method can leave behind hidden "Brush" actors which can only be removed through the Scene Tab, once removed make sure to rebuild the Geometry of the map.

!--T:1--> Warning Warning: The BSP Brushes are very buggy! Always save your map before you start using them, they are a large source of Bugsplats/Crashes.
  • Undo/Ctrl+Z has a VERY HIGH chance to crash the Editor while using BSP. It is better to just delete the Brush and start again.

The video below shows how to use brushes in 2 ways:

  • Technique 1 (00:00) - Using CSG Brushes to Add and Subtract Brushes.
  • Technique 2 (01:45) - Extrude method, usually faster but will require some forwarding thinking on edge subdivisions.

Technique 2 is typically better in the long run as it is less buggy and requires less clean up. However if you make a mistake and with Ctrl+Z/Undo being prone to crashing the editor, you will need to remake the brush.

Community Tutorial (by Delta): KF2 SDK - Making Volumes 2 Ways

Figure 8.1: Window that pops up when Geometry Mode is active. Note: The Extrude function is greyed-out, you need to select the Brush/Volume face to be able to select it.

Important Volumes

Volume Name Description
PawnBlockingVolume

KFPawnBlockingVolume

Does exactly as the name suggests, blocks Players, Zeds/AI and PlayerZeds from passing through them.

KFPawnBlockingVolume is different as it has options for Versus mode. You can use either for creating blocking volumes for your map.

KFSpawnVolume This is where Zeds will spawn, allows you to specify amount of spawn points, spawn delays and active areas.

Further Documentation: Setting Up Navigation (Killing Floor 2)

TriggerVolume These are used to activate Portal Spawns (Zeds popping out of vents and sewers). It is also used for scripted Kismet and Level events if Players or Zeds are in the Volume.
KFReverbVolume Affects how the sound will reverberate when the player is in that volume. Eg: In a open outside area or in an indoor small room.

Further Documentation: Setting Up Map Audio (Killing Floor 2)

KFDialogEnvironmentVolume When a player enters these volumes it will play a piece of dialog based on the character and sort of environment state you set in the volume.


Setting Up Gameplay

Spawning Zeds and Navigation

Player Spawns (KFPlayerStart)

When players start a game or respawn at the end of the round they spawn on these nodes. They also act like regular path nodes for Zeds and Trader arrows.

There is Kismet in Official Maps to choose which set of KFPlayerStarts they spawn on at the start of the game, but this will not be used again on respawning at the end of a round. The game will select the first set of PlayerStarts it has in memory.

You will want at least 6 for standard maps. If you are making a Holdout/Objective Map, probably include more in each arena for servers that run more the 6p.


Customization Points (KFCustomizationPoint)

Customization Points are used at the start of the game where player need to ready up. They are usually hidden far away from the main playable space of the map (either really high up or below the map). The easiest way to find them on official maps is to search for the actor in the Scene Tab.


Path Nodes (KFPathNode) and Navigation

Wiki Documentation: Setting Up Navigation (Killing Floor 2)

Tips:

  • N will toggle node visibility.
  • P will toggle path line visibility.
  • Use "KFPathNodes" rather than "PathNodes". But regular PathNodes will still work.
  • Generally we want a nice grid of pink navigation lines between the nodes. Whites paths are fine. If you are getting a lot of green and blue lines you may want to look at changing the location of props and nodes.
  • For very tight areas in maps, such as narrow doors, or tight sections around props, you will want to add "KFTrigger_ChokePoint"
    • These will shrink the collision of Zeds so they do not get stuck on props or each other.
  • It's advisable to try and orient path nodes in straight lines, as zig-zagging zed pathing is fun for no one.
  • Spacing between nodes is subjective but any distance between 320-640 is good.
    • Closer than 320 is considered overkill; but it is fine to increase density around props that Zeds need to path around.
    • Further apart will not really be dense enough for smooth navigation for the Gameplay
    • Just checkout how official maps orient their nodes.
  • There is 1024 a limit for PathNodes that you can have on a map; having more will significantly increase build time and pathing/trader trails will not work properly.


Zed Spawning (KFSpawnVolume)

Wiki Documentation: Setting_Up_Spawns_(Killing_Floor_2)

Spawning Zeds is rather straight forward. Create a KFSpawnVolume, adjust its size and put a path node in the volume.


Portal Spawns (KFSpawners)

Wiki Documentation: Setting_Up_Spawns_(Killing_Floor_2)#KFSpawner

The easiest way to get these into your map is to simply copy and paste them from an existing map. Requirements for them are linked below.

Make sure you read and add the Kismet Requirements documented below. If you do not, Zeds will not spawn.


Traders

The easiest way to get a trader into your map is to copy and paste a trader from an existing map. Traders are made up of 2 actors so make sure you copy both:

  1. A KFTraderTrigger
  2. A Trader SkeletalMesh

The KFTraderTrigger is what the players actually interact with, when they are inside it's collision radius they can use it. The SkeletalMesh is just the Prop representation of the Trader and can be basically anything (eg: Infernal Realms).

!--T:1--> Important Important: The KFTraderTrigger also acts as a path node so the Trigger itself and cannot be blocked by the actual Trader Mesh. For trader arrows to path to the correct trader make sure the following is correct:
  1. The KFTraderTrigger is outside any Mesh or Blocking Volume. Including the Trader Pod SkeletalMesh.
  2. Must be accessible by players
You can change the "Pre-Pivot" to ensure the radius remains around the Trader in a circular fashion while retaining a pivot point to path to in an acceptable Position. Figure 9.1 shows how to adjust this.


Figure 9.1: Adjusting the Trader Trigger Pre-Pivot to be just outside the Mesh so the trader arrows path correctly.


Ammo and Weapon/Armor Spawns

Wiki Documentation: Setting Up Pickups (Killing Floor 2)

!--T:1--> Note Note: Standard sized maps utilized between 14-20 Ammo and 14-20 Weapon Pickups around the map


Doors

Wiki Documentation: Setting Up Doors (Killing Floor 2)

!--T:1--> Important Important: Doors have a VERY specific set of requirements for them to work correctly, make sure you carefully read the documentation above.


Testing Your Map

You can play your map directly in the editor by pressing the "Play level in editor button"/Play in Editor (PiE), F8, or you can right click anywhere on the map and select "Play from Here".

By default no game mode will be active but you can test things like general feel of the map, lighting, collisions and so forth.

To test gameplay, open the console (~) in game and use these commands:

Command Function
ToggleSpawning Will allow you play the default game listed in your WorldInfo in the Editor
EnableCheats Will open up most commands
God Toggles God Mode
DemiGod Will take damage but will never die
Ghost No clip mode
Fly Can fly around the map with collision enabled
Walk Disables Ghost/Fly mode
Loaded Will give you nearly all the weapons in the game
UberAmmo Will give you nearly unlimited ammo
Chris Will give you God, Loaded, UberAmmo and enable ToggleSpawning
Stat FPS Will show you your fps while in game. Our go to for performance checking.

Full List of Console Commands: Useful Console Commands (Killing Floor 2)


What should I be testing for?

TL;DR - TEST EVERYTHING

  • Performance - Do we have stable frames on every part of the map?
    • Walk around the map and take note of where FPS drops as you look at it at different angle - Is the FPS changing drastically?
    • FPS is very dependent on your own PC. To get a baseline of what you should be aiming for, open up Official Maps that are similar to yours and enable stat fps:
      • If you have an open outside map, check performance against Black Forest
      • If you have an indoor map check performance against Biotics Lab
      • If you have a combination of both, check performance against Burning Paris or Outpost
    • Remember that lighting plays a very big part in performance!
  • Collisions - Do players or Zeds get stuck?
    • Run around your map and hug corners, make sure you do not get caught on anything.
    • Play the game as you would normally and watch how you and the Zeds walk around objects and props
    • Are you or Zeds getting caught on anything?
    • Are Blocking Volumes working as intended?
  • Zed Spawning and Pathing
    • Play the game in exclusively in specific areas to test Spawning, Pathing and Performance
    • Are spawns too slow or too fast?
    • Are the portal spawns working?
    • Are trader arrows navigating to the right traders?
    • Are Zeds attacking welded doors or standing still?
  • Exploits and Bugs
    • Can the players jump on top of anything they shouldn't be able to?
    • Can Zeds get to the players wherever they go?
    • Can the player leave the map?
  • Is the Gameplay Fun?


!--T:1--> Important Important: Testing in Editor VS Base Game VS On a Server
  • Playing in the Editor will allow you to rapid test your map and test changes.
  • Playing the map in the Base Game is usually the best place to test the map. This is because you will have slightly better performance and gameplay will be what other players will experience.
    • Put your KF-Map.kfm in the following location so you can play it in the base game: C:\SteamLibrary\steamapps\common\killingfloor2\KFGame\BrewedPC\Maps
  • Playing on a Server with other players is good to test gameplay with many people
  • Playing on a Server is good to make sure that materials are rendering properly and that Kismet events (portals, sounds, events etc) are working for all players as well.


Map Optimization

Map Optimization is the arguably one of the most important steps when completing a map. Aside from having good playable spaces, the map needs to perform well on all machines; maintaining stable Frames per Second (FPS). The following guide is a comprehensive list of areas that should be addressed before publishing a map. EVERY step should be evaluated and addressed as they will all add to performance.

Comprehensive Wiki Guide: Map Optimization Guide (Killing Floor 2)


Publishing to the Workshop

!--T:1--> Important Important: Make sure your map is in the correct location; As suggested above, the recommended location for maps should be: C:\Users\UserName\Documents\My Games\KillingFloor2\KFGame\Unpublished\BrewedPC).

KFWorkshopMapSummary.ini

By default, maps natively support Survival, Weekly, and Endless game modes; If you were to upload the map directly with the Workshop Upload Tool, your map would be playable in these game modes. Objective mode is set to false so the map will not show up in selection in Objective Gamemode. To enable this you have to create and bake an additional .ini file into the map during upload. Additionally if you had a map which didn't support a game mode (eg: Progression or Holdout not being supported in Endless) this .ini will allow you to remove map selection when that game mode is active.

Create a KFWorkshopMapSummary.ini within the following location:

C:\Users\UserName\Documents\My Games\KillingFloor2\KFGame\Config\Config
!--T:1--> Note Note: The nested 'Config' folder within Config is not a mistake, you will need to create that folder within Config. If it is not located in this exact location it will not show up in the Workshop Upload Tool.

Copy and paste the following into the KFWorkshopMapSummary.ini

[KF-MAPNAME KFMapSummary]
MapName=KF-MAPNAME
MapAssociation=0
ScreenshotPathName=UI_MapPreview_TEX.UI_MapPreview_Placeholder
bPlayableInSurvival=True
bPlayableInWeekly=True
bPlayableInVsSurvival=True
bPlayableInEndless=True
bPlayableInObjective=False
  • KF-MAPNAME: Replace BOTH instances with your own map name.
    • Cannot have any spaces or special characters. It must also be prefixed with KF-
  • MapAssociation: 0 = Custom, 1 = Official Custom, 2 = Tripwire Official. Changing these values doesn't do anything.
  • ScreenshotPathName: See below
  • bPlayableInGamemode: True or False. If False, it wont show up in map selection. As a mapper you should not blindly make everything True; if your map is not supported make it False so you don't annoy the player downloading and playing your map.


Custom Map Preview

If you want a custom map preview you will need to include a map preview image in the map:

  1. Import your preview image to any location within your map.
    1. The preview image itself MUST be 512x256 in size and in a .TGA format.
    2. The name can be anything but again I recommend sticking with the game's naming convention of 'UI_MapPreview_MapName; I used UI_MapPreview_ZedsDiner.
  2. Double click the preview image and within the texture properties change the following (See Figure 12.1):
    1. untick SRGB. (If enabled your image may appear much darker within the game)
    2. LODGroup to UI
  3. !--T:1--> Important Important: .KFM will not keep any assets that are not used in the map when you save and close the SDK. You will need to create a Material Instance, apply the Map Preview texture to it, and place it on a mesh somewhere hidden in the map.
  4. Once you have done this save your map
  5. Add your Map's name and image's name to the ScreenshotPathName within KFWorkshopMapSummary.ini
    1. In this case the line would look like this:
      ScreenshotPathName=KF-ZedsDiner.UI_MapPreview_ZedsDiner
    2. If your image is in a group (eg: ENV_ZedsDiner_TEX), you should add this to the path name as well or you will get a warning when loading the map preview.
      ScreenshotPathName=KF-ZedsDiner.ENV_ZedsDiner_TEX.UI_MapPreview_ZedsDiner


Uploading using the Workshop Upload Tool

To access the Upload Tool, open up your Steam Library Tools and right click on the Killing Floor SDK and select 'Workshop Upload Tool'. The upload steps are pretty straight forward:

  1. Create a 'New Workshop Item'
  2. Add your map under 'Packages to Brew'
  3. If you have a 'KFWorkshopMapSummary.ini' add it to 'INIs to add'
  4. Give it a workshop title; this is what the actual steam workshop item will be called.
  5. Give a description
  6. Give a preview image, it is not required for it to successfully upload however. It is recommended to make the preview a 512x512 PNG or JPEG.
  7. Provide the appropriate Tags. IMPORTANT: As with the .INI only tick the appropriate gamemodes your map supports. If it isn't a Holdout Map or doesn't have Objective support, dont spam the tags.
  8. Click on Start once you are ready to upload

Figure 12.2 shows what the Upload tool looks like with the provided .INI and MapPreview package.


Figure 12.1: Untick SRGB and change the LODGroup to UI
Figure 12.2: What the Workshop Upload Tool should look like just before you upload

Final Words

The guide above covers all the core concepts for creating maps for KF2 and it is really up to you on how you make your map. There is surprisingly quite a lot of freedom provided by SDK so let your craziest dreams go wild!

If you have any problems, need some help or advice/feedback feel free to ask the Community, we are pretty willing to help and we don't bite. We were all just starting out at one point or another and were in the same position as you.

Official KF2 Discord: https://discord.com/invite/killingfloor

Best of luck to all new mappers!

-Delta