<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://Selrach2040.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Textdata_rankingitem.txt</id>
	<title>Textdata rankingitem.txt - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://Selrach2040.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Textdata_rankingitem.txt"/>
	<link rel="alternate" type="text/html" href="https://Selrach2040.com/wiki/index.php?title=Textdata_rankingitem.txt&amp;action=history"/>
	<updated>2026-07-04T07:59:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.4</generator>
	<entry>
		<id>https://Selrach2040.com/wiki/index.php?title=Textdata_rankingitem.txt&amp;diff=68&amp;oldid=prev</id>
		<title>127.0.0.1: Technical breakdown (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://Selrach2040.com/wiki/index.php?title=Textdata_rankingitem.txt&amp;diff=68&amp;oldid=prev"/>
		<updated>2026-07-02T11:24:00Z</updated>

		<summary type="html">&lt;p&gt;Technical breakdown (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;rankingitem.txt&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; (3,190 bytes, part of [[BIN textdata]]) lists the weekly ranking-shop reward items.&lt;br /&gt;
&lt;br /&gt;
== Format ==&lt;br /&gt;
&lt;br /&gt;
117 rows = 13 weeks × 9 slots. Both consumers index it as &amp;lt;code&amp;gt;line = (week − 1) × 9 + slot&amp;lt;/code&amp;gt; (week from the in-game clock; slot from the ranking panel button / the NPC&amp;#039;s subtype) and &amp;lt;code&amp;gt;sscanf&amp;lt;/code&amp;gt; only &amp;lt;code&amp;gt;%*d,%*d,%d,%d&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! col !! meaning&lt;br /&gt;
|-&lt;br /&gt;
| 1 || week (1–13) — the row&amp;#039;s own coordinate, not read directly&lt;br /&gt;
|-&lt;br /&gt;
| 2 || slot (0–8) — likewise positional&lt;br /&gt;
|-&lt;br /&gt;
| 3 || &amp;#039;&amp;#039;&amp;#039;reward item dat file id&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| 4 || &amp;#039;&amp;#039;&amp;#039;reward item entry index&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| 5–10 || not read by either client consumer (slots 6–8 stash extra &amp;lt;code&amp;gt;dat,entry&amp;lt;/code&amp;gt; pairs in cols 5–8, unused here; likely legacy/server-side)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NPC subtype → slot table ==&lt;br /&gt;
&lt;br /&gt;
Each ranking-shop NPC is bound to a slot via a hardcoded subtype→slot table at &amp;lt;code&amp;gt;0x4e2f30&amp;lt;/code&amp;gt; (11 &amp;lt;code&amp;gt;byte(subtype), byte(slot)&amp;lt;/code&amp;gt; pairs):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! NPC subtype !! slot !! !! NPC subtype !! slot&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || || 56 || 4&lt;br /&gt;
|-&lt;br /&gt;
| 11 || 1 || || 66 || 5&lt;br /&gt;
|-&lt;br /&gt;
| 24 || 1 || || 76 || 5&lt;br /&gt;
|-&lt;br /&gt;
| 30 || 2 || || 82 || 5&lt;br /&gt;
|-&lt;br /&gt;
| 40 || 2 || || 86 || 5&lt;br /&gt;
|-&lt;br /&gt;
| 46 || 3 || ||  ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
So 11 NPC subtypes map to 6 slots (0–5), exactly the 6 item rows the panel exposes; the &amp;lt;code&amp;gt;dat=entry=0&amp;lt;/code&amp;gt; rows (slots 6–8) are unreachable/control rows. Full lookup: &amp;lt;code&amp;gt;item = rankingitem[(week−1)*9 + slotTable[npc.subtype]]&amp;lt;/code&amp;gt;, cols 3/4.&lt;br /&gt;
&lt;br /&gt;
== Loading (Ghidra) ==&lt;br /&gt;
&lt;br /&gt;
String address &amp;lt;code&amp;gt;004defc8&amp;lt;/code&amp;gt;. Consumers: &amp;lt;code&amp;gt;cpt_panel_ranking_widget_OnClick @ 004295d2&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;State_NpcRankingShop_Tick @ 0046943f&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;State_NpcRankingShop_Tick&amp;lt;/code&amp;gt; reads the subtype table with &amp;lt;code&amp;gt;npcObj+5&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[BIN textdata]]&lt;br /&gt;
* [[textdata cpt_panel_ranking_msg.txt]]&lt;br /&gt;
* [[textdata NN.dat]] — the reward item records this table points into&lt;/div&gt;</summary>
		<author><name>127.0.0.1</name></author>
	</entry>
</feed>