From OpenLieroX Wiki

Jump to: navigation, search

[Copied from here.]

Each Gusanos map is just a directory. Just create a directory of the desired map name in the levels-directory.

Contents

Level directory structure

Inside this map-directory you need three files: config.cfg, level.png, and material.png. Depending on needs you can use additional files such as: background.png, lightmap.png, and paralax.png.

config.cfg

This file contains imformation on where the worm spawns, and other object related things. This file must be present in a level folder or Gusanos will not recognise the folder as a level. You can also setup team bases (as for Game modes like CTF) or specify spawnpoints for specific teams.

Some examples

level.png

This image contains the artwork that is visable when playing the map; it can be any size and any colour depth.

Note: If you use only a few colors for your map (such as shades of brown and gray) you might want to optimize the color palette to reduce the final size of the map (but be careful!).

Note: if you intend to make a map based on a JPEG image, you should make sure it has good quality by zooming in a few times and looking for artifacts. JPEG (unlike PNG) is a lossy compression format, and too much compression makes an image look like crap, especially on low screen resolutions as GUSANOS uses. Consider resizing the JPEG to become smaller rather than cropping it to increase quality.

Some examples

material.png

This file contains all the information on how objects should interact with the level, it acts as a mask for level.png, telling Gusanos which parts of the map are passable and destructable.

This image should be in png format at the same size as level.png, and use an indexed colour palette (256 colors max). The colours in the palette are irrelevant, what matters is which index of the palette they are. For example: to make a square that is impassable the first colour in the palette (0 index) should be used.

Index Material Description
#0 Rock Solid.
#1 Background Air.
#2 Dirt Destructible.
#3 Special dirt Destructible. Worms can go through it but particles can't.
#4 Special rock Solid. Worms can't go through it but particles
Some examples

(The colors you see are just random because of some custom palette in it.)

Note: Annoyingly some programs will try to optimise the pallete and destroy the order, thus b0rking your level, so be careful.

background.png

This image is used to work out what should be displayed when destructable terrain is removed. You only need to draw anything in places where dirt is in the material file.

This image should be in png format at the same size as level.png.

Some examples

lightmap.png

This image is used to darken the level and all object sprites in it.

This image should be in png format at the same size as level.png, and be a greyscale image. Where white is normal brightness and black is not visible. It will only be used when in the config.cfg file the line: 'dark_mode = 1' is present.

Some examples

paralax.png

This image is used as a background to the level that moves in the opposite direction to the worm, it will display under any magenta (255,0,255) pixels in level.png.

This image should be in png format and should be bigger than 320*240. The smaller the paralax, the further away the background will seem.

Some examples

Dynamic elements

Any map can have its own objects. These are all the same as in Gusanos mods. Refer to Gusanos Modding for more information.

A map can have these mod-like directory structure:

  • fonts/
  • scripts/
    • map_<mapname>.lua : Lua init-function
  • objects/
  • sounds/
  • sprites/
  • mapeffects/

Via specifing some mod specific file (like ninjarope.obj), the map file will overload the mod behaviour.

Tutorials