Mapping/Compile

From UFO:AI

Contents

General

We use modfied bsp and rad tools that comes with quake2. UFO:AI doesn't need vising of a map. If you don't know what i'm talking about, read on below.

Errors

  • mixed face contents
Example: Entity 0, Brush 12: mixed face contents
All brushsides should have the same content and surfaceflags set - but there may be exceptions like nodraw faces
  • MAX_POINTS_ON_WINDING
this happens if more than the allowed number of brushes touches one brush - e.g. a long stair
  • MAX_MAP_LIGHTING
this means that there are "too many lightmap pages". Concretely, this may happen if there are too many surfaces in the map, or textures scaled too small.

Parameters

Default 'make maps' target uses -nice 19 -extra. Flags as of trunk svn revision 15110 :

-bounce <num>            : light bounces
-block num num           :
-blocks num num num num  :
-chop                    :
-direct                  :
-draw                    :
-dump                    :
-extra                   : extra light samples
-entity                  :
-fulldetail              : don't treat details (and trans surfaces) as details
-info                    : print bsp file info -maxlight                :
-micro <float>           :
-nice <prio>             : priority level [normal unix nice level - e.g. 19 = IDLE]
-nobackclip              : remove brushes that are not visible from birds view
-nocsg                   :
-nodetail                :
-nofill                  :
-nomerge                 :
-noprune                 :
-nosubdiv                :
-noshare                 :
-nofootstep              : don't generate a footstep file
-nomaterial              : don't generate a material file
-notjunc                 :
-nowater                 :
-noweld                  :
-noradiosity             : don't perform the radiosity calculations (day, night, all)
-onlyents                : only update entities
-quant                   : lightquant
-radchop                 :
-scale                   : lightscale
-v                       : verbose output
-verboseentities         : also be verbose about submodels (entities)

Windows

  • You have to use ufo2map.exe to compile your maps to bsp files.
  • first call
    ufo2map -extra mapfile
  • now you can test your map by starting UFO:AI, enter the console and type
    map mapname

compile.pl

There is a Perl-script in base/maps which will compile all the maps for you. Just install the perl interpreter and then call compile.pl from commandline (Start->Execute->cmd.exe) by typing
perl compile.pl
in base/maps (see directory tree).

compile.py

There is also Python script in base/maps to compile the maps. You will need Python installed and then call compile.py from commandline (Start->Execute->cmd.exe) by typing
python compile.py
in base/maps (see directory tree).

Using Far Manager

If you have Far Manager installed you may avoid using perl. Change directory to .\base\maps, press Alt F7 to search for map files, enter *.map mask and specify "search in current directory" option (Alt N), shoot Enter and wait for search to finish. Then choose "Panel" at the bottom of dialog box (Alt P). Now you have a full list of maps. Press Ctrl * to select all the files in the panel, press Ctrl G to execute a command for each selected file and enter string
..\..\ufo2map -bounce 0 -extra !.!
Hit Enter. Watch end movie.

Download

  • ufo2map compiler is included in the game installer
  • Compile tools Old compile tools for Windows (don't use them)
  • Active Perl

Linux

Under Linux we use ufo2map - which is a binary including the bsping and the radiosity part. We have a makefile in base/maps (see directory tree) which will build all the map files in the folder.

Just type make maps from trunk/ or make from base/maps

project-navigation