<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.zzt.org/w/index.php?action=history&amp;feed=atom&amp;title=Key</id>
	<title>Key - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.zzt.org/w/index.php?action=history&amp;feed=atom&amp;title=Key"/>
	<link rel="alternate" type="text/html" href="https://wiki.zzt.org/w/index.php?title=Key&amp;action=history"/>
	<updated>2026-07-03T06:38:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.zzt.org/w/index.php?title=Key&amp;diff=729&amp;oldid=prev</id>
		<title>RT-55J at 15:58, 26 December 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.zzt.org/w/index.php?title=Key&amp;diff=729&amp;oldid=prev"/>
		<updated>2025-12-26T15:58:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:58, 26 December 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l13&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keys can be placed in any of the default colors recognized by [[ZZT-OOP]], as well as the darker colors enabled by external editors. The foreground color is used to determine what the color of the key is when it is collected. The engine treats the dark colors the same as the default bright colors when collected, with the side effect that a brown key will be treated and addressed as a yellow key when collected.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keys can be placed in any of the default colors recognized by [[ZZT-OOP]], as well as the darker colors enabled by external editors. The foreground color is used to determine what the color of the key is when it is collected. The engine treats the dark colors the same as the default bright colors when collected, with the side effect that a brown key will be treated and addressed as a yellow key when collected.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Unlike other items, a key cannot be given directly to the player through ZZT-OOP; an [[object]] must first use [[Put|#put]], [[Change|#change]] or [[Become|#become]] to create a key for the player to collect.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Unlike other items, a key cannot be given directly to the player through ZZT-OOP; an [[object]] must first use [[Put|#put]], [[Change|#change]] or [[Become|#become]] to create a key for the player to collect&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Alternatively, a [[duplicator]] may duplicate a key directly onto a [[player]] or player clone to force collection without any player input&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;While keys are pushable, they cannot be pushed by a player since attempting to do so will collect them. However, a player can move them by pushing a [[boulder]] against them, or letting a [[pusher]] shove them.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;While keys are pushable, they cannot be pushed by a player since attempting to do so will collect them. However, a player can move them by pushing a [[boulder]] against them, or letting a [[pusher]] shove them.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key zztwiki:diff:1.41:old-728:rev-729:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>RT-55J</name></author>
	</entry>
	<entry>
		<id>https://wiki.zzt.org/w/index.php?title=Key&amp;diff=728&amp;oldid=prev</id>
		<title>RT-55J: &quot;Modern worlds&quot;? No that&#039;s been a thing since Caves.</title>
		<link rel="alternate" type="text/html" href="https://wiki.zzt.org/w/index.php?title=Key&amp;diff=728&amp;oldid=prev"/>
		<updated>2025-12-26T15:57:57Z</updated>

		<summary type="html">&lt;p&gt;&amp;quot;Modern worlds&amp;quot;? No that&amp;#039;s been a thing since Caves.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:57, 26 December 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|uses zzt-oop color=yes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|uses zzt-oop color=yes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &#039;&#039;&#039;key&#039;&#039;&#039; element is one of the built-in puzzle elements of [[ZZT]]. A key can be used to open a [[door]] of the corresponding color; together, they allow a designer to create a simple lock-and-key puzzle. When the [[player]] collects a key, the engine prints &quot;You now have the X key.&quot; where X is the key color, adds the key to the &quot;Keys&quot; counter on the HUD, and leaves an identically-colored [[empty]] where the key was. If the player already has a key of a certain color, the game prints &quot;You already have a X key!&quot; where X is the color, and prevents the player from collecting it. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A number &lt;/del&gt;of &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;modern worlds &lt;/del&gt;have exploited this attribute to create puzzles where the player is blocked by multiple keys of the same color and must find enough correctly-colored doors in order to consume each one.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &#039;&#039;&#039;key&#039;&#039;&#039; element is one of the built-in puzzle elements of [[ZZT]]. A key can be used to open a [[door]] of the corresponding color; together, they allow a designer to create a simple lock-and-key puzzle. When the [[player]] collects a key, the engine prints &quot;You now have the X key.&quot; where X is the key color, adds the key to the &quot;Keys&quot; counter on the HUD, and leaves an identically-colored [[empty]] where the key was. If the player already has a key of a certain color, the game prints &quot;You already have a X key!&quot; where X is the color, and prevents the player from collecting it. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ever since [[Caves &lt;/ins&gt;of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ZZT]], authors &lt;/ins&gt;have exploited this attribute to create puzzles where the player is blocked by multiple keys of the same color and must find enough correctly-colored doors in order to consume each one.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;ref&amp;gt;Sweeney, Tim. (1991) &#039;&#039;Caves of ZZT&#039;&#039;, board 34. [https://museumofzzt.com/file/view/zzt/?file=CAVES.ZZT&amp;amp;board=34 Museum of ZZT]&amp;lt;/ref&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keys can be placed in any of the default colors recognized by [[ZZT-OOP]], as well as the darker colors enabled by external editors. The foreground color is used to determine what the color of the key is when it is collected. The engine treats the dark colors the same as the default bright colors when collected, with the side effect that a brown key will be treated and addressed as a yellow key when collected.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keys can be placed in any of the default colors recognized by [[ZZT-OOP]], as well as the darker colors enabled by external editors. The foreground color is used to determine what the color of the key is when it is collected. The engine treats the dark colors the same as the default bright colors when collected, with the side effect that a brown key will be treated and addressed as a yellow key when collected.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot;&gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that attempting to collect a black key while already having 256 or more gems will fail, as the would-be boolean will already be set to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt; (or beyond).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that attempting to collect a black key while already having 256 or more gems will fail, as the would-be boolean will already be set to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt; (or beyond).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== References ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;references/&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Elements]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Elements]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ElementsNavbox}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ElementsNavbox}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key zztwiki:diff:1.41:old-312:rev-728:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>RT-55J</name></author>
	</entry>
	<entry>
		<id>https://wiki.zzt.org/w/index.php?title=Key&amp;diff=312&amp;oldid=prev</id>
		<title>The Green Herring: set to -&gt; increased by</title>
		<link rel="alternate" type="text/html" href="https://wiki.zzt.org/w/index.php?title=Key&amp;diff=312&amp;oldid=prev"/>
		<updated>2021-02-10T02:08:48Z</updated>

		<summary type="html">&lt;p&gt;set to -&amp;gt; increased by&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:08, 10 February 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l27&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Counters ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Counters ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The key counter in the world format is defined in GAMEVARS.PAS line 111, under &amp;lt;tt&amp;gt;TWorldInfo&amp;lt;/tt&amp;gt;, as a boolean array named &amp;lt;tt&amp;gt;Keys&amp;lt;/tt&amp;gt; which ranges from 1 to 7, covering CGA color indexes 1 to 7. Collecting the keys of these colors sets their equivalent boolean to &quot;true&quot;, which is indicated internally as &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt;; when used, they are set to false, or &amp;lt;tt&amp;gt;00&amp;lt;/tt&amp;gt;. When the engine attempts to access the entry of this array for color index 0, the color black, it adds &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt; in the byte prior to that of the Blue key, and in doing so goes out of bounds into the second byte of the gems counter, a 16-bit signed integer that thus uses the second byte to indicate units of 256. Because of this, the player&#039;s gems counter is &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;set to &lt;/del&gt;256. The bug can be fixed by changing the &amp;lt;tt&amp;gt;Keys&amp;lt;/tt&amp;gt; array range from &amp;lt;tt&amp;gt;1..7&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;0..7&amp;lt;/tt&amp;gt;, but doing so will also change the world format, making all standard world files incompatible with the engine.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The key counter in the world format is defined in GAMEVARS.PAS line 111, under &amp;lt;tt&amp;gt;TWorldInfo&amp;lt;/tt&amp;gt;, as a boolean array named &amp;lt;tt&amp;gt;Keys&amp;lt;/tt&amp;gt; which ranges from 1 to 7, covering CGA color indexes 1 to 7. Collecting the keys of these colors sets their equivalent boolean to &quot;true&quot;, which is indicated internally as &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt;; when used, they are set to false, or &amp;lt;tt&amp;gt;00&amp;lt;/tt&amp;gt;. When the engine attempts to access the entry of this array for color index 0, the color black, it adds &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt; in the byte prior to that of the Blue key, and in doing so goes out of bounds into the second byte of the gems counter, a 16-bit signed integer that thus uses the second byte to indicate units of 256. Because of this, the player&#039;s gems counter is &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;increased by &lt;/ins&gt;256. The bug can be fixed by changing the &amp;lt;tt&amp;gt;Keys&amp;lt;/tt&amp;gt; array range from &amp;lt;tt&amp;gt;1..7&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;0..7&amp;lt;/tt&amp;gt;, but doing so will also change the world format, making all standard world files incompatible with the engine.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that attempting to collect a black key while already having 256 or more gems will fail, as the would-be boolean will already be set to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt; (or beyond).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Note that attempting to collect a black key while already having 256 or more gems will fail, as the would-be boolean will already be set to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt; (or beyond).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key zztwiki:diff:1.41:old-311:rev-312:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>The Green Herring</name></author>
	</entry>
	<entry>
		<id>https://wiki.zzt.org/w/index.php?title=Key&amp;diff=311&amp;oldid=prev</id>
		<title>The Green Herring: collecting a key leaves an identically-colored empty</title>
		<link rel="alternate" type="text/html" href="https://wiki.zzt.org/w/index.php?title=Key&amp;diff=311&amp;oldid=prev"/>
		<updated>2021-02-10T01:50:51Z</updated>

		<summary type="html">&lt;p&gt;collecting a key leaves an identically-colored empty&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:50, 10 February 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|uses zzt-oop color=yes&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|uses zzt-oop color=yes&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &#039;&#039;&#039;key&#039;&#039;&#039; element is one of the built-in puzzle elements of [[ZZT]]. A key can be used to open a [[door]] of the corresponding color; together, they allow a designer to create a simple lock-and-key puzzle. When the [[player]] collects a key, the engine prints &quot;You now have the X key.&quot; where X is the key color, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;and &lt;/del&gt;adds the key to the &quot;Keys&quot; counter on the HUD. If the player already has a key of a certain color, the game prints &quot;You already have a X key!&quot; where X is the color, and prevents the player from collecting it. A number of modern worlds have exploited this attribute to create puzzles where the player is blocked by multiple keys of the same color and must find enough correctly-colored doors in order to consume each one.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &#039;&#039;&#039;key&#039;&#039;&#039; element is one of the built-in puzzle elements of [[ZZT]]. A key can be used to open a [[door]] of the corresponding color; together, they allow a designer to create a simple lock-and-key puzzle. When the [[player]] collects a key, the engine prints &quot;You now have the X key.&quot; where X is the key color, adds the key to the &quot;Keys&quot; counter on the HUD&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, and leaves an identically-colored [[empty]] where the key was&lt;/ins&gt;. If the player already has a key of a certain color, the game prints &quot;You already have a X key!&quot; where X is the color, and prevents the player from collecting it. A number of modern worlds have exploited this attribute to create puzzles where the player is blocked by multiple keys of the same color and must find enough correctly-colored doors in order to consume each one.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keys can be placed in any of the default colors recognized by [[ZZT-OOP]], as well as the darker colors enabled by external editors. The foreground color is used to determine what the color of the key is when it is collected. The engine treats the dark colors the same as the default bright colors when collected, with the side effect that a brown key will be treated and addressed as a yellow key when collected.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keys can be placed in any of the default colors recognized by [[ZZT-OOP]], as well as the darker colors enabled by external editors. The foreground color is used to determine what the color of the key is when it is collected. The engine treats the dark colors the same as the default bright colors when collected, with the side effect that a brown key will be treated and addressed as a yellow key when collected.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key zztwiki:diff:1.41:old-310:rev-311:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>The Green Herring</name></author>
	</entry>
	<entry>
		<id>https://wiki.zzt.org/w/index.php?title=Key&amp;diff=310&amp;oldid=prev</id>
		<title>The Green Herring: ♀</title>
		<link rel="alternate" type="text/html" href="https://wiki.zzt.org/w/index.php?title=Key&amp;diff=310&amp;oldid=prev"/>
		<updated>2021-02-10T01:41:27Z</updated>

		<summary type="html">&lt;p&gt;♀&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Element&lt;br /&gt;
|zzt-oop name=key&lt;br /&gt;
|id={{Byte|8}}&lt;br /&gt;
|char={{CharSwatch|12}}&lt;br /&gt;
|category=item&lt;br /&gt;
|stats=no&lt;br /&gt;
|destructible=no&lt;br /&gt;
|effect on movement=pushable&lt;br /&gt;
|uses zzt-oop color=yes&lt;br /&gt;
}}&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;key&amp;#039;&amp;#039;&amp;#039; element is one of the built-in puzzle elements of [[ZZT]]. A key can be used to open a [[door]] of the corresponding color; together, they allow a designer to create a simple lock-and-key puzzle. When the [[player]] collects a key, the engine prints &amp;quot;You now have the X key.&amp;quot; where X is the key color, and adds the key to the &amp;quot;Keys&amp;quot; counter on the HUD. If the player already has a key of a certain color, the game prints &amp;quot;You already have a X key!&amp;quot; where X is the color, and prevents the player from collecting it. A number of modern worlds have exploited this attribute to create puzzles where the player is blocked by multiple keys of the same color and must find enough correctly-colored doors in order to consume each one.&lt;br /&gt;
&lt;br /&gt;
Keys can be placed in any of the default colors recognized by [[ZZT-OOP]], as well as the darker colors enabled by external editors. The foreground color is used to determine what the color of the key is when it is collected. The engine treats the dark colors the same as the default bright colors when collected, with the side effect that a brown key will be treated and addressed as a yellow key when collected.&lt;br /&gt;
&lt;br /&gt;
Unlike other items, a key cannot be given directly to the player through ZZT-OOP; an [[object]] must first use [[Put|#put]], [[Change|#change]] or [[Become|#become]] to create a key for the player to collect.&lt;br /&gt;
&lt;br /&gt;
While keys are pushable, they cannot be pushed by a player since attempting to do so will collect them. However, a player can move them by pushing a [[boulder]] against them, or letting a [[pusher]] shove them.&lt;br /&gt;
&lt;br /&gt;
== Black keys ==&lt;br /&gt;
While keys can be placed in all of the available colors, black keys and dark-grey keys will have glitched behavior when collected:&lt;br /&gt;
# The engine will print a garbled mess in place of the key color that includes &amp;quot;Blue&amp;quot;, &amp;quot;Green&amp;quot;, &amp;quot;Cyan&amp;quot; and &amp;quot;Red&amp;quot;;&lt;br /&gt;
# The gems counter will be incremented by 256.&lt;br /&gt;
Both of these are out-of-bounds errors related to the arrays used for keys, as follows:&lt;br /&gt;
&lt;br /&gt;
=== Color naming ===&lt;br /&gt;
The color naming for pickup messages is handled by the &amp;lt;tt&amp;gt;ColorNames&amp;lt;/tt&amp;gt; array in GAME.PAS line 92, which has entries for color indexes 1 to 7 of the CGA color palette. This is an array of strings up to eight characters in length. When the engine attempts to access the color name for index 0, the color black, it attempts to access the entry prior to the first entry, &amp;lt;tt&amp;gt;Blue&amp;lt;/tt&amp;gt;, and goes out of bounds into where the preceding &amp;lt;tt&amp;gt;ProgressAnimStrings&amp;lt;/tt&amp;gt; array exists in memory. It then fails to detect when an entry ends, and prints as much of the succeeding portion of memory as it can fit in a message string after the initial &amp;quot;&amp;lt;tt&amp;gt;You now have the &amp;lt;/tt&amp;gt;&amp;quot;, producing the glitched message. When editing the engine, the bug can be fixed by changing the array range from &amp;lt;tt&amp;gt;1 .. 7&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;0 .. 7&amp;lt;/tt&amp;gt; and adding &amp;lt;tt&amp;gt;&amp;#039;Black&amp;#039;,&amp;lt;/tt&amp;gt; to the start of the array before &amp;lt;tt&amp;gt;&amp;#039;Blue&amp;#039;,&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Counters ===&lt;br /&gt;
The key counter in the world format is defined in GAMEVARS.PAS line 111, under &amp;lt;tt&amp;gt;TWorldInfo&amp;lt;/tt&amp;gt;, as a boolean array named &amp;lt;tt&amp;gt;Keys&amp;lt;/tt&amp;gt; which ranges from 1 to 7, covering CGA color indexes 1 to 7. Collecting the keys of these colors sets their equivalent boolean to &amp;quot;true&amp;quot;, which is indicated internally as &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt;; when used, they are set to false, or &amp;lt;tt&amp;gt;00&amp;lt;/tt&amp;gt;. When the engine attempts to access the entry of this array for color index 0, the color black, it adds &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt; in the byte prior to that of the Blue key, and in doing so goes out of bounds into the second byte of the gems counter, a 16-bit signed integer that thus uses the second byte to indicate units of 256. Because of this, the player&amp;#039;s gems counter is set to 256. The bug can be fixed by changing the &amp;lt;tt&amp;gt;Keys&amp;lt;/tt&amp;gt; array range from &amp;lt;tt&amp;gt;1..7&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;0..7&amp;lt;/tt&amp;gt;, but doing so will also change the world format, making all standard world files incompatible with the engine.&lt;br /&gt;
&lt;br /&gt;
Note that attempting to collect a black key while already having 256 or more gems will fail, as the would-be boolean will already be set to &amp;lt;tt&amp;gt;01&amp;lt;/tt&amp;gt; (or beyond).&lt;br /&gt;
&lt;br /&gt;
[[Category:Elements]]&lt;br /&gt;
{{ElementsNavbox}}&lt;/div&gt;</summary>
		<author><name>The Green Herring</name></author>
	</entry>
</feed>