<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://Selrach2040.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=0%3A0%3A0%3A0%3A0%3A0%3A0%3A1</id>
	<title>Raynegard Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://Selrach2040.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=0%3A0%3A0%3A0%3A0%3A0%3A0%3A1"/>
	<link rel="alternate" type="text/html" href="https://Selrach2040.com/wiki/index.php/Special:Contributions/0:0:0:0:0:0:0:1"/>
	<updated>2026-07-04T07:07:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.4</generator>
	<entry>
		<id>https://Selrach2040.com/wiki/index.php?title=Textdata_NN.dat&amp;diff=85</id>
		<title>Textdata NN.dat</title>
		<link rel="alternate" type="text/html" href="https://Selrach2040.com/wiki/index.php?title=Textdata_NN.dat&amp;diff=85"/>
		<updated>2026-07-02T23:39:44Z</updated>

		<summary type="html">&lt;p&gt;0:0:0:0:0:0:0:1: /* Record types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;NN.dat&amp;lt;/code&amp;gt;&#039;&#039;&#039; (part of [[BIN textdata]]) is the numbered family of item/NPC/monster object-definition files (&amp;lt;code&amp;gt;5.dat&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;8.dat&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;16.dat&amp;lt;/code&amp;gt;, … &amp;lt;code&amp;gt;92.dat&amp;lt;/code&amp;gt;). Despite the &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; extension every file is plain CP949 text.&lt;br /&gt;
&lt;br /&gt;
== Record format ==&lt;br /&gt;
&lt;br /&gt;
Each file is line-based:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;record count&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;Korean name&amp;amp;gt;            ┐&lt;br /&gt;
&amp;amp;lt;English name&amp;amp;gt;           ├ one record = 3 lines&lt;br /&gt;
&amp;amp;lt;stat line: space-separated ints&amp;amp;gt;  ┘&lt;br /&gt;
… repeated &amp;amp;lt;count&amp;amp;gt; times&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example (&amp;lt;code&amp;gt;8.dat&amp;lt;/code&amp;gt;, record 1, a ring): &amp;lt;code&amp;gt;레인가 루지아&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Reynega_rugia&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;8 1 1 1 22 492 100000 5000 0 0 0 0 0 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Loading pipeline ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Struct_Setup_DatFiles @ 00483ff0&amp;lt;/code&amp;gt; — loops all 60 slots, each calling &amp;lt;code&amp;gt;TextArchive_Load_Dat_From_Array @ 00484080&amp;lt;/code&amp;gt;, which reads the count then the 3 lines per record.&lt;br /&gt;
* &amp;lt;code&amp;gt;TextFile_Dat_FileNum_to_value @ 00485760&amp;lt;/code&amp;gt; — the authoritative &amp;lt;code&amp;gt;NN.dat&amp;lt;/code&amp;gt; → slot-index switch (see [[BIN textdata]] for context).&lt;br /&gt;
* &amp;lt;code&amp;gt;DatFiles_FileNum_value_to_DatType @ 00485650&amp;lt;/code&amp;gt; — slot value (0–59) → one of 14 record types (&amp;lt;code&amp;gt;Dat_Type&amp;lt;/code&amp;gt; 0–0xD).&lt;br /&gt;
* &amp;lt;code&amp;gt;Vtable_DatFiles_DecodeFuncs[Dat_Type] @ 00485618&amp;lt;/code&amp;gt; — a 14-entry table of per-type decoders. Each decoder &amp;lt;code&amp;gt;sscanf&amp;lt;/code&amp;gt;s an exact number of stat-line fields, &amp;lt;code&amp;gt;operator_new&amp;lt;/code&amp;gt;s the record, and copies the parsed columns into it. Decoders are recursive (decode one record, tail-call the next).&lt;br /&gt;
* &amp;lt;code&amp;gt;TextDatFiles_GetSlotEntry(g_TextDatFiles, datEnum, idx) @ 00485ac0&amp;lt;/code&amp;gt; — runtime fetch of record &amp;lt;code&amp;gt;idx&amp;lt;/code&amp;gt; from a loaded slot.&lt;br /&gt;
&lt;br /&gt;
== Record types ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type !! Decoder !! Category !! &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; files !! Stat cols !! Carries&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &amp;lt;code&amp;gt;0048422b&amp;lt;/code&amp;gt; || [[Weapons]] (katana/sword/axe/spear/bow/bowgun) || 16–22, 62, 63 || 44 || header + 6 stats + weapon block&lt;br /&gt;
|-&lt;br /&gt;
| 1 || &amp;lt;code&amp;gt;0048453f&amp;lt;/code&amp;gt; || [[Armor]] || 23–31, 61 || 16 || header + 6 stats + sprite/variant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &amp;lt;code&amp;gt;0048468c&amp;lt;/code&amp;gt; || [[Rings]] || 8, 32 || 14 || header + 6 stats&lt;br /&gt;
|-&lt;br /&gt;
| 3 || &amp;lt;code&amp;gt;004847b7&amp;lt;/code&amp;gt; || [[Emblems]] || 9, 33 || 8 || header only (no stats)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || &amp;lt;code&amp;gt;00484882&amp;lt;/code&amp;gt; || Medicine / food || 10, 11, 34 || 10–11 || header + recovery + effect name&lt;br /&gt;
|-&lt;br /&gt;
| 5 || &amp;lt;code&amp;gt;0048496d&amp;lt;/code&amp;gt; || Money || 15 || 8 || header (no price)&lt;br /&gt;
|-&lt;br /&gt;
| 6 || &amp;lt;code&amp;gt;00484a18&amp;lt;/code&amp;gt; || Scrolls || 38–43 || 33 || header + skill/effect params&lt;br /&gt;
|-&lt;br /&gt;
| 7 || &amp;lt;code&amp;gt;00484bd9&amp;lt;/code&amp;gt; || Books || 44–47 || 8 || header only&lt;br /&gt;
|-&lt;br /&gt;
| 8 || &amp;lt;code&amp;gt;00484c80&amp;lt;/code&amp;gt; || Misc items (ore / monster-item / letter) || 35, 36, 37, 48, 49 || 8 || header only&lt;br /&gt;
|-&lt;br /&gt;
| 9 || &amp;lt;code&amp;gt;00484d33&amp;lt;/code&amp;gt; || Monsters || 64–69, 73, 78, 79 || 32 (31 parsed) || monster block&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || &amp;lt;code&amp;gt;00484f8b&amp;lt;/code&amp;gt; || Monster (special) || 70 || 36 || monster block (extended)&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || &amp;lt;code&amp;gt;00485235&amp;lt;/code&amp;gt; || NPCs (field/party) || 5, 74, 75 || 8 || header + refs (no shop)&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || &amp;lt;code&amp;gt;00485305&amp;lt;/code&amp;gt; || NPC shopkeepers (incl. Au) || 77 || 22 (21 parsed) || header + shop-type + category flags&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || &amp;lt;code&amp;gt;004854f8&amp;lt;/code&amp;gt; || Monsters || 89–92 || ~3 || sparse / mostly empty&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Item vs entity split:&#039;&#039;&#039; only weapon/armor/ring carry the 6-stat block. Emblem, money, book, and misc items are header-only (8 cols) — a name + price, nothing more. Consumables add a recovery value + an effect-name string; scrolls add skill params. Monsters/NPCs use the entity layout instead of the item layout.&lt;br /&gt;
&lt;br /&gt;
== Common header (every record) ==&lt;br /&gt;
&lt;br /&gt;
Built by the root constructor &amp;lt;code&amp;gt;DatRecord_InitHeader @ 00483e80&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Field&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;char[0x10]&amp;lt;/code&amp;gt; || Korean name (CP949)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x11&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;char[0x10]&amp;lt;/code&amp;gt; || English name (&amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt; → space)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt; || int || col1 = dat file number&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt; || int || col2 = record index (1-based)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Column → offset mapping ==&lt;br /&gt;
&lt;br /&gt;
The constructors copy parsed columns sequentially into 4-byte fields starting at &amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;col&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; → record offset &amp;lt;code&amp;gt;0x24 + 4·(n − 1)&amp;lt;/code&amp;gt;&#039;&#039;&#039; (col1→&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;, col2→&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;, col3→&amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;, …)&lt;br /&gt;
&lt;br /&gt;
Verified by the weapon record: 44 cols, last field at &amp;lt;code&amp;gt;0x24 + 4·43 = 0xd0&amp;lt;/code&amp;gt;. A few fields are single bytes rather than ints.&lt;br /&gt;
&lt;br /&gt;
=== Item families (weapon / armor / ring / emblem / consumable / scroll / book / misc) ===&lt;br /&gt;
&lt;br /&gt;
Share the item base (&amp;lt;code&amp;gt;ItemRecord_InitBase @ 004862c0&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;…_InitBase2 @ 00486a30&amp;lt;/code&amp;gt;), which fills &amp;lt;code&amp;gt;0x2c–0x40&amp;lt;/code&amp;gt;, then a per-type extension:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Ring&#039;&#039;&#039; (&amp;lt;code&amp;gt;RingRecord_Init @ 00486930&amp;lt;/code&amp;gt;): +&amp;lt;code&amp;gt;0x44–0x58&amp;lt;/code&amp;gt; → 14 fields total (&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;–&amp;lt;code&amp;gt;0x58&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &#039;&#039;&#039;Armor&#039;&#039;&#039; (&amp;lt;code&amp;gt;ArmorRecord_Init @ 004861b0&amp;lt;/code&amp;gt;): +&amp;lt;code&amp;gt;0x44–0x60&amp;lt;/code&amp;gt; → 16 fields.&lt;br /&gt;
* &#039;&#039;&#039;Weapon&#039;&#039;&#039; (&amp;lt;code&amp;gt;WeaponRecord_Init @ 00486b10&amp;lt;/code&amp;gt;): +&amp;lt;code&amp;gt;0x44–0xd0&amp;lt;/code&amp;gt; → 44 fields; a byte at &amp;lt;code&amp;gt;0x68&amp;lt;/code&amp;gt; (col 18), plus a run of ~15 id-like values (col 26+) that look like sprite/effect/skill references.&lt;br /&gt;
&lt;br /&gt;
=== Entities (NPC / monster) ===&lt;br /&gt;
&lt;br /&gt;
Use the root header (&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;) then category fields from &amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Monster&#039;&#039;&#039; (&amp;lt;code&amp;gt;MonsterRecord_Init @ 00485c10&amp;lt;/code&amp;gt;): &amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt; (byte) then ints &amp;lt;code&amp;gt;0x30–0x9c&amp;lt;/code&amp;gt; — 29 fields (31 parsed; the 32nd column on the line isn&#039;t read). Example &amp;lt;code&amp;gt;64.dat&amp;lt;/code&amp;gt; &amp;quot;Weldok&amp;quot;: &amp;lt;code&amp;gt;64 1 36 1 0 0 620 62 79 354 … 160 120 100 350 50 85 150 233 61 …&amp;lt;/code&amp;gt;. HP/stats not yet labelled (consumed server-side).&lt;br /&gt;
* &#039;&#039;&#039;NPC&#039;&#039;&#039; (&amp;lt;code&amp;gt;NpcRecord_Init @ 00485f90&amp;lt;/code&amp;gt;, via &amp;lt;code&amp;gt;NpcRecord_InitBase @ 004860d0&amp;lt;/code&amp;gt;): ints &amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;0x30&amp;lt;/code&amp;gt;, a byte &amp;lt;code&amp;gt;0x34&amp;lt;/code&amp;gt;, ints &amp;lt;code&amp;gt;0x38–0x40&amp;lt;/code&amp;gt;, then a 14-byte block &amp;lt;code&amp;gt;0x44–0x51&amp;lt;/code&amp;gt;. Example &amp;lt;code&amp;gt;77.dat&amp;lt;/code&amp;gt; &amp;quot;Noick&amp;quot;: &amp;lt;code&amp;gt;77 1 121 85 0 0 75 57 0 …&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Common header columns (cols 1–8, item records) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Col !! Offset !! Meaning !! Confidence&lt;br /&gt;
|-&lt;br /&gt;
| 1 || &amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt; || dat file number || confirmed&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt; || record index (1-based) || confirmed&lt;br /&gt;
|-&lt;br /&gt;
| 3 || &amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt; || sub-type / grade (small: 0–3) || tentative&lt;br /&gt;
|-&lt;br /&gt;
| 4 || &amp;lt;code&amp;gt;0x30&amp;lt;/code&amp;gt; || sub-type / grade (small) || tentative&lt;br /&gt;
|-&lt;br /&gt;
| 5 || &amp;lt;code&amp;gt;0x34&amp;lt;/code&amp;gt; || item level / sort key (e.g. 22, 47, 52) || tentative&lt;br /&gt;
|-&lt;br /&gt;
| 6 || &amp;lt;code&amp;gt;0x38&amp;lt;/code&amp;gt; || icon bitmap index || confirmed (leader-emblem icon)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || &amp;lt;code&amp;gt;0x3c&amp;lt;/code&amp;gt; || buy price || confirmed (shop gold check)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || &amp;lt;code&amp;gt;0x40&amp;lt;/code&amp;gt; || sell price || inferred (buy/sell pair)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Header-only items (emblem/money/book/misc, 8 cols) end here. Money (&amp;lt;code&amp;gt;15.dat&amp;lt;/code&amp;gt;) has &amp;lt;code&amp;gt;col7=col8=0&amp;lt;/code&amp;gt; — it &#039;&#039;is&#039;&#039; currency, no price. Equippables continue with the 6-stat block below.&lt;br /&gt;
&lt;br /&gt;
== The 6 equip stat columns (confirmed) ==&lt;br /&gt;
&lt;br /&gt;
Every equippable item record carries six stats at a fixed offset block &amp;lt;code&amp;gt;0x44–0x58&amp;lt;/code&amp;gt; (cols 9–14), confirmed from the stat-display builder &amp;lt;code&amp;gt;FUN_004bacb0&amp;lt;/code&amp;gt; (the item-detail panel):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Col !! Offset !! Stat&lt;br /&gt;
|-&lt;br /&gt;
| col9 || &amp;lt;code&amp;gt;0x44&amp;lt;/code&amp;gt; || &#039;&#039;&#039;OFC&#039;&#039;&#039; — offense / attack&lt;br /&gt;
|-&lt;br /&gt;
| col10 || &amp;lt;code&amp;gt;0x48&amp;lt;/code&amp;gt; || &#039;&#039;&#039;DEF&#039;&#039;&#039; — defense&lt;br /&gt;
|-&lt;br /&gt;
| col11 || &amp;lt;code&amp;gt;0x4c&amp;lt;/code&amp;gt; || &#039;&#039;&#039;AGL&#039;&#039;&#039; — agility&lt;br /&gt;
|-&lt;br /&gt;
| col12 || &amp;lt;code&amp;gt;0x50&amp;lt;/code&amp;gt; || &#039;&#039;&#039;LUCK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| col13 || &amp;lt;code&amp;gt;0x54&amp;lt;/code&amp;gt; || &#039;&#039;&#039;LIFE&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| col14 || &amp;lt;code&amp;gt;0x58&amp;lt;/code&amp;gt; || &#039;&#039;&#039;FOOD&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The on-screen order differs from the record order — the header (&amp;lt;code&amp;gt;misccaption_u.txt&amp;lt;/code&amp;gt; line 1) reads &amp;lt;code&amp;gt;LIFE FOOD OFC DEF AGL LUCK&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;FUN_004bacb0&amp;lt;/code&amp;gt; re-orders fields to match. It prints two rows: the item&#039;s stat values, and a &#039;&#039;&#039;SPEC&#039;&#039;&#039; row (&amp;lt;code&amp;gt;misccaption_u.txt&amp;lt;/code&amp;gt; line 2) with the &amp;lt;code&amp;gt;%+d&amp;lt;/code&amp;gt; equip delta.&lt;br /&gt;
&lt;br /&gt;
Cross-checks: rings (&amp;lt;code&amp;gt;8.dat&amp;lt;/code&amp;gt;) only ever set cols 9–12 (OFC/DEF/AGL/LUCK), never LIFE/FOOD; armor &amp;lt;code&amp;gt;23.dat&amp;lt;/code&amp;gt; col10 = DEF (main stat), col11 = AGL; weapon &amp;lt;code&amp;gt;16.dat&amp;lt;/code&amp;gt; katana col9 = 110 (OFFENSE), col11 = 65 (AGL). These offsets are identical across item types — weapons carry the same 6 at &amp;lt;code&amp;gt;0x44–0x58&amp;lt;/code&amp;gt;, plus their weapon-specific columns beyond.&lt;br /&gt;
&lt;br /&gt;
== Weapon block (cols 15–44, &amp;lt;code&amp;gt;0x5c&amp;lt;/code&amp;gt;–&amp;lt;code&amp;gt;0xd0&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
Example &amp;lt;code&amp;gt;16.dat&amp;lt;/code&amp;gt; katana: &amp;lt;code&amp;gt;… 9 120 0 1 2 148 0 255 0 0 0 | 463 436 489 490 491 492 589 590 539 540 541 542 601 602 | 2 1 38 1 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;cols 15–25&#039;&#039;&#039; — weapon params (attack range/speed/hit-rate class; &amp;lt;code&amp;gt;0x68&amp;lt;/code&amp;gt;/col18 is a byte). Consumed by the attack/combat path (server-side for damage).&lt;br /&gt;
* &#039;&#039;&#039;cols 26–39&#039;&#039;&#039; — a run of 14 sprite/animation sequence ids (&amp;lt;code&amp;gt;463…602&amp;lt;/code&amp;gt;, in the sprite-archive range) — the weapon&#039;s swing/effect frames, loaded by the animation system on equip.&lt;br /&gt;
* &#039;&#039;&#039;cols 40–44&#039;&#039;&#039; — display/misc; col42 (&amp;lt;code&amp;gt;0xc8&amp;lt;/code&amp;gt;) = catalog icon (read by &amp;lt;code&amp;gt;Stuct_Setup_cpt_panel_catalog&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Consumables / scrolls ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Consumable&#039;&#039;&#039; (type 4, 10–11 cols): header + col9 = recovery amount (e.g. food &amp;lt;code&amp;gt;600&amp;lt;/code&amp;gt;) + a trailing effect/skill-name string.&lt;br /&gt;
* &#039;&#039;&#039;Scroll&#039;&#039;&#039; (type 6, 33 cols): header + col9…col15 = skill/effect params (skill id, power, level req), rest padding.&lt;br /&gt;
&lt;br /&gt;
== Monster block (&amp;lt;code&amp;gt;0x2c–0x9c&amp;lt;/code&amp;gt;, ~30 fields) ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MonsterRecord_Init&amp;lt;/code&amp;gt; writes cols 3+ as HP / base stats / AI / drop data. These are read by the &#039;&#039;&#039;server&#039;&#039;&#039; combat/AI — the client only uses the monster record for its sprite/name — so the columns aren&#039;t labelled here.&lt;br /&gt;
&lt;br /&gt;
== Confirmed column labels (field-consumer trace) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Record !! Col / offset !! Meaning !! Evidence&lt;br /&gt;
|-&lt;br /&gt;
| Item (all types) || col7 = &amp;lt;code&amp;gt;0x3c&amp;lt;/code&amp;gt; || buy price || &amp;lt;code&amp;gt;State_NpcShopBuy_Tick @ 00467fd0&amp;lt;/code&amp;gt;: buy allowed only if &amp;lt;code&amp;gt;record-&amp;amp;gt;0x3c &amp;amp;lt;= player.money&amp;lt;/code&amp;gt;, then sends &amp;lt;code&amp;gt;0x35&amp;lt;/code&amp;gt;. Ring col7=100000, weapon 9000, matches.&lt;br /&gt;
|-&lt;br /&gt;
| Item || col8 = &amp;lt;code&amp;gt;0x40&amp;lt;/code&amp;gt; || sell price (inferred) || Not consumer-confirmed, but the buy/sell pair — ring col8=5000 vs buy 100000; weapon col8=900 vs buy 9000.&lt;br /&gt;
|-&lt;br /&gt;
| NPC/shop (type 0xB/0xC) || col7 = &amp;lt;code&amp;gt;0x3c&amp;lt;/code&amp;gt; || shop-type code || &amp;lt;code&amp;gt;State_NpcShopBuy_Tick&amp;lt;/code&amp;gt; case 0 switches on &amp;lt;code&amp;gt;npcRecord-&amp;amp;gt;0x3c&amp;lt;/code&amp;gt;, accepts &amp;lt;code&amp;gt;0x44,0x47,0x4a,0x4d,0x50,0x53&amp;lt;/code&amp;gt; = letters D G J M P S (shop kinds).&lt;br /&gt;
|-&lt;br /&gt;
| NPC/shop || cols 9–22 = &amp;lt;code&amp;gt;0x44&amp;lt;/code&amp;gt;–&amp;lt;code&amp;gt;0x51&amp;lt;/code&amp;gt; (14 bytes) || per-category &amp;quot;sells this&amp;quot; flags || same function loops &amp;lt;code&amp;gt;npcRecord[i + 0x44]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..13&amp;lt;/code&amp;gt;; each nonzero byte adds item-category &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; to the shop&#039;s list (14 categories: Katana…MonsterItem).&lt;br /&gt;
|-&lt;br /&gt;
| Item / emblem || col6 = &amp;lt;code&amp;gt;0x38&amp;lt;/code&amp;gt; || class/icon bitmap index || &amp;lt;code&amp;gt;cpt_panel_status_widget_Draw&amp;lt;/code&amp;gt;: for the party-leader emblem (dat 9), &amp;lt;code&amp;gt;record-&amp;amp;gt;0x38&amp;lt;/code&amp;gt; is passed to &amp;lt;code&amp;gt;File_Read_Bitmap_Archive&amp;lt;/code&amp;gt; as the icon image id.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Server relevance:&#039;&#039;&#039; col7 (buy price) is the value the shop&#039;s gold check uses; an equipped item&#039;s col9–14 bonuses (OFC/DEF/AGL/LUCK/LIFE/FOOD) are applied to the wearer&#039;s totals. The player&#039;s &#039;&#039;total&#039;&#039; stats (base + all equipped bonuses) are computed server-side and pushed via packets &amp;lt;code&amp;gt;0xC001&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;0xC002&amp;lt;/code&amp;gt; — the client never re-derives totals from records.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[BIN textdata]]&lt;br /&gt;
* [[textdata cptNN.txt]] — the flavor-text companion file, paired by dat number&lt;/div&gt;</summary>
		<author><name>0:0:0:0:0:0:0:1</name></author>
	</entry>
	<entry>
		<id>https://Selrach2040.com/wiki/index.php?title=Textdata_NN.dat&amp;diff=83</id>
		<title>Textdata NN.dat</title>
		<link rel="alternate" type="text/html" href="https://Selrach2040.com/wiki/index.php?title=Textdata_NN.dat&amp;diff=83"/>
		<updated>2026-07-02T23:35:05Z</updated>

		<summary type="html">&lt;p&gt;0:0:0:0:0:0:0:1: /* Record types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;NN.dat&amp;lt;/code&amp;gt;&#039;&#039;&#039; (part of [[BIN textdata]]) is the numbered family of item/NPC/monster object-definition files (&amp;lt;code&amp;gt;5.dat&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;8.dat&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;16.dat&amp;lt;/code&amp;gt;, … &amp;lt;code&amp;gt;92.dat&amp;lt;/code&amp;gt;). Despite the &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; extension every file is plain CP949 text.&lt;br /&gt;
&lt;br /&gt;
== Record format ==&lt;br /&gt;
&lt;br /&gt;
Each file is line-based:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;record count&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;Korean name&amp;amp;gt;            ┐&lt;br /&gt;
&amp;amp;lt;English name&amp;amp;gt;           ├ one record = 3 lines&lt;br /&gt;
&amp;amp;lt;stat line: space-separated ints&amp;amp;gt;  ┘&lt;br /&gt;
… repeated &amp;amp;lt;count&amp;amp;gt; times&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example (&amp;lt;code&amp;gt;8.dat&amp;lt;/code&amp;gt;, record 1, a ring): &amp;lt;code&amp;gt;레인가 루지아&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Reynega_rugia&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;8 1 1 1 22 492 100000 5000 0 0 0 0 0 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Loading pipeline ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Struct_Setup_DatFiles @ 00483ff0&amp;lt;/code&amp;gt; — loops all 60 slots, each calling &amp;lt;code&amp;gt;TextArchive_Load_Dat_From_Array @ 00484080&amp;lt;/code&amp;gt;, which reads the count then the 3 lines per record.&lt;br /&gt;
* &amp;lt;code&amp;gt;TextFile_Dat_FileNum_to_value @ 00485760&amp;lt;/code&amp;gt; — the authoritative &amp;lt;code&amp;gt;NN.dat&amp;lt;/code&amp;gt; → slot-index switch (see [[BIN textdata]] for context).&lt;br /&gt;
* &amp;lt;code&amp;gt;DatFiles_FileNum_value_to_DatType @ 00485650&amp;lt;/code&amp;gt; — slot value (0–59) → one of 14 record types (&amp;lt;code&amp;gt;Dat_Type&amp;lt;/code&amp;gt; 0–0xD).&lt;br /&gt;
* &amp;lt;code&amp;gt;Vtable_DatFiles_DecodeFuncs[Dat_Type] @ 00485618&amp;lt;/code&amp;gt; — a 14-entry table of per-type decoders. Each decoder &amp;lt;code&amp;gt;sscanf&amp;lt;/code&amp;gt;s an exact number of stat-line fields, &amp;lt;code&amp;gt;operator_new&amp;lt;/code&amp;gt;s the record, and copies the parsed columns into it. Decoders are recursive (decode one record, tail-call the next).&lt;br /&gt;
* &amp;lt;code&amp;gt;TextDatFiles_GetSlotEntry(g_TextDatFiles, datEnum, idx) @ 00485ac0&amp;lt;/code&amp;gt; — runtime fetch of record &amp;lt;code&amp;gt;idx&amp;lt;/code&amp;gt; from a loaded slot.&lt;br /&gt;
&lt;br /&gt;
== Record types ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Type !! Decoder !! Category !! &amp;lt;code&amp;gt;.dat&amp;lt;/code&amp;gt; files !! Stat cols !! Carries&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &amp;lt;code&amp;gt;0048422b&amp;lt;/code&amp;gt; || [[Weapons]] (katana/sword/axe/spear/bow/bowgun) || 16–22, 62, 63 || 44 || header + 6 stats + weapon block&lt;br /&gt;
|-&lt;br /&gt;
| 1 || &amp;lt;code&amp;gt;0048453f&amp;lt;/code&amp;gt; || [[Armor]] || 23–31, 61 || 16 || header + 6 stats + sprite/variant&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &amp;lt;code&amp;gt;0048468c&amp;lt;/code&amp;gt; || [[Rings]] || 8, 32 || 14 || header + 6 stats&lt;br /&gt;
|-&lt;br /&gt;
| 3 || &amp;lt;code&amp;gt;004847b7&amp;lt;/code&amp;gt; || Emblems || 9, 33 || 8 || header only (no stats)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || &amp;lt;code&amp;gt;00484882&amp;lt;/code&amp;gt; || Medicine / food || 10, 11, 34 || 10–11 || header + recovery + effect name&lt;br /&gt;
|-&lt;br /&gt;
| 5 || &amp;lt;code&amp;gt;0048496d&amp;lt;/code&amp;gt; || Money || 15 || 8 || header (no price)&lt;br /&gt;
|-&lt;br /&gt;
| 6 || &amp;lt;code&amp;gt;00484a18&amp;lt;/code&amp;gt; || Scrolls || 38–43 || 33 || header + skill/effect params&lt;br /&gt;
|-&lt;br /&gt;
| 7 || &amp;lt;code&amp;gt;00484bd9&amp;lt;/code&amp;gt; || Books || 44–47 || 8 || header only&lt;br /&gt;
|-&lt;br /&gt;
| 8 || &amp;lt;code&amp;gt;00484c80&amp;lt;/code&amp;gt; || Misc items (ore / monster-item / letter) || 35, 36, 37, 48, 49 || 8 || header only&lt;br /&gt;
|-&lt;br /&gt;
| 9 || &amp;lt;code&amp;gt;00484d33&amp;lt;/code&amp;gt; || Monsters || 64–69, 73, 78, 79 || 32 (31 parsed) || monster block&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || &amp;lt;code&amp;gt;00484f8b&amp;lt;/code&amp;gt; || Monster (special) || 70 || 36 || monster block (extended)&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || &amp;lt;code&amp;gt;00485235&amp;lt;/code&amp;gt; || NPCs (field/party) || 5, 74, 75 || 8 || header + refs (no shop)&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || &amp;lt;code&amp;gt;00485305&amp;lt;/code&amp;gt; || NPC shopkeepers (incl. Au) || 77 || 22 (21 parsed) || header + shop-type + category flags&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || &amp;lt;code&amp;gt;004854f8&amp;lt;/code&amp;gt; || Monsters || 89–92 || ~3 || sparse / mostly empty&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Item vs entity split:&#039;&#039;&#039; only weapon/armor/ring carry the 6-stat block. Emblem, money, book, and misc items are header-only (8 cols) — a name + price, nothing more. Consumables add a recovery value + an effect-name string; scrolls add skill params. Monsters/NPCs use the entity layout instead of the item layout.&lt;br /&gt;
&lt;br /&gt;
== Common header (every record) ==&lt;br /&gt;
&lt;br /&gt;
Built by the root constructor &amp;lt;code&amp;gt;DatRecord_InitHeader @ 00483e80&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Field&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;char[0x10]&amp;lt;/code&amp;gt; || Korean name (CP949)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x11&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;char[0x10]&amp;lt;/code&amp;gt; || English name (&amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt; → space)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt; || int || col1 = dat file number&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt; || int || col2 = record index (1-based)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Column → offset mapping ==&lt;br /&gt;
&lt;br /&gt;
The constructors copy parsed columns sequentially into 4-byte fields starting at &amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
: &#039;&#039;&#039;col&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; → record offset &amp;lt;code&amp;gt;0x24 + 4·(n − 1)&amp;lt;/code&amp;gt;&#039;&#039;&#039; (col1→&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;, col2→&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;, col3→&amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;, …)&lt;br /&gt;
&lt;br /&gt;
Verified by the weapon record: 44 cols, last field at &amp;lt;code&amp;gt;0x24 + 4·43 = 0xd0&amp;lt;/code&amp;gt;. A few fields are single bytes rather than ints.&lt;br /&gt;
&lt;br /&gt;
=== Item families (weapon / armor / ring / emblem / consumable / scroll / book / misc) ===&lt;br /&gt;
&lt;br /&gt;
Share the item base (&amp;lt;code&amp;gt;ItemRecord_InitBase @ 004862c0&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;…_InitBase2 @ 00486a30&amp;lt;/code&amp;gt;), which fills &amp;lt;code&amp;gt;0x2c–0x40&amp;lt;/code&amp;gt;, then a per-type extension:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Ring&#039;&#039;&#039; (&amp;lt;code&amp;gt;RingRecord_Init @ 00486930&amp;lt;/code&amp;gt;): +&amp;lt;code&amp;gt;0x44–0x58&amp;lt;/code&amp;gt; → 14 fields total (&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;–&amp;lt;code&amp;gt;0x58&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &#039;&#039;&#039;Armor&#039;&#039;&#039; (&amp;lt;code&amp;gt;ArmorRecord_Init @ 004861b0&amp;lt;/code&amp;gt;): +&amp;lt;code&amp;gt;0x44–0x60&amp;lt;/code&amp;gt; → 16 fields.&lt;br /&gt;
* &#039;&#039;&#039;Weapon&#039;&#039;&#039; (&amp;lt;code&amp;gt;WeaponRecord_Init @ 00486b10&amp;lt;/code&amp;gt;): +&amp;lt;code&amp;gt;0x44–0xd0&amp;lt;/code&amp;gt; → 44 fields; a byte at &amp;lt;code&amp;gt;0x68&amp;lt;/code&amp;gt; (col 18), plus a run of ~15 id-like values (col 26+) that look like sprite/effect/skill references.&lt;br /&gt;
&lt;br /&gt;
=== Entities (NPC / monster) ===&lt;br /&gt;
&lt;br /&gt;
Use the root header (&amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt;) then category fields from &amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Monster&#039;&#039;&#039; (&amp;lt;code&amp;gt;MonsterRecord_Init @ 00485c10&amp;lt;/code&amp;gt;): &amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt; (byte) then ints &amp;lt;code&amp;gt;0x30–0x9c&amp;lt;/code&amp;gt; — 29 fields (31 parsed; the 32nd column on the line isn&#039;t read). Example &amp;lt;code&amp;gt;64.dat&amp;lt;/code&amp;gt; &amp;quot;Weldok&amp;quot;: &amp;lt;code&amp;gt;64 1 36 1 0 0 620 62 79 354 … 160 120 100 350 50 85 150 233 61 …&amp;lt;/code&amp;gt;. HP/stats not yet labelled (consumed server-side).&lt;br /&gt;
* &#039;&#039;&#039;NPC&#039;&#039;&#039; (&amp;lt;code&amp;gt;NpcRecord_Init @ 00485f90&amp;lt;/code&amp;gt;, via &amp;lt;code&amp;gt;NpcRecord_InitBase @ 004860d0&amp;lt;/code&amp;gt;): ints &amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;0x30&amp;lt;/code&amp;gt;, a byte &amp;lt;code&amp;gt;0x34&amp;lt;/code&amp;gt;, ints &amp;lt;code&amp;gt;0x38–0x40&amp;lt;/code&amp;gt;, then a 14-byte block &amp;lt;code&amp;gt;0x44–0x51&amp;lt;/code&amp;gt;. Example &amp;lt;code&amp;gt;77.dat&amp;lt;/code&amp;gt; &amp;quot;Noick&amp;quot;: &amp;lt;code&amp;gt;77 1 121 85 0 0 75 57 0 …&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Common header columns (cols 1–8, item records) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Col !! Offset !! Meaning !! Confidence&lt;br /&gt;
|-&lt;br /&gt;
| 1 || &amp;lt;code&amp;gt;0x24&amp;lt;/code&amp;gt; || dat file number || confirmed&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &amp;lt;code&amp;gt;0x28&amp;lt;/code&amp;gt; || record index (1-based) || confirmed&lt;br /&gt;
|-&lt;br /&gt;
| 3 || &amp;lt;code&amp;gt;0x2c&amp;lt;/code&amp;gt; || sub-type / grade (small: 0–3) || tentative&lt;br /&gt;
|-&lt;br /&gt;
| 4 || &amp;lt;code&amp;gt;0x30&amp;lt;/code&amp;gt; || sub-type / grade (small) || tentative&lt;br /&gt;
|-&lt;br /&gt;
| 5 || &amp;lt;code&amp;gt;0x34&amp;lt;/code&amp;gt; || item level / sort key (e.g. 22, 47, 52) || tentative&lt;br /&gt;
|-&lt;br /&gt;
| 6 || &amp;lt;code&amp;gt;0x38&amp;lt;/code&amp;gt; || icon bitmap index || confirmed (leader-emblem icon)&lt;br /&gt;
|-&lt;br /&gt;
| 7 || &amp;lt;code&amp;gt;0x3c&amp;lt;/code&amp;gt; || buy price || confirmed (shop gold check)&lt;br /&gt;
|-&lt;br /&gt;
| 8 || &amp;lt;code&amp;gt;0x40&amp;lt;/code&amp;gt; || sell price || inferred (buy/sell pair)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Header-only items (emblem/money/book/misc, 8 cols) end here. Money (&amp;lt;code&amp;gt;15.dat&amp;lt;/code&amp;gt;) has &amp;lt;code&amp;gt;col7=col8=0&amp;lt;/code&amp;gt; — it &#039;&#039;is&#039;&#039; currency, no price. Equippables continue with the 6-stat block below.&lt;br /&gt;
&lt;br /&gt;
== The 6 equip stat columns (confirmed) ==&lt;br /&gt;
&lt;br /&gt;
Every equippable item record carries six stats at a fixed offset block &amp;lt;code&amp;gt;0x44–0x58&amp;lt;/code&amp;gt; (cols 9–14), confirmed from the stat-display builder &amp;lt;code&amp;gt;FUN_004bacb0&amp;lt;/code&amp;gt; (the item-detail panel):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Col !! Offset !! Stat&lt;br /&gt;
|-&lt;br /&gt;
| col9 || &amp;lt;code&amp;gt;0x44&amp;lt;/code&amp;gt; || &#039;&#039;&#039;OFC&#039;&#039;&#039; — offense / attack&lt;br /&gt;
|-&lt;br /&gt;
| col10 || &amp;lt;code&amp;gt;0x48&amp;lt;/code&amp;gt; || &#039;&#039;&#039;DEF&#039;&#039;&#039; — defense&lt;br /&gt;
|-&lt;br /&gt;
| col11 || &amp;lt;code&amp;gt;0x4c&amp;lt;/code&amp;gt; || &#039;&#039;&#039;AGL&#039;&#039;&#039; — agility&lt;br /&gt;
|-&lt;br /&gt;
| col12 || &amp;lt;code&amp;gt;0x50&amp;lt;/code&amp;gt; || &#039;&#039;&#039;LUCK&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| col13 || &amp;lt;code&amp;gt;0x54&amp;lt;/code&amp;gt; || &#039;&#039;&#039;LIFE&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| col14 || &amp;lt;code&amp;gt;0x58&amp;lt;/code&amp;gt; || &#039;&#039;&#039;FOOD&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The on-screen order differs from the record order — the header (&amp;lt;code&amp;gt;misccaption_u.txt&amp;lt;/code&amp;gt; line 1) reads &amp;lt;code&amp;gt;LIFE FOOD OFC DEF AGL LUCK&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;FUN_004bacb0&amp;lt;/code&amp;gt; re-orders fields to match. It prints two rows: the item&#039;s stat values, and a &#039;&#039;&#039;SPEC&#039;&#039;&#039; row (&amp;lt;code&amp;gt;misccaption_u.txt&amp;lt;/code&amp;gt; line 2) with the &amp;lt;code&amp;gt;%+d&amp;lt;/code&amp;gt; equip delta.&lt;br /&gt;
&lt;br /&gt;
Cross-checks: rings (&amp;lt;code&amp;gt;8.dat&amp;lt;/code&amp;gt;) only ever set cols 9–12 (OFC/DEF/AGL/LUCK), never LIFE/FOOD; armor &amp;lt;code&amp;gt;23.dat&amp;lt;/code&amp;gt; col10 = DEF (main stat), col11 = AGL; weapon &amp;lt;code&amp;gt;16.dat&amp;lt;/code&amp;gt; katana col9 = 110 (OFFENSE), col11 = 65 (AGL). These offsets are identical across item types — weapons carry the same 6 at &amp;lt;code&amp;gt;0x44–0x58&amp;lt;/code&amp;gt;, plus their weapon-specific columns beyond.&lt;br /&gt;
&lt;br /&gt;
== Weapon block (cols 15–44, &amp;lt;code&amp;gt;0x5c&amp;lt;/code&amp;gt;–&amp;lt;code&amp;gt;0xd0&amp;lt;/code&amp;gt;) ==&lt;br /&gt;
&lt;br /&gt;
Example &amp;lt;code&amp;gt;16.dat&amp;lt;/code&amp;gt; katana: &amp;lt;code&amp;gt;… 9 120 0 1 2 148 0 255 0 0 0 | 463 436 489 490 491 492 589 590 539 540 541 542 601 602 | 2 1 38 1 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;cols 15–25&#039;&#039;&#039; — weapon params (attack range/speed/hit-rate class; &amp;lt;code&amp;gt;0x68&amp;lt;/code&amp;gt;/col18 is a byte). Consumed by the attack/combat path (server-side for damage).&lt;br /&gt;
* &#039;&#039;&#039;cols 26–39&#039;&#039;&#039; — a run of 14 sprite/animation sequence ids (&amp;lt;code&amp;gt;463…602&amp;lt;/code&amp;gt;, in the sprite-archive range) — the weapon&#039;s swing/effect frames, loaded by the animation system on equip.&lt;br /&gt;
* &#039;&#039;&#039;cols 40–44&#039;&#039;&#039; — display/misc; col42 (&amp;lt;code&amp;gt;0xc8&amp;lt;/code&amp;gt;) = catalog icon (read by &amp;lt;code&amp;gt;Stuct_Setup_cpt_panel_catalog&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Consumables / scrolls ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Consumable&#039;&#039;&#039; (type 4, 10–11 cols): header + col9 = recovery amount (e.g. food &amp;lt;code&amp;gt;600&amp;lt;/code&amp;gt;) + a trailing effect/skill-name string.&lt;br /&gt;
* &#039;&#039;&#039;Scroll&#039;&#039;&#039; (type 6, 33 cols): header + col9…col15 = skill/effect params (skill id, power, level req), rest padding.&lt;br /&gt;
&lt;br /&gt;
== Monster block (&amp;lt;code&amp;gt;0x2c–0x9c&amp;lt;/code&amp;gt;, ~30 fields) ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MonsterRecord_Init&amp;lt;/code&amp;gt; writes cols 3+ as HP / base stats / AI / drop data. These are read by the &#039;&#039;&#039;server&#039;&#039;&#039; combat/AI — the client only uses the monster record for its sprite/name — so the columns aren&#039;t labelled here.&lt;br /&gt;
&lt;br /&gt;
== Confirmed column labels (field-consumer trace) ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Record !! Col / offset !! Meaning !! Evidence&lt;br /&gt;
|-&lt;br /&gt;
| Item (all types) || col7 = &amp;lt;code&amp;gt;0x3c&amp;lt;/code&amp;gt; || buy price || &amp;lt;code&amp;gt;State_NpcShopBuy_Tick @ 00467fd0&amp;lt;/code&amp;gt;: buy allowed only if &amp;lt;code&amp;gt;record-&amp;amp;gt;0x3c &amp;amp;lt;= player.money&amp;lt;/code&amp;gt;, then sends &amp;lt;code&amp;gt;0x35&amp;lt;/code&amp;gt;. Ring col7=100000, weapon 9000, matches.&lt;br /&gt;
|-&lt;br /&gt;
| Item || col8 = &amp;lt;code&amp;gt;0x40&amp;lt;/code&amp;gt; || sell price (inferred) || Not consumer-confirmed, but the buy/sell pair — ring col8=5000 vs buy 100000; weapon col8=900 vs buy 9000.&lt;br /&gt;
|-&lt;br /&gt;
| NPC/shop (type 0xB/0xC) || col7 = &amp;lt;code&amp;gt;0x3c&amp;lt;/code&amp;gt; || shop-type code || &amp;lt;code&amp;gt;State_NpcShopBuy_Tick&amp;lt;/code&amp;gt; case 0 switches on &amp;lt;code&amp;gt;npcRecord-&amp;amp;gt;0x3c&amp;lt;/code&amp;gt;, accepts &amp;lt;code&amp;gt;0x44,0x47,0x4a,0x4d,0x50,0x53&amp;lt;/code&amp;gt; = letters D G J M P S (shop kinds).&lt;br /&gt;
|-&lt;br /&gt;
| NPC/shop || cols 9–22 = &amp;lt;code&amp;gt;0x44&amp;lt;/code&amp;gt;–&amp;lt;code&amp;gt;0x51&amp;lt;/code&amp;gt; (14 bytes) || per-category &amp;quot;sells this&amp;quot; flags || same function loops &amp;lt;code&amp;gt;npcRecord[i + 0x44]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..13&amp;lt;/code&amp;gt;; each nonzero byte adds item-category &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; to the shop&#039;s list (14 categories: Katana…MonsterItem).&lt;br /&gt;
|-&lt;br /&gt;
| Item / emblem || col6 = &amp;lt;code&amp;gt;0x38&amp;lt;/code&amp;gt; || class/icon bitmap index || &amp;lt;code&amp;gt;cpt_panel_status_widget_Draw&amp;lt;/code&amp;gt;: for the party-leader emblem (dat 9), &amp;lt;code&amp;gt;record-&amp;amp;gt;0x38&amp;lt;/code&amp;gt; is passed to &amp;lt;code&amp;gt;File_Read_Bitmap_Archive&amp;lt;/code&amp;gt; as the icon image id.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Server relevance:&#039;&#039;&#039; col7 (buy price) is the value the shop&#039;s gold check uses; an equipped item&#039;s col9–14 bonuses (OFC/DEF/AGL/LUCK/LIFE/FOOD) are applied to the wearer&#039;s totals. The player&#039;s &#039;&#039;total&#039;&#039; stats (base + all equipped bonuses) are computed server-side and pushed via packets &amp;lt;code&amp;gt;0xC001&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;0xC002&amp;lt;/code&amp;gt; — the client never re-derives totals from records.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[BIN textdata]]&lt;br /&gt;
* [[textdata cptNN.txt]] — the flavor-text companion file, paired by dat number&lt;/div&gt;</summary>
		<author><name>0:0:0:0:0:0:0:1</name></author>
	</entry>
	<entry>
		<id>https://Selrach2040.com/wiki/index.php?title=BIN_files&amp;diff=16</id>
		<title>BIN files</title>
		<link rel="alternate" type="text/html" href="https://Selrach2040.com/wiki/index.php?title=BIN_files&amp;diff=16"/>
		<updated>2026-07-02T11:01:12Z</updated>

		<summary type="html">&lt;p&gt;0:0:0:0:0:0:0:1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[BIN bitmapdata]] — Flat, single-image files: a small header (palette size, width, height) followed by an embedded color palette and 8-bit indexed pixel data. General-purpose still images (backgrounds, larger art), accessed by numeric index.&lt;br /&gt;
*[[BIN cockpitdata]] — Same flat indexed-image format as bitmapdata. Holds the artwork used for cockpit/HUD-style overlay panels.&lt;br /&gt;
*[[BIN etcimage]] — Same flat indexed-image format as bitmapdata. A catch-all bucket for miscellaneous 2D art that doesn&#039;t belong to the other image archives.&lt;br /&gt;
*[[BIN mapdata]] — Encrypted, name-indexed archive holding world/map data: plain-text &amp;lt;code&amp;gt;.knd&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;.knd_p&amp;lt;/code&amp;gt; 3D model definitions describing map and building geometry, which reference textures and sprites from the texture/sprite archives by index.&lt;br /&gt;
*[[BIN npcdata]] — Encrypted, name-indexed archive of plain-text NPC definition files (one record set per NPC), keyed by a self-referential &amp;lt;code&amp;gt;npclist.dat&amp;lt;/code&amp;gt; file-name list stored as entry 0.&lt;br /&gt;
*[[BIN palette]] — Per-entry 16-bit color palettes, one file per numeric index, matched by index to the corresponding sprite sheet in the pattern archive to color its indexed pixel data.&lt;br /&gt;
*[[BIN pattern]] — Multi-sprite sheets: each entry is a small directory of sub-images (offset + width/height per sprite) packed into one indexed-color pixel blob, colored using the matching-index file from the palette archive. Used for character/entity/effect animation frames.&lt;br /&gt;
*[[BIN point]] — Plain-text 3D point/vertex-list entries (a count followed by that many &amp;lt;code&amp;gt;x,y,z&amp;lt;/code&amp;gt; coordinate lines), consumed when building mesh geometry for map objects and models.&lt;br /&gt;
*[[BIN sedata]] — Encrypted, numeric-indexed archive of short compressed sound-effect clips (SSF-format audio), referenced by the game&#039;s sound-effect id tables (e.g. &amp;lt;code&amp;gt;setable.txt&amp;lt;/code&amp;gt;).&lt;br /&gt;
*[[BIN seqence]] — Plain-text, numeric-indexed animation-sequence tracks (the client&#039;s own spelling of &amp;quot;sequence&amp;quot;): per-frame timing/loop data and pattern-sheet frame indices, with built-in 8-direction mirroring, that drive playback of a pattern sheet&#039;s sprite frames.&lt;br /&gt;
*[[BIN sprite]] — Same flat indexed-image format as bitmapdata. Individual 2D sprite/object art placed in the game world.&lt;br /&gt;
*[[BIN textdata]] — Encrypted, name-indexed archive of the game&#039;s plain-text data tables: item/NPC/monster stats, UI strings, quick-chat phrases, world zone/effect/BGM tables, and more. The largest and most varied of the BIN archives.&lt;br /&gt;
*[[BIN texture]] — Same flat indexed-image format as bitmapdata. Texture maps applied to the 3D models defined in the mapdata archive.&lt;/div&gt;</summary>
		<author><name>0:0:0:0:0:0:0:1</name></author>
	</entry>
	<entry>
		<id>https://Selrach2040.com/wiki/index.php?title=Raynegard_game_assets&amp;diff=14</id>
		<title>Raynegard game assets</title>
		<link rel="alternate" type="text/html" href="https://Selrach2040.com/wiki/index.php?title=Raynegard_game_assets&amp;diff=14"/>
		<updated>2026-07-02T10:53:25Z</updated>

		<summary type="html">&lt;p&gt;0:0:0:0:0:0:0:1: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Raynegard&#039;s game data is distributed as many small files packed into a custom .bin container/archive format. The client unpacks these at startup (or on demand) to load its text, images, sprites, maps, NPC/item data, and sound.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[BIN files]] — the game&#039;s general-purpose archive format. Assets of a given category (text, sprites, maps, NPC data, etc.) are bundled in matched pairs of files: a small header file (e.g. &amp;lt;code&amp;gt;textdatah.bin&amp;lt;/code&amp;gt;) and the packed data file (&amp;lt;code&amp;gt;textdata.bin&amp;lt;/code&amp;gt;). The header is just a flat list of &amp;lt;code&amp;gt;(offset, size)&amp;lt;/code&amp;gt; entries, one per packed file, with no padding or alignment between entries. Some archives (&amp;quot;directory-type&amp;quot;) also store a self-referential file-name list as entry 0, so files can be looked up by name instead of index; others are accessed purely by numeric index. Contents are sometimes obfuscated with a simple repeating XOR cipher (key byte + increment, resetting per file) rather than real encryption. At startup the client loads about a dozen of these paired archives — &amp;lt;code&amp;gt;bitmapdata&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cockpitdata&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;etcimage&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mapdata&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;npcdata&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;palette&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pattern&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;point&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sedata&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;seqence&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sprite&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;textdata&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;texture&amp;lt;/code&amp;gt; — together covering nearly every non-executable asset category in the game.&lt;br /&gt;
*[[SSF files]] — Raynegard&#039;s custom compressed audio format. Unlike the BIN archives, an &amp;lt;code&amp;gt;.ssf&amp;lt;/code&amp;gt; file is not a container — each one holds a single sound effect or music track. It has a small header (channel count, sample rate, loop flag/loop point) followed by audio data encoded with a custom ADPCM-style compression scheme. Decoding walks the file block by block, reconstructing 16-bit PCM samples from packed nibbles and a small set of fixed prediction coefficients, so it can be converted losslessly-in-practice to a standard &amp;lt;code&amp;gt;.wav&amp;lt;/code&amp;gt; for playback outside the game.&lt;/div&gt;</summary>
		<author><name>0:0:0:0:0:0:0:1</name></author>
	</entry>
</feed>