Kod:
[ROOT]>uirefine.py açılır Aratılır > textLine = ui.TextLine() Kod Bloğu şu şekilde Değiştirilir textLine = ui.TextLine() textLine.SetParent(thinBoard) textLine.SetFontName(localeInfo.UI_DEF_FONT) if player.GetItemCountByVnum(vnum) < count: textLine.SetPackedFontColor(0xffFF0033) else: textLine.SetPackedFontColor(0xff40EF37) textLine.SetText("|cFFdddddd|H|h%s x%d|h|r (%d)" % (item.GetItemName(), count, player.GetItemCountByVnum(vnum))) textLine.SetOutline() textLine.SetFeather(FALSE) textLine.SetWindowVerticalAlignCenter() textLine.SetVerticalAlignCenter() --------------------------------------------------------------- [LOCALE_TR(DE)]>locale_game.txt Açılır Aratılır > REFINE_SUCCESS_PROBALITY Değiştirilir REFINE_SUCCESS_PROBALITY |cffffcc00Yükseltme Oranı : |cff00ccff%% %d --------------------------------------------------------------- # AYNI DOSYA ICINDE Aratılır > REFINE_COST Değiştirilir REFINE_COST |cffffcc00Yükseltme bedeli : |cff00ccff%d |cffffcc00Yang --------------------------------------------------------------- [LOCALE_TR(DE)] > locale_interface.txt Açılır Aratılır > REFINE_COST Yükseltme Ücreti: 0 Yang REFINE_INFO Başarılı bir geliştirme olasılığı: %100 Değiştirilir REFINE_INFO Yükseltme şansı : REFINE_COST Yükseltme bedeli : NEW_OK |cff00C78CTamam NEW_NO |cff00C78CHayır --------------------------------------------------------------- [uiscript] > refinedialog.py değiştirilir import uiScriptLocale window = { "name" : "RefineDialog", "style" : ("movable", "float",), "x" : SCREEN_WIDTH - 400, "y" : 70 * 800 / SCREEN_HEIGHT, "width" : 0, "height" : 31, "children" : ( { "name" : "Board", "type" : "board", "style" : ("attach",), "x" : 0, "y" : 0, "width" : 0, "height" : 31, "children" : ( { "name" : "TitleBar", "type" : "titlebar", "style" : ("attach",), "x" : 8, "y" : 8, "width" : 0, "color" : "red", "children" : ( { "name" : "TitleName", "type" : "text", "text" : uiScriptLocale.REFINE_TTILE, "horizontal_align" : "center", "text_horizontal_align" : "center", "x" : 0, "y" : 3, }, ), }, { "name" : "SuccessPercentage", "type" : "text", "text" : uiScriptLocale.REFINE_INFO, "horizontal_align" : "center", "vertical_align" : "bottom", "text_horizontal_align" : "center", "x" : 0, "y" : 60, }, { "name" : "Cost", "type" : "text", "text" : uiScriptLocale.REFINE_COST, "horizontal_align" : "center", "vertical_align" : "bottom", "text_horizontal_align" : "center", "x" : 0, "y" : 47, }, { "name" : "AcceptButton", "type" : "button", "x" : -35, "y" : 30, "text" : uiScriptLocale.NEW_OK, "horizontal_align" : "center", "vertical_align" : "bottom", "default_image" : "d:/ymir work/ui/public/Middle_Button_01.sub", "over_image" : "d:/ymir work/ui/public/Middle_Button_02.sub", "down_image" : "d:/ymir work/ui/public/Middle_Button_03.sub", }, { "name" : "CancelButton", "type" : "button", "x" : 35, "y" : 30, "text" : uiScriptLocale.NEW_NO, "horizontal_align" : "center", "vertical_align" : "bottom", "default_image" : "d:/ymir work/ui/public/Middle_Button_01.sub", "over_image" : "d:/ymir work/ui/public/Middle_Button_02.sub", "down_image" : "d:/ymir work/ui/public/Middle_Button_03.sub", }, ), }, ), }
KANIT
Mavi Ruh - Dönüşümde Eklentiler [PYTHON]
Metin2 özel sunucu geliştirme sürecinde, eklentiler sunucuların işlevselliğini artırmanın ve oyuncuların deneyimini zenginleştirmenin temel araçlarıdır. Bu bağlamda, Python dili kullanılarak geliştirilen eklentiler, özellikle Py GUI, UI Script ve Py Root gibi yapılarla büyük bir esneklik ve kontrol imkanı sunar. Bu yazıda, Mavi Ruh adlı sunucuda yapılan dönüşüm sürecinde nasıl Python tabanlı eklentilerin entegre edildiğine odaklanacağız.
Python Eklentilerinin Mimari Yapısı
Python, Metin2 sunucu tarafında Game Server ile etkileşim kurarken güçlü bir araçtır. Özellikle Py Root klasör yapısı, sunucu üzerinde çalışan Python betiklerinin organize edilmesini sağlar. Py Root altında yer alan dosyalar, sunucu başlatıldığında aktif olur ve gerekli modül ve fonksiyonlarla sunucu davranışlarını doğrudan etkileyebilir.
Py GUI ise genellikle kullanıcı arayüzü ile ilgili geliştirmelerde kullanılır. Oyuncuların etkileşimde bulunduğu menü, pencere ve butonlar bu yapı üzerinden kolayca özelleştirilebilir. UI Script dosyaları, arayüzün görsel bileşenlerini tanımlarken, Python betikleri bu bileşenlere işlevsellik kazandırır.
Mavi Ruh'da Python Entegrasyonu
Mavi Ruh özel sunucusunda yapılan dönüşümde, eski sistemlerin yerine daha modern ve sürdürülebilir çözümler getirilmiştir. Özellikle PvP sistemleri ve game core alanlarında yapılan yenilikler, Python dili ile daha hızlı ve verimli hale getirilmiştir. Örneğin, PvP turnuvaları için özel bir eklenti geliştirilmiş ve bu eklenti, Py Root üzerinden Auth ve Game sunucuları arasında senkron çalışarak, turnuva skorlarını gerçek zamanlı olarak günceller.
DB Core ile entegre çalışan Python eklentileri sayesinde, oyuncu verileri, envanter içerikleri ve eşya geçmişi gibi kritik bilgiler daha güvenli ve hızlı bir şekilde yönetilebilmektedir. Ayrıca, Martysama geliştirici topluluğu tarafından sağlanan örnek eklentilerle başlangıç yapmak oldukça kolay hale gelmiştir.
Python ile Geliştirme Pratikleri
Python ile eklenti geliştirirken dikkat edilmesi gereken bazı önemli konular vardır. Öncelikle, source edit işlemleri sırasında mevcut yapıyı bozmamak ve compile süreçlerini etkilememek önemlidir. Client SRC ile uyumlu olacak şekilde geliştirilen eklentiler, hem sunucu tarafında hem de istemci tarafında sorunsuz çalışabilir.
Metin2Dev toplulukları, Python tabanlı eklentilerin test aşamasında önemli bir rol oynar. Geliştiriciler, eklentileri farklı channel yapılarında test ederek, hata ayıklama ve performans iyileştirme süreçlerini optimize ederler. Pack dosyaları ile birlikte sunucuya entegre edilen eklentiler, server SRC üzerindeki diğer sistemlerle uyumlu çalışır.
Sonuç
Mavi Ruh gibi gelişmiş özel sunucularda Python eklentileri, hem teknik hem de oyun içi deneyim açısından büyük faydalar sağlar. Game core, DB Core, PvP sistemleri gibi alanlarda yapılan geliştirmeler, Python dili sayesinde daha sürdürülebilir ve esnek hale gelir. Metin2 Lobby olarak, bu tür gelişmeleri takip etmek ve toplulukla paylaşmak bizim önceliğimizdir.
Blue Spirit - Extensions in Transformation [PYTHON]
Metin2 private server development process, extensions are essential tools for enhancing functionality and enriching player experience. In this context, extensions developed using Python provide great flexibility and control through structures like Py GUI, UI Script, and Py Root. In this article, we will focus on how Python-based extensions were integrated into the transformation process of the server called Blue Spirit.
Architectural Structure of Python Extensions
Python is a powerful tool for interacting with the Game Server on the Metin2 server side. The Py Root folder structure particularly ensures organized management of Python scripts running on the server. Files located under Py Root become active upon server start and can directly influence server behavior through necessary modules and functions.
Py GUI is commonly used for UI-related improvements. Menus, windows, and buttons that players interact with can be easily customized using this structure. While UI Script files define visual components of the interface, Python scripts add functionality to these components.
Python Integration in Blue Spirit
In the transformation process of the Blue Spirit private server, modern and sustainable solutions have replaced older systems. Especially in PvP systems and game core areas, updates made using the Python language have improved efficiency and speed. For example, a special extension has been developed for PvP tournaments, which updates tournament scores in real-time by synchronizing between Auth and Game servers via Py Root.
Thanks to Python extensions integrated with DB Core, critical information such as player data, inventory contents, and item history can be managed more securely and quickly. Additionally, starting development with sample extensions provided by the Martysama developer community has become easier.
Python Development Practices
When developing extensions with Python, there are important considerations to keep in mind. Primarily, it's crucial not to disrupt existing structures during source edit processes and not affect compile operations. Extensions developed to be compatible with Client SRC can operate seamlessly both on the server and client sides.
Metin2Dev communities play a significant role during testing phases of Python-based extensions. Developers optimize debugging and performance improvement processes by testing extensions across different channel structures. Extensions integrated into the server along with pack files work compatibly with other systems on the server SRC.
Conclusion
On advanced private servers like Blue Spirit, Python extensions offer significant benefits both technically and in terms of in-game experience. Improvements made in areas such as game core, DB Core, and PvP systems become more maintainable and flexible thanks to the Python language. As Metin2 Lobby, tracking and sharing such developments is our priority.
