Server Systems & Source Patches
Metin2 bulk stat points: bounded allocation and HP/SP refresh corrections
M2City Systems · Editorial · Published 2026-11-05 · Branch-specific details should be checked against your own source.
Adds /stat_val with st, dx, ht and iq targets. The character window sends one point normally or ten while left Ctrl is pressed. The server limits allocation by available stat points and MAX_STAT and rejects polymorphed characters. The supplied UI tooltip uses emoji text markup, which requires that separate client capability or a plain-text locale replacement.
M2City r1 changes
The native cap compares val against MAX_STAT minus the current real stat, avoiding an overflowing current-plus-val comparison. HT now refreshes max HP and IQ refreshes max SP; those targets were reversed in the supplied fragment. The Python click handler uses a checked dictionary lookup so an unknown status key does not raise KeyError.
Merge and test
Register stat_val before the command-table terminator, merge the implementation into cmd_general.cpp and merge the four UI handler/tooltip changes into uiCharacter.py. Preserve existing status command permissions, anti-abuse checks and packet behavior. Check that your fork uses the expected HT/HP and IQ/SP conventions and the same POINT_* constants. Test no points, one/ten points, remaining capacity below ten, cap reached, invalid target/amount, polymorph and both normal and Ctrl clicks. Keep server and client revisions together.
Validation and variant handling
All five text files were reviewed. The revised command compiled under C++11 with fake character state and passed caps, available-point debit, INT_MAX request clamping, invalid commands, polymorph and correct HP/SP refresh signals. This is not a full stat recalculation or game build test. The overlapping unk_faststatusadd archive is tracked as a variant of this resource and must not become a second duplicate publication; media and instruction differences remain under review.
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: Exact reviewed logic compiled with clang++ C++11 and passed isolated fake-engine assertions. No complete binary build/gameplay test.
Source: Owner-supplied source; public creator/feature reference where established
SHA-256: d563d89a6e36378d0bffd62a2f146c522010f45da4ab7ccbf7322fb447328910
Download package
3 download options · Sign in to download
metin2-bulk-stat-points-m2city-r1.zipM2City downloadmetin2-bulk-stat-points-m2city-r1.zipGoogle Drive mirrormetin2-bulk-stat-points-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