Editing C2M

You are not logged in. While you can edit without logging in, your IP address will be recorded publicly, along with the time and date, in this page's history. It is sometimes possible for others to identify you with this information. Creating an account will conceal your IP address and provide you with many other benefits. Messages sent to your IP can be viewed on your talk page.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
A '''C2M '''file (having the extension .c2m) is the file format which [[Chip's Challenge 2]] individual levels are stored in.
A '''C2M '''file (having the extension .c2m) is the file format which [[Chip's Challenge 2]] individual levels are commonly stored in.


The file is a binary file consisting of several sections one after the other, terminated by the END section. Each section begins with a section header, which is followed by the section's data.
The file is a binary file consisting of several sections one after the other, terminated by the END section. Each section begins with a section header, which is followed by the section's data.
Line 30: Line 30:
|LOCK
|LOCK
|Null-terminated string
|Null-terminated string
|Usually "Custom version for Chuck Sommerville", optional. Seems to be ignored
|Usually "Custom version for Chuck Sommerville", optional. Seems to be ignored by CC2.
|-
|-
|TITL
|TITL
Line 46: Line 46:
|CLUE
|CLUE
|Null-terminated string
|Null-terminated string
|Level clue (Only one allowed, but see below <ref name=":0">The NOTE section can contain multiple clues separated by a "[CLUE]" line. The clues are assigned to the clue tiles in reading order.</ref>)
|Level clue (Only one allowed, but see <ref name=":0">The NOTE section can contain multiple clues separated by "[CLUE]" line. The clues are assigned to the clue tiles in order of appearance of both.</ref>)
|-
|-
|NOTE
|NOTE
Line 62: Line 62:
|KEY
|KEY
|16 bytes
|16 bytes
|Unknown, seems not required <!--could be a MD5 hash of something-->
|Unknown, seems not required, could be a MD5 hash of something
|-
|-
|REPL / PRPL
|REPL / PRPL
|See REPL section table below
|See REPL section table below
|Solution replay, optional. A REPL section is not packed; a PRPL section is.
|Solution replay, optional. A REPL section is not packed, a PRPL section is.
|-
|-
|RDNY
|RDNY
|No content ''(length is 0)''
|No content (length is 0)
|The presence of this section makes the level read-only so it can't be edited in the level editor.
|The presence of this section makes the level readonly so it can't be edited in the level editor.
|-
|-
|END
|END
|No content ''(length is 0)''
|No content (length is 0)
|Signifies end of file
|Signifies end of file
|}
|}
Line 126: Line 126:
|}
|}


==== Data block ====
==== Data Block ====
When encountered during decompression, the data block's N bytes of data are added to the list..
When encountered during decompression, the data block's N bytes of data are added to the list..
{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 139: Line 139:
|}
|}


==== Back-reference block ====
==== Back-Reference Block ====
When encountered during decompression, COUNT bytes are copied from position (CURRENT - OFFSET) in the list to position CURRENT in the list. (Where CURRENT is the current position in the list, while COUNT and OFFSET are defined below)
When encountered during decompression, COUNT bytes are copied from position (CURRENT - OFFSET) in the list to position CURRENT in the list. (Where CURRENT is the current position in the list, while COUNT and OFFSET are defined below)


Line 176: Line 176:
!Tile
!Tile
!Additional data, if any
!Additional data, if any
!Modifier
|-
|-
|0x1
|0x1
|[[Floor]]
|Floor
|
|
| Wires
|-
|-
|0x2
|0x2
|[[Wall]]
|Wall
|
|
|
|-
|-
|0x3
|0x3
|[[Ice]]
|Ice
|
|
|
|-
|-
|0x4
|0x4
|[[Ice]] corner ''(SW)''
|Ice, South West Corner
|
|
|
|-
|-
|0x5
|0x5
|[[Ice]] corner ''(NW)''
|Ice, North West Corner
|
|
|
|-
|-
|0x6
|0x6
|[[Ice]] corner ''(NE)''
|Ice, North East Corner
|
|
|
|-
|-
|0x7
|0x7
|[[Ice]] corner ''(SE)''
|Ice, South East Corner
|
|
|
|-
|-
|0x8
|0x8
|[[Water]]
|Water
|
|
|
|-
|-
|0x9
|0x9
|[[Fire]]
|Fire
|
|
|
|-
|-
|0xa
|0xa
|[[Force floor]] ''(N)''
|Force Floor, North
|
|
|
|-
|-
|0xb
|0xb
|[[Force floor]] ''(E)''
|Force Floor, East
|
|
|
|-
|-
|0xc
|0xc
|[[Force floor]] ''(S)''
|Force Floor, South
|
|
|
|-
|-
|0xd
|0xd
|[[Force floor]] ''(W)''
|Force Floor, West
|
|
|
|-
|-
|0xe
|0xe
|Green [[toggle wall]]
|Green Toggle Wall
|
|
|
|-
|-
|0xf
|0xf
|Green [[Toggle wall|toggle floor]]
|Green Toggle Floor
|
|
|
|-
|-
|0x10
|0x10
|[[Red teleport]]
|Red Teleport
|
|
| Wires
|-
|-
|0x11
|0x11
|[[Blue teleport]]
|Blue Teleport
|
|
| Wires
|-
|-
|0x12
|0x12
|[[Yellow teleport]]
|Yellow Teleport
|
|
|
|-
|-
|0x13
|0x13
|[[Green teleport]]
|Green Teleport
|
|
|
|-
|-
|0x14
|0x14
|[[Exit]]
|Exit
|
|
|
|-
|-
|0x15
|0x15
|[[Slime]]
|Slime (the obstacle)
|
|
|
|-
|-
|0x16
|0x16
|[[Chip]] ''(the hero)''
|Chip (the hero)
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x17
|0x17
|[[Dirt block]]
|Dirt Block
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x18
|0x18
|[[Walker]]
|Walker Enemy
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x19
|0x19
|[[Glider|Ship]]
|Ship Enemy
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x1a
|0x1a
|[[Ice block]]
|Ice Block
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x1b
|0x1b
|[[Thin wall]] ''(S) (used in CC1 levels)''
|(Unused) East Panel
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x1c
|0x1c
|[[Thin wall]] ''(E) (used in CC1 levels)''
|(Unused) South Panel
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x1d
|0x1d
|[[Thin wall]] ''(SE) (used in CC1 levels)''
|(Unused) South+East Panel
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x1e
|0x1e
|[[Gravel]]
|Gravel
|
|
|
|-
|-
|0x1f
|0x1f
|[[Green button]]
|Door Toggle Button
|
|
|
|-
|-
|0x20
|0x20
|[[Blue button]]
|Blue Tank Button
|
|
|
|-
|-
|0x21
|0x21
|[[Tank|Blue tank]]
|Blue Tank
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x22
|0x22
|[[Red door]]
|Red Door
|
|
|
|-
|-
|0x23
|0x23
|[[Blue door]]
|Blue Door
|
|
|
|-
|-
|0x24
|0x24
|[[Yellow door]]
|Yellow Door
|
|
|
|-
|-
|0x25
|0x25
|[[Green door]]
|Green Door
|
|
|
|-
|-
|0x26
|0x26
|[[Red key]]
|Red Key
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x27
|0x27
|[[Blue key]]
|Blue Key
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x28
|0x28
|[[Yellow key]]
|Yellow Key
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x29
|0x29
|[[Green key]]
|Green Key
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x2a
|0x2a
|[[Computer chip|IC Chip]]
|IC Chip
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x2b
|0x2b
|Extra [[Computer chip|IC Chip]]
|Extra IC Chip
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x2c
|0x2c
|[[Socket|Chip socket]]
|IC Chip Socket
|
|
|
|-
|-
|0x2d
|0x2d
|[[Recessed wall|Pop-up wall]]
|Push-up Wall
|
|
|
|-
|-
|0x2e
|0x2e
|[[Appearing wall]]
|Appearing Wall
|
|
|
|-
|-
|0x2f
|0x2f
|[[Invisible wall]]
|Invisible Wall
|
|
|
|-
|-
|0x30
|0x30
|Solid [[blue wall]]
|Solid Blue Wall
|
|
|
|-
|-
|0x31
|0x31
|False [[blue wall]]
|False Blue Wall
|
|
|
|-
|-
|0x32
|0x32
|[[Dirt]]
|Dirt
|
|
|
|-
|-
|0x33
|0x33
|[[Bug|Ant]]
|Ant
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x34
|0x34
|[[Paramecium|Centipede]]
|Centipede
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x35
|0x35
|[[Ball|Purple ball]]
|Purple Ball
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x36
|0x36
|[[Blob]]
|Blob
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x37
|0x37
|[[Teeth|Angry teeth]]
|Red Teeth
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x38
|0x38
|[[Fireball|Fire box]]
|Fire box
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x39
|0x39
|[[Red button]]
|Clone Button
|
|
|
|-
|-
|0x3a
|0x3a
|[[Brown button]]
|Trap Button
|
|
|
|-
|-
|0x3b
|0x3b
|[[Ice skates|Cleats]]
|Cleats
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x3c
|0x3c
|[[Suction boots]]
|Magno Shoes
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x3d
|0x3d
|[[Fire boots]]
|Fire Shoes
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x3e
|0x3e
|[[Flippers]]
|Flippers
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x3f
|0x3f
|Tool [[thief]]
|Red Thief
|
|
|
|-
|-
|0x40
|0x40
|[[Bomb|Cherry bomb]]
|Red Bomb
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x41
|0x41
|Open [[trap]] ''(unused in main levels)''
|(Unused)
|
|
|
|-
|-
|0x42
|0x42
|[[Trap]]
|Trap
|
|
|
|-
|-
|0x43
|0x43
|[[Clone machine]] ''(used in CC1 levels)''
|(Unused -- Behaves like Clone Machine)
|
|
| Clone direction (?)
|-
|-
|0x44
|0x44
|[[Clone machine]]
|Clone Machine (Modifier required, see below)
|
|
| Clone direction
|-
|-
|0x45
|0x45
|[[Hint|Clue]]
|Clue Tile
|
|
|
|-
|-
|0x46
|0x46
|[[Force floor]] ''(random)''
|Force Field, Random
|
|
|
|-
|-
|0x47
|0x47
|[[Gray button]]
|Area Control Button
|
|
|
|-
|-
|0x48
|0x48
|[[Swivel door]] ''(SW)''
|Revolving Door, South West
|
|
|
|-
|-
|0x49
|0x49
|[[Swivel door]] ''(NW)''
|Revolving Door, North West
|
|
|
|-
|-
|0x4a
|0x4a
|[[Swivel door]] ''(NE)''
|Revolving Door, North East
|
|
|
|-
|-
|0x4b
|0x4b
|[[Swivel door]] ''(SE)''
|Revolving Door, South East
|
|
|
|-
|-
|0x4c
|0x4c
|[[Time bonus]]
|Time Bonus
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x4d
|0x4d
|[[Stopwatch]]
|Time Toggle
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x4e
|0x4e
|[[Transmogrifier]]
|Transformer
|
|
| Wires
|-
|-
|0x4f
|0x4f
|[[Railroad track]]
|Train Tracks Base (Modifier required, see section below)
|
|
| Tracks (see below)
|-
|-
|0x50
|0x50
|[[Steel wall]]
|Metal Wall
|
|
| Wires
|-
|-
|0x51
|0x51
|[[Time bomb]]
|Time Bomb
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x52
|0x52
|[[Helmet]]
|Helmet
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x53
|0x53
|''(Unused)''
|(Unused)
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x54
|0x54
|''(Unused)''
|(Unused)
|
|
|
|-
|-
|0x55
|0x55
|''(Unused)''
|(Unused)
|
|
|
|-
|-
|0x56
|0x56
|[[Melinda]]
|Melinda
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x57
|0x57
|[[Teeth|Timid teeth]]
|Blue Teeth
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x58
|0x58
|Explosion animation ''(unused in main levels)''
|(Unused) Explosion Animation
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x59
|0x59
|[[Hiking boots]]
|Hiking Shoes
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x5a
|0x5a
|[[Gender-only sign|Male-only sign]]
|Male Only Sign
|
|
|
|-
|-
|0x5b
|0x5b
|[[Gender-only sign|Female-only sign]]
|Female Only Sign
|
|
|
|-
|-
|0x5c
|0x5c
|[[Wire#Gates|Logic gate]]
|Inverter Gate, North (Modifier allows other gates, see below)
|
|
|Gate type and direction (see below)
|-
|-
|0x5d
|0x5d
|''(Unused)''
|(Unused)
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x5e
|0x5e
|[[Pink button]]
|Logic Switch, On
|
|
|Wires
|-
|-
|0x5f
|0x5f
|[[Flame jet]] ''(OFF)''
|Flame Jet, Off
|
|
|
|-
|-
|0x60
|0x60
|[[Flame jet]] ''(ON)''
|Flame Jet, On
|
|
|
|-
|-
|0x61
|0x61
|[[Orange button]]
|Flame Jet Button
|
|
|
|-
|-
|0x62
|0x62
|[[Lightning bolt]]
|Lightning Bolt
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x63
|0x63
|[[Yellow tank]]
|Yellow Tank
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x64
|0x64
|[[Yellow tank button]]
|Yellow Tank D-Pad
|
|
|
|-
|-
|0x65
|0x65
|[[Mirror Chip]]
|Mirror Chip (the enemy)
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x66
|0x66
|[[Mirror Melinda]]
|Mirror Melinda
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x67
|0x67
|''(Unused)''
|(Unused)
|
|
|
|-
|-
|0x68
|0x68
|[[Bowling ball]]
|Bowling Ball
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x69
|0x69
|[[Rover]]
|Rover
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x6a
|0x6a
|[[Time penalty]]
|Time Penalty
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x6b
|0x6b
|[[Custom tile|Custom floor]]
|Custom Floor, Brown (Modifier allows other styles, see below)
|
|
|Style (see below)
|-
|-
|0x6c
|0x6c
|(Unused)
|(Unused)
|
|
|
|-
|-
|0x6d
|0x6d
|[[Thin wall]] / [[Canopy]]
|Panels/Canopy, see below
|Panel/Canopy bitmask ''(see below)'', Tile Specification for lower layer
|Panel/Canopy bitmask, Tile Specification for tile underneath
|
|-
|-
|0x6e
|0x6e
|''(Unused)''
|(Unused)
|
|
|
|-
|-
|0x6f
|0x6f
|[[Railroad sign]]
|Railroad Crossing Sign
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x70
|0x70
|[[Custom tile|Custom wall]]
|Custom Wall, Brown (Modifier allows other styles, see below)
|
|
|Style (see below)
|-
|-
|0x71
|0x71
|[[Letter tile]] ''(space)''
|"Sunken" Floor (Modifier required, see below)
|
|
|Glyph type (see below)
|-
|-
|0x72
|0x72
|[[Switch door|Purple toggle floor]]
|Purple Toggle Wall
|
|
|
|-
|-
|0x73
|0x73
|[[Switch door|Purple toggle wall]]
|Purple Toggle Floor
|
|
|
|-
|-
|0x74
|0x74
|''(Unused)''
|(Unused)
|
|
|
|-
|-
|0x75
|0x75
|''(Unused)''
|(Unused)
|
|
|
|-
|-
|0x76
|0x76
|8-bit Modifier ''(see Modifier section below)''
|8-bit Modifier (see Modifier section below)
|1 modifier byte, Tile Specification for affected tile
|1 modifier byte, Tile Specification for affected tile
|N/A
|-
|-
|0x77
|0x77
|16-bit Modifier ''(see Modifier section below)''
|16-bit Modifier (see Modifier section below)
|2 modifier bytes, Tile Specification for affected tile
|2 modifier bytes, Tile Specification for affected tile
|N/A
|-
|-
|0x78
|0x78
|32-bit Modifier ''(see Modifier section below)''
|32-bit Modifier (see Modifier section below)
|4 modifier bytes, Tile Specification for affected tile
|4 modifier bytes, Tile Specification for affected tile
|N/A
|-
|-
|0x79
|0x79
|''(Unused)''
|(Unused)
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x7a
|0x7a
|10 point [[Bonus flag|flag]]
|10 Point Flag
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x7b
|0x7b
|100 point [[Bonus flag|flag]]
|100 Point Flag
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x7c
|0x7c
|1000 point [[Bonus flag|flag]]
|1000 Point Flag
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x7d
|0x7d
|Solid [[green wall]]
|Stay Up Green Wall
|
|
|
|-
|-
|0x7e
|0x7e
|False [[green wall]]
|Pop Down Green Wall
|
|
|
|-
|-
|0x7f
|0x7f
|[[No sign|Not allowed marker]]
|"Forbidden" mark (modifies items/keys)
|Modifies tools/keys. Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x80
|0x80
|2x points [[Bonus flag|flag]]
|2x Points Flag
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x81
|0x81
|[[Directional block]]
|Directional Block
|Direction byte, Directional Arrows Bitmask, Tile Specification for lower layer
|Direction byte, Directional Arrows Bitmask, Tile Specification for tile underneath
|
|-
|-
|0x82
|0x82
|[[Floor mimic]]
|Floor Mimic
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x83
|0x83
|[[Green bomb]]
|Green Bomb
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x84
|0x84
|[[Green chip]]
|Green IC Chip
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x85
|0x85
|''(Unused)''
|(Unused)
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x86
|0x86
|''(Unused)''
|(Unused)
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x87
|0x87
|[[Black button]]
|Reverse Logic Button
|
|
|Wires
|-
|-
|0x88
|0x88
|[[Switch|ON/OFF switch]] ''(OFF)''
|Off Switch, Off
|
|
|Wires
|-
|-
|0x89
|0x89
|[[Switch|ON/OFF switch]] ''(ON)''
|On Switch, On
|
|
|Wires
|-
|-
|0x8a
|0x8a
|[[Key thief]]
|Red Thief
|
|
|
|-
|-
|0x8b
|0x8b
|[[Ghost]]
|Ghost
|Direction byte, Tile Specification for lower layer
|Direction byte, Tile Specification for tile underneath
|
|-
|-
|0x8c
|0x8c
|[[Steel foil]]
|Steel Foil
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x8d
|0x8d
|[[Turtle]]
|Turtle
|
|
|
|-
|-
|0x8e
|0x8e
|[[Secret eye]]
|Eye
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x8f
|0x8f
|[[Bribe|Thief bribe]]
|Bribe
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x90
|0x90
|[[Speed boots]]
|Speed Shoes
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|-
|-
|0x91
|0x91
|''(Unused)''
|(Unused)
|
|
|
|-
|-
|0x92
|0x92
|[[Hook]]
|Hook
|Tile Specification for lower layer
|Tile Specification for tile underneath
|
|}
|}


==== Direction byte ====
==== Direction Byte ====
The direction byte comes after enemy tiles and some others:
The direction byte comes after enemy tiles and some others:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 928: Line 781:
|}
|}


==== Thin wall/Canopy bitmask ====
==== Panel/Canopy Bitmask ====
Any number of these bits can be combined:
Any number of these bits can be combined:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 935: Line 788:
|-
|-
|0x1
|0x1
|[[Thin wall]] ''(N)''
|Panel, North
|-
|-
|0x2
|0x2
|[[Thin wall]] ''(E)''
|Panel, East
|-
|-
|0x4
|0x4
|[[Thin wall]] ''(S)''
|Panel, South
|-
|-
|0x8
|0x8
|[[Thin wall]] ''(W)''
|Panel, West
|-
|-
|0x10
|0x10
|[[Canopy]]
|Canopy
|}
|}


==== Directional block arrows bitmask ====
==== Directional Arrows Bitmask ====
Any number of these bits can be combined:
Any number of these bits can be combined:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 957: Line 810:
|-
|-
|0x1
|0x1
|North
|Arrow, North
|-
|-
|0x2
|0x2
|East
|Arrow, East
|-
|-
|0x4
|0x4
|South
|Arrow, South
|-
|-
|0x8
|0x8
|West
|Arrow, West
|}
|}


==== Tile modifiers ====
==== Tile Modifiers ====
The modifier "tiles" (0x76, 0x77, 0x78) affect the tile specification that they carry in their additional data. The meaning of the modifier value depends on the type of tile they affect.
The modifier "tiles" (0x76, 0x77, 0x78) affect the tile specification that they carry in their additional data. The meaning of the modifier value depends on the type of tile they affect.


The size of the modifier is irrelevant, and modifiers default to zero.  That is, if a tile is expecting a 16-bit modifier but the high byte is zero, an 8-bit modifier works as well.  If a tile is expecting an 8-bit modifier which is zero, the modifier may be omitted entirely.
==== Wire Modifier ====
 
This is an 8-bit modifier that affects floors, metal walls, on/off switches, transformers, and blue/red fans (possibly more?). It adds wires to the tile it affects. Any number of these bits can be combined:
==== Wire modifier ====
This is an 8-bit modifier that affects [[floor]]s, [[steel wall]]s, ON/OFF switches, [[transmogrifier]]s, and [[Blue teleport|blue]] and [[red teleport]]s<!--possibly more?-->. It adds [[wire]]s to the tile it affects. Any number of these bits can be combined:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Bitmask
!Bitmask
Line 981: Line 832:
|-
|-
|0x1
|0x1
|[[Wire]] ''(N)''
|Wire, North
|-
|-
|0x2
|0x2
|[[Wire]] ''(E)''
|Wire, East
|-
|-
|0x4
|0x4
|[[Wire]] ''(S)''
|Wire, South
|-
|-
|0x8
|0x8
|[[Wire]] ''(W)''
|Wire, West
|-
|-
|0x10
|0x10
|[[Wire tunnel]] ''(N)''
|Wire Tunnel, North
|-
|-
|0x20
|0x20
|[[Wire tunnel]] ''(E)''
|Wire Tunnel, East
|-
|-
|0x40
|0x40
|[[Wire tunnel]] ''(S)''
|Wire Tunnel, South
|-
|-
|0x80
|0x80
|[[Wire tunnel]] ''(W)''
|Wire Tunnel, West
|}
|}


==== Letter tile modifier ====
==== ASCII Modifier ====
This is an 8-bit modifier that affects [[letter tile]]s by adding a symbol (usually an ASCII symbol) to them:
This is an 8-bit modifier that affects "sunken" floors by adding a symbol (usually an ASCII symbol) to them:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Values
!Values
Line 1,012: Line 863:
|-
|-
|0x1c
|0x1c
|Up arrow
|Up Arrow
|-
|-
|0x1d
|0x1d
|Right arrow
|Right Arrow
|-
|-
|0x1e
|0x1e
|Down arrow
|Down Arrow
|-
|-
|0x1f
|0x1f
|Left arrow
|Left Arrow
|-
|-
|0x20 through 0x5f
|0x20 through 0x5f
|Corresponding ASCII character (' ' through '_')
|Corresponding ASCII Character (' ' through '_')
|}
|}


==== Clone machine arrow modifier ====
==== Clone Machine Arrow Modifier ====
This is an 8-bit modifier that affects [[clone machine]]s by specifying their direction. The values can be combined and will show up on the clone machine appropriately, but the game will only clone in one direction.
This is an 8-bit modifier that affects clone machines by specifying their direction. The values can be combined and will show up on the clone machine appropriately, but the game will only clone in one direction:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Value
!Value
Line 1,034: Line 885:
|-
|-
|0x1
|0x1
|Arrow ''(N)''
|Arrow, North
|-
|-
|0x2
|0x2
|Arrow ''(E)''
|Arrow, East
|-
|-
|0x4
|0x4
|Arrow ''(S)''
|Arrow, South
|-
|-
|0x8
|0x8
|Arrow ''(W)''
|Arrow, West
|}
|}


==== Custom floor/wall modifier ====
==== Custom Floor/Wall Modifier ====
This is an 8-bit modifier that affects custom walls or floors by replaces their style:
This is an 8-bit modifier that affects custom walls or floors by replaces their style:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Value
!Value
!Meaning
!Meaning
|-
|0x0
|Green
|-
|-
|0x1
|0x1
|Pink
|Custom Wall/Floor, Pink
|-
|-
|0x2
|0x2
|Yellow
|Custom Wall/Floor, Yellow
|-
|-
|0x3
|0x3
|Blue
|Custom Wall/Floor, Blue
|}
|}


==== Logic modifier ====
==== Logic Modifier ====
This is an 8-bit modifier that affects an inverter gate by replacing it with another gate. Modifiers outside of the ranges specified below will produce [[voodoo tile]]s.
This is an 8-bit modifier that affects an inverter gate by replacing it with another gate. Modifiers outside of the ranges specified below will produce [[voodoo tile]]s.
Most logic gates have 4 assigned values instead of just 1; unless otherwise specified below, the face direction of the logic gate is determined by its index, stored in the order: North, East, South, West.
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Values
!Values
!Meaning
!Meaning
|-
|-
|0x0 through 0x3
|0x1 through 0x3
|[[Inverter|Inverter gate]]
|Inverter Gate East/South/West
|-
|-
|0x4 through 0x7
|0x4 through 0x7
|[[AND gate]]
|And Gate North/East/South/West
|-
|-
|0x8 through 0xb
|0x8 through 0xb
|[[OR gate]]
|Or Gate North/East/South/West
|-
|-
|0xc through 0xf
|0xc through 0xf
|[[XOR gate]]
|Xor Gate North/East/South/West
|-
|-
|0x10 through 0x13
|0x10 through 0x13
|[[Latch gate]] ''(clockwise arrow)''
|Latch North/East/South/West, Clockwise Arrow
|-
|-
|0x14 through 0x17
|0x14 through 0x17
|[[NAND gate]]
|Nand Gate North/East/South/West
|-
|-
|0x1e through 0x27
|0x1e through 0x27
|[[Counter|Counter gate]] ''(0 through 9)''
|Counter Gate 0 through 9
|-
|-
|0x40 through 0x43
|0x40 through 0x43
|[[Latch gate]] ''(counterclockwise arrow)''
|Latch North/East/South/West, Counter Clockwise Arrow
|}
|}


==== Track modifier ====
==== Track Modifier ====
This is a 16-bit modifier that affects the [[railroad track]] tile. The low byte specifies which tracks exist; any number of bits can be combined:
This is an 8- or 16-bit modifier that affects the train tracks base tile. The low-order byte specifies which tracks exist; any number of bits can be combined:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Bitmask
!Bitmask
Line 1,105: Line 951:
|-
|-
|0x1
|0x1
|Turn ''(NE)''
|Track, North East
|-
|-
|0x2
|0x2
|Turn ''(SE)''
|Track, South East
|-
|-
|0x4
|0x4
|Turn ''(SW)''
|Track, South West
|-
|-
|0x8
|0x8
|Turn ''(NW)''
|Track, North West
|-
|-
|0x10
|0x10
|Horizontal
|Track, Horizontal
|-
|-
|0x20
|0x20
|Vertical
|Track, Vertical
|-
|-
|0x40
|0x40
|Track switch
|Track Switch
|}
|}


The high byte is comprised of two nybbles.  The lower nybble specifies which track is active. For tiles with a track switch, the active track is the only one that can be used; the others are shown in red.
The high order byte is optional and specifies which track is the active one. If omitted, the North East track is the active one. For tiles with a track switch, the active track is the only one that can be used (the other are shown red).
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!Value
!Value
!Meaning
!Meaning
|-
|-
|0x000
|(Omitted)
|NE track is active
|North East track is active
|-
|-
|0x100
|0x100
|SE track is active
|South East track is active
|-
|-
|0x200
|0x200
|SW track is active
|South West track is active
|-
|-
|0x300
|0x300
|NW track is active
|North West track is active
|-
|-
|0x400
|0x400
Line 1,149: Line 995:
|Vertical track is active
|Vertical track is active
|}
|}
The upper nybble is the tile's initial "entered" direction.  When an actor starts the level already on top of this tile, it's treated as though it entered by moving in this direction.  (If there are no tracks corresponding to that direction, the actor will be unable to move.)


=== REPL / PRPL section ===
=== REPL / PRPL section ===
This section contains the replay data. If this is a PRPL section, it must be unpacked first (see Section Packing). However the hash for the replay and the valid solution bit-flag is set in the OPTN section and not here
This section contains the replay data. If this is a PRPL section, it must be unpacked first (see Section Packing).


The contents of this section are as follows:
The contents of this section are as follows:
Line 1,161: Line 1,005:
|-
|-
|1
|1
|Usually 0; function unknown
|Unknown (Usually 0)
|-
|-
|1
|1
|[[Force floor|Random force floor]] initial direction
|Random force floor initial direction
|-
|-
|1
|1
|Randomness seed ''(used by [[blob]]s)''
|Randomness seed (used by blobs)
|-
|-
|Varies
|Varies
|A sequence of input changes; optionally terminated by 0xff
|A sequence of input changes, optionally terminated by 0xff
|}
|}


==== Input change ====
==== Input Change ====
Specifies a change in input:
Specifies a change in input:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,180: Line 1,024:
|-
|-
|1
|1
|Number of frames to wait before inputting the new input. The last input is still held while the new input is pending. Always <= 0xfc. Larger delays are specified via multiple input changes
|Number of frames passed since previous input change. Always <= 0xfc. Larger delays are specified via multiple input changes.
|-
|-
|1
|1
Line 1,186: Line 1,030:
|}
|}


==== Input bitmask ====
==== Input Bitmask ====
Specifies which keys are pressed, any number of bits can be combined:
Specifies which keys are pressed, any number of bits can be combined:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 1,214: Line 1,058:
|-
|-
|0x80
|0x80
|If set, this input is for player 2 in a split-screen game <!-- doesn't work? -->
|If set, this input is for player 2 in a split-screen game.
|}
|}


Please note that all contributions to Chip's Challenge Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Chip's Challenge Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)
Your changes will be visible immediately.
  • If you want to test editing, try the sandbox.
  • On talk pages, please sign your posts by typing four tildes (~~~~).