Page tree
Skip to end of metadata
Go to start of metadata

Introduced in



Description:Sets selected video options.


Syntax:setVideoSetting [option,value]
  • option: String - Supported options:
    • "objectDetail": (0-4) (V1.23+)
    • "objectDrawDistance": (500-10000) (V1.23+)
    • "postprocessDetail": (0-2) (V1.67+, but not V.2.00+)
    • "screenResolution": Followed by two parameters: width, height. Supported only in full-screen mode, and only for supported resolutions. List of supported resolutions is provided by getSupportedResolutions (V1.48+). In V2.05+, two more parameters can be defined: width, height, render percentage, windowed. Render percentage defines the rendering resolution in relation to the screen resolution - for example, [1280,720,50,true] sets up a 1280x720 windowed mode with a rendering resolution of 640x360. Possible percentages are 50, 67, 75, 80, 83, 88, 100, 114, 120, 125, 133, 150, and 200; windowed defines whether the display is shown in windowed or full-screen mode. Windowed screen resolutions can be anything, and are not restricted to getSupportedResolutions. Does not automatically adjust the aspect ratio, if the new resolution requires that.
    • "shadingDetail": (0-4) (V1.67+, but not V.2.00+)
    • "shadowDetail": (0-4) (V1.67+, but not V.2.00+)
    • "shadowDistance": Maximum shadow distance.
    • "shadowsCamHeightCoef": Computing the shadows drawing distance from the camera height above the ground. Draw distance is calculated as height * shadowsCamHeightCoef (V1.31+). 
    • "terrainDetail": (0-4) (V1.67+, but not V.2.00+)
    • "viewDistance": (10-10000 in V1.23+), (500-10000 in V3.6+) In V3.2+, all video settings from the options dialog can be defined using the command. If setViewDistance is already used, viewDistance does not have any effect (in single-player and multiplayer).
    • "anisotropicFiltering" (0,1,2,3,4)
    • "AToC" (0,1,2,3)
    • "blood" (0,1,2)
    • "bloom" (0,1)
    • "brightness" (0.5 - 1.5)
    • "caustics" (0,1,2)
    • "depthOfField": Depth of Field (0,1,2)
    • "dynamicObjectViewDistance" (0,1)
    • "dynamicViewDistance" (0,1)
    • "fsaa" (0,1,2...) (depends on video card)
    • "gamma" (0.5 - 2.0) (only has an effect in full-screen mode)
    • "godrays": Crepuscular rays (0,1)
    • "hdrquality" (0,1,2)
    • "motionBlur" (0,1)
    • "objectsDetail" (0,1,2,3,4)
    • "particleQuality": Particle Effects Detail (0,1,2),
    • "ppaa": Postprocess Antialiasing (0,1,2,3,4,5,6,7,8)
    • "rttCount" (0,1,2,3)
    • "rttQuality" (0,1,2,3)
    • "sceneDetail" (0,1,2,3,4)
    • "scriptedPostProcess" (0,1)
    • "shadowQuality" (0,1,2,3)
    • "ssao": Screen space ambient occlusion (0,1,2,3)
    • "terrainDetail" (0,1,2,3,4)
    • "textureQuality" (0,1,2,3)
    • "videoMemory" (0,1,2,3,4)
    • "vsync" (0,1), V3.4+: (0,1,2)
    • "waterReflections" (0,1,2,3,4)

       In V3.6+, the following settings have been added:
    • "damageCharring" (0,1): Darkening of vehicle parts that are damaged (or the whole vehicle if no sub-systems are defined).
    • "vehComplexityScale": Used for managing vehicle LOD rendering. The higher the value, the greater the complexity of the vehicle compared to other objects. Values < 1 cause lower LODs to be displayed. Values > 1 cause lower LODs to be displayed at a bigger distance from the camera (default: 1, V3.8.1+).
    • "maxMapObjectLOD": Allows the user to specify the best LOD used for map objects (default: 0, no limitation) (V17.2.0+).
    • "particleDensity": Affects the amount of particles generated by particle sources. When set to 1, no change is applied. When set, for example, to 2, the amount of generated particles is doubled. If set to 0.5, only half of the particles is being generated (the minimum value is 0.01) (V17.2.0+).
    • "particleDrawDistance": Can be used to modify the maximum distance from the camera, where the particles are created. When this option is not set, or is set to a negative value, object draw distance is used instead (the option value is used only if it is set to 0 or above). Particle Draw Distance is not limited by ObjectDraw Distance. After changing ObjectDraw Distance ParticleDraw Distance get reseted. (20.2+)
  • value: Number - One or more values, depending on option. The possible values listed correspond to the options of the in-game drop-down menus (for example, "blood" (0,1,2) corresponds to ("disabled", "low", "high")).
Return Value:Nothing


setVideoSetting ["shadowDistance",1000]

setVideoSetting ["screenResolution",1600,1024]

setVideoSetting ["screenResolution",1024,768,100,true]

Demo mission that shows the effect of different view distance settings:

Additional Information

See also: getVideoSetting, setRoadDrawDistance, setWindowedMode, forceRender


The max input values for:

  • objectDrawDistance
  • viewDistance

are 10000 by default. However, the setting "MaxViewDistance" can be defined within the vbs2.cfg file, and its value is used instead as the max input value for these two settings. In this way, you could use a number greater than 10000 for the input of this command. --General Barron 02:24, 7 April 2009 (CEST)