<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sankoquest.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ASprite%2FItem%2Fdoc</id>
	<title>Module:Sprite/Item/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://sankoquest.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ASprite%2FItem%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://sankoquest.wiki/w/index.php?title=Module:Sprite/Item/doc&amp;action=history"/>
	<updated>2026-08-17T06:56:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://sankoquest.wiki/w/index.php?title=Module:Sprite/Item/doc&amp;diff=654&amp;oldid=prev</id>
		<title>GrizzledAlchemistb40f9cb5: module documentation</title>
		<link rel="alternate" type="text/html" href="https://sankoquest.wiki/w/index.php?title=Module:Sprite/Item/doc&amp;diff=654&amp;oldid=prev"/>
		<updated>2026-07-05T17:15:18Z</updated>

		<summary type="html">&lt;p&gt;module documentation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is the documentation page for [[Module:Sprite/Item]].&lt;br /&gt;
&lt;br /&gt;
A pure data module (no functions): it returns a Lua table describing the Sanko item sprite atlas. It is consumed by [[Module:Sprite]] via &amp;lt;code&amp;gt;mw.loadData(&amp;#039;Module:Sprite/Item&amp;#039;)&amp;lt;/code&amp;gt; and, through that, by [[Template:ItemSprite]] and [[Template:Sprite]].&lt;br /&gt;
&lt;br /&gt;
== Table layout ==&lt;br /&gt;
{| class=&amp;quot;wikitable sanko-table&amp;quot;&lt;br /&gt;
! Key !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;url&amp;lt;/code&amp;gt; || Atlas asset path (&amp;lt;code&amp;gt;/w/sanko-assets/Sanko_item_atlas.svg&amp;lt;/code&amp;gt;). Not read by Module:Sprite; the image is applied by the &amp;lt;code&amp;gt;.sanko-sprite&amp;lt;/code&amp;gt; site CSS.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt; || Wiki file name of the atlas (&amp;lt;code&amp;gt;Sanko item atlas.svg&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cell&amp;lt;/code&amp;gt; || Sprite cell size in pixels (32).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;columns&amp;lt;/code&amp;gt; || Atlas columns (4).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;width&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; || Native atlas dimensions in pixels (128 × 1056).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;items&amp;lt;/code&amp;gt; || Map of exact item name → &amp;lt;code&amp;gt;{ item_id, x, y }&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; are the sprite&amp;#039;s pixel offsets in the atlas at native size.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local itemData = mw.loadData(&amp;#039;Module:Sprite/Item&amp;#039;)&lt;br /&gt;
local entry = itemData.items[&amp;#039;Bronze Axe&amp;#039;]&lt;br /&gt;
-- entry = { item_id = 4, x = 96, y = 0 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes and sharp edges ==&lt;br /&gt;
* Keys are exact display names — case, spacing, and punctuation sensitive. &amp;lt;code&amp;gt;[&amp;#039;Bronze Axe&amp;#039;]&amp;lt;/code&amp;gt; works; &amp;lt;code&amp;gt;[&amp;#039;bronze axe&amp;#039;]&amp;lt;/code&amp;gt; renders the missing-sprite placeholder.&lt;br /&gt;
* &amp;lt;code&amp;gt;item_id&amp;lt;/code&amp;gt; values track the game item catalog and are not contiguous (gaps exist, e.g. 29 and 98–100 are unassigned here); Module:Sprite only uses &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;, not &amp;lt;code&amp;gt;item_id&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;NA&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;NA2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;NA3&amp;lt;/code&amp;gt; are placeholder atlas cells, not real items.&lt;br /&gt;
* When adding an entry, its &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; must match the sprite&amp;#039;s actual cell in the atlas image (columns advance x by 32, rows advance y by 32), and &amp;lt;code&amp;gt;height&amp;lt;/code&amp;gt; must cover any new rows. Item IDs and catalog names are bot/API-owned fields per the [[SankoQuest:Style guide|style guide]] — keep them in sync with the catalog rather than inventing values.&lt;br /&gt;
* Loaded with &amp;lt;code&amp;gt;mw.loadData&amp;lt;/code&amp;gt;, so the table must stay static data only (no functions, no metatables).&lt;/div&gt;</summary>
		<author><name>GrizzledAlchemistb40f9cb5</name></author>
	</entry>
</feed>