Client Systems & Python UI
Metin2 expanded currency HUD: independent Won/Gaya and lifecycle fixes
M2City Client · Editorial · Published 2026-11-05 · Branch-specific details should be checked against your own source.
This is an adaptation of the supplied Expanded Money Taskbar integration. It adds a small optional HUD panel for the existing client balances. Won and Gaya can be enabled independently. It does not add currencies to a server, change their limits or replace the inventory, database or network protocol.
Why this revision exists
The original instructions call the wrong base constructor for a ScriptWindow, use a differently cased UIScript filename, tie some Gaya bindings to the Won feature and position Gaya outside the board when it is the only optional currency. Inventory widget aliases, a global ImageBox event override and incomplete teardown create additional integration risks.
M2City r1 supplies a separate uiExpandedMoney.py module with stock window primitives. Independent optional flags use getattr defaults, vertical rows stay inside the board, and the width grows with the actual text measurement. Values are exact nonnegative integers up to the signed 64-bit limit; unknown values display --. Invalid updates are rejected before any label changes. The panel starts hidden and reuses its widgets instead of rebuilding them every time it opens.
Keep the existing money operations
The panel receives balances from your existing refresh path through SetBalances(yang, won, gaya). Use the actual getters in your branch; this package deliberately does not guess a universal player API for Gaya or Won. Keep the inventory balances and all server checks intact.
Optional Yang/Won Pick buttons delegate to your existing inventory dialog through weak no-argument callbacks. They remain hidden when not connected. Gaya is display-only. The module sends no network packets and performs no currency transfer, debit or item drop itself. A server must continue to validate every operation triggered by the original dialog.
Integration and cleanup
Use the exact-case root/uiExpandedMoney.py module in a legacy Python client with ui.Window, ui.Board, ui.TextLine, ui.Button and ui.__mem_func__. Construct it once after the taskbar/inventory exist. Bind an available HUD button to the toggle method, choosing a free button identifier for your fork. The small Pick buttons use standard public small_button SUB assets; provide them in the client pack if absent.
INSTALL.txt gives creation, balance refresh, optional pick wrappers, temporary hide/restore and teardown steps. This is an alternative integration: do not apply the original global ui.py patch or inventory alias changes alongside it. It does not require the original custom taskbar icon; select an existing spare launcher or supply its assets yourself. Recalculate its position when resolution/HUD layout changes. Destroy clears events and child references, is repeat-safe and prevents a destroyed panel from reopening.
Validation, source and limitations
All ten supplied text/source files were read. The exact replacement module passed fake-widget tests for four Won/Gaya combinations, absent flags, integer boundaries, rejected partial updates, measured long-label spacing, weak pick callbacks, repeated open/close and 100 teardown cycles. These tests do not prove actual game rendering, integration with your currency packets or pick-dialog behaviour. Test those on your own client, including relog, language/font and resolution changes.
Reference: Expanded Money Taskbar, Metin2Dev, April 2019. The thread lists Metin2 Dev and matches the supplied integration; it does not establish exclusive original authorship or a new licence. The owner confirmed redistribution of the supplied archive. Original files/notices remain included for comparison; no open-source relicensing 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 ten supplied text/source files read. Exact replacement tested with fake widgets: four Won/Gaya combinations, missing feature flags, signed-64-bit boundary, invalid/atomic balance updates, large-label spacing, optional weak delegates, 100 toggles per configuration and 100 teardown cycles. No real client renderer, native build or live currency transaction test.
Source: Owner-supplied archive; related Metin2Dev Expanded Money Taskbar thread (2019)
SHA-256: c0f6177dcc07d9c2327604115ce1266498fc920cb040cc945f31594ce712b5ab
Download package
3 download options · Sign in to download
metin2-expanded-money-panel-m2city-r1.zipM2City downloadmetin2-expanded-money-panel-m2city-r1.zipGoogle Drive mirrormetin2-expanded-money-panel-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