Console Commands - DarklightGames/DarkestHour GitHub Wiki

Team Indices

Some commands below require you to provide a team index. This is a numeric value that refers to either Axis or Allied team (or both of them):

  • Axis: 0.
  • Allies: 1.
  • Both or Neutral: 255 (not all commands that accept a team index support this).

Administrative

AdminLogin <Username:String> <Password:String>

Logs in as administrator.

AdminLoginSilent <Username:String> <Password:String>

Logs in as administrator silently.

AdminLogout

Logs out as administrator.

Admin <Command:String...>

Runs a command as the administrator. This is required for running server-side commands from the client (eg. ResetGame etc.).

Server-Side Commands

Round Settings

ResetGame

Starts a 10 second countdown, then resets the round.

SwapTeams

This function will initiate a reset game with swap teams

MidGameVote

Initiates the mid game vote.

WinRound <TeamToWin:Int>

Ends the round in favor of the specified team.

Timers

Timer modifiers accept an optional "operation type" parameter. If omitted, the function will set the time to the provided value.

Operation types:

  • set (default)
  • add
  • subtract

ChangeRoundTime <Minutes:Int> [OperationType:String]

This function is for admins who want to change round time on the fly.

ChangeSetupPhaseTime <Minutes:Int> <Seconds:Int> [OperationType:String]

Modifies the duration of the setup phase. This function is only valid during the setup phase.

Examples:

  • Increase the time by 30s: ChangeSetupPhaseTime 0 30 Add
  • Set the time to 5:04: ChangeSetupPhaseTime 5 4

Team Ratios

SetAlliesToAxisRatio <Value:Float>

Function for changing the Allies to Axis ratio for testing and real time balance changes.

SetHardTeamRatio <Ratio:Bool>

Function for changing bHardTeamRatio in real time.

Reinforcements

SetReinforcements <Team:Int> <Amount:Int>

Changes the amount of available reinforcements.

SetReinforcementInterval <Team:Int> <Amount:Int>

Function for changing a team's reinforcement interval.

SetAttrition <Enabled:Bool>

Toggles the reinforcements attrition.

NOTE: This function won't have an effect until the next NotifyObjStateChanged() call, i.e. you won't be able to enable/disable the attrition after the last objective has been captured. Use with care during a live game!

Objectives & Danger Zone

CaptureObj <Team:Int>

Captures a currently active objective (for the supplied team). Useful for debugging.

ShowDebugMap

Toggles an overlay on the overview map that displays NE and SW map bounds, as well as spawn and objective indices and DZ modifier values of objectives.

SetDangerZone <Enable:Bool>

Toggles the danger zone on and off.

SetDangerZoneNeutral <Factor:Byte>

Adjusts the size of the neutral zone (range: 0..255, default: 128).

SetDangerZoneBalance <Factor:Int>

Shift the balance between axis and allied zones (range -127..127, default: 0).

SetInfluence <InfluenceType, Index, Value>

Modify DangerZone influence values of an individual objective. InfluenceType is value to modify (a=All, b=Base, n=Neutral, ax=Axis, al=Allies), Index is the objnum of the desired objective to modify (Run ShowDebugMap command beforehand to display objective/spawn indices and current values), Value is the new modifier value.

DebugObjectiveSpawnDistance <Distance:Int>

Change the objective spawn distance threshold value. The distance value is in meters.

Miscellaneous

DebugSetRoleLimit <Team:int> <RoleIndex:Int> <NewLimit:Int>

Quick test function to change a role's limit. Doesn't support bots.

Debugging

Stat <All|Audio|FPS|Game|Hardware|Net|None|Render>

Displays debugging stats related to various game subsystems.

FixedVisibility

Fixes the engine's visibility from your current point of view. You can walk around and see what exactly is being drawn, check that antiportals are working, object cull distances, etc. Useful for visualizing and identifying areas that need culling optimization. Enter it again to turn it off.

RMode <Mode:Integer[0..7]>

Changes the rendering mode. The default render mode is 7.

Slomo <T:Float>

Sets the time dilation of the game logic, where a T of 1.0 is normal speed, 2.0 is twice normal speed, 0.5 is half normal speed etc.

⚠️ **GitHub.com Fallback** ⚠️