<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.perfecttower2.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AModuleView%2Fdoc</id>
	<title>Module:ModuleView/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.perfecttower2.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AModuleView%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.perfecttower2.com/w/index.php?title=Module:ModuleView/doc&amp;action=history"/>
	<updated>2026-10-07T06:04:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.perfecttower2.com/w/index.php?title=Module:ModuleView/doc&amp;diff=4327&amp;oldid=prev</id>
		<title>Speedybrain: Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.perfecttower2.com/w/index.php?title=Module:ModuleView/doc&amp;diff=4327&amp;oldid=prev"/>
		<updated>2026-10-07T01:49:00Z</updated>

		<summary type="html">&lt;p&gt;Documentation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Shows the game&amp;#039;s modules from the game&amp;#039;s own data, for [[Template:Module|&amp;lt;nowiki&amp;gt;{{Module}}&amp;lt;/nowiki&amp;gt;]] and [[Template:Module row|&amp;lt;nowiki&amp;gt;{{Module row}}&amp;lt;/nowiki&amp;gt;]]. Used on [[Modules]] and the region pages.&lt;br /&gt;
&lt;br /&gt;
The data comes live from the game&amp;#039;s browser build on the game&amp;#039;s CDN. The server reads it, and Lua gets it through the library &amp;lt;code&amp;gt;mw.ext.gameData&amp;lt;/code&amp;gt;: &amp;lt;code&amp;gt;getVersion()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;getModule(key)&amp;lt;/code&amp;gt; (by id or by name), &amp;lt;code&amp;gt;getModules(category)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;getCategories()&amp;lt;/code&amp;gt;. It updates with each game build, without edits on the wiki. Text from the game is escaped. The styles are in [[Template:Module/styles.css]] (TemplateStyles).&lt;br /&gt;
&lt;br /&gt;
== Entry points ==&lt;br /&gt;
* &amp;lt;code&amp;gt;main(frame)&amp;lt;/code&amp;gt;, for &amp;lt;nowiki&amp;gt;{{Module}}&amp;lt;/nowiki&amp;gt;: &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; replaces the shown name. Names link to the module database on perfecttower2.com, or with &amp;lt;code&amp;gt;link&amp;lt;/code&amp;gt; to a wiki page. &amp;lt;code&amp;gt;view&amp;lt;/code&amp;gt; is one of:&lt;br /&gt;
** &amp;lt;code&amp;gt;icon&amp;lt;/code&amp;gt; (default): the name in the text, with a category swatch and a tooltip (category, type, max tier);&lt;br /&gt;
** &amp;lt;code&amp;gt;compact&amp;lt;/code&amp;gt;: a card with the short description;&lt;br /&gt;
** &amp;lt;code&amp;gt;full&amp;lt;/code&amp;gt;: a panel with the description, max tier, levels per tier, prices, target, tags and game version (numbers through [[Module:FormatNumber]]).&lt;br /&gt;
* &amp;lt;code&amp;gt;row(frame)&amp;lt;/code&amp;gt;, for &amp;lt;nowiki&amp;gt;{{Module row}}&amp;lt;/nowiki&amp;gt;: one table row. &amp;lt;code&amp;gt;layout&amp;lt;/code&amp;gt; picks the columns: standard (default; with &amp;lt;code&amp;gt;location&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;condition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;formula&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;infinity&amp;lt;/code&amp;gt; (adds &amp;lt;code&amp;gt;maxtier&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;gridlocation&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;gridcoordinates&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;unlockcost&amp;lt;/code&amp;gt;) or &amp;lt;code&amp;gt;region&amp;lt;/code&amp;gt; (type, name and &amp;lt;code&amp;gt;condition&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;note&amp;lt;/code&amp;gt; adds the wiki&amp;#039;s note under the description.&lt;br /&gt;
* &amp;lt;code&amp;gt;_view(m, args)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_row(m, args, key, available)&amp;lt;/code&amp;gt;: the same from a module table, for tests.&lt;br /&gt;
&lt;br /&gt;
Values the game fills in at runtime show in brackets, such as &amp;lt;code&amp;gt;[chance]&amp;lt;/code&amp;gt;; a parameter with that name (&amp;lt;code&amp;gt;chance=20%&amp;lt;/code&amp;gt;) puts the wiki&amp;#039;s value in its place. The templates&amp;#039; own parameter names (&amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;view&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;formula&amp;lt;/code&amp;gt; and so on) don&amp;#039;t work for this.&lt;br /&gt;
&lt;br /&gt;
An id or name the game doesn&amp;#039;t have shows &amp;quot;Unknown module&amp;quot; and adds [[:Category:Pages with unknown modules]], except in the Template and Module namespaces. When the game data can&amp;#039;t be read, the id or name shows as plain text.&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- Categories below this line --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Module documentation pages]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Speedybrain</name></author>
	</entry>
</feed>