[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Mapping tutorial continued
Patrick motivated me to finally write the next chapter for the mapping
tutorial. Actually, it's rather the introduction explaining the very
basics. I'd still like to hear about the issues you have with CoMET...
In Crimson Fields maps consist of several building blocks:
1) the map itself (the terrain)
Point 1) should be largely self-explanatory so I won't elaborate.
Units are the pieces players use to fight against one another. A unit
belongs to one of the players (there is one exception from this rule that
is explained under 3) below). Only the owner can move a unit and use it
to attack enemy pieces. Some units are transporters which means they can
carry other units and/or crystals. Again only the owner can inspect a
transporter to see what it carries (if anything). Some transporters can
simply carry more than others, others may place restrictions on the type
or the size of the units they can carry (e.g. aircraft carriers can only
Shops are important tactical locations. They can be used to repair or
produce units. These actions consume crystals. Shops can also be configured
to "produce" crystals. Like units, shops are usually owned by one of the
players. Only the owner can repair or produce units in a shop. Shops can,
however, also be neutral or unaligned which simply means that no player
can use them. All units inside an unaligned shop also become unaligned and
thus cannot be controlled by any player. Players can peek into unaligned
shops to see what's inside, though.
To take over a shop (either enemy or neutral) you need to move a special
unit into it. In the default unit set this is the Infantry piece. In such
a case all units inside the shop switch their alignment to the attacking
You can play a map just fine with only units and shops, or even just units.
However, such a mission is never going to "end". Even when all units on the
board have been destroyed there will be no victory message or somesuch.
That's what events are for. They provide a mechanism for checking for
certain game conditions and variables and triggering actions based on
An event always has two components. The first is the "trigger" which defines
the conditions (ie. WHEN the event is executed), the other is the event
itself or "action" (ie. WHAT happens when the event is executed). Examples
for triggers are the "Timer" which simply checks whether a specified turn has
been reached or "Unit Destruction" to do something when a certain unit has
been destroyed. Available actions include "Create Unit" to place new units
on the board and "Score" to award points to one of the players. Every event
is assigned to one of the players, and upon execution it acts on behalf of
that player, eg. a "Create Unit" event will create a unit for the assigned
player, not his enemy.
A mission ends when one of the players reaches 100 points. With this
information and the above examples we have everything we need to create
a simple mission that actually has an ending:
You create a "Score" event with "Unit Destruction" trigger and award
100 points to the player when all enemy units are destroyed. Of course,
you need one of these events for each player so that both can win.