Difference between revisions of "Land Data file"

From Worms Knowledge Base

Jump to: navigation, search
(Linking to Image file)
(Added weird "object count" number behind water height, reformatted file format, rewrote experiments in WormNet2)
Line 6: Line 6:
 
* 4-byte tag signature - "LND\x1A"
 
* 4-byte tag signature - "LND\x1A"
 
* complete file length (4 bytes)
 
* complete file length (4 bytes)
* width of map
+
* width of map (4 bytes)
* height of map
+
* height of map (4 bytes)
* border style: 0 = no border, >0 = top border (4 bytes)  
+
* border style (4 byte bool) - 0 for no border, non-zero for top border
* water height - (4 bytes)
+
* water height (4 bytes)
* number of object placements (4 bytes)
+
* unknown number, often same as the next one (4 bytes)
* object placement coordinates - horizontal (4 bytes), vertical (4 bytes). 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.
+
* number of object placements (4 bytes) - s. below
 +
* object placement coordinates - each horizontal (4 bytes), vertical (4 bytes)
 +
* uncompressed color (8 bpp) [[Image file|IMG image]] - visual foreground land
 +
* uncompressed monochrome (1 bpp) [[Image file|IMG image]] - collision mask (black determines collidable pixels)
 +
* uncompressed color (8 bpp) [[Image file|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
  
== Layer 1 - Visual Foreground Land ==
+
== Object Placement Coordinates ==
  
A colour [[Image file|IMG image]] (not compressed).
+
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.
  
== Layer 2 - Collision Mask ==
+
== Land.dat use for custom color maps in WormNet2 ==
  
A black&white [[Image file|IMG image]] (not compressed): black determines the collidable pixels.
+
[[User:Etho|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.
 
+
== Layer 3 - Visual Background Land ==
+
 
+
A colour [[Image file|IMG image]] (not compressed).
+
 
+
== Additional Data - Pathing ==
+
 
+
* length of path string (1 byte)
+
* absolute path to land texture
+
* length of path string (1 byte)
+
* absolute path to water.dir file
+
 
+
 
+
----
+
 
+
 
+
Worms player/3rd party programmer, Etho, plans on developing a new map file format for Worms World Party that players will be able to use with the program CutWorm. The format will allow wwp players to play customized color maps with each other on WormNet2. Map makers will have 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.
 
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.

Revision as of 23:09, 22 April 2017

(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