Client Systems & Python UI
Metin2 Yang display animation: replace threaded money updates with a UI-only helper
M2City Client · Editorial · Published 2026-11-05 · Branch-specific details should be checked against your own source.
This reviewed alternative addresses the supplied Refresh-Money-With-Sleep integration credited to blackdragonx61 / Mali. It animates the inventory label towards the latest Yang amount in a fixed 0.30 seconds. It is intended for maintainers of legacy Python 2.7 Metin2 clients, not as a currency system or server economic change.
Why the native implementation was replaced
The supplied patch creates a detached thread for each gold update and changes CPythonPlayer status once per currency unit. Large transfers can create enormous loops, overlapping threads can overwrite newer balances, and those writes race with the client UI. M2City r1 keeps the normal immediate network status update and performs one bounded display calculation per UI frame. It does not sleep, create threads, change packet values or alter the actual balance.
The display handles increases/decreases, new balances arriving mid-animation, unchanged updates, exact final values, clock resets and cleanup. All payment and eligibility logic must continue reading player.GetElk(), never the animated label's intermediate number.
Integration
If the original C++ patch is installed, remove its detached-thread block and restore the usual rkPlayer.SetStatus(PointChange.Type, PointChange.value) behavior before using this alternative. Preserve unrelated receiver changes. Do not run both implementations.
Copy reviewed/uimoneydisplay.py into root. Initialize one MoneyDisplay after InventoryWindow.wndMoney is bound and use a callback that formats the amount with localeInfo.NumberToMoneyString. In RefreshStatus set its target from player.GetElk(); merge its Update call into your existing OnUpdate. Do not overwrite other status updates or define a second OnUpdate method.
Snap to the actual balance when opening the inventory or changing character. Destroy the helper before releasing wndMoney during logout/teardown, and clear its reference. Ordinary Hide may keep the instance if your inventory window is reused. The package includes the exact merge checklist and method example. No native build or extra bitmap dependency is introduced by the reviewed alternative.
Validation and attribution
All four original text files were reviewed. Isolated tests exercised rising/falling amounts up to signed 64-bit maximum, exact final balance, monotonic bounded steps, mid-animation retargeting, backwards clock, 1000 unchanged updates and 100 teardown cycles. The original threaded implementation was not executed. No full client build, actual renderer, network session or gameplay test was performed.
Credit for the supplied original: blackdragonx61 / Mali, from its README. Exact public upstream release/checksum could not be independently established. Original archive and notices are retained for comparison; the original unsafe receiver is not an installation prerequisite. The replacement display helper and review are M2City's contribution. Owner confirmed public redistribution; no blanket open-source licence is asserted.
Editorial resource — M2City
Version: Owner-supplied legacy integration; M2City r1 (2026-11-04); exact fork unspecified
Rights: Owner explicitly confirmed public redistribution. Preserve original notices; no open-source relicensing.
Validation: All four original text files reviewed. Display-only replacement tested with fake clock/render: increases/decreases up to signed 64-bit maximum, exact final balance, monotonic bounded steps, mid-animation retarget, clock rollback, 1000 unchanged updates and 100 teardown cycles. No supplied threaded code executed and no full client/gameplay test.
Source: Owner-supplied archive, reviewed files and retained notices; exact upstream release not established
SHA-256: 54dd9857e40be7e95d62cf3029620e907c7431714bdfda762aeced27fe5dddfe
Download package
3 download options · Sign in to download
metin2-money-display-animation-m2city-r1.zipM2City downloadmetin2-money-display-animation-m2city-r1.zipGoogle Drive mirrormetin2-money-display-animation-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