Slomo 2 - Sets game speed to double - Increase number to go faster Slomo.5 - Sets game speed to half - Decrease number to go slower Summon classname - Summon or spawn an instance of the specified classname (this is a package.class string). Teleport - Teleports the player to the surface they are look at. BugIt The ‘BugIt’ command is a useful console command that will take a screenshot of whatever is currently displayed on your screen and output 2 files: a bmp file and a text file. This can be used to quickly take screenshots of stuck locations, collision issues, and environment issues that are encountered on maps.
These are all the console commands that can be used in Killing Floor. Note that not all are actually useful; some are remnants of UT code.
All of those marked 'cheat' require that you first enable cheats using the enablecheats command.
All those marked 'UT' are provided by UT code, although possibly updated by the game.
- 2Commands
Binding a command to a key
To bind any command to a key simply enter the following in the console, replacing parameters where necessary:
set input <key> <command>
You may also set a command to be called when the key is released, like so:
set input Z Behindview 1 | OnRelease Behindview 0
When you exit the game, the settings will be saved to user.ini.
Commands
Cheats
These are provided in the CheatManager and KFCheatManager classes.
Command | Description | Cheat | UT |
---|---|---|---|
AllAmmo | Refills all currently owned weapons. | Yes | Yes |
AllWeapons | N/A | Yes | Yes |
ArmorUp | Gives full armor. | Yes | No |
Arsenal 0/1 | Gives all weapons. 0-None 1-MaxAmmo | Yes | No |
AssaultMe | Gives all Commando weapons. | Yes | No |
Bombs 0/1 | Gives all Demolitions weapons. 0-None 1-MaxAmmo | Yes | No |
Bond | Gives Golden Weapons Part I. | Yes | No |
Bond2 | Gives Golden Weapons Part II. | Yes | No |
Camo | Gives Camo Weapons. | Yes | No |
EnableCheats | Allows cheats to be used. Disables achievements and perk progress. | Yes | Yes |
FlameUp 0/1 | Gives all Firebug weapons. 0-None 1-MaxAmmo | Yes | No |
Flare 0/1 | Gives the Flare Revolver. 0-None 1-MaxAmmo | Yes | No |
Flares 0/1 | Gives the Dual Flare Revolver. 0-None 1-MaxAmmo | Yes | No |
FrightPack 0/1 | Gives the Fright Pack Weapons. 0-None 1-MaxAmmo | Yes | No |
God | Invincibility. | Yes | Yes |
Heal | Heals the player as if they were injected with the Syringe. | Yes | No |
Horde | Spawns a random horde of specimens. | Yes | No |
IJC | Gives the IJC weapons. | Yes | No |
ImRich | Gives £10000. | Yes | No |
LaidLAW | Gives the LAW. | Yes | No |
Meds | Gives all Field Medic weapons. | Yes | No |
MeleeMe 0/1 | Gives all Berserker weapons. 0-None 1-MaxAmmo | Yes | No |
Nails | Gives Vlad The Impaler. | Yes | No |
Pistols | Gives all pistols. | Yes | Yes |
RifleMe | Gives all rifles. | Yes | No |
SMG | Gives all sub-machine guns. | Yes | No |
Shotty | Gives all Support Specialist weapons. | Yes | No |
Sniper | Gives all Sharpshooter weapons. | Yes | No |
ZED | You've got Zed Eradication Device!. | Yes | No |
Cheats (Other)
Most or all of these are provided in the cheat-related classes but are used for debugging.
Command | Description | Cheat | UT |
---|---|---|---|
Amphibious | N/A | Yes | Yes |
Avatar | N/A | Yes | Yes |
Backup | Spawns a friendly bot (does not work). | Yes | No |
CauseEvent EventName | Triggers an event. | Yes | Yes |
ChangeSize Size | Changes player size. | Yes | Yes |
CheatView | N/A | Yes | Yes |
ClearAllDebugLines | Clears all staying debug lines. | No | Yes |
DisableNextObjective | N/A | Yes | Yes |
EndPath | N/A | No | Yes |
Fly | Allows the player to fly around the map. | Yes | Yes |
FreeCamera | Changes to free camera mode. | Yes | Yes |
FreezeAll | Stops time for everything but the player. | Yes | Yes |
FreezeFrame delay | Pauses the game after a set delay. | Yes | Yes |
Ghost | Allows the player to fly and pass through walls. | Yes | Yes |
HugeGnome | Enlarges gnomes by 20 times their original size. | No | No |
Invisible | Makes your character invisible. | Yes | Yes |
JumpMatch LadderRung | N/A | Yes | Yes |
KillPawns | Kills all pawns (doesn't seem to work). | Yes | Yes |
KillZeds | Kills all specimens. | Yes | No |
KillViewedActor | N/A | Yes | Yes |
ListDynamicActors | Outputs a list of dynamic actors to the log. | Yes | Yes |
Loaded | N/A | Yes | Yes |
LockCamera | Locks the camera in its current position and rotation. | Yes | Yes |
LogScriptedSequences | N/A | No | Yes |
MopUp | Kills all specimens. | Yes | No |
PatRage | N/A | Yes | No |
Phil | N/A | Yes | Yes |
PlayersOnly | Stops time for everything but the player. | Yes | Yes |
RememberSpot | N/A | Yes | Yes |
ReviewJumpSpots | N/A | Yes | Yes |
SetCameraDist Distance | In 3rd person view, sets camera distance from player. | Yes | Yes |
SetFlash Value | N/A | Yes | Yes |
SetFogB Value | N/A | Yes | Yes |
SetFogG Value | N/A | Yes | Yes |
SetFogR Value | N/A | Yes | Yes |
SetGravity Value | Sets gravity. | Yes | Yes |
SetJumpZ Value | Sets jump height. | Yes | Yes |
SetSpeed | N/A | Yes | Yes |
SkipMatch | N/A | Yes | Yes |
SloMo Speed | Sets the game speed. Zed time overrides this when it occurs. | Yes | Yes |
Summon Class | Spawns a specimen of the selected class where the player is pointing. | Yes | Yes |
Teleport | Teleports to the location the player is looking at. | Yes | Yes |
ViewActor | N/A | Yes | Yes |
ViewBot | N/A | Yes | Yes |
ViewClass | N/A | Yes | Yes |
ViewFlag | N/A | Yes | Yes |
ViewPlayer | N/A | Yes | Yes |
ViewSelf | N/A | Yes | Yes |
ViewTurret | N/A | Yes | Yes |
ViewZombie | N/A | Yes | No |
Walk | N/A | Yes | Yes |
WeakObjectives | N/A | Yes | Yes |
WinMatch | N/A | Yes | Yes |
WriteToLog Param | Writes Param to the log file. | No | Yes |
ruler | N/A | Yes | Yes |
Console
These are provided in the Console and ExtendedConsole classes.
Command | Description |
---|---|
AddCurrentToFavorites | Adds the current server to the favorites list. |
CLS | Clears the console. |
ConsoleClose | Closes the console. |
ConsoleOpen | Opens the console. |
ConsoleToggle | Toggles the console. |
DebugTabOrder | ? |
DLO ClassName, ClassType | Calls DynamicLoadObject() for the selected class name and type. |
DumpLoadingHints Param | Dumps loading hints for all game types. |
DumpPlayInfo Group | Dumps the settings of any playinfo objects (debugging). |
DumpRecords Type | Dumps cache records. |
InGameChat | ? |
MusicMenu | Opens the native music player. |
PlayWaitingGame | N/A |
ServerInfo | ? |
SpeechMenuToggle | Opens the voice commands menu. |
StartRollingDemo | ? |
StopRollingDemo | ? |
Talk | Opens the chat input box with the 'Say' prefix. |
TeamChatOnly | ? |
TeamTalk | Opens the chat input box with the 'TeamSay' prefix. |
Type | Opens the chat input box without the 'Say' prefix, so that console commands can be entered directly. |
HUD
Rising Storm 2 Console
These are provided in the HUD and HUDKillingFloor classes.
Command | Description |
---|---|
GrowHUD | N/A |
HideScores | Hides the tab window. |
NextStats | N/A |
ShowDebug | Shows debug information for the player. |
ShowHud | Shows/hides the HUD. |
ShowScores | Shows the tab window. |
ShowStats | N/A |
ShrinkHUD | N/A |
Debugging
These are provided natively by the engine.
Command | Description |
---|---|
ShowLog | Opens the log in a separate window, as if the game was launched with the -log command line parameter. |
Set Class, Variable, Value | Sets the value of all objects of a given class (and all of its subclasses) and the class default values themselves to Value. |
EditActor Class=Class | Displays an editable property sheet for the property values of the nearest actor of the given class. Only works in windowed mode. |
EditActor Name=Name | Displays an editable property sheet for the property values of the given actor. You may have to run the game with the -makenames command line parameter to have it assign unique names to every dynamically spawned actor. |
EditDefault Class=Class | Displays an editable property sheet for the default values of the given class. |
EditObj ObjName | Displays an editable property sheet for the given object. Like EditActor, but works for non-actor objects too. |
Admin
These are admin commands, used for managing players and the game itself. These are provided in the AdminBase class.
Command | Description |
---|---|
PlayerList | Outputs a list of players to the log. |
Kick Cmd, Extra | Kicks the selected player. |
KickBan Player | Kicks and bans the selected player. |
RestartMap | Restarts the map. |
NextMap | Loads the next map in the list. |
Map Map | Loads the selected map. |
Maplist Cmd, Extra | ? |
Switch URL | ? |
Player
Most of these functions are provided in the pawn and controller classes, and related classes.
Command | Description |
---|---|
ActivateInventoryItem InvItem | N/A |
ActivateItem | N/A |
Admin CommandLine | Executes an administrative console command on the server. |
AdminDebug CommandLine | Same as above. |
AdminGUI | N/A |
AdminLogin User, Pass | Logs in as admin. |
AdminLoginSilent User, Pass | ? |
AdminLogout | Logs out as admin. |
AdminMenu CommandLine | N/A |
AdminSay Msg | Sends a chat message to all players, as administrator. The message appears in the middle of the screen, rather than in the chat area. |
AltFire | Secondary fire. |
BasePath Num | N/A. |
BehindView bEnable | Call with true to enable 3rd person view, or false to enable 1st person. Disables perk progression and achievements. |
Bloom | Toggles bloom on/off. |
BWEffect Amount | Enables black-and-white mode, with the intensity of the effect specified as a value between 0 and 1.0. Disables perk progression and achievements. |
ChangeCharacter NewCharacter, optional inClass | ? |
ChangeTeam TeamNum | N/A |
ChatDebug | ? |
Check | ? |
CheckPriority | Shows (in the log, console, and message area) the priority of all weapons the player is holding. |
ClearProgressMessages | ? |
Command RecognizedString | ? |
CreateCameraEffect EffectClass | ? |
Crouch | Crouch. |
DisableVoiceChat | Disables voice chat. |
DropFlag | N/A |
EnableVoiceChat | Enables voice chat. |
Fire | Primary fire. |
ForceReload | Reloads the player's weapon. |
FOV Angle | Changes the camera's field of view if the value passed is 80.0 or higher. Only works in single player or as a spectator. |
FreeCamera bOn | Enables/disables freelook mode. |
GetWeapon WeaponClass | Switches to the specified weapon. See the complete list of weapon class names here. |
GetWeaponStats | N/A |
InvertLook | N/A |
InvertMouse bEnable (optional) | Inverts the mouse's Y axis. If set to true, it sets the mouse to inverted mode. If set to false, it sets the mouse to regular mode. |
IronSightZoomIn | Aims down the sights if the current weapon has them. |
IronSightZoomOut | Stop aiming down the sights. |
Join ChanName, ChanPwd | ? |
Jump Valud | N/A |
KillAll Class | N/A |
KillBots Num | ? |
L33TPhrase PhraseNum | ? |
Leave ChannelTitle | ? |
LocalTravel URL | Local-equivalent of server travel. |
Mutate MutateString | Calls each loaded mutator's Mutate() function and passes the string entered. |
NetDebugBot | ? |
NextItem | ? |
NextWeapon | ? |
Pause | Pauses/unpauses the game. |
PipedSwitchWeapon Group | Same as SwitchWeapon. |
PlayVehicleHorn HornIndex | N/A |
postfxbloom_blurmult Value | Used for adjusting bloom settings. Valid range: 1.0 - 2.0 (default 1.5). |
postfxbloom_bpcontrast Value | Used for adjusting bloom settings. Valid range: 0.0 - 4.0 (default 3.0). |
postfxbloom_gpucalcs | Used for adjusting bloom settings. |
postfxbloom_ratio Value | Used for adjusting bloom settings. Valid range: 0.0 - 1.0 (default 0.5). |
postfxbloom_ratiomax Value | Used for adjusting bloom settings. Valid range: 0.0 - 1.0 (default 0.5). |
postfxbloom_ratiomin Value | Used for adjusting bloom settings. Valid range: 0.0 - 1.0 (default 0.0). |
postfxbloom_togglegpu | Used for adjusting bloom settings. |
PrevItem | N/A |
PrevWeapon | N/A |
QuickHeal | Quickheal. |
QuickLoad | N/A |
QuickSave | N/A |
RandomTaunt | N/A |
ReloadMeNow | Reloads the player's weapon. |
RestartLevel | Restarts the map. |
Say Msg | Sends a chat message. |
SetAutoTaunt(bool Value) | N/A |
SetChatPassword(string NewPassword) | ? |
SetFlashScaling Value | ? |
SetMouseAccel Value | Sets mouse acceleration. |
SetMouseSmoothing Mode | ? |
SetName(coerce string S) | N/A |
SetSensitivity Value | Sets the mouse sensitivity. |
SetSpectateSpeed Value | ? |
SetVoice VoicePack | Sets your character's voice pack. Valid voices are KFMod.KFVoicePack, KFMod.KFVoicePackTwo, KFMod.KFVoicePackThree, and KFMod.KFVoicePackFemale. Does not seem to work online. |
SetWeaponHand Hand | Setting this to hidden hides the player's current weapon. |
ShowAI | Shows detailed debugging information for the currently viewed pawn. |
ShowAliases | Outputs a list of bind aliases to the log. |
ShowBindings | Outputs a list of bindings to the log. |
ShowFakeNotification | Shows a fake notification, used to test if notifications are working properly. |
ShowGun | Shows/hides the current weapon. |
ShowKickMenu | Opens the kick menu. Only works online when kick voting is enabled. |
ShowMenu | Shows ESC menu. |
ShowVoteMenu | Opens the voting menu. Only works online when voting is enabled. |
PlayerCollisionDebug | Shows/hides player collision areas. |
SoakBots | N/A |
SpawnTargets | N/A |
Speak ChannelTitle | ? |
SpeakDefault | ? |
SpeakLast | ? |
SpecViewGoal | ? |
Speech Type, Index, Callsign | Uses a voice command. Type should be set to AUTO, and Index to the relevant index value of the voice command you want. |
Suicide | Suicide. |
SwitchLevel URL | Changes map. |
SwitchTeam | N/A |
SwitchToBestMeleeWeapon | Switches to your best melee weapon. |
SwitchToBestWeapon | Switches to your best weapon. |
SwitchToLastWeapon | Switches to the last weapon held. |
SwitchWeapon Group | Switches to a weapon of the particular weapon group chosen. |
Taunt Sequence | N/A |
TeamSay Msg | Sends a chat message to your team only. |
TestEye | N/A |
ThrowGrenade | Throws a grenade. |
ThrowWeapon | Drops your current weapon. |
ToggleBehindView | Toggles 1st/3rd person camera mode. |
ToggleBuddyHudDebug | N/A |
ToggleDuck | Toggle duck. |
ToggleFlashlight | Toggles the flashlight. |
ToggleIronSights | Toggles iron sights. |
TogglePathToTrader | Toggles showing path to the trader. |
TogglePlayerAttract | ? |
ToggleScreenShotMode | Toggles screenshot mode, which hides the current weapon and all HUD elements. |
ToggleTorch | N/A |
ToggleXHair | N/A |
ToggleZedHudDebug | N/A |
TossCash Amount | Throws the specified amount of money, or £50 if Amount is left blank. |
UnCrouch | Uncrouches. |
Use | Uses doors or interactive items. |
xSpeech type, int Index, SquadLeader | N/A |
|
The following is a list of items that LDs and Environment Artists should follow for a map to perform well. Most of these were lessons learnt while optimizing RO2 and should also serve as a guideline for modders to make sure that they don't run into the same pitfalls.
- 1Terrain
- 2Static Meshes
- 3Materials
- 4Dynamic Actors
- 5Draw Calls
bCastDynamicShadow
This flag should be OFF. Setting this flag to ON will cast dynamic preshadows by the terrain for both per-object shadows and whole scene dynamic shadows, which can be very expensive depending on the number of dynamic primitives in the scene. Preshadows (which are dynamic shadows from the static environment onto dynamic objects) only make sense if the terrain has hills and valleys throughout the scene. If the scene just has a few mounds here and there it might be worth modeling the mounds with static meshes and have the terrain blend in at the bottom. The side effect of disabling bCastDynamicShadow is that terrain deco layers (e.g. grass) will not cast whole scene dynamic shadows. But considering that shadows from deco layers usually are low-res and don't look great, it is a good price to pay for a substantial performance boost.
Terrain Layers
The RO2 engine allows for a maximum of 12 textures to be blended for terrain. These 12 textures could be part of 2 terrain layers (6 textures each), 3 terrain layers (4 textures each), or any other combination thereof. This is a hard limit for the engine, and exceeding this limit will result in rainbow colored terrain patches. However, fetching and accessing so many textures is not cheap and since the terrain usually takes up a large portion of the screen, it is recommended that you keep the number of blend textures to a minimum.
One example for this is that say you have a terrain which comprises or dirt, rubble and snow and one part of the terrain is solid concrete. Instead of making 4 terrain layers of dirt, rubble, snow and concrete and blending between them it is more optimized if the terrain uses 3 layers of dirt, rubble and snow, and the concrete portion is modeled separately as BSP, static mesh or even another terrain actor. Doing this will reduce the overall cost of rendering the entire terrain since the concrete layer texture fetches are eliminated for the rest of the terrain that doesn't need it.
bCastDynamicShadow
When placing a static mesh in the level, you should decide whether you want it to cast dynamic preshadows or not. Preshadows are dynamic shadows from the static environment onto dynamic objects, and can be very expensive depending on the number of dynamic primitives in the scene. Turning off this flag for a lot of static meshes in the environment in the scene such as debris, rubble, etc. will improve the dynamic shadow performance.
Once the lighting in a map is finalized, you can also go through and set bCastDynamicShadow to false for all static meshes that are already in shadow (such as the truck in the following image, which is is shadow of the building) since any dynamic shadow cast by it will be drowned by the static shadow cast by the environment.
Distance Culling
Using distance culling effectively will allow you to have a lot of detail in your environment whilst still allowing the map to perform well. There are 2 ways to do this :
- You can either put a CullDistanceVolume around the map and the let the map build process choose the appropriate cull distances for the placed static meshes in the level. This method is not ideal though, and might cause certain cover objects, etc. to disappear at a distance (which is not desirable).
- Or, you can manually set the MaxDrawDistance for each object.
Using Material LODs
In order to make the best looking environment materials as well as keep the overall performance cost low, consider using material LODs. The concept is very simple - assign the best looking/highest instruction count material to the base LOD for a static mesh, and then create another LOD for the static mesh (this can have the exact same triangle count as the base LOD) and assign it a simple material that does not have expensive operations such as depth biased alpha, specularity, cube maps or even normal maps. Such subtle lighting effects cannot be perceived from a distance anyway, and will make improve the fill rate for the rendered scene.
bDisablePerObjectShadows
If you place an actor onto a level that casts dynamic shadows, the shadowing cost for it is one per object shadow and in certain cases a preshadow as well. If bDisablePerObjectShadows is set it will only cast dynamic shadows for the primitive if it is within the whole scene dominant shadow radius. This reduces the cost associated with shadowing for the primitive. If whole scene dominant shadows are not enabled, the primitive will not cast any dynamic shadows.
Red Orchestra 2 Console Commands Script
bAllowMergedDynamicShadows
If this flag is set, any primitive that allows per object dynamic shadows will be considered for being merged with other primitives that allow merged per object dynamic shadows and are close enough. As a consequence, the number of dynamic shadows in the scene are reduced.
The radius used to merge primitives is dynamically adjusted based on the distance of the primitives from the viewer. It starts at MinShadowGroupRadius (when the primitive is closest to the viewer) and increases up to MaxShadowGroupRadius (when the primitive is ShadowGroupRampCutoff away from the viewer). The rate of increase is determined by ShadowGroupRadiusRampUpFactor. For anything beyond ShadowGroupRampCutoff, the MaxShadowGroupRadius will be used. All these settings are available in the engine INI.
About Draw Calls
As the UE3 rendering engine is a Direct X 9.0 renderer, it is limited to one CPU core to tell the GPU about what to draw. It does this via a Draw Call. Each object you place in the world is at least one draw call (if not more due to shadows). The CPU can become the bottleneck of a level if it is trying to tell the GPU to draw a detailed scene and chokes on the amount of draw calls. This is why it is best to limit the amount in any given scene. With the Red Orchestra SDK it is very easy to make many types of levels, from wide open plains (or with rolling hills) to detailed interior settings and building to building fighting. However, depending on what the scale of your map is, you will be limited in the amount of 'detail' you can place in the level.
Limiting Draw Calls Per Scene
Suggested Maximum Draw Call Limit: 2000
Using the console command Stat d3d9rhi' a Level Designer/Artist (or anyone) can go through a level and find out the amount of Draw Calls and optimize based on areas where it has increased beyond the suggested maximum.
The details settings for both users and in the SDK allows Level Designers to put some objects on different levels of the setting so those with faster computers (in this case CPU core speed) can see more details without harming performance for those with slower machines. It is best to do this with 'fluff' detail that is not gameplay important but just makes the level look better overall.