Client Systems & Python UI
Metin2 PresentNPC: equipment display table with parsing and accessory fixes
M2City Client · Editorial · Published 2026-11-05 · Branch-specific details should be checked against your own source.
Represent selected NPC VNUMs with player-style race, armor, weapon, hair, accessory, mount and shining data. The table supports a global all rule and overrides per map. This is a client display integration; it does not create server NPC AI, give equipment to players or modify combat stats.
M2City r1 fixes
Corrected the inverted non-player condition in SetAcce. The supplied condition could admit unsupported NPC races while rejecting some player races. Numeric table fields now require nonnegative decimal integers within signed 32-bit range instead of accepting atoi truncation, negative values and junk. Empty map names, zero NPC VNUMs and invalid dressed-NPC races are rejected. The shining loop is bounded by both the actual shining count and the four available table fields. Lookups validate vector length before indexing.
Integration
Merge all six source fragments and the supplied npc_wear.txt into the corresponding client modules. Enable ENABLE_NPC_WEAR_ITEM consistently. npc_wear.txt contains twelve tab-separated columns: VNUM, map name and ten appearance fields. Map-specific rules override all; first repeated map/VNUM record wins. The example hair value is the proto value3 shape value, not automatically the hair item VNUM.
The implementation expects accessory and shining systems that expose SetAcce, SetShining and CHR_SHINING_NUM. The example IDs 60001/60003 and appearance/effect numbers must be mapped to your own installed resources; no models, textures or effect files are bundled. Dressed NPC race values remain the legacy 0..7 set. Lycan/custom NPC support needs actual race registration and attachment testing. Preserve the rest of InstanceBase creation and verify later branches do not overwrite the chosen display parts.
Validation and source
The revised table loader/getter and accessory guard compiled with fake pack/map interfaces. Tests exercised malformed, negative and overflowing fields, map priority, global fallback, duplicates, invalid race, missing table and bounds. No full client build, engine render or server spawn was performed. The creator product page confirms the feature family; it does not establish this archive checksum or latest release. The original archive and example table remain available alongside reviewed merge fragments.
dracaryS Present NPC creator reference
Editorial resource — M2City
Version: Legacy integration fragments; exact fork unspecified; M2City r1 (2026-11-04)
Rights: Public redistribution confirmed by owner; upstream notices retained. No blanket open-source relicensing.
Validation: Revised native table loader/getter and accessory guard compiled with fake pack/map interfaces. Strict numeric overflow/negative/malformed fields, map-specific precedence, all fallback, duplicates, invalid race, missing files and vector bounds passed. No actual NPC render, client build or server spawn tested.
Source: Owner-supplied source; public creator/feature reference where established
SHA-256: 71999ee604b5c2baa391b72fae90c1ed05589ac6f7a878f4509993fe9956025c
Download package
3 download options · Sign in to download
metin2-npc-equipment-display-m2city-r1.zipM2City downloadmetin2-npc-equipment-display-m2city-r1.zipGoogle Drive mirrormetin2-npc-equipment-display-m2city-r1.zipMEGA mirrorMAKE THE NEXT ANSWER BETTER
What happened on your build?
Share a small example, the exact error and how you verified your fix. The discussion is open on the forum.
Need a scoped quest, UI or proto fix? · Explore more development guides · Check your proto files free