Archive of under the Creative Commons Attribution International (CC BY 4.0) license by PCGamingWiki

STALKER: Shadow of Chernobyl Tweak Guide

[Page 7] Advanced Tweaking

STALKER's long development shows evidence of many features which have either been implemented and then disabled due to bugs, or perhaps were added towards the end of game's development cycle and are not as robust as they should be, or that the developers simply didn't want the average user to alter. Either way, there are a range of options which are not accessible via the normal in-game settings, and can only be changed via advanced tweaking. This section looks at these settings and what the major ones do. There are three primary ways to access and alter advanced settings in STALKER: the in-game console, the user configuration file, and the command line switches. Each of these is covered in the relevant section of its own on the following three pages. We start with the User.ltx file on this page.

Click to enlarge

User.ltx Settings

Your personal settings and keyboard configuration for STALKER are held in a file called User.ltx, found under the \Documents and Settings\All Users\Shared Documents\STALKER-SHOC directory in Windows XP, or the Users\Public\Documents\STALKER-SHOC directory in Windows Vista. This file is automatically loaded up each time STALKER starts, and the values in it are implemented by the game's X-Ray engine.

Fortunately you can open it with a text editor like Windows Notepad and alter the values in it, but before making any changes make sure to create a backup copy of it first. When you open the file you will see a range of settings, most of which are the same as the Console Commands covered on the next page. You can alter any of the values shown and save the file, and the changes will be implemented upon next starting up STALKER. Keep in mind the following:

  • Variables which can be completely altered using the in-game settings are not covered below.
  • I tested all the variables in the console and User.ltx file. Only major settings which affect gameplay, image quality and performance will be detailed below. Less significant settings and those which don't appear to have any practical impact are not covered below.
  • Default values aren't shown because they will differ based on the system and options being used.
  • To see what a setting does on your system, in most cases you should try it in the Command Console first to see the impacts before committing it to your User.ltx file.

  • The list below covers the major settings and what they do:

    bind [action, key] - These are your control bindings usually set under the in-game Controls options (See In-Game Settings section). To see the full list of bindable actions, use the bind_list console command first, and bear in mind that any key assigned to an action needs to have the letter k in front of it. For example to assign the space key to the jump action, you need to use bind jump kspace.

    cam_inert [0.0 - 1.0] - Controls the camera inertia, which basically determines how laggy your view will be. It should be left at 0, as values closer to 1.0 make the viewpoint laggier for no real benefit. If you're looking to disable head bobbing/swaying, see the Mods section on page 4.

    g_always_run [on,off] - By default when you move forward, your character is actually running (look at the stance animation in the bottom left corner). If this setting is changed to Off, your character will walk forward by default. This is slightly more silent, but obviously slower. Note that neither is to be confused with Sprinting, which is a very fast form of running triggered by pressing another key.

    Note: The following settings with r1_ or r2_ prefixes only have an impact under certain Render options (See In-Game Settings section). Any setting starting with r1_ only works under the 'Static Lighting' (DX8) renderer. Any setting starting with r2_ only works under the 'Objects Dynamic Lighting' or 'Full Dynamic Lighting' (DX9) renderers.

    r1_dlights [on,off] - Controls whether dynamic lighting is enabled using the Static Lighting renderer. Since Static Lighting already removes all dynamic lights, the only effect disabling this option has is to remove your torchlight, so it is not recommended.

    r1_dlights_clip [10.000 - 150.000] - Determines the distance before dynamic lights have no impact on the environment. Since the Static Lighting renderer already removes dynamic lights, this option has little to no impact except perhaps on the distance of your torchlight.

    r1_glows_per_frame [2 - 32] - Appears to control the maximum number of light sources, but in practice I've found little performance or visual impact when changing this setting.

    r1_lmodel_lerp [0.000 - 0.333] - This setting controls the Linear Interpolation (Lerp) of the lighting model. As the value is increased, it brightens some textures (e.g. look at your own gun while changing this setting), but the change is otherwise not significant.

    r1_ssa_lod_a [16.000 - 96.000] - Controls the general Level of Detail (LOD) for the game world, with the higher the value, the greater the detail and visibility of objects in the distance, but at a cost of a slight drop in FPS.

    r1_ssa_lod_b [16.000 - 64.000] - This option is similar to the one above, however it appears to control the LOD for certain types of objects within the game world. Once again the higher the value the greater the detail at the cost of some FPS.

    r1_tf_mipbias [-0.500 - 0.500] - Controls the mipmap LOD bias, which in effect determines how clear textures are in the distance. Greater negative values make distant textures far crisper and clearer, but at the cost of reduced FPS and also an increased shimmering effect. Greater positive values make things blurrier and reduce detail, but may improve FPS. Given the Anisotropic Filtering slider in the in-game settings is non-functional, this setting is the main way to control texture filtering and hence the clarity of distant textures in STALKER.

    Update: As of the 1.0004 patch the range for r1_tf_mipbias has been changed from -3.000 - 3.000 to -0.500 - 0.500.

    r2_gi [on,off] - Disabled by default, this setting appears to control whether Global Illumination is used, a form of lighting which is more realistic, in that lit surfaces then indirectly reflect on and light up other surfaces. There are a range of global illumination parameters starting with r2_gi_ you can use to alter the effect if it is enabled, such as r2_gi_refl which controls the reflectivity of lit surfaces. However enabling global illumination severely reduces FPS, so it is best left disabled on most systems.

    r2_aa [on,off] - This setting controls whether a blur-shader form of fake Antialiasing is enabled in the game or not. It is not the same as the Antialiasing slider in the game, and is not a real form of Antialiasing. It does not reduce the actual jaggedness of outlines; it masks them by blurring the screen at the cost of some FPS - you can get much the same effect (without the FPS drop) by running an LCD monitor in a non-native resolution for example. Given the in-game Antialiasing slider is essentially non-functional, and AA cannot be forced by using your graphics card's control panel either (since the game uses Deferred Shading - see the In-Game Settings section), this is the only form of AA possible for the game. You can control the level of blur used with the r2_aa_ parameters below.

    Update: You can now force standard Anti-Aliasing via the graphics card control panel - see the In-Game Settings section for details.

    r2_aa_kernel [0.300 - 0.700] - This setting controls the overall blur effect used for the fake Antialiasing if the r2_aa option is enabled. The higher the value, the greater the blur effect used. Enabling fake AA and setting this option to 0.3 provides a reasonable fake AA effect without too much blur.

    r2_aa_break [0.000000 - 1.000000,0.000000 - 1.000000,0.000000 -1.000000] - This setting appears to control the distance at which the fake AA effect operates. The higher the values used, the further away the effect will be implemented. However because the values are vector-based, setting them all to maximum doesn't necessarily ensure the best result. Experiment to see which values suit your needs (e.g. r2_aa_break 0.000000,1.000000,0.000000 gives sharp close imagery and blurred distance imagery)

    r2_aa_weight [0.000000 - 1.000000,0.000000 - 1.000000,0.000000 - 1.000000] - This setting provides more precise control over the strength of the blurring effect. The higher the values used, the more blurring will be implemented, but again note the values are vector-based.

    r2_allow_r1_lights [on,off] - Enabling this option appears to enhance existing lighting with DX8 lighting. This results in unrealistically bright lighting effect and a drop in FPS, so there should be no reason to implement it.

    r2_gloss_factor [0.000 - 10.000] - This setting appears to control the specularity of objects, that is how much they shine and reflect light. The higher the value used, the greater the general gloss on surfaces, at the cost of some FPS. For the most part the default value provides a good level of realistic gloss, though you may wish to fine-tune it.

    r2_ls_bloom_fast [on,off] - This option controls whether an enhanced form of Bloom lighting effect is used in the game. If this option is enabled the enhanced bloom effect will be turned on and will appear quite exaggerated - everything will appear much brighter and hazier. Performance is not greatly affected by this setting. The game already uses HDR lighting by default when the DX9 renderer is enabled, this setting merely enhances the existing bloom effect of the HDR, it doesn't replace HDR with Bloom. Note however that you don't need to turn this option on to use the various r2_ls_bloom_ settings below. See below as well as the In-Game Settings section for more details.

    r2_ls_bloom_kernel_b [0.010 - 1.000] - Most noticeable if fast bloom is enabled (though fast bloom is not required for it to work), this option appears to control the level of blurring associated with the bloom effect. The higher the value, the more blurring/haziness will be used in the game world's lighting.

    r2_ls_bloom_kernel_g [1.000 - 7.000]

    r2_ls_bloom_kernel_scale [0.500 - 2.000]

    r2_ls_bloom_speed [0.000 - 100.000]

    In my testing the settings above don't appear to have a discernable impact on the lighting in general, however if you have firm practical details on exactly what they do, please let me know.

    r2_ls_bloom_threshold [0.000 - 1.000] - This setting controls the level of the lighting effect used throughout the game by default, whether or not you have the r2_ls_bloom_fast option enabled. Higher values reduce the brightness of the bloom effect used along with the HDR, such that at 1.000 the game appears similar to the DX8 lighting (but with dynamic lights). You can experiment with altering this value, both with and without fast bloom to achieve a desirable result. For example try Fast Bloom on and a value of 0.350 for this setting to arrive at a slightly more atmospheric look in the game world.

    r2_ls_depth_bias [-0.500 - 0.500] - This setting determines how far the visible light from light sources shines. Lower values increase the depth/boundary of the light cast, any values above 0 essentially clip (remove) the light cast totally. Best left at its default setting.

    r2_ls_depth_scale [0.500 - 1.500] - Similar to the setting above, the practical impact of changing this setting is alter the amount of light cast from light sources, and the resulting impact on shadows. Lower values reduce the light cast and make shadows disappear - this is best kept at its default.

    r2_mblur [0.000 - 1.000] - This option controls motion blurring in the game. However to have it function, you will first need to use the -mblur command line switch on your STALKER launch icon (see page 9 for details), and then you can see the effects of changing this variable. A value of 1.0 (which I personally use) shows noticeable blurring as you turn around, while a value of around 0.1 provides a minor amount of blurring wth no real drop in FPS. Experiment to see what suits you best. Thanks to Eik Corell for the tip.

    r2_parallax_h [0.000 - 0.500] - This setting appears to control Parallax Mapping, a technique used to further improve the appearance of depth on surfaces. However in my experimentation changing this setting had no visual or performance impact. People claim that raising this setting to a value of 0.04 has helped them improve performance, so you may wish to try this as it should cause no harm or discernable image quality loss.

    r2_slight_fade [0.020 - 2.000] - I am unsure as to what exactly this setting controls, and testing reveals no real image quality or performance impact. However others claim that raising this setting can improve performance, so give it a try.

    r2_ssa_lod_a [16.000 - 96.000] - Controls the Level of Detail (LOD) for the game world, with the higher the value, the greater the detail and visibility of objects in the distance, but at a cost of a slight drop in FPS.

    r2_ssa_lod_b [32.000 - 64.000] - This option is similar to the one above, however it appears to control the LOD for certain objects. Once again the higher the value the greater the detail at the cost of some FPS.

    r2_sun [on,off] - This setting controls whether the Sun is enabled as a light source or not, hence it is the same as the 'Sun Shadows' in-game setting (See In-Game Settings section). However if the Sun is enabled, there are also a range of settings starting with r2_sun_ you can use to control various aspects of the Sun's lighting and appearance. Only the more practical of these is covered below.

    r2_sun_depth_far_bias [-0.500 - 0.500]

    r2_sun_depth_far_scale [0.500 - 1.500]

    r2_sun_depth_near_bias [-0.500 - 0.500]

    r2_sun_depth_near_scale [0.500 - 1.500]

    These settings essentially control the level of detail of the shadows cast by the sun, and the boundary of the sun's light and shadow areas. Higher values result in more areas of shadow, negative values result in less shadow. The defaults are generally recommended as best.

    r2_sun_details [on,off] - It is worth mentioning that this setting is actually the same as the Grass Shadows in-game option.

    r2_sun_lumscale [-1.000 - 3.000] - Determines the level of luminosity (brightness) of the sun's light, with values of zero or below essentially turning off the Sun.

    r2_sun_lumscale_amb [0.000 - 3.000] - This setting controls the ambient (indirect) lighting caused by the Sun. Lower values result in darker overall visuals, higher values brighten up the surrounding area without increasing the direct light from the Sun.

    r2_sun_near_border [0.500 - 1.000] - This setting affects sun shadows, however importantly altering this setting can fix a shadow glitch which some people see, especially at widescreen resolutions. Setting this to a value of 0.8 or 1.0 can be a workaround to resolving the shadow glitch.

    r2_tf_mipbias [-0.500 - 0.500] - Controls the mipmap LOD bias, which in effect determines how clear textures are in the distance. Greater negative values make distant textures far crisper and clearer, but at the cost of reduced FPS and also an increased shimmering effect. Greater positive values make things blurrier and reduce detail, but may improve FPS. Given the Anisotropic Filtering slider in the In-Game Settings is non-functional, this setting is the main way to control texture filtering and hence the clarity of distant textures in STALKER.

    Update: As of the 1.0004 patch the range for r2_tf_mipbias has been changed from -3.000 - 3.000 to -0.500 - 0.500.

    r2_tonemap [on,off] - This option controls whether Tone Mapping is used in STALKER. Tone Mapping will help improve the appearance of the HDR used in the game, reducing contrasts and highlighting details as necessary to keep the image more realistic. It is recommended that you keep this option enabled, as disabling it gives no real boost to FPS. With tone mapping enabled, you can alter the appearance of the HDR in the game by using the settings further below. The r2_tonemap_middlegray setting in particular has the most noticeable impact on the HDR effect.

    r2_tonemap_lowlum [0.000 - 1.000] - This setting controls the effect of tone mapping on darker areas. The higher this setting, the darker the overall appearance of HDR will be. In general it is best left at its default.

    r2_tonemap_middlegray [0.000 - 2.000] - This setting has the most discernable impact on HDR, and as its value is raised, the HDR effect because more prominent and rich. For example try a value of 1.2 to see the HDR in STALKER look more like that used in games like Oblivion.

    r__supersample [1 - 4]

    r__tf_aniso [1 - 16]

    Just a note regarding the above two settings - they are associated with the Antialiasing and Anisotropic Filtering sliders in the in-game settings, however neither appear to have any real impact on image quality or performance in the game. The r2_aa and r2_tf_mipbias settings further above are the ones which actually have practical control over AA and AF in STALKER.

    rs_stats [on,off] - When set to On, displays a range of game statistics, including the Frames Per Second (FPS) counter in the top left corner of the screen. In most cases though it is easier just to use the free Fraps utility to measure framerate in STALKER.

    snd_acceleration [on,off] - This setting purportedly controls whether hardware accelerated sound is used in the game when on, or whether software sound is used when off. However in testing this setting it doesn't appear to impact on the actual use of sound acceleration.

    snd_cache_size [4 - 32] - This setting controls the size of the sound cache, a portion of memory used to hold sound effects for quicker loading. A setting of 4 equates to an 8MB cache, while the maximum value of 32 is equal to a cache of 64MB in size. In general you should set this to the highest value possible (32), so that more sounds are cached and there is less in-game loading/stuttering.

    snd_efx [on,off] - This option is meant to enable or disable sound effects, however changing this setting, even after the use of the snd_restart command or a restart, appears to have no impact.

    snd_targets [4 - 32] - This setting appears to determines the number of audio channels used, with the greater the channels specified, the more distinct sounds you can hear, but the lower your overall performance.

    vid_mode [WxH] - Controls the Resolution used for the game, as set under the Resolution option in the in-game settings. Here however you can try setting a custom resolution by entering it in the correct WxH format (e.g. 1280x960 or 640x480) - as long as your monitor supports it. Note that you will have to use the vid_restart console command to implement the change if using this command in the console.

    That covers all the major settings in User.ltx which appear to have some practical worthwhile function. After extensive testing of all the variables, some of the more interesting-sounding commands seem to have no impact whatsoever, so that is why you may see them missing from the list above. If you believe an important working setting has been omitted, or any of the descriptions above are inaccurate, please Email Me with details, so I can keep this list as up-to-date and accurate as possible.

    The next page continues the Advanced Tweaking by examining the Console Commands.