İNDİR:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
VT:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Envanterde İtemin Yanında +Sının Yazması
Metin2 özel sunucularında kullanıcı deneyimini artırmak için birçok küçük detay önemli rol oynar. Bunlardan biri de envanterde bir itemin yanında + sayısının belirtilmesidir. Bu durum, özellikle Metin2 PvP sistemlerinde yüksek seviye silahlar, zırhlar veya bonusları olan eşyaların tanımlanmasında büyük kolaylık sağlar. Bu yazıda, envanterde bir itemin yanında + sayısının nasıl yazdırılacağını ve bunun arkasındaki teknik detayları ele alacağız.
Metin2 Item Sistemi ve + Sistemi Nedir?
Metin2 oyununda her item, veritabanında farklı alanlarda saklanan birtakım değerler barındırır. Bu değerlerden birisi de itemin sahip olduğu + seviyesidir. Örneğin, bir kılıcın +7 olduğunu düşünelim. Bu, kılıcın normal攻击力ne ek olarak +7攻击力 bonusu taşıdığını gösterir. Bu değerler, hem sunucu tarafında hem de istemci tarafında doğru şekilde işlenmelidir ki kullanıcıya uygun şekilde yansısın.
+ Sayısının Sunucu Tarafında Tanımlanması
Sunucu tarafında (game server), bir itemin + değeri genellikle 'socket0' alanına yazılır. Bu alan, itemin bonus seviyesini belirtmek için kullanılır. Eğer bir item +5 ise, bu değer socket0 alanında saklanır. Bu değer, oyun içi item listeleme sırasında istemciye gönderilir. Sunucu taraflı işlemler için C++ bilgisi gerekebilir, çünkü çoğu özel Metin2 sunucusu özelleştirilmiş game server kaynak kodları ile çalışır.
İstemci Tarafında Gösterim
İstemci tarafında, yani oyuncunun gördüğü arayüzde, itemin yanında + sayısı görünmelidir. Bu işlem genellikle UIScript veya Python GUI dosyalarında yapılır. Python tabanlı UI sistemlerinde, bir itemin tooltip veya envanter adı yazdırılırken, socket0 değerine bakılır ve bu değer + olarak ekrana yazdırılır. Örneğin, item name 'Sword of Light' ise ve socket0 değeri 7 ise, ekranda 'Sword of Light +7' şeklinde görüntülenebilir.
Python GUI ve UIScript Kullanımı
Metin2 özel sunucularında UI tarafı çoğunlukla Python ile yazılmıştır. Uiscript dosyalarında, bir item slotuna tıklanınca ya da item listesi yüklendiğinde, itemin + değeri kontrol edilir. Eğer socket0 değeri 0’dan büyükse, item adının sonuna + sayısı eklenir. Bu, kullanıcı dostu bir sistemdir ve geliştiriciler için kolayca değiştirilebilir.
Py Root ve Pack Dosyaları[/COORD]
Py root dosyaları, istemci tarafında çalışan Python dosyalarıdır. Bu dosyalar, item isimlerinin nasıl yazılacağını ve hangi değerlerin kullanılacağını belirler. Pack dosyaları ise bu Python dosyalarını sıkıştırılmış bir biçimde sunar. Bu nedenle, + sistemini aktif etmek istiyorsanız py root dosyalarınıza müdahale etmeniz gerekebilir. Pack dosyalarını açmak ve düzenlemek için özel araçlar kullanılabilir.
Database (DB) ile Entegrasyon
Item bilgileri veritabanında tutulur. Game DB'de item_slot adlı bir tablo bulunur ve burada socket0 alanı + değerini taşır. Oyun sunucusu, bu değeri okur ve istemciye gönderir. Bu nedenle, doğru DB tasarımı ve düzeni, + sayısının doğru gösterilmesi için kritiktir. Auth server ve game server arasında doğru senkronizasyon da önemlidir.
Özel Sunucularda Geliştirme ve Test
Metin2 özel sunucularında geliştirme yaparken, + sistemini test etmek için hem sunucu hem de istemci tarafında değişiklikler yapmanız gerekir. Bu süreçte, MARTYSAMA gibi sistemler veya kendi yazdığınız C++ sistemlerle entegre çalışarak, item isimlerini dinamik hale getirebilirsiniz. Özellikle PvP sunucularında, + sistemleri doğru çalışmadığında kullanıcılar eşyaların gerçek gücünü anlayamaz.
Sonuç
Envanterde itemin yanında + sayısının yazılması, Metin2 özel sunucularında kullanıcı deneyimini artıran küçük ama etkili bir özelliktir. Bu sistemin düzgün çalışması için hem sunucu hem de istemci tarafında uygun ayarlamalar yapılmalıdır. Python GUI, UIScript, DB ve C++ sistemlerinin uyum içinde çalışması, bu özelliğin sorunsuz çalışmasını sağlar.
Displaying the + Value Next to Items in Inventory
In Metin2 private servers, many small details play an important role in enhancing user experience. One of these details is displaying the + value next to items in the inventory. This feature is particularly useful in Metin2 PvP systems, where high-level weapons, armors, or items with bonuses need to be clearly identified. In this article, we will examine how to display the + number next to an item in the inventory and the technical details behind it.
What is the Metin2 Item System and the + System?
In Metin2, each item holds certain values stored in different fields within the database. One of these values is the item's + level. For example, consider a sword with +7. This indicates that the sword has an additional +7 attack bonus on top of its base stats. These values must be correctly processed both on the server-side and client-side to properly reflect to the player.
Defining the + Value on the Server Side[/COLO]
On the server side (game server), the + value of an item is usually stored in the 'socket0' field. This field represents the bonus level of the item. If an item is +5, this value is stored in the socket0 field. When listing items in-game, this value is sent to the client. Working with server-side operations often requires C++ knowledge, as most Metin2 private servers run on customized game server source code.
Display on the Client Side
On the client side—that is, the interface visible to the player—the + value should appear next to the item. This process is typically done through UIScript or Python GUI files. In Python-based UI systems, when an item's tooltip is shown or when the inventory is loaded, the socket0 value is checked, and the + value is printed to the screen. For instance, if the item name is 'Sword of Light' and the socket0 value is 7, it can be displayed as 'Sword of Light +7'.
Using Python GUI and UIScript
In Metin2 private servers, the UI side is mostly written in Python. In uiscript files, when an item slot is clicked or when the item list is loaded, the item's + value is checked. If the socket0 value is greater than 0, the + number is appended to the item name. This creates a user-friendly system that is also easy for developers to modify.
Py Root and Pack Files
Py root files are Python files running on the client-side. These files determine how item names are printed and which values are used. Pack files compress these Python files into a compact format. Therefore, to activate the + system, you may need to modify your py root files. Special tools can be used to unpack and edit pack files.
Integration with Database (DB)
Item information is stored in the database. The item_slot table in the game DB holds the socket0 field, which carries the + value. The game server reads this value and sends it to the client. Therefore, correct DB design and structure are critical for the accurate display of the + value. Proper synchronization between the auth server and game server is also important.
Development and Testing in Private Servers
When developing on Metin2 private servers, you need to make adjustments on both the server and client sides to test the + system. During this process, by integrating with systems like MARTYSAMA or your own custom C++ systems, you can dynamically adjust item names. Especially on PvP servers, if the + system does not function correctly, users cannot determine the true power of their items.
Conclusion
Displaying the + value next to items in the inventory is a small but effective feature that enhances user experience in Metin2 private servers. For this system to work properly, adjustments must be made on both the server and client sides. Ensuring that Python GUI, UIScript, DB, and C++ systems operate in harmony allows this feature to function smoothly.
