Diorama Manual
License / Copyright
Diorama (and the Warzone Map Tools) are licensed under the
GPL 3
and are © 2009 by Florian Schanda and Martin Brain.
Gringo and Clasp (which are distributed in source along with diorama)
are also licensed under the
GPL 3.
Installation
System Requirements
-
Warzone 2.2 (The 2.1 branch does
not work and will never be made to work, as mapwrite.py always writes
a blank zoneinfo section.)
- Python 2.5 (Should also work with 2.6, but I did not test this.)
- PyQt4 (apt-get install python-qt4 python-qt4-gl)
- PyGL (apt-get install python-opengl)
- Cython (apt get install cython python2.5-dev)
Diorama also requires gringo and clasp from the
potassco
tool chain - but because they are a bit obscure the Diorama distribution
contains a stable copy of them. To compile them you will also require the
following:
- re2c (apt-get install re2c)
- cmake (apt-get install cmake)
Compiling
Linux
Simply issue a $ make which should compile gringo, clasp and
a single cython file (blur.pyx).
If you are one of the rare people who already have gringo and clasp
installed on their system, then before you issue make you can symlink
your gringo and clasp binaries to potassco/gringo.bin and
potassco/clasp.bin respectively.
Other, in particular MS WindowsTM
I don't have any other operating systems. If you do and you do manage to
get Diorama working, please let me know how it works and I can include
the instructions here.
Running
Simply issue $ ./diorama.py
Using Diorama
Quick Introduction
When starting diorama you should be presented with a screen similar to
image shown on the right. Go on, click the Bake! button to create
your first random map. This should create a random 2 player map given all
the properties listed above the bake button.
Hint: You should start diorama from a terminal (such as xterm or
konsole) as a lot of useful information and diagnostics is printed while
the program is baking.
After a while your random map should appear in the map preview to the
right.
- The lighter shades indicate higher terrain, darker shades indicate
lower terrain. Red indicates impassable cliff tiles.
Blue indicates lakes (the map shown in the screen shot does not
have any lakes).
- Light lines and squares represent both a player's structures or
walls and also neutral structures (abandoned buildings) or features
(such as trees or rocks).
- Darker lines indicate roads or tracks. Lighter squares indicate
buildings (both neutral and players) and other terrain features
(such as rocks or trees).
- Light green dots represent oil resources.
- The dark band around the edges represents the annoying 3 tile map
border on which you cannot place any buildings.
The map shown in the screen shot has two player bases (top left and bottom
right) and also has a total of 6 oil wells scattered on the map (in
clusters of two each).
If you click the Save button, then the currently shown map is saved
in your ~/.warzone-2.2/ directory. Its name will be whatever is
entered into the Name text field, with the usual 2c-, 4c- or 8c-
prefix. You can now play this map in
skirmish (and multi-player if you give it to other people as well).
Parameters
This section will describe all the parameters you can fiddle with to give
you a variety of maps.
Name
Name given to the map once you click the Save button.
Map Version/Type
Output a map in the specified format.
- Optimised for 2.2 - Create maps for both warzone 2.2 and trunk.
Currently trunk will not render roads, so if you want to play in trunk
you should choose trunk here.
- Trunk only - Create maps optimised for trunk. These maps will
be more or less unplayable in 2.2, but should look much better on trunk.
For now this option will not generate urban maps for random tilesets
(as they look a bit crap) and it will also not create any roads (as
trunk won't be able to display them).
Tileset
This option influences two things: The actual tileset (Arizona, Urban or
Rockies) and what kind of features are placed on the map.
- Arizona - Draw roads between interesting points on the map.
Place a small number of derelict towns somewhere near a road.
- Urban - Draw a grid of roads all over the place. Place derelict
buildings on most tiles (except the highest regions of the map). Place
cars and other features on or near roads.
- Rockies - Draw roads between interesting points on the map
(same as with Arizona). Draw a few huts anywhere near roads. Place a
number of trees randomly on the map.
Players
Number of player bases to create. It is often faster to create good 8 player
maps with the Map Style option set to Symmetry.
Due to limitations of warzone this can be only 2, 4 or 8, however
there is no intrinsic limit in Diorama on the number of player bases
generated.
Map Style
This option influences the overall map generation approach.
- Random - This generates asymmetric maps. For maps larger than
12x12 this can be very slow.
- Symmetrical - This requires the Map Cell Width and
Map Cell Height to be equal, and will create a much larger map
by mirroring it on both the X and Y axis. The total size of the map
is equal to 2*size - 1.
However note that 8 player maps created with the Symmetrical option
will not be truly symmetrical: In order to satisfy Base Defensibility
constraints the solver will alter the terrain around the middle (non-corner)
bases.
Also note that oil cluster placement is not necessary symmetrical on
Symmetrical maps - but there is a very good chance it will be.
Global Feature
A global feature is a special constraint on the map which will
significantly influence the style of the map. Setting this value to
None results in a map that is completely random, as no
special constraint is imposed. Each availible global feature is described
below, with an example map to illustrate it.
Most of these options work with the Symmetry map style, for one
exception: 8 player, symmetrical hotspot maps are not yet possible.
- Hotspot - This will enforce a cross of "walls" through the map,
leaving a gap in the middle.
- Wasteland - This will cause next to no cliffs to
appear in the middle of the map.
- Lake - This will create a large body of water in the middle
of the map.
- Continent - This will enclose the entire map in water,
effectively giving you a continent (or maybe a large island).
Causeways/Canyons
A causeway is defined as a (small or large) section of terrain which
is higher than two surrounding areas (on opposite sides). A canyon is
the exact reverse.
- Don't care - This option will not impose any constraints on the
numbers of causeways or canyons; you may get some or you may not.
- Few - This will severely limit the number of causeways or
canyons, generally resulting in a more open map.
- Lots - This will enforce a large number of causeways or
canyons.
Note that for some values of the
Density option (very high and very low), constraining this
feature will significantly increase runtime.
Base Defensibility
If set, this will cause each player bases to be surrounded by exactly 0, 1,
2 or 3 cliff fronts.
Base Height
If set this will cause each player base to be higher or lower than
surrounding terrain.
Player Oil Wells
Each player starts with this many oil wells and your extractors will
already be built on them. (Unless of course you start with no bases; the
game will automatically remove all your starting buildings in that case.)
Oil Clusters
This defines the number of oil clusters randomly strewn onto the map.
Within their constraints (see Oil Defensibility), they are placed
on the map such that their distance between each other and to any player
base is maximal (i.e. equally spaced from everything). If more than one
such placement exists, then one is chosen randomly.
The distance is air-distance, not walking distance. (The latter would be
very hard to implement efficiently; but we are looking into it as a
possible future option.)
For technical reasons this option must be at least 1; if you want to
disable any non-player-base oil, then set the Oil Cluster Size
option below to zero.
Oil Cluster Size
Each oil cluster will have this many oil wells. The total number of oil
wells not intrinsically associated with any player on any map is
Oil Clusters * Oil Cluster Size.
Oil Defensibility
Similar to Base Defensibility this will cause oil wells to be
placed near cliffs (or in alcoves).
Map Cell Width, Map Cell Height and Cell Scale
These three options are very tightly linked. The total map size in
game tiles is (Map Cell Width * Cell Scale) x
(Map Cell Height * Cell Scale). (A game tile is the
size of a single bunker or wall tile. Three game tiles is a factory.)
The Cell Scale option influences the detail of the map created.
Larger values give you a larger but more bland map, smaller values
will result in a more intricate map.
The Map Cell Width and Map Cell Height options simply
increase the size of the map, but increasing the number of cells.
An eight player map requires at least 100 cells, otherwise the
layout solver will be unable to place all bases and the grid solver will
be unable to create any terrain. If you want to play a game with
full bases, you will get much better results if Cell Scale has
a value of greater than or equal to 10.
Depth
This option defines how many separate height levels exist. Warzone only
has 256 distinct height levels, which are portioned up into Depth
values. For example a map generated with Depth set to 3
will have terrain at heights 0, 128 and 255.
A consequence of this is that maps with lower Depth will have much
more pronounced cliff sides than maps with higher Depth.
Density (in %)
This option constrains the number of cliffs that should appear in the map.
Lower values give more open maps with undulating terrain, higher values give
intricate maze like maps.
Water Proportion (in %)
This option is the ratio of water to land. Note that high values
significantly increase runtime.
Everything is reachable
This option ensures that there are no sections of the map which can only be
reached via VTOL or hover. Note that even if this option is not set,
there will always be a walk-able route from any player base to any oil well
cluster and to any other player base. If this option is set you may
get empty islands or mountains that do not have a ramp.
Better Bases
The following base structures and droids are created for each player
regardless of what this option is set to: One power plant, one HQ building,
a resource extractor for each oil well and two trucks. On top of that a wall
with at least once entrance is created around the base with either HMG or
light cannon hardpoints guarding each entrance. (As usual, the number of
buildings you actually start with depends on the game's 'Base'
setting.)
- Not set - This will use a quick and dirty way to create
player bases. Due to the algorithm sucking, no further structures are
created.
- Set - This will create complete player bases. On top of the
above listed the following structures are created: Two vehicle
factories and two research facilities. It is recommended to set
Cell Scale to at least 10 if you intend to play a game
with full bases, as otherwise all bases will be extremely cramped.
The only reason this option is turned off by default is that currently it
can significantly increase the time it takes to create a map.