Please create an account or Login! Have fun!
Editing DAT
Jump to navigation
Jump to search
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 7: | Line 7: | ||
The format is a relatively simple binary structure. All fields are little-endian. | The format is a relatively simple binary structure. All fields are little-endian. | ||
=== File header === | === File header ==== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 92: | Line 92: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! | !Byte | ||
! | !Tile | ||
! | !Byte | ||
! | !Tile | ||
! | !Byte | ||
! | !Tile | ||
! | !Byte | ||
! | !Tile | ||
!Byte | |||
!Tile | |||
!Byte | |||
!Tile | |||
!Byte | |||
!Tile | |||
|- | |- | ||
|<code>$00</code> | |||
|[[Image:Floor.png]] [[Floor]] | |[[Image:Floor.png]] [[Floor]] | ||
|[[Image:Clone block S.png]] [[Clone block]] (S) < | |<code>$10</code> | ||
|''unused'' < | |[[Image:Clone block S.png]] [[Clone block]] (S) | ||
|<code>$20</code> | |||
|''unused''<br><small>(used internally as [[overlay buffer|Combination]])</small> | |||
|<code>$30</code> | |||
|[[Image:Thin wall SE.png]] [[Thin wall]] (SE) | |[[Image:Thin wall SE.png]] [[Thin wall]] (SE) | ||
|<code>$40</code> | |||
|[[Image:Bug N.png]] [[Bug]] (N) | |[[Image:Bug N.png]] [[Bug]] (N) | ||
|<code>$50</code> | |||
|[[Image:Glider N.png]] [[Glider]] (N) | |[[Image:Glider N.png]] [[Glider]] (N) | ||
|<code>$60</code> | |||
|[[Image:Paramecium NS.png]] [[Paramecium]] (N) | |[[Image:Paramecium NS.png]] [[Paramecium]] (N) | ||
|- | |- | ||
|<code>$01</code> | |||
|[[Image:Wall.png]] [[Wall]] | |[[Image:Wall.png]] [[Wall]] | ||
|[[Image:Clone block E.png]] [[Clone block]] (E) < | |<code>$11</code> | ||
|[[Image:Thief.png]] [[ | |[[Image:Clone block E.png]] [[Clone block]] (E) | ||
|<code>$21</code> | |||
|[[Image:Thief.png]] [[Key thief]] | |||
|<code>$31</code> | |||
|[[Image:Clone machine.png]] [[Cloner]] | |[[Image:Clone machine.png]] [[Cloner]] | ||
|<code>$41</code> | |||
|[[Image:Bug W.png]] [[Bug]] (W) | |[[Image:Bug W.png]] [[Bug]] (W) | ||
|<code>$51</code> | |||
|[[Image:Glider W.png]] [[Glider]] (W) | |[[Image:Glider W.png]] [[Glider]] (W) | ||
|<code>$61</code> | |||
|[[Image:Paramecium WE.png]] [[Paramecium]] (W) | |[[Image:Paramecium WE.png]] [[Paramecium]] (W) | ||
|- | |- | ||
|<code>$02</code> | |||
|[[Image:Computer chip.png]] [[Computer chip]] | |[[Image:Computer chip.png]] [[Computer chip]] | ||
|<code>$12</code> | |||
|[[Image:Force floor N.png]] [[Force floor]] (N) | |[[Image:Force floor N.png]] [[Force floor]] (N) | ||
|<code>$22</code> | |||
|[[Image:Socket.png]] [[Chip socket]] | |[[Image:Socket.png]] [[Chip socket]] | ||
|<code>$32</code> | |||
|[[Image:Force floor Random.png]] [[Random force floor]] | |[[Image:Force floor Random.png]] [[Random force floor]] | ||
|<code>$42</code> | |||
|[[Image:Bug S.png]] [[Bug]] (S) | |[[Image:Bug S.png]] [[Bug]] (S) | ||
|<code>$52</code> | |||
|[[Image:Glider S.png]] [[Glider]] (S) | |[[Image:Glider S.png]] [[Glider]] (S) | ||
|<code>$62</code> | |||
|[[Image:Paramecium NS.png]] [[Paramecium]] (S) | |[[Image:Paramecium NS.png]] [[Paramecium]] (S) | ||
|- | |- | ||
|<code>$03</code> | |||
|[[Image:Water.png]] [[Water]] | |[[Image:Water.png]] [[Water]] | ||
|<code>$13</code> | |||
|[[Image:Force floor E.png]] [[Force floor]] (E) | |[[Image:Force floor E.png]] [[Force floor]] (E) | ||
|<code>$23</code> | |||
|[[Image:Green button.png]] [[Green button]] | |[[Image:Green button.png]] [[Green button]] | ||
|[[Image:Drowned Chip.png]] [[Drowned Chip]] < | |<code>$33</code> | ||
|[[Image:Drowned Chip.png]] <s>[[Drowned Chip]]</s> | |||
|<code>$43</code> | |||
|[[Image:Bug E.png]] [[Bug]] (E) | |[[Image:Bug E.png]] [[Bug]] (E) | ||
|<code>$53</code> | |||
|[[Image:Glider E.png]] [[Glider]] (E) | |[[Image:Glider E.png]] [[Glider]] (E) | ||
|<code>$63</code> | |||
|[[Image:Paramecium WE.png]] [[Paramecium]] (E) | |[[Image:Paramecium WE.png]] [[Paramecium]] (E) | ||
|- | |- | ||
|<code>$04</code> | |||
|[[Image:Fire.png]] [[Fire]] | |[[Image:Fire.png]] [[Fire]] | ||
|<code>$14</code> | |||
|[[Image:Force floor W.png]] [[Force floor]] (W) | |[[Image:Force floor W.png]] [[Force floor]] (W) | ||
|<code>$24</code> | |||
|[[Image:Red button.png]] [[Red button]] | |[[Image:Red button.png]] [[Red button]] | ||
|[[Image:Chip in Fire.png]] [[Burned Chip]] < | |<code>$34</code> | ||
|[[Image:Chip in Fire.png]] <s>[[Burned Chip]]</s> | |||
|<code>$44</code> | |||
|[[Image:Fireball.png]] [[Fireball]] (N) | |[[Image:Fireball.png]] [[Fireball]] (N) | ||
|<code>$54</code> | |||
|[[Image:Teeth N.png]] [[Teeth]] (N) | |[[Image:Teeth N.png]] [[Teeth]] (N) | ||
|<code>$64</code> | |||
|[[Image:Blue key.png]] [[Blue key]] | |[[Image:Blue key.png]] [[Blue key]] | ||
|- | |- | ||
|<code>$05</code> | |||
|[[Image:Invisible wall.png]] [[Invisible wall]] | |[[Image:Invisible wall.png]] [[Invisible wall]] | ||
|<code>$15</code> | |||
|[[Image:Exit.png]] [[Exit]] | |[[Image:Exit.png]] [[Exit]] | ||
|<code>$25</code> | |||
|[[Image:Toggle wall Closed.png]] [[Toggle wall]] | |[[Image:Toggle wall Closed.png]] [[Toggle wall]] | ||
|[[Image:Burned Chip.png]] [[Burned Chip]] < | |<code>$35</code> | ||
|[[Image:Burned Chip.png]] <s>[[Burned Chip]]</s> | |||
|<code>$45</code> | |||
|[[Image:Fireball.png]] [[Fireball]] (W) | |[[Image:Fireball.png]] [[Fireball]] (W) | ||
|<code>$55</code> | |||
|[[Image:Teeth W.png]] [[Teeth]] (W) | |[[Image:Teeth W.png]] [[Teeth]] (W) | ||
|<code>$65</code> | |||
|[[Image:Red key.png]] [[Red key]] | |[[Image:Red key.png]] [[Red key]] | ||
|- | |- | ||
|<code>$06</code> | |||
|[[Image:Thin wall N.png]] [[Thin wall]] (N) | |[[Image:Thin wall N.png]] [[Thin wall]] (N) | ||
|<code>$16</code> | |||
|[[Image:Blue lock.png]] [[Blue lock]] | |[[Image:Blue lock.png]] [[Blue lock]] | ||
|<code>$26</code> | |||
|[[Image:Toggle wall Open.png]] [[Toggle wall|Toggle floor]] | |[[Image:Toggle wall Open.png]] [[Toggle wall|Toggle floor]] | ||
|''unused'' < | |<code>$36</code> | ||
|''unused''<br><small>(acts as invisible wall)</small> | |||
|<code>$46</code> | |||
|[[Image:Fireball.png]] [[Fireball]] (S) | |[[Image:Fireball.png]] [[Fireball]] (S) | ||
|<code>$56</code> | |||
|[[Image:Teeth S.png]] [[Teeth]] (S) | |[[Image:Teeth S.png]] [[Teeth]] (S) | ||
|<code>$66</code> | |||
|[[Image:Green key.png]] [[Green key]] | |[[Image:Green key.png]] [[Green key]] | ||
|- | |- | ||
|<code>$07</code> | |||
|[[Image:Thin wall W.png]] [[Thin wall]] (W) | |[[Image:Thin wall W.png]] [[Thin wall]] (W) | ||
|<code>$17</code> | |||
|[[Image:Red lock.png]] [[Red lock]] | |[[Image:Red lock.png]] [[Red lock]] | ||
|<code>$27</code> | |||
|[[Image:Brown button.png]] [[Brown button]] | |[[Image:Brown button.png]] [[Brown button]] | ||
|''unused'' < | |<code>$37</code> | ||
|''unused''<br><small>(acts as invisible wall)</small> | |||
|<code>$47</code> | |||
|[[Image:Fireball.png]] [[Fireball]] (E) | |[[Image:Fireball.png]] [[Fireball]] (E) | ||
|<code>$57</code> | |||
|[[Image:Teeth E.png]] [[Teeth]] (E) | |[[Image:Teeth E.png]] [[Teeth]] (E) | ||
|<code>$67</code> | |||
|[[Image:Yellow key.png]] [[Yellow key]] | |[[Image:Yellow key.png]] [[Yellow key]] | ||
|- | |- | ||
|<code>$08</code> | |||
|[[Image:Thin wall S.png]] [[Thin wall]] (S) | |[[Image:Thin wall S.png]] [[Thin wall]] (S) | ||
|<code>$18</code> | |||
|[[Image:Green lock.png]] [[Green lock]] | |[[Image:Green lock.png]] [[Green lock]] | ||
|<code>$28</code> | |||
|[[Image:Blue button.png]] [[Blue button]] | |[[Image:Blue button.png]] [[Blue button]] | ||
|''unused'' < | |<code>$38</code> | ||
|''unused''<br><small>(acts as invisible wall)</small><br><small>([[Ice block]] in [[pgchip]])</small> | |||
|<code>$48</code> | |||
|[[Image:Pink ball.png]] [[Ball]] (N) | |[[Image:Pink ball.png]] [[Ball]] (N) | ||
|<code>$58</code> | |||
|[[Image:Walker NS.png]] [[Walker]] (N) | |[[Image:Walker NS.png]] [[Walker]] (N) | ||
|<code>$68</code> | |||
|[[Image:Flippers.png]] [[Flippers]] | |[[Image:Flippers.png]] [[Flippers]] | ||
|- | |- | ||
|<code>$09</code> | |||
|[[Image:Thin wall E.png]] [[Thin wall]] (E) | |[[Image:Thin wall E.png]] [[Thin wall]] (E) | ||
|<code>$19</code> | |||
|[[Image:Yellow lock.png]] [[Yellow lock]] | |[[Image:Yellow lock.png]] [[Yellow lock]] | ||
|<code>$29</code> | |||
|[[Image:Teleport.png]] [[Teleporter]] | |[[Image:Teleport.png]] [[Teleporter]] | ||
|[[Image:Chip in Exit.png]] [[Fake exit]] < | |<code>$39</code> | ||
|[[Image:Chip in Exit.png]] <s>[[Fake exit]]</s> | |||
|<code>$49</code> | |||
|[[Image:Pink ball.png]] [[Ball]] (W) | |[[Image:Pink ball.png]] [[Ball]] (W) | ||
|<code>$59</code> | |||
|[[Image:Walker WE.png]] [[Walker]] (W) | |[[Image:Walker WE.png]] [[Walker]] (W) | ||
|<code>$69</code> | |||
|[[Image:Fire boots.png]] [[Fire boots]] | |[[Image:Fire boots.png]] [[Fire boots]] | ||
|- | |- | ||
|<code>$0a</code> | |||
|[[Image:Block.png]] [[Dirt block]] | |[[Image:Block.png]] [[Dirt block]] | ||
|<code>$1a</code> | |||
|[[Image:Ice NW.png]] [[Ice corner]] (NW) | |[[Image:Ice NW.png]] [[Ice corner]] (NW) | ||
|<code>$2a</code> | |||
|[[Image:Bomb.png]] [[Bomb]] | |[[Image:Bomb.png]] [[Bomb]] | ||
|[[Image:Exit2.png]] [[Fake exit]] < | |<code>$3a</code> | ||
|[[Image:Exit2.png]] <s>[[Fake exit]]</s> | |||
|<code>$4a</code> | |||
|[[Image:Pink ball.png]] [[Ball]] (S) | |[[Image:Pink ball.png]] [[Ball]] (S) | ||
|<code>$5a</code> | |||
|[[Image:Walker NS.png]] [[Walker]] (S) | |[[Image:Walker NS.png]] [[Walker]] (S) | ||
|<code>$6a</code> | |||
|[[Image:Ice skates.png]] [[Ice skates]] | |[[Image:Ice skates.png]] [[Ice skates]] | ||
|- | |- | ||
|<code>$0b</code> | |||
|[[Image:Dirt.png]] [[Dirt]] | |[[Image:Dirt.png]] [[Dirt]] | ||
|<code>$1b</code> | |||
|[[Image:Ice NE.png]] [[Ice corner]] (NE) | |[[Image:Ice NE.png]] [[Ice corner]] (NE) | ||
|<code>$2b</code> | |||
|[[Image:Trap.png]] [[Trap]] | |[[Image:Trap.png]] [[Trap]] | ||
|[[Image:Exit3.png]] [[Fake exit]] < | |<code>$3b</code> | ||
|[[Image:Exit3.png]] <s>[[Fake exit]]</s> | |||
|<code>$4b</code> | |||
|[[Image:Pink ball.png]] [[Ball]] (E) | |[[Image:Pink ball.png]] [[Ball]] (E) | ||
|<code>$5b</code> | |||
|[[Image:Walker WE.png]] [[Walker]] (E) | |[[Image:Walker WE.png]] [[Walker]] (E) | ||
|<code>$6b</code> | |||
|[[Image:Suction boots.png]] [[Suction boots]] | |[[Image:Suction boots.png]] [[Suction boots]] | ||
|- | |- | ||
|<code>$0c</code> | |||
|[[Image:Ice.png]] [[Ice]] | |[[Image:Ice.png]] [[Ice]] | ||
|<code>$1c</code> | |||
|[[Image:Ice SE.png]] [[Ice corner]] (SE) | |[[Image:Ice SE.png]] [[Ice corner]] (SE) | ||
|<code>$2c</code> | |||
|[[Image:Hidden wall.png]] [[Hidden wall]] | |[[Image:Hidden wall.png]] [[Hidden wall]] | ||
|[[Image:Swimming Chip N.png]] [[Swimming Chip]] (N) | |<code>$3c</code> | ||
|[[Image:Swimming Chip N.png]] <s>[[Swimming Chip]] (N)</s> | |||
|<code>$4c</code> | |||
|[[Image:Tank N.png]] [[Tank]] (N) | |[[Image:Tank N.png]] [[Tank]] (N) | ||
|<code>$5c</code> | |||
|[[Image:Blob.png]] [[Blob]] (N) | |[[Image:Blob.png]] [[Blob]] (N) | ||
|<code>$6c</code> | |||
|[[Image:Chip N.png]] [[Chip]] (N) | |[[Image:Chip N.png]] [[Chip]] (N) | ||
|- | |- | ||
|<code>$0d</code> | |||
|[[Image:Force floor S.png]] [[Force floor]] (S) | |[[Image:Force floor S.png]] [[Force floor]] (S) | ||
|<code>$1d</code> | |||
|[[Image:Ice SW.png]] [[Ice corner]] (SW) | |[[Image:Ice SW.png]] [[Ice corner]] (SW) | ||
|<code>$2d</code> | |||
|[[Image:Gravel.png]] [[Gravel]] | |[[Image:Gravel.png]] [[Gravel]] | ||
|[[Image:Swimming Chip W.png]] [[Swimming Chip]] (W) < | |<code>$3d</code> | ||
|[[Image:Swimming Chip W.png]] <s>[[Swimming Chip]] (W)</s> | |||
|<code>$4d</code> | |||
|[[Image:Tank W.png]] [[Tank]] (W) | |[[Image:Tank W.png]] [[Tank]] (W) | ||
|<code>$5d</code> | |||
|[[Image:Blob.png]] [[Blob]] (W) | |[[Image:Blob.png]] [[Blob]] (W) | ||
|<code>$6d</code> | |||
|[[Image:Chip W.png]] [[Chip]] (W) | |[[Image:Chip W.png]] [[Chip]] (W) | ||
|- | |- | ||
|<code>$0e</code> | |||
|[[Image:Clone block N.png]] [[Clone block]] (N) < | |[[Image:Clone block N.png]] [[Clone block]] (N) | ||
|<code>$1e</code> | |||
|[[Image:Blue wall.png]] Fake [[blue wall]] | |[[Image:Blue wall.png]] Fake [[blue wall]] | ||
|<code>$2e</code> | |||
|[[Image:Recessed wall.png]] [[Recessed wall]] | |[[Image:Recessed wall.png]] [[Recessed wall]] | ||
|[[Image:Swimming Chip S.png]] [[Swimming Chip]] (S) < | |<code>$3e</code> | ||
|[[Image:Swimming Chip S.png]] <s>[[Swimming Chip]] (S)</s> | |||
|<code>$4e</code> | |||
|[[Image:Tank S.png]] [[Tank]] (S) | |[[Image:Tank S.png]] [[Tank]] (S) | ||
|<code>$5e</code> | |||
|[[Image:Blob.png]] [[Blob]] (S) | |[[Image:Blob.png]] [[Blob]] (S) | ||
|<code>$6e</code> | |||
|[[Image:Chip S.png]] [[Chip]] (S) | |[[Image:Chip S.png]] [[Chip]] (S) | ||
|- | |- | ||
|<code>$0f</code> | |||
|[[Image:Clone block W.png]] [[Clone block]] (W) < | |[[Image:Clone block W.png]] [[Clone block]] (W) | ||
|<code>$1f</code> | |||
|[[Image:Blue wall.png]] Real [[blue wall]] | |[[Image:Blue wall.png]] Real [[blue wall]] | ||
|<code>$2f</code> | |||
|[[Image:Hint.png]] [[Hint]] | |[[Image:Hint.png]] [[Hint]] | ||
|[[Image:Swimming Chip E.png]] [[Swimming Chip]] (E) < | |<code>$3f</code> | ||
|[[Image:Swimming Chip E.png]] <s>[[Swimming Chip]] (E)</s> | |||
|<code>$4f</code> | |||
|[[Image:Tank E.png]] [[Tank]] (E) | |[[Image:Tank E.png]] [[Tank]] (E) | ||
|<code>$5f</code> | |||
|[[Image:Blob.png]] [[Blob]] (E) | |[[Image:Blob.png]] [[Blob]] (E) | ||
|<code>$6f</code> | |||
|[[Image:Chip E.png]] [[Chip]] (E) | |[[Image:Chip E.png]] [[Chip]] (E) | ||
|} | |} | ||
=== Level metadata chunks === | === Level metadata chunks === | ||
Line 309: | Line 409: | ||
|$02 | |$02 | ||
|? | |? | ||
|Map title. Must include a trailing NUL byte, and must not exceed 64 characters (including the NUL). Should generally be ASCII, though | |Map title. Must include a trailing NUL byte, and must not exceed 64 characters (including the NUL). Should generally be ASCII, though Tile World appears to interpret this as Latin-1. <!-- XXX what does MSCC do with a long title or byte over 128? --> | ||
|} | |} | ||
Line 403: | Line 503: | ||
|$02 | |$02 | ||
|? | |? | ||
|[[Hint]] text. Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL). Should generally be ASCII, though | |[[Hint]] text. Must include a trailing NUL byte, and must not exceed 128 characters (including the NUL). Should generally be ASCII, though Tile World appears to interpret this as Latin-1. <!-- XXX what does MSCC do with a long title or byte over 128? --> | ||
|} | |} | ||
Line 412: | Line 512: | ||
==== 10: Monster list ==== | ==== 10: Monster list ==== | ||
Contains zero or more of the following structure. As this structure is 2 bytes in size, the chunk size should be a multiple of 2, and there cannot be more than | Contains zero or more of the following structure. As this structure is 2 bytes in size, the chunk size should be a multiple of 2, and there cannot be more than 128 moving monsters in a level. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 420: | Line 520: | ||
|- | |- | ||
|$00 | |$00 | ||
| | |2 | ||
|x-coordinate of monster | |x-coordinate of monster | ||
|- | |- | ||
|$02 | |$02 | ||
| | |2 | ||
|y-coordinate of monster | |y-coordinate of monster | ||
|} | |} | ||
Line 431: | Line 531: | ||
Tile World in Lynx mode will ignore this structure and always allow any number of monsters to move as normal. | Tile World in Lynx mode will ignore this structure and always allow any number of monsters to move as normal. | ||
== See also == | == See also == | ||
* [[C2M]], the more flexible format used in [[Chip's Challenge 2]] | * [[C2M]], the more flexible format used in [[Chip's Challenge 2]] | ||
* Implementation in [[Tile World]]: [https://github.com/zrax/tworld/blob/master/series.c <code>series.c</code>] (whole file) and [https://github.com/zrax/tworld/blob/master/encoding.c <code>encoding.c</code>] (individual level) | |||
* Implementation in [[Lexy's Labyrinth]]: [https://github.com/eevee/lexys-labyrinth/blob/master/js/format-dat.js <code>js/format-dat.js</code>] | |||
== External Links == | == External Links == | ||
[http://www.seasip.info/ccfile.html Explanation of the CHIPS.DAT format] | |||
[[Category:Terminology]] | [[Category:Terminology]] | ||
[[Category:File formats]] | [[Category:File formats]] |