<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dwarffortresswiki.org/index.php?action=history&amp;feed=atom&amp;title=Utility%3ATweak%2FDevelopment%2FReveal_example</id>
	<title>Utility:Tweak/Development/Reveal example - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dwarffortresswiki.org/index.php?action=history&amp;feed=atom&amp;title=Utility%3ATweak%2FDevelopment%2FReveal_example"/>
	<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utility:Tweak/Development/Reveal_example&amp;action=history"/>
	<updated>2026-05-13T12:45:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utility:Tweak/Development/Reveal_example&amp;diff=62666&amp;oldid=prev</id>
		<title>Briess: moved User:Rick/Tweak/Development/Reveal example to Utility:Tweak/Development/Reveal example:&amp;#32;move utilities to the utility namespace, for searching, indexing, etc</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utility:Tweak/Development/Reveal_example&amp;diff=62666&amp;oldid=prev"/>
		<updated>2010-02-07T20:16:08Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/index.php/User:Rick/Tweak/Development/Reveal_example&quot; class=&quot;mw-redirect&quot; title=&quot;User:Rick/Tweak/Development/Reveal example&quot;&gt;User:Rick/Tweak/Development/Reveal example&lt;/a&gt; to &lt;a href=&quot;/index.php/Utility:Tweak/Development/Reveal_example&quot; title=&quot;Utility:Tweak/Development/Reveal example&quot;&gt;Utility:Tweak/Development/Reveal example&lt;/a&gt;: move utilities to the utility namespace, for searching, indexing, etc&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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 20:16, 7 February 2010&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wiki_db:diff::1.12:old-57361:rev-62666 --&gt;
&lt;/table&gt;</summary>
		<author><name>Briess</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utility:Tweak/Development/Reveal_example&amp;diff=57361&amp;oldid=prev</id>
		<title>HebaruSan: sort key for hacking category</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utility:Tweak/Development/Reveal_example&amp;diff=57361&amp;oldid=prev"/>
		<updated>2009-11-08T19:51:23Z</updated>

		<summary type="html">&lt;p&gt;sort key for hacking category&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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 19:51, 8 November 2009&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-l116&quot; &gt;Line 116:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 116:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;}&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;}&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;[[Category:Hacking]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;[[Category:Hacking&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|Tweak&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki_db:diff::1.12:old-41496:rev-57361 --&gt;
&lt;/table&gt;</summary>
		<author><name>HebaruSan</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utility:Tweak/Development/Reveal_example&amp;diff=41496&amp;oldid=prev</id>
		<title>Mithaldu at 14:19, 25 July 2008</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utility:Tweak/Development/Reveal_example&amp;diff=41496&amp;oldid=prev"/>
		<updated>2008-07-25T14:19:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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 14:19, 25 July 2008&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-l115&quot; &gt;Line 115:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 115:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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='diff-marker'&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='diff-marker'&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;}&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;}&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&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;&gt; &lt;/td&gt;&lt;td class='diff-marker'&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;[[Category:Hacking]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki_db:diff::1.12:old-41495:rev-41496 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mithaldu</name></author>
	</entry>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Utility:Tweak/Development/Reveal_example&amp;diff=41495&amp;oldid=prev</id>
		<title>Rick: New page: &lt;pre&gt;using System; using System.Windows.Forms; using Gibbed.DwarfFortress.Utilities;  namespace Gibbed.DwarfFortress.Tools.Reveal { 	public class Module : IModule 	{ 		private readonly Gui...</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Utility:Tweak/Development/Reveal_example&amp;diff=41495&amp;oldid=prev"/>
		<updated>2008-05-10T02:49:52Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;pre&amp;gt;using System; using System.Windows.Forms; using Gibbed.DwarfFortress.Utilities;  namespace Gibbed.DwarfFortress.Tools.Reveal { 	public class Module : IModule 	{ 		private readonly Gui...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;using System;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using Gibbed.DwarfFortress.Utilities;&lt;br /&gt;
&lt;br /&gt;
namespace Gibbed.DwarfFortress.Tools.Reveal&lt;br /&gt;
{&lt;br /&gt;
	public class Module : IModule&lt;br /&gt;
	{&lt;br /&gt;
		private readonly Guid _Id = new Guid(&amp;quot;{0D303765-8D64-4e46-B7AD-3BD6999F281F}&amp;quot;);&lt;br /&gt;
		public Guid Id { get { return this._Id; } }&lt;br /&gt;
		public string Name { get { return &amp;quot;Reveal&amp;quot;; } }&lt;br /&gt;
		public string Description { get { return &amp;quot;Reveals loaded tiles in the local region.&amp;quot;; } }&lt;br /&gt;
		public string Author { get { return &amp;quot;Rick (rick@gibbed.us)&amp;quot;; } }&lt;br /&gt;
		public string Website { get { return &amp;quot;http://www.dwarffortresswiki.net/index.php/User:Rick/Tweak/Core_Modules#Reveal&amp;quot;; } }&lt;br /&gt;
		public Version Version { get { return new Version(1, 1); } }&lt;br /&gt;
		public bool HideIfUnsupported { get { return false; } }&lt;br /&gt;
&lt;br /&gt;
		public bool SupportsMode(ModuleMode mode)&lt;br /&gt;
		{&lt;br /&gt;
			return mode == ModuleMode.Gui;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		public bool SupportsVersion(IVersion version)&lt;br /&gt;
		{&lt;br /&gt;
			return&lt;br /&gt;
				version.HasAddress(&amp;quot;map_data&amp;quot;) &amp;amp;&amp;amp;&lt;br /&gt;
				version.HasAddress(&amp;quot;map_x_count&amp;quot;) &amp;amp;&amp;amp;&lt;br /&gt;
				version.HasAddress(&amp;quot;map_y_count&amp;quot;) &amp;amp;&amp;amp;&lt;br /&gt;
				version.HasAddress(&amp;quot;map_z_count&amp;quot;) &amp;amp;&amp;amp;&lt;br /&gt;
				version.HasOffset(&amp;quot;map_data_designation_offset&amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		public void Run(ModuleMode mode, IVersion version, IMemory memory, ILogger log, string[] args)&lt;br /&gt;
		{&lt;br /&gt;
			UInt32 map, xcount, ycount, zcount, designation;&lt;br /&gt;
			byte[] data, xoffsets, yoffsets, zoffsets;&lt;br /&gt;
&lt;br /&gt;
			map = memory.ReadU32(version.GetAddress(&amp;quot;map_data&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
			if (map == 0)&lt;br /&gt;
			{&lt;br /&gt;
				MessageBox.Show(&amp;quot;Map data is not yet available!&amp;quot;, &amp;quot;Warning&amp;quot;, MessageBoxButtons.OK, MessageBoxIcon.Warning);&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			if (MessageBox.Show(&lt;br /&gt;
				&amp;quot;Are you sure you want to reveal the map?&amp;quot; + Environment.NewLine +&lt;br /&gt;
				Environment.NewLine +&lt;br /&gt;
				&amp;quot;This could break any ability to get magma and&amp;quot; +&lt;br /&gt;
				Environment.NewLine +&lt;br /&gt;
				&amp;quot;adamantine related structures / options!&amp;quot;, &amp;quot;Question&amp;quot;,&lt;br /&gt;
				MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)&lt;br /&gt;
			{&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			if (memory.Suspend() == false)&lt;br /&gt;
			{&lt;br /&gt;
				memory.Resume();&lt;br /&gt;
				MessageBox.Show(&amp;quot;Failed to suspend process.&amp;quot;, &amp;quot;Error&amp;quot;, MessageBoxButtons.OK, MessageBoxIcon.Error);&lt;br /&gt;
				return;&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			designation = version.GetOffset(&amp;quot;map_data_designation_offset&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			xcount = memory.ReadU32(version.GetAddress(&amp;quot;map_x_count&amp;quot;));&lt;br /&gt;
			ycount = memory.ReadU32(version.GetAddress(&amp;quot;map_y_count&amp;quot;));&lt;br /&gt;
			zcount = memory.ReadU32(version.GetAddress(&amp;quot;map_z_count&amp;quot;));&lt;br /&gt;
			&lt;br /&gt;
			data = new byte[256 * 4];&lt;br /&gt;
			xoffsets = new byte[xcount * 4];&lt;br /&gt;
			yoffsets = new byte[ycount * 4];&lt;br /&gt;
			zoffsets = new byte[zcount * 4];&lt;br /&gt;
&lt;br /&gt;
			memory.Read(map, ref xoffsets);&lt;br /&gt;
			for (int bx = 0; bx &amp;lt; xcount; bx++)&lt;br /&gt;
			{&lt;br /&gt;
				memory.Read(BitConverter.ToUInt32(xoffsets, bx * 4), ref yoffsets);&lt;br /&gt;
&lt;br /&gt;
				for (int by = 0; by &amp;lt; ycount; by++)&lt;br /&gt;
				{&lt;br /&gt;
					memory.Read(BitConverter.ToUInt32(yoffsets, by * 4), ref zoffsets);&lt;br /&gt;
&lt;br /&gt;
					for (int bz = 0; bz &amp;lt; zcount; bz++)&lt;br /&gt;
					{&lt;br /&gt;
						UInt32 block = BitConverter.ToUInt32(zoffsets, bz * 4);&lt;br /&gt;
&lt;br /&gt;
						if (block == 0)&lt;br /&gt;
						{&lt;br /&gt;
							continue;&lt;br /&gt;
						}&lt;br /&gt;
&lt;br /&gt;
						memory.Read(block + designation, ref data);&lt;br /&gt;
&lt;br /&gt;
						for (int i = 0; i &amp;lt; 16 * 16; i++)&lt;br /&gt;
						{&lt;br /&gt;
							byte[] newdata = BitConverter.GetBytes(BitConverter.ToUInt32(data, i * 4) &amp;amp; ~0x200);&lt;br /&gt;
							&lt;br /&gt;
							data[(i * 4) + 0] = newdata[0];&lt;br /&gt;
							data[(i * 4) + 1] = newdata[1];&lt;br /&gt;
							data[(i * 4) + 2] = newdata[2];&lt;br /&gt;
							data[(i * 4) + 3] = newdata[3];&lt;br /&gt;
						}&lt;br /&gt;
&lt;br /&gt;
						memory.Write(block + designation, ref data);&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			if (memory.Resume() == false)&lt;br /&gt;
			{&lt;br /&gt;
				MessageBox.Show(&amp;quot;Failed to resume process.&amp;quot;, &amp;quot;Warning&amp;quot;, MessageBoxButtons.OK, MessageBoxIcon.Warning);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rick</name></author>
	</entry>
</feed>