Official Pet Isim Değiştirme

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Merhaba Arkadaşlar bildiğiniz üzere official pet sistemini daha çok sayıda eksiklerinden biri olan isim değiştirme eksiğini sizinle paylaşacağım...
hiç bir yerden alıntı değildir paylaşacak olan arkadaşlar bu emeği gözardı etmez ise sevinirim..
Anlatım rar içerisinde mevcut yapamayan arkadaşlar olur ise konu altında belirtin yardımcı olalım ..

screenshot-638.png








Skill restleme ilgili bakayım onuda tamamlayıp paylaşacağım..
Official Pet Isim Değiştirme Sistemi

Metin2 özel sunucularında oyun deneyimini zenginleştirmek ve oyuncuların pet karakterlerine kişisel dokunuş yapabilmesi için Official Pet Isim Değiştirme sistemi oldukça popülerdir. Bu sistem sayesinde oyuncular, sahip oldukları evcil hayvanların isimlerini kendi isteklerine göre değiştirebilir. Bu işlem genellikle bir NPC üzerinden veya belirli itemlerle gerçekleştirilir. Bu yazıda, Metin2 özel sunucularında Pet Isim Değiştirme özelliğinin nasıl entegre edileceği, gerekli C++ kaynak kod düzenlemeleri, Python GUI değişiklikleri ve gerekli veritabanı güncellemeleri hakkında detaylı bilgi vereceğiz.

Sistem Mimarisine Genel Bakış

Pet isim değiştirme sistemi, genellikle game sunucusu tarafında çalışır. Gerekli komutlar, C++ ile yazılmış sunucu kaynak koduna entegre edilir. Bu sistemde, oyuncu bir NPC ile etkileşime girer ve ismini değiştirmek istediği peti seçer. Ardından, belirli bir item (örneğin rename stone) kullanılır ve yeni isim girilir. Bu işlem sırasında güvenlik önlemleri alınarak, kullanıcıların geçersiz karakterler veya küfür kullanmaması sağlanır.

C++ Sunucu Tarafı Uygulama

Sunucu tarafında bu sistemi entegre etmek için src/game dizinindeki dosyalarda değişiklik yapmanız gerekir. Öncelikle, pet nesnesinin isim değiştirme metoduna erişim sağlanması gerekir. Bu işlem için örneğin pet_system.cpp dosyasında bir fonksiyon tanımlanabilir. Fonksiyon, oyuncu tarafından girilen ismi alır, filtreler ve veritabanında günceller. Bu işlem sırasında security checks uygulanmalıdır. Güvenlik kontrolü için özel regex ifadeleri yazılabilir. Ayrıca, isim uzunluğu da sınırlandırılmalıdır (örneğin maksimum 16 karakter).

Python Tarafında GUI Entegrasyonu

Oyuncu arayüzü tarafında, pet isim değiştirme işlemi için bir pencere açılması gerekir. Bu pencere genellikle uiscript ile tanımlanır. py root altında yer alan GUI dosyalarında bu pencerenin yapılandırılması yapılır. Kullanıcı, pet seçimini yaptıktan sonra yeni ismi girer ve onay butonuna basar. İşlem doğrulandıktan sonra sunucuya gönderilir. GUI tasarımı sırasında kullanıcı dostu bir arayüz önemlidir. Arka plan resimleri, buton stilleri gibi görsel öğeler dikkatlice seçilmelidir.

Veritabanı Yapılandırması

Pet isimleri genellikle player.pets tablosunda saklanır. Yeni isim değiştirme sistemi için bu tabloya bir name alanı eklenmelidir. Ayrıca, isim değiştirme işlemi için log tutulması önerilir. Bu sayede, her isim değişikliği tarih, kullanıcı ID ve IP adresiyle birlikte veritabanına yazılır. Bu loglar, güvenlik nedeniyle önemli olabilir. MySQL veya MariaDB gibi veritabanları için uygun SQL komutları hazırlanmalıdır.

Özet

Official Pet Isim Değiştirme sistemi, Metin2 özel sunucularında kullanıcı deneyimini artırmak için oldukça etkili bir özelliktir. Bu sistemin doğru şekilde entegre edilmesi için hem C++ hem de Python bilgisi gerekebilir. Ayrıca, veritabanı tasarımı ve güvenlik önlemleri de göz ardı edilmemelidir. Bu makale sayesinde, Metin2 geliştiricileri kendi sunucularında bu sistemi kolayca entegre edebilir.


Official Pet Name Change System

In order to enhance the gaming experience on Metin2 private servers and allow players to personalize their pets, the Official Pet Name Change system has become quite popular. With this system, players can change the names of their pets according to their preferences. This process is usually done through an NPC or specific items. In this article, we will provide detailed information about how to integrate the Pet Name Change feature into Metin2 private servers, including necessary C++ source code modifications, Python GUI adjustments, and required database updates.

Overview of System Architecture

The Pet Name Change system typically operates on the game server side. Relevant commands are integrated into the C++ server source code. In this system, the player interacts with an NPC, selects the pet whose name they want to change, then uses a certain item (e.g., rename stone) and enters a new name. During this process, security measures are taken to prevent users from entering invalid characters or profanity.

C++ Server-Side Implementation

To integrate this system on the server side, modifications must be made to files located in the src/game directory. First, access to the pet object's name changing method must be provided. For instance, a function can be defined in the pet_system.cpp file. The function receives the name entered by the player, filters it, and updates it in the database. Security checks must be implemented during this process. Custom regex expressions can be written for security validation. Additionally, the name length should be limited (e.g., maximum 16 characters).

GUI Integration on Python Side

On the user interface side, a window must open for the pet name change operation. This window is generally defined using uiscript. The configuration of this window is handled in GUI files under py root. After selecting a pet, the user enters the new name and clicks the confirm button. Once validated, the request is sent to the server. When designing the GUI, a user-friendly interface is important. Visual elements such as background images and button styles should be carefully selected.

Database Configuration

Pet names are typically stored in the player.pets table. For the new name change system, a name field should be added to this table. It is also recommended to keep logs of name change operations. Each name change can be logged with date, user ID, and IP address. These logs may be important for security reasons. Appropriate SQL commands should be prepared for databases like MySQL or MariaDB.

Summary

The Official Pet Name Change system is a highly effective feature to enhance user experience on Metin2 private servers. Correctly integrating this system requires knowledge of both C++ and Python. Furthermore, database design and security measures should not be overlooked. With this article, Metin2 developers can easily implement this system on their own servers.
 

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

Benzer konular

Geri
Üst Alt