How to make a map

Ok, here is how I make maps for snowballz. The format is really pretty simple. Here is a sample hierarchy:

You can watch a video of me creating a map and and learn about the map configuration below.

settings.ini

This is the settings file for iceland.

System Message: ERROR/3 (<string>, line 30)

Unknown directive type "sourcecode".

.. sourcecode:: ini

   [map]
   name = Iceland
   regions = regions.png
   resources = resources.png
   land = land.png
   terrain = terrain.png
   description = A small 3 player map with ice pinnacles in the center.
   objectives = Take over all enemy igloos.
   required_plugins = powerup-v1.1, conquer_victory-v1
   music = llamas_y_bakunas.mp3

This is the basic map configuration section. The regions, resources, land and terrain are for telling the map loader where to find the images, so you can have those files named whatever you want so long as it's linked up here. Land and terrain are optional.

The description and objectives aren't anything special, put what ever you want (But no, snowballz won't enforce what you say there.)

The required_plugins option loads the listed plugins. In our case it loads the powerup plugin and the conquer_victory plugin. You can see all available plugins in the "plugins" folder. For details on what each plugin does, open the __init__.py file in the plugin folder and read the doc string (it's at the top). If you make your own plugins I would be more than happy to include them in the next version of snowballz.

The last one is music (new in 0.9.5). This tells snowballz to loop through llamas_y_bakunas.mp3 while playing this map. Currently the music file must be located in the music folder in the snowballz root directory.

System Message: ERROR/3 (<string>, line 51)

Unknown directive type "sourcecode".

.. sourcecode:: ini

   [victory]
   to_win = all
   to_lose = 0

If you read the help for the conquer_victory plugin you know that this section is used by that plugin. The to_win option will give victory to the first person to conquer all the regions and defeat to any player that loses all of theirs. This allows for some creativity.

System Message: ERROR/3 (<string>, line 59)

Unknown directive type "sourcecode".

.. sourcecode:: ini

   [powerups]
   1 = Defense,90,62
   2 = Defense,39,14
   3 = Defense,55,61
   4 = DoubleSnowball,30,84
   5 = DoubleSnowball,66,8
   6 = DoubleSnowball,35,44

This section is used by the powerup plugin. We are basically placing powerups on the map here. I think it's pretty self explanatory.

System Message: ERROR/3 (<string>, line 72)

Unknown directive type "sourcecode".

.. sourcecode:: ini

   [workers]
   max_warmth = 10

   [snowballers]
   max_warmth = 12

These two sections are defining some of the unit settings for the game. Available options are:

  • max_warmth (default 10)
  • gather_time (default 20000)
  • create_snowball_time (default 3000)

System Message: ERROR/3 (<string>, line 86)

Unknown directive type "sourcecode".

.. sourcecode:: ini

   [igloo_settings]
   workers = 12
   snowballers = 15

Some settings for the igloos. This tells snowballz to start each igloo with 12 workers and 15 snowballers.

System Message: ERROR/3 (<string>, line 94)

Unknown directive type "sourcecode".

.. sourcecode:: ini

   [igloos]
   1 = 34,87
   2 = 87,26
   3 = 19,13

And lastly we place the igloos on the map. You must be very careful here, there will be unpredictable results if more than one igloo gets placed in the same region!

A good way to do this is to open up the regions.png file and hover over where you want the igloo; on the bottom left of the image window it will show you the pixel coordinates (the map and pixel coordinates are the same.)

Before we move on there is one more section that you can have (used in crystal crises):

System Message: ERROR/3 (<string>, line 107)

Unknown directive type "sourcecode".

.. sourcecode:: ini

   [ai]
   gather = crystal
   gather_force = 80
   guard = 75,75

This functionality isn't very full yet, but it is usefull. This tells the ai players to focus on gathering crystal with 80% of it's workers, then to use it's snowballers for guard the tile at coordinates 75,75 (in the case of this map, the center where all the crystal is).