Difference between revisions of "Land Data file"

From Worms Knowledge Base

Jump to: navigation, search
Line 4: Line 4:
 
* 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 - 1920 (4 bytes)
+
* width of map
* height of map - 696 (4 bytes)
+
* height of map
 
* border style: 0 = no border, >0 = top border (4 bytes)  
 
* border style: 0 = no border, >0 = top border (4 bytes)  
 
* water height - (4 bytes)
 
* water height - (4 bytes)
Line 13: Line 13:
 
== Layer 1 - Visual Foreground Land ==
 
== Layer 1 - Visual Foreground Land ==
  
* 4-byte tag signature - "IMG\x1A"
+
A colour IMG image (not compressed).
* complete file length (4 bytes)
+
* the number of bits per pixel in the image - value 8 (1 byte)
+
* image flags - value 128 (1 byte)
+
* the number of colors in the image palette, excluding true black (2 bytes)
+
* image palette, excluding true black - RGB format ((3 * palette colors) bytes)
+
* image width - 1920 (2 bytes)
+
* image height - 696 (2 bytes)
+
* image data (1336320 bytes)
+
  
 
== Layer 2 - Invisible Collision Mapping ==
 
== Layer 2 - Invisible Collision Mapping ==
  
* 4-byte tag signature - "IMG\x1A"
+
A black&white IMG image (not compressed): black determines the collidable pixels.
* complete file length (4 bytes)
+
* the number of bits per pixel in the image - value 1 (1 byte)
+
* the number of colors in the image palette - value 0 (1 byte)
+
* image width - 1920 (2 bytes)
+
* image height - 696 (2 bytes)
+
* the number of colors in the image palette, excluding true black (2 bytes)
+
* image data (167040 bytes)
+
  
 
== Layer 3 - Visual Background Land ==
 
== Layer 3 - Visual Background Land ==
  
* 4-byte tag signature - "IMG\x1A"
+
A colour IMG image (not compressed).
* complete file length (4 bytes)
+
* the number of bits per pixel in the image - value 1 (1 byte)
+
* the number of colors in the image palette - value 0 (1 byte)
+
* image width - 1920 (2 bytes)
+
* image height - 696 (2 bytes)
+
* the number of colors in the image palette, excluding true black (2 bytes)
+
* image data (167040 bytes)
+
  
 
== Additional Data - Pathing ==
 
== Additional Data - Pathing ==
  
 
* length of path string (1 byte)
 
* length of path string (1 byte)
* path to land texture
+
* absolute path to land texture
 
* length of path string (1 byte)
 
* length of path string (1 byte)
* path to water.dir file
+
* absolute path to water.dir file
  
  

Revision as of 20:29, 17 July 2008

(Up to File formats)

File Format

  • 4-byte tag signature - "LND\x1A"
  • complete file length (4 bytes)
  • width of map
  • height of map
  • border style: 0 = no border, >0 = top border (4 bytes)
  • water height - (4 bytes)
  • number of object placements (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.

Layer 1 - Visual Foreground Land

A colour IMG image (not compressed).

Layer 2 - Invisible Collision Mapping

A black&white IMG image (not compressed): black determines the collidable pixels.

Layer 3 - Visual Background Land

A colour 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.

Personal tools