İtem Kod gösterme

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 53

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Selamlar herkese daha önce paylaşıldı m bilmiyorum itemlerin üzerine geldiğinde itemin gmler tarafından kodunu görüntülenmeyi göstericeğim ( Vnum )


Metin2 Oyununda İtem Kodlarını Gösterme Rehberi

Metin2 özel sunucularında geliştirme yapan geliştiriciler için önemli konulardan birisi, item (eşya) kodlarının doğru şekilde gösterilmesidir. Bu işlem hem kullanıcı deneyimini artırır hem de sunucu tarafında debug (hata ayıklama) süreçlerinde kolaylık sağlar. Bu makalede, Metin2 özel sunucularında istem kodlarının nasıl gösterileceği ve bu işlemin sunucu tarafında nasıl yönetileceği detaylı olarak ele alınacaktır.

İtem Kodları Nedir?

Metin2 oyununda her eşyanın benzersiz bir ID (kimlik numarası) vardır. Bu ID, genellikle item_proto tablosunda tanımlanır. Sunucu tarafında bir itemin doğrudan ID'si üzerinden erişim sağlanması, geliştiricilerin scriptler yazarken veya özel sistemler geliştirmelerinde büyük kolaylık sağlar. Örneğin, bir itemin ID'si 12345 ise, bu değer kullanılarak o itemle ilgili tüm bilgilere ulaşılabilir.

Sunucu Tarafında İtem Kodlarını Gösterme Yöntemleri

Metin2 özel sunucularında, client (istemci) tarafında item kodlarını göstermek için bazı modifikasyonlar yapılması gerekir. Bu işlem genellikle client source (istemci kaynak kodu) üzerinde değişiklik yaparak gerçekleştirilir. Client source, genellikle C++ diliyle yazılmıştır ve UI (kullanıcı arayüzü) ile ilgili dosyalar burada yer alır. Bu dosyalarda, item tooltip (bilgi baloncuğu) kısmına ID bilgisinin eklenmesi gerekir.

Python Arayüzünde (PyUI) Kod Gösterimi

Metin2 client'ı genellikle Python tabanlı bir arayüz sistemi (PyUI) kullanır. Bu yapıda, UI script dosyaları (.py) yardımıyla oyun arayüzü şekillenir. Item tooltip'lerin bulunduğu dosyalarda, item'ın adının yanında ID numarasının da gösterilmesi sağlanabilir. Bu işlem için, uiscript dosyalarında gerekli düzenlemeler yapılmalıdır.

Py Root Dosyaları ve Tooltip Düzenlemesi

Py root klasörleri, client tarafındaki Python dosyalarını içerir. Bu klasörlerde yer alan tooltip.py gibi dosyalar, item'lar üzerine gelindiğinde gösterilen bilgileri kontrol eder. Burada, item'ın proto_id adlı değişkeni çekilerek ekranda gösterilebilir. Geliştirici bu değeri, tooltip penceresine ekleyerek oyuncuların item ID'lerini görebilmesini sağlayabilir.

Martysama ve Diğer Araçlar

Geliştiriciler bazen hazır sistemlerden faydalanmak ister. Martysama gibi topluluk projeleri, geliştiricilere kolaylık sağlayan araçlar sunar. Bu tür sistemlerde, item kodlarını gösteren özellikler önceden tanımlanmış olabilir. Ancak, özelleştirme yapabilmek için yine de source edit bilgisi gerekebilir.

Sunucu Tarafında Destekleyici Ayarlar

Sunucu tarafında, auth ve game sunucuları arasında item ID'lerinin doğru şekilde aktarılması gerekir. DB (veritabanı) bağlantısı bu noktada kritik öneme sahiptir. Sunucu, client'a item ID'sini gönderdiğinde, client bu ID'yi alıp ekrana yansıtabilir. Bu yüzden, hem client hem de server src (sunucu kaynağı) üzerinde uyumlu çalışmak gerekir.

Sonuç

Metin2 özel sunucularında item kodlarını göstermek, geliştirme ve debug süreçlerini hızlandırır. PyUI, uiscript, py root gibi sistemler üzerinden yapılan bu işlemler, kullanıcı dostu bir geliştirme ortamı sunar. Geliştiricilerin, client src ve server src üzerindeki bilgilerini birleştirerek, istemci tarafında item ID'lerini kolayca görüntüleyebilirler. Bu sayede hem hata tespiti kolaylaşır hem de kullanıcıya daha fazla bilgi verilebilir.


Displaying Item Codes in Metin2

For developers working on Metin2 private servers, one of the important topics is correctly displaying item codes. This process enhances user experience and simplifies debugging processes on the server side. In this article, we will detail how to display item codes in Metin2 private servers and how this process is managed on the server side.

What Are Item Codes?

In the Metin2 game, every item has a unique ID. This ID is typically defined in the item_proto table. On the server side, accessing an item directly via its ID provides great convenience for developers when writing scripts or creating custom systems. For example, if an item's ID is 12345, this value can be used to access all related information about that item.

Methods for Displaying Item Codes on the Server Side

In Metin2 private servers, displaying item codes on the client side requires certain modifications. This process is usually done by making changes to the client source code. The client source is generally written in C++ and includes files related to the user interface. In these files, the ID information must be added to the item tooltip section.

Displaying Codes in the Python Interface (PyUI)

The Metin2 client often uses a Python-based interface system (PyUI). In this structure, UI script files (.py) shape the game interface. In tooltip files, the item's ID number can be displayed alongside its name. To achieve this, necessary adjustments must be made in the uiscript files.

Py Root Files and Tooltip Editing

Py root folders contain the Python files on the client side. Files such as tooltip.py located in these folders control the information shown when hovering over items. Here, the proto_id variable of the item can be retrieved and displayed on screen. Developers can add this value to the tooltip window so players can see the item IDs.

Tools Like Martysama

Sometimes developers prefer to use ready-made systems. Community projects like Martysama provide tools that ease the work for developers. Such systems may already have features to display item codes. However, customization still requires knowledge of source editing.

Supportive Settings on the Server Side

On the server side, item IDs must be transferred correctly between the auth and game servers. Database connections are critical at this point. When the server sends an item ID to the client, the client can receive and display it. Therefore, compatibility is essential between both client and server sources (src).

Conclusion

Displaying item codes in Metin2 private servers accelerates development and debugging processes. Through systems like PyUI, uiscript, and py root, these operations allow for a user-friendly development environment. By combining their knowledge of client src and server src, developers can easily view item IDs on the client side. This makes error detection easier and provides more information to users.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt