Client Systems & Python UI
Metin2 save camera mode: guard invalid CAMERA_MODE values
M2City Client · Editorial · Published 2026-11-05 · Branch-specific details should be checked against your own source.
The selected near/far camera mode persists in metin2.cfg. It does not save arbitrary zoom, rotation or scene position. The supplied README names official 23.1.4.0 as its reverse-engineering reference; this does not establish compatibility with every private client branch.
M2City r1 correction
The supplied Python code indexes CAMERA_MAX_DISTANCE_LIST using the stored camera mode. An invalid value can raise IndexError at startup. Both config loading and SetCameraMode now normalize the supported modes to 0 or 1; values other than mode 1 select mode 0.
Integration
Back up the client source, root and metin2.cfg. Merge the CPythonSystem config field, default, loader, saver, getter and setter together with the Python bindings, constInfo.py and uiSystemOption.py fragments. Apply __BL_SAVE_CAMERA_MODE__ consistently and check whether your fork already has a camera-persistence implementation before adding another. Preserve your existing UI handlers and localize labels where needed.
Rebuild the client in staging. Select near, exit normally and reopen; repeat for far. Check a missing CAMERA_MODE, invalid values, a fresh config, the feature disabled and interaction with custom camera systems. Keep the previous executable/root/config available for rollback.
Validation
All eight nonempty supplied files were reviewed. Extracted revised native config/setter logic passed clang++ C++11 stub checks for missing/invalid config and all 256 byte setter values. This does not validate the complete CPythonSystem build, UI callbacks or an actual game scene. The unchanged original archive and isolated test source are included alongside the corrected instruction fragments.
Editorial resource — M2City
Version: Legacy CPythonSystem/root integration; upstream reference official 23.1.4.0; M2City r1 (2026-11-04)
Rights: Public redistribution confirmed by supplying owner; original creator notices retained. No blanket open-source licence granted.
Validation: Full supplied small-package source review and isolated native regression tests; no complete client/server build or in-game runtime validation.
Source: Mali / blackdragonx61 Save Camera Mode release
SHA-256: 0313a92992295dfb561d8013449b4afe35c945a1ab39312dd4693e4bc8162bd6
Download package
3 download options · Sign in to download
metin2-save-camera-mode-m2city-r1.zipM2City downloadmetin2-save-camera-mode-m2city-r1.zipGoogle Drive mirrormetin2-save-camera-mode-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