Öncelikle Selamın Aleyküm Sistem Daha Önce Recep Tarafından Paylaşıldı Ama Konuyu Editlemiş Şahsen Ben Arıyordum Buldum Arayanlar İçin Paylaşıyorum,
Kemer slotunun yanına 2 tane daha slot açmaya yarar.
Öncelikle txt kullanan arkadaşlar oraya giyilmesini istediği yüzüklerin flagını item_proto'dan ITEM_RING Yapıcaklar.
locale_tr / ui içerisinde inventoryWindow.py Açılır :
Aratılır :
Kod:
Kemer varsa bunu :
Kod:
Kemer Slotu yoksa eklemek için bunu :
Kod:
Eklenir.
Aratılır :
Kod:
Değiştirilir :
Kod:
Metin2'de Python Kullanarak Yüzük Slotlarını 4'e Çıkarma Rehberi
Metin2 özel sunucularında geliştirme yaparken birçok geliştirici, oyuncuların daha fazla ekipman taşıyabilmesi veya farklı stratejik avantajlar sunabilmek amacıyla yüzük slot sayısını artırmak ister. Varsayılan olarak oyunda iki adet yüzük slotu bulunur. Ancak bu sayıyı Python seviyesinde düzenleyerek 4 veya daha fazlasına çıkarmak mümkündür. Bu rehberde, Python kullanarak iki yüzük slotunu dörde nasıl çıkaracağınızı adım adım anlatacağız.
Gereksinimler ve Hazırlıklar
Bu işlemi gerçekleştirebilmeniz için şu dosyalara erişiminiz olması gerekir:
- Client-side: root klasörü altında bulunan Python dosyaları (örneğin: uitooltip.py, uiinventory.py)
- Server-side: game/src/char_item.cpp, game/src/packet.h gibi dosyalar
- Ayrıca uiscript ve locale ayarları da yapılmalıdır.
Yüzük Slotlarını Tanımlamak
Öncelikle, yüzük slotlarının tanımının yapıldığı yerleri belirlememiz gerekir. Python tarafında uiinventory.py dosyasında, yüzük slotları genellikle sabit olarak tanımlanmıştır. Bu tanımı genişletmemiz gerekiyor.
Aşağıdaki satırlar, genellikle uiinventory.py içinde şu şekilde tanımlıdır:
RANK_RING_SLOT_NUMBER = 2
Bu değeri 4 olarak değiştirmek, arayüz tarafında slot sayısını artırır ancak sadece bu yeterli olmaz. Sunucu tarafında da buna uygun değişiklikler yapılması gerekir.
Sunucu Tarafında Değişiklikler
Sunucu tarafında, oyuncunun kaç adet yüzük taşıyabileceği bilgisi packet.h ve char_item.cpp gibi dosyalarda tanımlanmıştır. Bu dosyaları düzenlemek için C++ bilginiz olmalıdır. Örneğin, HEADER_CG_ITEM_USE paketi ile birlikte gönderilen slot indeksi kontrol edilir ve bu değer 2'den büyükse sunucu tarafından reddedilebilir. Bu nedenle, paket boyutlarını ve indeks kontrollerini güncellemek önemlidir.
Ayrıca, karakter veritabanında (DB) yer alan ring_slot sütunu varsa, burada da değişiklik gerekebilir.
Grafik Arayüzünde Yeni Slotları Göstermek
Yeni yüzük slotlarını oyuncuların görebilmesi için arayüzde de değişiklikler yapmalısınız. uiscript dosyalarında, InventoryWindow.py veya benzeri dosyada slotların konumlarını tanımlayan GUI elemanlarını güncellemelisiniz. Genellikle bu dosyalar XML benzeri yapıdadır ve slot_index gibi alanlar içerir. Bu slotları doğru şekilde çizmek için GUI sınıflarını genişletmeniz gerekebilir.
Test ve Hata Ayıklama
Değişiklikleri yaptıktan sonra, hem istemci hem de sunucu tarafında test yapmalısınız. Yeni slotlara eşya yerleştirip çıkartıldığını, veritabanına doğru yazıldığını ve oyuncu arasında aktarılmadığında sorun yaşamadığınızı kontrol etmelisiniz. Ayrıca, Python tarafında hatalı indeks atamaları veya C++ tarafında buffer overflow gibi durumlara dikkat etmelisiniz.
Sonuç
Metin2 özel sunucularında yüzük slot sayısını artırmak, oyuncular için daha fazla esneklik sağlar. Python ile arayüzü ve C++ ile sunucu mantığını doğru şekilde düzenlediğiniz takdirde, bu değişikliği başarıyla gerçekleştirebilirsiniz. Bu işlem, Metin2 lobby geliştirme sürecinde sıklıkla yapılan küçük ama etkili geliştirmelerden biridir.
Expanding Ring Slots from 2 to 4 in Metin2 Using Python
When developing private servers for Metin2, many developers aim to enhance gameplay by allowing players to carry more equipment or provide strategic advantages. By default, the game allows only two ring slots. However, increasing this number to four or even more is achievable through modifications on the Python side. In this guide, we will explain step-by-step how to increase the number of ring slots from two to four using Python.
Requirements and Prerequisites
To perform this operation, you need access to the following files:
- Client-side: Python files located under the root folder (e.g., uitooltip.py, uiinventory.py)
- Server-side: Files like game/src/char_item.cpp, game/src/packet.h
- Additionally, uiscript and locale settings must be adjusted accordingly.
Defining Ring Slots
Firstly, we need to identify where the ring slots are defined. In the Python side, usually within the uiinventory.py file, ring slots are defined with fixed values. We need to expand these definitions.
The following lines are typically found in uiinventory.py:
RANK_RING_SLOT_NUMBER = 2
Changing this value to 4 increases the number of slots in the UI, but that alone is not sufficient. Corresponding changes must also be made on the server-side.
Server-Side Modifications
On the server side, the number of rings a player can carry is defined in files like packet.h and char_item.cpp. Modifying these files requires knowledge of C++. For example, the HEADER_CG_ITEM_USE packet checks the slot index, and if the value exceeds 2, it may be rejected by the server. Therefore, updating packet sizes and index checks is crucial.
Additionally, if there is a ring_slot column in the character database, changes may be needed there as well.
Displaying New Slots in the UI
To ensure players can see the new ring slots, modifications must be made in the UI as well. In uiscript files, particularly in InventoryWindow.py or similar, you must update the GUI elements that define the positions of the slots. These files often have an XML-like structure and contain fields like slot_index. You may need to extend the GUI classes to properly render these new slots.
Testing and Debugging
After making the changes, thoroughly test both the client and server sides. Verify that items can be placed into and removed from the new slots, that they are correctly saved to the database, and that no issues occur during transfers. Also, be cautious of incorrect index assignments in Python or buffer overflows in C++.
Conclusion
Increasing the number of ring slots in Metin2 private servers provides more flexibility for players. When the UI is properly adjusted with Python and the server logic is modified with C++, this change can be successfully implemented. This enhancement is one of the small yet effective improvements frequently applied in Metin2 lobby development.
Kemer slotunun yanına 2 tane daha slot açmaya yarar.
Öncelikle txt kullanan arkadaşlar oraya giyilmesini istediği yüzüklerin flagını item_proto'dan ITEM_RING Yapıcaklar.
locale_tr / ui içerisinde inventoryWindow.py Açılır :
Aratılır :
Kod:
Kod:
{"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},
Kod:
Kod:
{"index":item.EQUIPMENT_RING1, "x":2, "y":106, "width":32, "height":32}, {"index":item.EQUIPMENT_RING2, "x":75, "y":106, "width":32, "height":32},
Kod:
Kod:
{"index":item.EQUIPMENT_RING1, "x":2, "y":106, "width":32, "height":32}, {"index":item.EQUIPMENT_RING2, "x":75, "y":106, "width":32, "height":32}, {"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},
Aratılır :
Kod:
Kod:
"image" : "d:/ymir work/ui/equipment_bg_without_ring.tga",
Kod:
Kod:
"image" : "d:/ymir work/ui/equipment_bg_with_ring.tga",
Metin2'de Python Kullanarak Yüzük Slotlarını 4'e Çıkarma Rehberi
Metin2 özel sunucularında geliştirme yaparken birçok geliştirici, oyuncuların daha fazla ekipman taşıyabilmesi veya farklı stratejik avantajlar sunabilmek amacıyla yüzük slot sayısını artırmak ister. Varsayılan olarak oyunda iki adet yüzük slotu bulunur. Ancak bu sayıyı Python seviyesinde düzenleyerek 4 veya daha fazlasına çıkarmak mümkündür. Bu rehberde, Python kullanarak iki yüzük slotunu dörde nasıl çıkaracağınızı adım adım anlatacağız.
Gereksinimler ve Hazırlıklar
Bu işlemi gerçekleştirebilmeniz için şu dosyalara erişiminiz olması gerekir:
- Client-side: root klasörü altında bulunan Python dosyaları (örneğin: uitooltip.py, uiinventory.py)
- Server-side: game/src/char_item.cpp, game/src/packet.h gibi dosyalar
- Ayrıca uiscript ve locale ayarları da yapılmalıdır.
Yüzük Slotlarını Tanımlamak
Öncelikle, yüzük slotlarının tanımının yapıldığı yerleri belirlememiz gerekir. Python tarafında uiinventory.py dosyasında, yüzük slotları genellikle sabit olarak tanımlanmıştır. Bu tanımı genişletmemiz gerekiyor.
Aşağıdaki satırlar, genellikle uiinventory.py içinde şu şekilde tanımlıdır:
RANK_RING_SLOT_NUMBER = 2
Bu değeri 4 olarak değiştirmek, arayüz tarafında slot sayısını artırır ancak sadece bu yeterli olmaz. Sunucu tarafında da buna uygun değişiklikler yapılması gerekir.
Sunucu Tarafında Değişiklikler
Sunucu tarafında, oyuncunun kaç adet yüzük taşıyabileceği bilgisi packet.h ve char_item.cpp gibi dosyalarda tanımlanmıştır. Bu dosyaları düzenlemek için C++ bilginiz olmalıdır. Örneğin, HEADER_CG_ITEM_USE paketi ile birlikte gönderilen slot indeksi kontrol edilir ve bu değer 2'den büyükse sunucu tarafından reddedilebilir. Bu nedenle, paket boyutlarını ve indeks kontrollerini güncellemek önemlidir.
Ayrıca, karakter veritabanında (DB) yer alan ring_slot sütunu varsa, burada da değişiklik gerekebilir.
Grafik Arayüzünde Yeni Slotları Göstermek
Yeni yüzük slotlarını oyuncuların görebilmesi için arayüzde de değişiklikler yapmalısınız. uiscript dosyalarında, InventoryWindow.py veya benzeri dosyada slotların konumlarını tanımlayan GUI elemanlarını güncellemelisiniz. Genellikle bu dosyalar XML benzeri yapıdadır ve slot_index gibi alanlar içerir. Bu slotları doğru şekilde çizmek için GUI sınıflarını genişletmeniz gerekebilir.
Test ve Hata Ayıklama
Değişiklikleri yaptıktan sonra, hem istemci hem de sunucu tarafında test yapmalısınız. Yeni slotlara eşya yerleştirip çıkartıldığını, veritabanına doğru yazıldığını ve oyuncu arasında aktarılmadığında sorun yaşamadığınızı kontrol etmelisiniz. Ayrıca, Python tarafında hatalı indeks atamaları veya C++ tarafında buffer overflow gibi durumlara dikkat etmelisiniz.
Sonuç
Metin2 özel sunucularında yüzük slot sayısını artırmak, oyuncular için daha fazla esneklik sağlar. Python ile arayüzü ve C++ ile sunucu mantığını doğru şekilde düzenlediğiniz takdirde, bu değişikliği başarıyla gerçekleştirebilirsiniz. Bu işlem, Metin2 lobby geliştirme sürecinde sıklıkla yapılan küçük ama etkili geliştirmelerden biridir.
Expanding Ring Slots from 2 to 4 in Metin2 Using Python
When developing private servers for Metin2, many developers aim to enhance gameplay by allowing players to carry more equipment or provide strategic advantages. By default, the game allows only two ring slots. However, increasing this number to four or even more is achievable through modifications on the Python side. In this guide, we will explain step-by-step how to increase the number of ring slots from two to four using Python.
Requirements and Prerequisites
To perform this operation, you need access to the following files:
- Client-side: Python files located under the root folder (e.g., uitooltip.py, uiinventory.py)
- Server-side: Files like game/src/char_item.cpp, game/src/packet.h
- Additionally, uiscript and locale settings must be adjusted accordingly.
Defining Ring Slots
Firstly, we need to identify where the ring slots are defined. In the Python side, usually within the uiinventory.py file, ring slots are defined with fixed values. We need to expand these definitions.
The following lines are typically found in uiinventory.py:
RANK_RING_SLOT_NUMBER = 2
Changing this value to 4 increases the number of slots in the UI, but that alone is not sufficient. Corresponding changes must also be made on the server-side.
Server-Side Modifications
On the server side, the number of rings a player can carry is defined in files like packet.h and char_item.cpp. Modifying these files requires knowledge of C++. For example, the HEADER_CG_ITEM_USE packet checks the slot index, and if the value exceeds 2, it may be rejected by the server. Therefore, updating packet sizes and index checks is crucial.
Additionally, if there is a ring_slot column in the character database, changes may be needed there as well.
Displaying New Slots in the UI
To ensure players can see the new ring slots, modifications must be made in the UI as well. In uiscript files, particularly in InventoryWindow.py or similar, you must update the GUI elements that define the positions of the slots. These files often have an XML-like structure and contain fields like slot_index. You may need to extend the GUI classes to properly render these new slots.
Testing and Debugging
After making the changes, thoroughly test both the client and server sides. Verify that items can be placed into and removed from the new slots, that they are correctly saved to the database, and that no issues occur during transfers. Also, be cautious of incorrect index assignments in Python or buffer overflows in C++.
Conclusion
Increasing the number of ring slots in Metin2 private servers provides more flexibility for players. When the UI is properly adjusted with Python and the server logic is modified with C++, this change can be successfully implemented. This enhancement is one of the small yet effective improvements frequently applied in Metin2 lobby development.
