Difference between revisions of "Land Data file"
From Worms Knowledge Base
(Added differencies for Worms 2, tabular file format layout) |
m (Added units of values) |
||
Line 12: | Line 12: | ||
!Description | !Description | ||
|- | |- | ||
− | | {{software|W2|WA|WWP}} || int || 4 || Signature "LND\x1A" | + | | {{software|W2|WA|WWP}} || int || 4 || Signature reading "LND\x1A". |
|- | |- | ||
− | | {{software|W2|WA|WWP}} || int || 4 || Complete file length | + | | {{software|W2|WA|WWP}} || int || 4 || Complete file length in bytes. |
|- | |- | ||
− | | {{software|W2|WA|WWP}} || int || 4 || Width of map | + | | {{software|W2|WA|WWP}} || int || 4 || Width of map in pixels. |
|- | |- | ||
− | | {{software|W2|WA|WWP}} || int || 4 || Height of map | + | | {{software|W2|WA|WWP}} || int || 4 || Height of map in pixels. |
|- | |- | ||
| {{software|W2|WA|WWP}} || bool || 4 || Indestructible cavern border | | {{software|W2|WA|WWP}} || bool || 4 || Indestructible cavern border | ||
Line 24: | Line 24: | ||
* non-zero = top border | * non-zero = top border | ||
|- | |- | ||
− | | {{software|WA|WWP}} || int || 4 || Water height | + | | {{software|WA|WWP}} || int || 4 || Water height in pixels. |
|- | |- | ||
− | | {{software|WA|WWP}} || int || 4 || Unknown number, often same as number of object placement structures (s. next) | + | | {{software|WA|WWP}} || int || 4 || Unknown number, often same as number of object placement structures (s. next). |
|- | |- | ||
| {{software|W2|WA|WWP}} || int || 4 || Number of object placement structures following, each: | | {{software|W2|WA|WWP}} || int || 4 || Number of object placement structures following, each: | ||
Line 36: | Line 36: | ||
| {{software|W2|WA|WWP}} || [[Image file|IMG]] || - || Uncompressed color (8 bpp) image, being the visual foreground land. | | {{software|W2|WA|WWP}} || [[Image file|IMG]] || - || Uncompressed color (8 bpp) image, being the visual foreground land. | ||
|- | |- | ||
− | | {{software|W2|WA|WWP}} || [[Image file|IMG]] || - || Uncompressed monochrome (1 bpp) image, being the collision mask (black determines collidable pixels) | + | | {{software|W2|WA|WWP}} || [[Image file|IMG]] || - || Uncompressed monochrome (1 bpp) image, being the collision mask (black determines collidable pixels). |
|- | |- | ||
| {{software|W2|WA|WWP}} || [[Image file|IMG]] || - || Uncompressed color (8 bpp) image, being the visual background land. | | {{software|W2|WA|WWP}} || [[Image file|IMG]] || - || Uncompressed color (8 bpp) image, being the visual background land. |
Revision as of 23:23, 22 April 2017
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
The format differs slightly between Worms 2 and Worms Armaggedon / Worms World Party.
Game | Type | Length | Description |
---|---|---|---|
int | 4 | Signature reading "LND\x1A". | |
int | 4 | Complete file length in bytes. | |
int | 4 | Width of map in pixels. | |
int | 4 | Height of map in pixels. | |
bool | 4 | Indestructible cavern border
| |
int | 4 | Water height in pixels. | |
int | 4 | Unknown number, often same as number of object placement structures (s. next). | |
int | 4 | Number of object placement structures following, each:
| |
int | 4 | Unknown number, often (always?) 0. | |
IMG | - | Uncompressed color (8 bpp) image, being the visual foreground land. | |
IMG | - | Uncompressed monochrome (1 bpp) image, being the collision mask (black determines collidable pixels). | |
IMG | - | Uncompressed color (8 bpp) image, being the visual background land. | |
IMG | - | Uncompressed color (8 bpp) image, with unknown meaning. | |
string | - | 1 byte length-prefixed string, being the absolute path to the land texture. | |
string | - | 1 byte length-prefixed string, being the absolute path to the 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.