Dark Messiah of Might & Magic Tweak Guide
[Page 7] Advanced Tweaking
Dark Messiah of Might & Magic is based on a modified version of the highly configurable Source Engine - the same engine used in games like Half Life 2, CounterStrike: Source and Day of Defeat: Source. This means that there are a very large number of advanced settings available for you to alter and experiment with, beyond those included in the in-game settings. This section provides details of exactly how to do that, and lists the major command variables which will prove most useful to us in tweaking Dark Messiah. It's very important that you read this section carefully to ensure that you apply these tweaks correctly.
There are four main ways in which you can implement custom command variables (or cvars) in Dark Messiah: In the game's Console; through Config (.cfg) files; in the Steam Launch Options box; or in your game icon's Target box. These various methods usually result in the same outcome for each command, however they provide flexibility in the ways in which you can test, add, edit and remove cvars for the game. The way to access and use each method is covered below. Make sure you read through this information carefully otherwise the tweaks in the Advanced Tweaking section will not function correctly if at all:
Command Console
To enable the Dark Messiah Command Console (or 'console' for short), you will first need to go into the in-game options, and under the Keyboard tab, click the Advanced button and tick the 'Enable developer console' option. Now you can open and close the console at any time by pressing the '~' key (the key under ESC). The Dark Messiah console is a window into the game's Source engine. It allows you to see a range of information about the game and you can also use it to change the way the engine behaves.
Config Files
Dark Messiah holds many of the settings you select in the in-game options - along with a range of other custom variables - in a file called config.cfg, which can be found in your \Program Files\Ubisoft\Dark Messiah of Might and Magic\mm\cfg directory, or under \Program Files\Valve\Steam\SteamApps\[Username]\dark messiah might and magic single player\mm\cfg for those playing via Steam. This file can be opened and edited using any text editor, such as the Windows Wordpad. The config.cfg file is very important, so you should first create a backup of it before you edit it or apply any other advanced tweaks.
While you can add, edit and remove commands directly in config.cfg, it is recommended that instead you create an entirely new file for adding custom commands. To do this, in the same directory as config.cfg, right-click in an empty area and select New>Text Document. Rename this new text document to autoexec.cfg (not autoexec.cfg.txt), and you can now insert all your custom commands into this config file. By default the Source engine looks for autoexec.cfg at startup, and if it finds it, it will automatically load and execute all the valid commands. Importantly: In Dark Messiah the engine appears not to automatically execute autoexec.cfg in singleplayer mode, so you must add the line +exec autoexec.cfg to your DMOMM launch icon - see further below for more details.
For multiplayer, an autoexec.cfg file will be detected automatically, but must be inserted under the \Program Files\Valve\Steam\SteamApps\[Username]\dark messiah might and magic multiplayer\cfg\ directory.
Steam Launch Options
Dark Messiah of Might & Magic doesn't require Steam to be running when playing singleplayer, but it does require it for multiplayer, so this tip is more for DMOMM multiplayer. You can add various command variables into the launch options for Dark Messiah, ensuring that they are activated each time the game is launched. To do this, launch Steam and under the 'My Games' tab right-click on the relevant Dark Messiah entry and select Properties. In the Properties box which opens, click the 'Set Launch Options' button. You can now enter command variables in this box and they will be executed whenever Dark Messiah is launched from Steam. For Dark Messiah singleplayer the method below should be used.
Dark Messiah Icon Properties
Similar to the way you can add command variables to the Steam Launch Options for Dark Messiah multiplayer, you can add them to the Dark Messiah singleplayer startup by editing the icon used to launch the game. Right-click on the launch icon for Dark Messiah and select Properties. Under the properties, you can enter command variables in the Target box. For example:
"C:\Program Files\Ubisoft\Dark Messiah of Might and Magic\mm.exe" -novid -heapsize 1048576 +map_background none +exec autoexec.cfg
The above command line variables and parameters will launch Dark Messiah with a memory allocation of around 1GB (-heapsize 1048576), the game will also start without playing the introductory videos (-novid), will also load faster by not having the background animation in the main menu (+map_background none), and executes a custom autoexec.cfg file upon launch. You can add as many parameters and variables as will fit in the Target box, simply make sure you put a single space between each command.
Command Line Parameters
Command line parameters are commands which can only be used in the Target box of your Dark Messiah launch icon (or in the 'Set launch options' box of Steam). They cannot be used in the game's console or in your autoexec.cfg file. These are not the same as command variables which are covered on the next page, however both can be used in the command line, and the most useful of these commands are as follows:
-heapsize [Kilobytes]: This command tells Dark Messiah to allocate the specified amount of additional RAM in kilobytes to the game system heap, where it can be accessed by the game to store more game nformation and hence reducing loading pauses and stuttering. The default heapsize is 256MB (262144), however given the fact that Dark Messiah is a hugely data-intensive game (See Troubleshooting Tips for details), you should allocate a fair bit of RAM for this value. I don't recommend exceeding half your physical RAM (e.g. for 2GB of RAM set a heapsize of 1048576), and remember that 1024 KB = 1MB and 1024MB = 1GB when doing your calculations.
-console: Starts the game quickly with the console open. However this method of fast startup for DMOMM is not recommended, the best way is to add +map_background none to the command line instead, as this prevents the background image from loading up in the game's main menu, speeding up loading time and further reducing memory usage.
-width [pixels] -height [pixels]: Using these two commands you can set a custom resolution in Pixel Width x Pixel Height (e.g. -width 640 -height 480 starts Dark Messiah with 640x480 resolution). Make sure you choose a resolution supported by your monitor and with the correct ratio of width to height for your screen, otherwise the game will crash while loading or black screen.
-dxlevel [version]: Using this command allows you to restrict Dark Messiah into only using the specified DirectX version for shaders. For example, use -dxlevel 70 to force Hardware DirectX7.0 level support for shaders. This means a reduction in image quality but an increase in performance. Other values include -dxlevel 80, -dxlevel 81 and -dxlevel 90. Note that this is only useful if you choose a DirectX version which is lower than the current one supported by your graphics card. Note further that at DirectX 7.0 Dark Messiah exhibits a lot of visual glitches, whereas DirectX 8.1 is a good compromise of performance and image quality. The most noticeable differences are in a reduction/removal of shader effects like HDR, Bloom, shiny surfaces, spell effects, etc. If you can live without these, or if your graphics card is simply too slow or too old to support full DirectX 9.0 effects, then try this method. Note that forcing a dxlevel means it remains in effect - even if you remove this paramater - until you either use the autoconfig command parameter further below at least once to clear it, or manually force Dark Messiah to another DirectX level. Also see the Hardware DirectX Version option under the In-Game settings for more details.
-refresh [Hz]: Specifies the refresh rate the game will use upon loading. This is normally not required as your system should already use the optimal refresh rate at your chosen resolution. However if this is not the case you can force it to a specific refresh rate (e.g. -refresh 85). Make absolutely certain that the rate you are trying to apply does not exceed your monitor's capabilities at your chosen resolution otherwise you will get a crash or a blackscreen, especially if you change resolutions and forget to change this option.
-novid: Prevents the introductory videos from playing when loading up the game, speeding up startup time. This does not prevent in-game videos from playing, so it is safe to use.
-autoconfig: Not to be confused with an autoexec.cfg file, this parameter resets all the performance and video-related settings back to their default, ignoring any customized config settings. Use this option to clear any semi-permanent changes you've made, such as changes to the dxlevel, then remove it once done. If you leave it in your command line it will prevent customized config options in files like autoexec.cfg from working.
Notice that all of the command line parameters above have a '-' in front of them. This is because strictly speaking, these are command line parameters, not normal command variables (cvars). If you want to run any of the command variables listed on the next few pages in your icon's Target box, or in Launch Options, you can do so but you must add a '+' sign in front of them (instead of a '-'). For example, if you want to use the exec command to execute a config file at startup, you will actually have to put the command into the Target/Launch Options box in the following way:
"C:\Program Files\Ubisoft\Dark Messiah of Might and Magic\mm.exe" +exec mytweaks.cfg
In the example above, when you start the game the contents of the file mytweaks.cfg (which should be in the same directory as config.cfg will be executed.
The simple rule for using commands in the command line is that aside from the few command line-specific commands listed further above, all other command variables, such as those listed on the following pages, require a '+' sign in front of them if used in the Target box or Steam's Launch Options. Note that you must also place a single space between each separate command, and no " " (quote) marks are required around the commands. If you're after other command line paramaters, check this full list of Command Line Options.
Using Command Variable Tweaks - The Best Method
In general, the majority of the command variables you will be using will be inserted into a config file after first being tested in the console. To use a command variable in the game's console, open the console and simply type the name of the command variable. This will show you the current setting for the variable as well as its default setting. If you want to change a command variable's value, simply type the name of the variable, then a space, then the value you want to assign it. Some command variables don't require a value, and can be run simply by entering their name and pressing return. You can use the cvarlist, find, help and revert commands to search for and learn more about specific commands (See Common Commands under the Command Variables list on the next page for details of these commands).
Once you've tested the effects of specific variables in the console, if you only want to change a few you can insert them directly into your game icon's Target box or Steam Launch Options box as detailed further above. However in most cases it is better to create an autoexec.cfg file and insert all your custom command variables one under the other in that file. Note that when using command variables in autoexec.cfg, you don't need to use any '-', '+' or " " signs around the command. Simply enter the command name, followed by a space, and the value you want to assign it, just as if you were entering it into the console. However if you decide to edit or insert any settings into the config.cfg file (not recommended), you will need to use "" marks around the value assigned to any command variable. In general you should avoid editing config.cfg and use autoexec.cfg for your tweaking. Remember however to add +exec autoexec.cfg to your launch icon's target line to make it work though. An example of an autoexec.cfg file's contents is provided below to show you what it should look like:
cl_forcepreload 1
sv_forcepreload 1
r_fastzreject 1
cl_smooth 0
This autoexec.cfg file will help reduce stuttering, but it just an example. The major reason why I don't provide 'pre-tweaked' config files in my guides is that I have no way of knowing your image quality and performance preferences, not to mention precisely which hardware is on each system. There are very few commands which give extra performance without any visual quality impact and which work for all systems. Therefore I strongly urge you to take the time to read, test and compile your own list of custom command variables. It is very important to understand what you're doing rather than just being told what to do, otherwise when you inevitably run into problems you won't have any idea of what exactly is causing it or how to fix it.
Troubleshooting Command Variable Issues
If you do run into any problems with cvar changes you have made, you should note that many changes you make in the console or in your autoexec.cfg file (or any other config file) may also be recorded in the config.cfg file by the game engine and hence become 'permanent', even if you delete or alter other config files. You can either search through config.cfg and alter or delete the cvar there, or you can restore your backed-up version of config.cfg to undo all your changes. However that doesn't work for certain variables and parameters, so you will need to either go into the game's console and type the command variable with the correct value to restore it back. For example, the mat_dxlevel cvar (or the -dxlevel parameter) will change the Hardware DirectX level 'permanently' until you give it a new value, so if in doubt go into the console and change the variable back there, or use the -autoconfig parameter further above to reset things to default.
If on the other hand you find that your commands are not working, first make sure to read through the above instructions thoroughly. If the instructions are followed in detail, I guarantee that the command parameters and command variables shown will work, simply because I have tested them and I know these methods are sound. To see whether you're even using the correct commands, enter the command in the console with your chosen value, then just type the cvar name again (with no value). It should show the new value against the cvar - if not, then the command is either not being used properly, the value you want to apply is invalid, or you may not be able to change it due to your hardware capabilities. Also note that cheat commands (denoted by (cheat) next to them on the list in the following pages) can often only be enabled if the sv_cheats 1 command is first used.
In the case of the command parameters which can only be used in an icon's Target box such as heapsize, you can open the console immediately after Dark Messiah has started up and you should see some indications of their implementation. With Heapsize for example, once you open the console after Dark Messiah has just loaded you will see the amount of memory allocated to the game at the top of the console text - it should match the heapsize you set.
That covers the methods for applying advanced tweaks in Dark Messiah. The next few pages list the actual command variables which can be used.