NeoLemmix 2KB Level Format

Note that some bytes are mixed together with others, so this is a bit out of order.

2KB levels are always assumed to be 1584x160 in size, with the VGASPEC (if any) placed at 304, 0.

All multi-byte values are big endian.

AddressData
0x00Should always be 0x00.
A value of 0x01, 0x02 or 0x03 identifies a 10KB level.
A value of 0x04 or higher identifies a variable-size level.
0x01Release rate (1~99)
0x02
0x03
Number of lemmings
Can be up to 65535, but recommended maximum is ~500
0x04
0x05
Save requirement
This is a number of lemmings, not a percent
0x06Seconds of time limit (0~59)
0x07Minutes of time limit (0~99)
For infinite time, set this higher than 99 minutes
0x08
0x0A
0x0C
0x0E
Gimmick flags
These are the same as in the 10KB format
0x10Oddtable target rank
0x12Oddtable target level
0x14
0x16
Skillset flags
These are the same as in the 10KB format
0x09
0x0B
0x0D
0x0F
0x11
0x13
0x15
0x17
Skill quantities
These are one byte per skill, in the in-game order, and only skills that are in the level's skillset are included
This should be in the range 0~99, values over 99 are treated as infinite
0x18
0x19
Horizontal screen start position
0x1AMusic track number. The same special values apply as in the 10KB format
0x1BGraphic set number
0x1CLevel options flags:
Bit 0 - Steel areas #16 onwards are treated as negative steel
Bit 1 - Enable autosteel
Bit 2 - Ignore level's steel areas
Bit 3 - Use the simple autosteel formula
Bit 4 - Copy the level layout from the oddtable level
Bit 5 - Use the gimmick flags; otherwise the gimmick code is used instead
Bit 6 - Use the skillset flags, otherwise the skillset is the 8 traditional skills
Bit 7 - Unused
0x1DVGASPEC number
0 means no VGASPEC, 1 = VGASPEC0, 2 = VGASPEC1, etc
0x1E
0x1F
Gimmick code
This is used if the option to use gimmick flags isn't set, and if the code doesn't correspond to any gimmick or gimmick combination, the level has no gimmick
0x20Object data (32 slots)
0x120Terrain data (400 slots)
0x760Steel data (32 slots)
0x7E0Level title (32 bytes of text)

Object data format
AddressData
0x00
0x01
X coordinate. A value of 0 here corresponds to a position of -16, a value of 16 corresponds to a position of 0, a value of 32 would be X = 16, etc
0x02
0x03
Y coordinate.This is a signed value
0x04L value. The effect of this depends on the object type
0x05Piece number
0x06S value and some flags:
Bit 0 to Bit 3 - S value. The effect of this depends on the object type
Bit 4 - Object is fake
Bit 5 - Object is left-facing (window, pre-placed lemming, teleporter, splitter)
Bit 6 - Draw object only on terrain
Bit 7 - Draw object behind terrain
0x070x0F for normal
0x8F for upside down
Unused slots should be blanked out with 0x00s.

Terrain data format
AddressData
0x00
0x01
Bit 12 - Add 64 to piece ID if set.
Bit 13 - Acts as eraser
Bit 14 - Upside down
Bit 15 - Draw behind earlier pieces

The rest of these bytes is the X position; like with the objects it is offset by 16
0x02Y position. This is a 9-bit value, so it overflows into 0x03's Bit 7 (which is the least significant bit). This is also offset by 4 (ie: a value of 0 means a Y position of -4), and is a signed value.
0x03Bit 7 - See above
Bit 6 - Should always be off.

The rest of this is the piece ID's lower 6 bits.
Unused slots should be blanked out with 0xFFs.

Steel data format
AddressData
0x00X coordinate. This is a 9-bit value that leaks into the next byte, in the same way as terrain Y coordinate does. The stored value is actually 1/4th of the actual value; eg. a value of 5 should be read as 20. Additionally, it has the same offsetting by 16 as object and terrain X positions do.
0x01Bit 7 - See above.

The rest of this byte is the Y position; like the X coordinate the stored value is 1/4th of the actual value.
0x02Bit 4 to Bit 7 is the width
Bit 0 to Bit 3 is the height

Both of these are offset by -4 (ie: a value of 8 means a size of 12), and are stored as 1/4 of the actual value just like the coordinates.
0x03This byte is four 2-bit values which are treated as offsets for the coordinates and dimensions. Each value here is subtracted from the value obtained from the above bytes.

Bit 6-7 - X position
Bit 4-5 - Y position
Bit 2-3 - Width
Bit 0-1 - Height
Unused slots should be blanked out with 0x00s.

Gimmick codes
CodeGimmick(s)
0x4200Plays the gimmick music without giving any gimmick
0x4201Frenzy
SuperLemming
0x4202Frenzy
0x4203Reverse Skill Counts
0x4204Karoshi
0x4205Unalterable Terrain
0x4206Overflow
0x4207No Gravity
0x4208Hardworkers
0x4209Frenzy
SuperLemming
Karoshi
Unalterable Terrain
0x420ASuperLemming, plays gimmick music rather than Frenzy music
0x420BBackwards Walkers
0x420CLazy Lemmings
0x420DExhaustion
0x420EFrenzy
Exhaustion
0x420FLazy Lemmings
Exhaustion
0x4210No Gravity
Hardworkers
0x4211Nonfatal Bombers
0x4212Invincibility
0x4213One Skill Per Lemming
0xFFFFSuperLemming
Gimmicks (or combinations of gimmicks) without a code listed here must be set via the gimmick flags.