[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 5.6.3 Step 3: Configuring ``map2cs'`

``map2cs'` is configured by a special configuration file called ``map2cs.cfg'`, located within the 'C:\Crystal\CS\data\config\' directory. If you need support for multiple configurations, you can use several configuration files, but for now we will restrict ourselves to just one file. Open up ``map2cs.cfg'` in you favorite editor and edit it, so it looks like the following template:

    Map2CS.TextureSettings.DefaultTexture = liquids/bubbles
    Map2CS.TextureSettings.wad1 = C:\Crystal\WADs\cstex_1.wad
    Map2CS.TextureSettings.wad2 = C:\Crystal\WADs\cstex_2.wad
    Map2CS.TextureSettings.wad3 = C:\Sierra\HalfLife\valve\halflife.wad
    Map2CS.TextureSettings.wad4 = C:\Sierra\HalfLife\valve\xeno.wad
    Map2CS.TextureSettings.wad5 = C:\Sierra\HalfLife\valve\liquids.wad
    Map2CS.TextureSettings.wad6 = C:\Sierra\HalfLife\valve\texpack.wad

    Map2CS.General.Scaling = 0.025
    Map2CS.General.UseBSP = 0
    Map2CS.General.RemoveHidden = 0
    Map2CS.General.LightScale=30

    System.ApplicationID = Map2CS

The only thing you will probably need to adjust in the supplied ``map2cs.cfg'` is the texture path (setting for ``Map2CS.TextureSettings.wad1'` etc.). If you need more wads, you need to add them as ``wad5'`, ``wad6'` and so on. If you have Quake3-style texture files, you can add them by ``Map2CS.TextureSettings.pk3=...'`, ``Map2CS.TextureSettings.pk4=...'`, and so on.

Now Windows and DOS users need to create a batch file to compile and run a map. The batch file should be stored as ``C:\Crystal\LevBuild.bat'` and contain the following commands:

    set CRYSTAL=C:\Crystal\CS
    cd CS
    map2cs ..\maps\%1.map data\%1.zip
    levtool - data\%1.zip
    walktest %1 -relight
    cd ..

From the command-line (the MS-DOS prompt for Windows and DOS users) change to the directory ``C:\Crystal'`. Type ``LevBuild.bat yourmapsname'`. Now, if everything is properly installed and you have a file ``yourmapsname.map'` in your ``maps'` directory (if you have downloaded the binary Crystal Space distribution for map making, you have), then you should see the following output:

    map2cs, Copyright (C) 1999 by Thomas Hieber

    Reading map `..\Maps\yourmapsname.map'
    Map contains:
    6 Entities
    26 Brushes
    118 Unique planes
    Writing world `data\yourmapsname.zip'
    done.

Right after that, a new window should appear, that contains the Crystal Space startup console with lots of text in it. After some time, you should have loaded you first self-compiled map.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ]

This document was generated using texi2html 1.76.