Land Data file

From Worms Knowledge Base

Revision as of 23:09, 22 April 2017 by Pac-Man (Talk | contribs) (Added weird "object count" number behind water height, reformatted file format, rewrote experiments in WormNet2)

Jump to: navigation, search
(Up to File formats)

The Land Data File (located at Data\land.dat) contains an uncompressed version of the map, as generated by the land generator (formerly landgen.exe). Aside the map colour data and collision mask, it contains some parameters such as water height and object placement coordinates. Some 3rd-party software such as CutWorm allow customizing the game map by creating/editing this file directly.

File Format

  • 4-byte tag signature - "LND\x1A"
  • complete file length (4 bytes)
  • width of map (4 bytes)
  • height of map (4 bytes)
  • border style (4 byte bool) - 0 for no border, non-zero for top border
  • water height (4 bytes)
  • unknown number, often same as the next one (4 bytes)
  • number of object placements (4 bytes) - s. below
  • object placement coordinates - each horizontal (4 bytes), vertical (4 bytes)
  • uncompressed color (8 bpp) IMG image - visual foreground land
  • uncompressed monochrome (1 bpp) IMG image - collision mask (black determines collidable pixels)
  • uncompressed color (8 bpp) IMG image - visual background land
  • 1 byte length-prefixed string - absolute path to the land texture
  • 1 byte length-prefixed string - absolute path to water.dir file

Object Placement Coordinates

Each worm, mine, and oil barrel are randomly placed at one of these coordinates at the beginning of the game. The more excess coordinate points there are, the more possibilities there are for each object placement. Not all mines or oil barrels will be placed if there are fewer object placement coordinates than there are objects. Worms will be placed outside of the map if there are fewer object placement coordinates than there are worms or if object placement coordinates overlap each other. The game can crash if worms are placed outside of the map.

Land.dat use for custom color maps in WormNet2

Etho planned on developing a new map file format for Worms World Party that players would have been able to use with the program CutWorm. The format allowed WWP players to play customized color maps with each other on WormNet2. Map makers had the option to customize all three layers that land.dat uses, the border & water setting, object placement coordinates, and water type/color settings.

Online and offline tests where these parameters were properly adjusted have worked successfully with no desync errors. So far, tests to increase the size of a map beyond the size 1920 x 696 have failed.

Personal tools