Results 1 to 22 of 22

Thread: Command line switches

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Config File & .cfg Switching

    The config file

    The medieval2.preference.cfg file that you can find in your M2TW directory has a lot of settings that can be used to enhance modding or customize your game.
    The primary uses for it in modding are presumably as a mod switcher (together with a .bat file, explained later), to enable the battle editor, and to set error tracking, but there are some further options that you can enable.
    Please note: The following code snippets should be inserted into your .cfg file. If two snippets belong to the same section (sections headers are the words in square brackets), the second section header can (and should) be omitted.

    This file should not actually be modified, because according to wilddog the game will overwrite it again. To create a permanent custom configuration, follow the instructions mentioned below under ".cfg Switching".


    Bug Tracking

    To enable the error logging functions of MTW2, add:
    Code:
    [log]
    to          = logs/system.log.txt
    level       = * error
    The following gives a lot of info that won't be very useful for the average modder, but if the error logging doesn't help you, try it:
    Code:
    [log]
    to          = logs/system.log.txt
    level       = * trace
    You can further use both level statements in the same file in which case the last setting will be used. As an example, providing:
    Code:
    [log]
    to          = logs/system.log.txt
    level       = * trace
    level       = * error
    Will do the same as if you only supplied level = * error.


    Battle Editor

    To enable the battle editor, simply add these two lines:
    Code:
    [features]
    editor = true
    Faction Unlocking

    These few lines will unlock all playable factions in your campaign:
    Code:
    [misc]
    unlock_campaign = true

    Running in a Window

    To run the game in a window (same as the "-ne" switch in RTW), add:
    Code:
    [video]
    windowed = true

    Disabling the Videos

    If you want to disable the movies for the game ("-nm" switch in RTW), use:
    Code:
    [video]
    movies = false


    .cfg Switching

    The .cfg switching mechanism allows you to use different game configuration.
    To start the game using a different config file, you have to create a new batch file (create a new text file and rename the file extension to .bat) in your MTW2 directory, that looks like this:
    Code:
    medieval2.exe @mod.cfg
    Then create a copy of your medieval2.preference.cfg, rename it to mod.cfg (you can use any name here, just remember to also change it in the .bat file) and make your changes. Then create a shortcut to your newly-created .bat file and enjoy the game.


    Mod Switching

    This method can be used as a very efficient mod switching mechanism:
    Proceed as above, but before saving your .cfg file, add the following:
    Code:
    [features]
    mod = mymodfolder
    The mymodfolder is a placeholder for your personal mod folder, so say you have a mod called "Fishpants", then create a subfolder inside your MTW2 directory called "Fishpants", then add "mod = Fishpants" to your configuration file.
    A mod directory will require the data/world/maps/base and data/world/maps/campaign/imperial_campaign folders to work and data/sounds/events.idx and data/sounds/events.dat in order to include sounds.
    It should supercede any packed files, but that may actually only be the case after the unpacking tool has been released by CA.
    Last edited by alpaca; 10-29-2007 at 18:12.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO