Console commands

From Derail Valley Wiki
Jump to navigation Jump to search

Derail Valley has a developer console where you can type commands to perform different actions. Some of them can also be accessed in the settings, some are mostly only useful for the developers, but some can be used to tweak the game to your liking. By default, the keybind to bring up the console is `.

List of console commands

Controls

Command Description
Controls.Bind

bind

Sets bindings for a key. Usage example: bind teleport F
Controls.ShowBinds

showbinds

Shows current key bindings
Controls.ResetBinds

resetbinds

Resets current key bindings to default

Graphics

Command Description
Graphics.AnisitropicFiltering Disable/enable/force anisotropic texture filtering (0, 1, 2)
Graphics.Antialiasing Antialiasing level (0, 2, 4, 8)
Graphics.AsyncUpload.BufferSize See Unity docs for QualitySettings.AsyncUploadBufferSize (2-512)
Graphics.AsyncUpload.TimeSlice See Unity docs for QualitySettings.AsyncUploadTimeSlice (1-33)
Graphics.LodBias LOD distance multiplier (float)
Graphics.MasterTextureLimit Texture MipMap limit, each value cuts texture quality into half (int)
Graphics.MaxQueuedFrames Maximum number of frames queued up by graphics driver (int)
Graphics.ParticleRaycastBudget Limits number of collision tests per frame for particles (int)
Graphics.PixelLightCount The maximum number of pixel lights that should affect any object (int)
Graphics.RealtimeReflectionProbes Enable/disable realtime reflection probes (bool)
Graphics.Shadow.Cascades Number of shadow cascades for directional lights (1, 2, 4)
Graphics.Shadow.Distance Shadow drawing distance (float)
Graphics.Shadow.Projection Directional light close/stable shadow projection (0, 1)
Graphics.Shadow.Resolution Shadow resolution (0-3)
Graphics.Shadow.Mode Off / Hard only / Hard & Soft shadows (0, 1, 2)
Graphics.StreamingMipmaps.Active Enable/disable texture mipmap streaming (see also StreamingMipmapsAddAllCameras) (bool)
Graphics.StreamingMipmaps.AddAllCameras Enable/disable texture mipmap streaming on all enabled cameras (bool)
Graphics.StreamingMipmaps.MaxFileIORequests Limits number of file IO requests for texture streaming (int)
Graphics.StreamingMipmaps.MaxLevelReduction Maximum number of mipmap levels to discard for each texture (int)
Graphics.StreamingMipmaps.MemoryBudget Total amount of memory to be used by streaming and non-streaming textures (float)
Graphics.StreamingMipmaps.RenderersPerFrame Limits number of renderers per frame used for calculation of mipmap levels (int)
Graphics.VSyncCount Number of VSyncs that should pass between each frame (0-4)
Graphics.TerrainShadows Enable/disable terrain shadows
Graphics.TerrainsRendering Enable/disable rendering terrains
Graphics.DeferredAA Set deferred anti-aliasing mode (0, 1, 2, 3)
Graphics.SoftTAA Set TAA to be softer-looking, can help with screenshots
Graphics.TweakTAA Set TAA parameters, run without arg to get a list, run without value to get current state, or with multiple values in a row to set all at once
Graphics.ExposureCompensation View or set current exposure compensation value from the global postprocessing object
Graphics.KillVolumetrics Disable all volumetric props
Graphics.RestoreVolumetrics Restore all volumetric props
Graphics.LightsRange Set lights range
Graphics.LightingQuality Set lighting quality (0, 1, 2)

Textures

Command Description
Texture.allowThreadedTextureCreation Allow Unity internals to perform Texture creation on any thread (rather than the dedicated render thread)
Texture.currentTextureMemory The amount of memory that all Textures in the scene use
Texture.desiredTextureMemory The total size of the Textures, in bytes, that Unity loads if there were no other constraints. Before Unity loads any Textures, it applies the memory budget which reduces the loaded Texture resolution if the Texture sizes exceed its value. The desiredTextureMemory value takes into account the mipmap levels that Unity has requested or that you have set manually.

For example, if Unity does not load a Texture at full resolution because it is far away or its requested mipmap level is greater than 0, Unity reduces the desiredTextureMemory value to match the total memory needed. The desiredTextureMemory value can be greater than the targetTextureMemory value.

Texture.GenerateAllMips Can be used with Texture constructors that take a mip count to indicate that all mips should be generated. The value of this field is -1.
Texture.nonStreamingTextureCount The number of non-streaming Textures in the scene. This includes instances of Texture2D and CubeMap Textures. This does not include any other Texture types, or 2D and CubeMap Textures that Unity creates internally.
Texture.nonStreamingTextureMemory The amount of memory Unity allocates for non-streaming Textures in the scene. This only includes instances of Texture2D and CubeMap Textures. This does not include any other Texture types, or 2D and CubeMap Textures that Unity creates internally.
Texture.streamingMipmapUploadCount How many times has a Texture been uploaded due to Texture mipmap streaming.
Texture.streamingRendererCount Number of renderers registered with the Texture streaming system.
Texture.streamingTextureCount Number of streaming Textures.
Texture.streamingTextureDiscardUnusedMips Forces the streaming Texture system to discard all unused mipmaps instead of caching them until the Texture memory budget is exceeded. This is useful when you profile or write tests to keep a predictable set of Textures in memory.
Texture.streamingTextureForceLoadAll Force streaming Textures to load all mipmap levels.
Texture.streamingTextureLoadingCount Number of streaming Textures with mipmaps currently loading.
Texture.streamingTexturePendingLoadCount Number of streaming Textures with outstanding mipmaps to be loaded.
Texture.targetTextureMemory The total amount of Texture memory that Unity allocates to the Textures in the scene after it applies the memory budget and finishes loading Textures. targetTextureMemory also takes mipmap streaming settings into account. This value only includes instances of Texture2D and CubeMap Textures. It does not include any other Texture types, or 2D and CubeMap Textures that Unity creates internally.
Texture.totalTextureMemory The total amount of Texture memory that Unity would use if it loads all Textures at mipmap level 0.This is a theoretical value that does not take into account any input from the streaming system or any other input, for example when you set the Texture2D.requestedMipmapLevel manually.To see a Texture memory value that takes inputs into account, use desiredTextureMemory . totalTextureMemory only includes instances of Texture2D and CubeMap Textures. It does not include any other Texture types, or 2D and CubeMap Textures that Unity creates internally.
Debug.ToggleCouplingHoseDebugGUI Enable/disable coupling hoses debug stats

Languages

Command Description
Lang.Dirs Prints all dirs specified in LocalizationLoader.LocalizationDirs
Lang.Fetch Downloads localization CSVs from all URLs defined in sources.json files,which are looked for in dirs specified in LocalizationLoader.LocalizationDirs

The format of JSON content is:

{'filename.csv': 'https://url/to.csv','another.csv': 'https://...'}

Lang.Reload Reloads localization .csv files and loads current scene again
Lang.Set Change localization to given language name. If a second argument is passed (any value) it will also do Lang.Reload
Lang.RunTestScene Runs the localization test scene

Physics

Command Description
Physics.Toggle Enable/disable physics

Debug

Command Description
Debug.NumCars Prints number of train cars in the world
Debug.ToggleTrackIndicators Enable/disable track ID indicators above station tracks
Debug.MaxJobsPerStation Sets maximum number of procedural jobs created in stations
Debug.DestroyBuggedObjects Destroys objects that have NaN position, should fix short tele-grab
Debug.SleepAllItems Force all items/props physics to sleep
Debug.DestroyAllItems Destroys all props/items (can be game-breaking)
Debug.DeleteCarsAndJobsSaveData Deletes all existing cars, jobs and clears cars/jobs savegame data
Debug.TeleportToPoint Teleports the player to a specific x,z coordinate on the map (value range 0-16384)
Debug.TeleportToPointNormalized Teleports the player to a specific normalized x and normalized z coordinate on the map (value range 0-1)
Debug.PrintPlayerPosition Prints player's current coordinates in the world
Debug.TrainOptimizationStatus Shows number of sleeping / awaken cars
Debug.RemoveAllLicenses Removes all licenses. Use when you are not on any job
Debug.SetSunYRotation Sets sun Y rotation (0 - 360)
Debug.SetSunXRotation Sets sun X rotation (0 - 360)
Debug.LoadingAlertsToggle Toggles loading area and car spawning alerts
Debug.AutoSavingEnabled Toggles auto-save
Debug.AutoSaveNow Forces a auto-save
Debug.QuickSaveNow Forces a quick-save
Debug.ManualSaveNow Forces a manual save
Debug.ErrorPingToggle Toggles playing of error sound
Debug.NumberOfCarsPerCarType Lists number of cars per each car type
Debug.UnloadUnusedAssetsToggle Toggles freeing up memory when loading new area (frees up more RAM, but causes stutter)
Debug.ForceUnloadUnusedAssets Calls Resources.UnloadUnusedAssets() method.
Debug.GCCollect Calls GC.Collect() method.
Debug.GCCollectIncremental Calls GarbageCollector.CollectIncremental() method with desired duration (in ms).
Debug.Telemetry Record in-game train car telemetry that will be saved to disk when derailing, for later analysis.
Debug.SaveTelemetry Save current telemetry data, with an optional string prefix for easier identification. Look for new files in app data folder afterwards.
Debug.InventoryEventDebug Enables logging of inventory event debug

Oculus

Command Description
Oculus.RenderScale View/set Oculus SDK render scale min & max values (float [, float])

Player

Command Description
Player.MoveToLastGoodPosition Moves player to where it was last in contact with the terrain
Player.FOV Sets camera field of view. Default is 50, valid range is 30-120.

Screenshots

Command Description
ScreenshotTaker.Enable Enable screenshot taker tool
ScreenshotTaker.Supersize Resolution multiplier

Vegetation

Command Description
Veg.Toggle Enables/disables vegetation (re-enabling might not work yet)
Veg.LodFactor LOD factor (0-5)
Veg.Distance.Grass Grass & small plant distance (0-800)
Veg.Distance.Tree Additional tree distance (0-3000)
Veg.Distance.Billboard Additional billboard distance (0-20000)
Veg.Density.Grass Grass density (0-2)
Veg.Density.Plant Small plant density (0-2)
Veg.Density.Tree Tree density (0-2)
Veg.Density.Object Object density (0-2)
Veg.Density.LargeObject Large object density (0-2)
Veg.Shadows.Grass Grass shadows (bool)
Veg.Shadows.Plant Small plant shadows (bool)
Veg.Shadows.Tree Tree shadows (bool)
Veg.Shadows.Object Object shadows (bool)
Veg.Shadows.LargeObject Large object shadows (bool)
Veg.Shadows.Billboard Billboard shadows (bool)
Veg.Debug.WaitFrames Number of frames to wait between (un)loading terrain tiles (int)
Veg.Debug.RefreshVegetation Refreshes Vegetation
Veg.Debug.RefreshVegetationLocal Refreshes vegetation cells within a given range around the player. Uses range of 20m if no argument is passed