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