One guy asked in one forum if it possible to do this (already he have in settings to disable/enable via shift+f12 but is shit for player ^^, so i was think is nice to post and here what i did for him free.
Graphic mode you can find here (already is public from long years ago and you can find him in a lot a forums): [You need to extract all files from archive in directory where is launcher]
- <li data-xf-list-type="ul">
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız! Giriş yap veya üye ol.
Kod:
#root/uiSystem.py: #1.) Search: def OnPressExitKey(self): self.Close() return TRUE #2.) Add after function: if app.ENABLE_GRAPHIC_MODE: ################################################################### # title_name : Features for graphic mode # date_created : 2017.01.04 # author : VegaS ################################################################### def IsActiveModeGraphic(self): idx = open("enbconvertor.ini", "r").readlines() if int(idx[1][-2]) > 0: return TRUE return FALSE def __ClickSystemModeButton(self): import dbg, os, app, localeInfo if self.IsActiveModeGraphic(): dam = 0 else: dam = 1 idxCurMode = "EnableProxyLibrary=%d" % (dam) f = [*] getLine = 2 if os.path.exists("enbconvertor.ini"): idx = open("enbconvertor.ini", "r") for it in idx: f.append(it) idx.close() while len(f) < int(getLine): f.append("") f[int(getLine)-1] = str(idxCurMode) idx = open("enbconvertor.ini", "w") for it in f: idx.write(it) if (len(it) > 0 and it[-1:] != "\n") or len(it) == 0: idx.write("\n") idx.close() self.Close() if dam > 0: dbg.LogBox(localeInfo.GRAPHIC_MODE_ENABLE) else: dbg.LogBox(localeInfo.GRAPHIC_MODE_DISABLE) dbg.LogBox(localeInfo.GRAPHIC_MODE_RESTART) os.system('start metin2client.exe') ### Change with your name of application. app.Exit() #1.) Search: self.GetChild("exit_button").SAFE_SetEvent(self.__ClickExitButton) #2.) Add bellow: if app.ENABLE_GRAPHIC_MODE: self.GetChild("system_mode_button").SAFE_SetEvent(self.__ClickSystemModeButton) #locale/en/locale_game.txt: GRAPHIC_MODE_ENABLE [i] The graphic mode was enabled. GRAPHIC_MODE_DISABLE [i] The graphic mode was disabled. GRAPHIC_MODE_RESTART [i] Client will restart. #locale/en/ui/systemdialog.py { "name" : "system_mode_button", "type" : "button", "x" : 10, # Position X "y" : 5, # Position Y "text" : "Graphic Mode (Enable/Disable)", "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, //@Src/Client/UserInterface/Locale_inc.h #define ENABLE_GRAPHIC_MODE //@Src/Client/UserInterface/PythonApplicationModule.cpp //1.) Search: #ifdef ENABLE_COSTUME_SYSTEM PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 0); #endif //2.) Add bellow: #ifdef ENABLE_GRAPHIC_MODE PyModule_AddIntConstant(poModule, "ENABLE_GRAPHIC_MODE", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_GRAPHIC_MODE", 0); #endif
Python ile Yönetim Arayüzü Oluşturmak: Metin2 Sunucularında Grafiksel Kontrol
Metin2 özel sunucu geliştirme sürecinde, Python dili özellikle grafiksel yönetim sistemlerinin entegrasyonu açısından oldukça güçlü bir araçtır. Özellikle Py GUI (Python Graphical User Interface) kütüphaneleri sayesinde, geliştiriciler uiscript ve py root gibi yapılarla birlikte kullanıcı dostu arayüzler tasarlayabilir. Bu yazıda, Python kullanarak Management Graphic Mode yani Yönetim Grafik Modu oluşturmanın detaylarına değineceğiz. Bu mod, hem game server hem de auth server üzerinde çalışan işlemlerin görsel olarak takip edilmesini ve yönetilmesini sağlar.
Python GUI Nedir ve Neden Kullanılır?
Python dilinin en güçlü yanlarından birisi, geniş kütüphane desteğiyle birlikte görsel arayüz oluşturma imkanı sunmasıdır. Özellikle Tkinter, PyQt veya Kivy gibi kütüphaneler kullanılarak, sunucu üzerindeki olayları anlık izlemek ve müdahale etmek mümkün hale gelir. Örneğin, Metin2 özel sunucularda, oyuncu listesi, aktif savaşlar, paket durumları (pack), veritabanı (db) bağlantıları gibi veriler bir pencere üzerinden takip edilebilir. Bu da hem geliştirici hem de sunucu yöneticisi için büyük kolaylıklar sağlar.
Py Root ve Uiscript ile Entegrasyon
Py Root, Metin2'nin istemci tarafında kullanılan Python dosyalarının bulunduğu dizindir. Burada bulunan uiscript dosyaları ile arayüz bileşenleri tanımlanır. Ancak bu sadece istemci tarafında değil, sunucu tarafında da benzer yapılar kurulabilir. Python ile geliştirilen bir yönetim paneli, server src ile entegre çalışarak sunucu üzerindeki işlemleri kontrol edebilir. Örneğin, bir savaş sistemi (PvP system) devreye girdiğinde, bu olay bir grafiksel panel üzerinden anlık olarak gösterilebilir.
Python ile PvP Sistemlerini Yönetmek
Metin2'de PvP sistemleri, sunucu tarafında yoğun programlama gerektirir. Bu sistemlerin C++ tabanlı source kodlarla geliştirilmesi gerekir. Ancak bu kodların kontrolü, testi ve yönetimi için Python destekli grafiksel arayüzler oldukça faydalıdır. Örneğin, bir PvP turnuvası başlatıldığında, bu turnuvaya katılan oyuncuların listesi, skor tablosu ve zamanlayıcı gibi bilgiler bir GUI üzerinden kontrol edilebilir. Böylece hem geliştirme hem de oyun içi yönetim süreçleri hızlanır.
Olası Hatalar ve Çözümler
Python ile grafiksel yönetim sistemleri geliştirilirken karşılaşılan bazı yaygın hatalar vardır. Bunlardan birisi, Py GUI ile uiscript arasında veri aktarımı yapılırken yaşanan senkronizasyon problemleridir. Bu tür durumlarda, veri akışını doğrulamak ve gecikmeleri azaltmak için Threading (eş zamanlı işlem) yapıları kullanılmalıdır. Ayrıca, pack dosyalarında yapılan değişikliklerin doğru şekilde compile edilmesi ve root dosyalarıyla uyumlu olması önemlidir.
Sonuç
Python ile Management Graphic Mode oluşturmak, Metin2 özel sunucularında gelişmiş yönetim ve izleme olanakları sunar. Hem C++ sistemler hem de Python yapıları ile birlikte çalışarak güçlü ve kullanıcı dostu çözümler geliştirilebilir. Bu tür sistemler, özellikle PvP odaklı sunucularda, oyun içi deneyimi artırmak ve sunucu performansını optimize etmek için kritik öneme sahiptir.
Creating Management Interfaces with Python: Graphical Control on Metin2 Servers
In the process of developing Metin2 private servers, the Python language is quite powerful, especially in integrating graphical management systems. Thanks to Py GUI (Python Graphical User Interface) libraries, developers can design user-friendly interfaces alongside structures like uiscript and py root. In this article, we will discuss the details of creating a Management Graphic Mode using Python. This mode allows visual tracking and management of operations running on both game server and auth server.
What is Python GUI and Why Use It?
One of the strongest aspects of Python is its ability to create visual interfaces thanks to extensive library support. Libraries such as Tkinter, PyQt, or Kivy allow real-time monitoring and intervention of events occurring on the server. For instance, in Metin2 private servers, player lists, active battles, package statuses (pack), database (db) connections, etc., can be monitored via a window. This provides significant convenience for both developers and server administrators.
Integration with Py Root and Uiscript
Py Root is the directory where Python files used by the client side of Metin2 are located. The UI components are defined in the uiscript files here. However, similar structures can also be built on the server side. A management panel developed with Python can interact with the server src to control processes on the server. For example, when a battle system (PvP system) activates, this event can be displayed in real-time through a graphical panel.
Managing PvP Systems with Python
In Metin2, PvP systems require intensive programming on the server side. These systems must be developed with C++ based source codes. However, Python-supported graphical interfaces are very useful for controlling, testing, and managing these codes. For example, when a PvP tournament begins, the list of participating players, scoreboards, timers, etc., can be controlled via a GUI. Thus, both development and in-game management processes are accelerated.
Possible Errors and Solutions
Some common errors encountered when developing graphical management systems with Python include synchronization issues that occur during data transfers between Py GUI and uiscript. In such cases, Threading (concurrent processing) structures should be used to validate data flow and reduce delays. Additionally, modifications made in pack files must be correctly compiled and compatible with root files.
Conclusion
Creating a Management Graphic Mode with Python provides advanced management and monitoring capabilities for Metin2 private servers. Together with C++ systems and Python structures, powerful and user-friendly solutions can be developed. Such systems are critically important for enhancing the in-game experience and optimizing server performance, particularly in PvP-oriented servers.
