Skip to content

Instantly share code, notes, and snippets.

@OnGle
Last active September 2, 2016 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OnGle/42e9650668c5d4f659c4f07664130fae to your computer and use it in GitHub Desktop.
Save OnGle/42e9650668c5d4f659c4f07664130fae to your computer and use it in GitHub Desktop.

N++ User Level Offsets and Tile IDs

Basic Structure

12 bytes of unknown things
1 byte of gamemode (0-single, 1-coop, 2-race, anything else - unset)
19 bytes of unknown things
128 chars of title
18 bytes of unknown things
966 bytes of tiles (1 byte per tile, see tiles below)
80 unknown bytes
28 * 2 bytes of object index (2 byte per object see object index table below,
 position determines object, value determines object count)

the rest of the file can be split into 5 byte chunks
(id, param1, param2, param3, param4), see param table below

Offsets

0x0C: game mode (possibly an integer or short value) 00 - Single Player 01 - Coop 02 - Race 04 - Unset

0x26: level name, null padded (to 128 bytes)

Tiles start at top left of the map (0xB8) and go to the bottom right of the map (0x47D)

Tile Table

ID Tiles
0x0 Nothing
0x1 Full Block
0x2 top half block
0x3 right half block
0x4 bottom half block
0x5 left half block
0x6 Lower Right Diagonal
0x7 Lower Left Diagonal
0x8 Upper Left Diagonal
0x9 Upper Right Diagonal
0x0A - Top left outer curve
0x0B - Top right outer curve
0x0C - Bottom right outer curve
0x0D - Bottom left outer curve
0x0E - Top left inner curve
0x0F - Top right inner curve
0x10 - Bottom right inner curve
0x11 - Bottom left inner curve
0x12 - (Mid left to top right diagonal) Thin variant
0x13 - (Upper left to mid right diagonal) Big variant
0x14 - (Bottom left to mid right diagonal) Thin variant
0x15 - (Mid left to bottom right diagonal) Big variant
0x16 - (Mid right bottom left diagonal) Big variant
0x17 - (Mid left to bottom right diagonal) Thin variant
0x18 - (Mid left to top right diagonal) Big variant
0x19 - (Upper left to mid right diagonal) Thin variant
0x1A - (Bottom left to mid top diagonal) Big variant
0x1B - (Mid top to bottom right diagonal) Thin variant
0x1C - (Mid bottom to top right diagonal) Big variant
0x1D - (Top Left to mid bottom diagonal) Thin variant
0x1E - (Mid bottom to top right diagonal) Thin variant
0x1F - (Mid bottom to top left diagonal) Big variant
0x20 - (Bottom left to mid top diagonal) Thin variant
0x21 - (Mid top to bottom right diagonal) Big variant

##Object Table

Index Offset Name ID Params
0x0 Ninja 0 x, y, ?, ?
0x2 Mine 1 x, y, ?, ?
0x4 Gold 2 x, y, ?, ?
0x6 Exit Door 3 x, y, ?, ?
n/a Exit Button 4 x, y, ?, ?
0x8 Normal Door 5 x, y, dir, ?
0xA Locked Door 6 x, y, dir, ?
n/a Locked Button 7 x, y, ?, ?
0xC Trap Door 8 x, y, ?, ?
n/a Trap Button 9 x, y, dir, ?
0xE Launcher 10 x, y, dir, ?
0x10 Oneway 11 x, y, dir, ?
0x12 Chaingun Drone 12 x, y, dir, path
0x14 Laser Drone 13 x, y, dir, path
0x16 Drone 14 x, y, dir, path
0x18 Seeker Drone 15 x, y, dir, path
0x1A Floor Guard 16 x, y, ?, ?
0x1C Bounce 17 x, y, ?, ?
0x1E Rocket Turret 18 x, y, ?, ?
0x20 Gauss Turret 19 x, y, ?, ?
0x22 Thwump 20 x, y, dir, ?
0x24 Toggle Mine 21 x, y, ?, ?
0x26 Evil Ninja 22 x, y, ?, ?
0x28 Booster 24 x, y, ?, ?
0x2A Deathball 25 x, y, ?, ?
0x2C Microdrone 26 x, y, dir, path
0x2E Shove Thwump 28 x, y, ?, ?
0x30 Laser Turret 23 x, y, dir, path
0x32 Unknown ? unknown
0x34 Unknown ? unknown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment