Oyun içi Wiki Sistemidir, Hangi eşya hangi bossdan , metinden elde edilir gibi...
Türkçeye çevirip kullanabilirsiniz
Türkçeye çevirip kullanabilirsiniz
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Metin2 Oyunu İçin Oyun İçi Wiki Sistemi (Ne Nerden Düşer)
Metin2 özel sunucularında kullanıcıların kaynakları, itemleri ve drop oranlarını öğrenmeleri için bir oyun içi wiki sistemi oldukça faydalıdır. Bu sistem sayesinde oyuncular kafasında soru işaretleri olmadan item elde etme stratejileri oluşturabilir. Bu rehberde, hem C++ hem de Python tarafında bu sistemin nasıl entegre edileceğini adım adım göstereceğiz.
Oyun İçi Wiki Sistemi Nedir?
Oyun içi wiki sistemi, oyuncuların belirli itemlerin nerede veya hangi düşmandan düşeceğini öğrenebildiği bir arayüzdür. Bu sistem genellikle Python tarafında bir GUI ile sunulur ve C++ tarafında gerekli verileri veritabanından çeker. Bu sayede oyuncular, hangi itemi nereden alabileceklerini kolayca görebilir.
Sistem Gereksinimleri
- Python tabanlı GUI sistemi (uiscript, py root)
- MySQL veritabanı bağlantısı
- C++ oyun sunucusu tarafında SQL sorguları
- Mob_proto, item_proto, drop tablolarının doğru yapılandırılması
Python Tarafı Uygulama (Py GUI)
Öncelikle Python tarafında bir WikiWindow sınıfı oluşturulur. Bu sınıf, oyuncuya sunulan arayüzü yönetir. Kullanıcı bir item ismi yazdığında, sistem veritabanından bu item'in hangi moblardan düşebileceğini çeker ve listeler. Bu işlem genellikle bir SQLite ya da MySQL bağlantısı üzerinden yapılır.
Ayrıca, UIScript dosyası ile arayüz tasarımı yapılır. Butonlar, metin kutuları ve liste elemanları bu dosya ile tanımlanır. Örnek olarak:
Kod:
[BR][/BR]{'type': 'button', 'name': 'search_button', 'text': 'Ara', ...}[BR][/BR]
C++ Tarafı Entegrasyon
C++ tarafında, game core içinde bir komut sistemi tanımlanır. Oyuncu komutu gönderdiğinde, auth veya game server bu komutu alır ve veritabanından gerekli drop verilerini çeker. Bu veriler daha sonra istemciye gönderilir.
Örneğin, bir fonksiyon şu şekilde tanımlanabilir:
Kod:
[BR][/BR]int GetDropFromMonster(const char* item_name);[BR][/BR]
Veritabanı Yapısı
Sistem çalışabilmesi için mob_proto ve drop tablolarının doğru yapılandırılmış olması gerekir. Bu tablolarda her düşmanın hangi itemleri hangi oranla düşürdüğü bilgisi bulunur. Örnek bir sorgu şu şekilde olabilir:
Kod:
[BR][/BR]SELECT mob_name, drop_rate FROM drop_table WHERE item_vnum = ?;[BR][/BR]
Avantajlar[/BR][/BR]- Oyuncuların item bulma sürecini hızlandırır
- Sunucuda daha az destek talebi oluşur
- Oyuncu deneyimini artırır
Sonuç[/BR][/BR]Oyun içi wiki sistemi, Metin2 özel sunucularında kullanıcı dostu bir sistemdir. Python ve C++ dilleri ile entegre bir şekilde çalışarak, kullanıcıların bilgiye kolay erişimini sağlar. Doğru yapılandırıldığında, sunucu sahipleri oyuncuların daha fazla zaman harcamasını sağlayabilir. Bu sistem Martysama gibi geliştiricilerin projelerinde de sıklıkla kullanılmaktadır.
Kaynak Kod Paylaşımı
Eğer Metin2 özel sunucu geliştiriyorsanız, Metin2Lobby üzerinden güncel source edit, C++ system, py gui ve diğer kaynaklara ulaşabilirsiniz.
In-Game Wiki System (Where Items Drop) for Metin2 (C++ / Py)
An in-game wiki system is highly useful in Metin2 private servers, allowing players to learn about resources, items, and drop rates. With this system, players can strategize their item acquisition without confusion. This guide will demonstrate how to implement such a system on both C++ and Python sides, step by step.
What is an In-Game Wiki System?
An in-game wiki system is an interface that allows players to see where certain items drop from—whether from monsters or other sources. It typically uses a GUI built in Python and fetches necessary data from the database via C++. This way, players can easily check which items they can obtain and where.
System Requirements
- Python-based GUI system (uiscript, py root)
- MySQL database connection
- SQL queries on the C++ game server side
- Properly configured mob_proto, item_proto, and drop tables
Python Side Implementation (Py GUI)
Firstly, a WikiWindow class is created in Python. This class manages the interface shown to the player. When the user enters an item name, the system retrieves the monsters that may drop the item from the database and lists them. This process usually occurs through an SQLite or MySQL connection.
Additionally, the UIScript file handles the UI design. Buttons, text boxes, and list elements are defined with this file. Example:
Kod:
[BR][/BR]{'type': 'button', 'name': 'search_button', 'text': 'Search', ...}[BR][/BR]
C++ Side Integration
On the C++ side, a command system is defined within the game core. When a player sends a command, the auth or game server receives it and fetches the relevant drop data from the database. These data are then sent back to the client.
For instance, a function could be defined as:
Kod:
[BR][/BR]int GetDropFromMonster(const char* item_name);[BR][/BR]
Database Structure
For the system to work properly, mob_proto and drop tables must be correctly set up. These tables contain information about which items drop from each monster at what rate. An example query might look like this:
Kod:
[BR][/BR]SELECT mob_name, drop_rate FROM drop_table WHERE item_vnum = ?;[BR][/BR]
Advantages[/BR][/BR]- Speeds up the item-finding process for players
- Reduces support requests on the server
- Enhances overall player experience
Conclusion[/BR][/BR]The in-game wiki system is a user-friendly feature for Metin2 private servers. Integrated seamlessly between Python and C++, it allows users easy access to information. When properly configured, server owners can encourage players to spend more time in-game. This system is commonly used in projects by developers like Martysama.
Source Code Sharing
If you are developing a Metin2 private server, you can find up-to-date source edit, C++ system, py gui, and other resources at Metin2Lobby.
