// kapatıldı.
Metin2 Oyununda BeviS Statü Ekranında HP ve SP Değerlerini Noktalı Gösterim Nasıl Yapılır?
Metin2 özel sunucularında geliştirme yaparken, kullanıcı arayüzü üzerinde değişiklikler yapmak isteyebilirsiniz. Bunlardan birisi de BeviS olarak bilinen statü ekranında HP ve SP değerlerinin noktalı olarak gösterilmesidir. Bu işlem hem görsellik hem de kullanıcı deneyimi açısından oldukça faydalıdır. Bu makalede, C++ tabanlı game server tarafında ve client src üzerinde nasıl yapılabileceğini adım adım anlatacağız.
HP ve SP Nedir?
HP (Health Point) karakterin can değeridir. SP (Skill Point) ise beceri puanlarını ifade eder. Bu değerler genellikle binlik basamaklarda nokta ile ayrılır. Örneğin: 1.000.000 HP. Bu gösterim, kullanıcıların büyük sayıları daha kolay okumasını sağlar.
BeviS Statü Ekranında Noktalı Gösterim Nasıl Uygulanır?
Adım 1: Client Tarafı (uiscript)
Öncelikle uiscript dosyasında BeviS arayüzünü düzenlememiz gerekir. statusboard.py gibi bir dosya üzerinden HP ve SP değerlerinin yazdığı kısım bulunur. Burada Python tarafında bir fonksiyon yardımıyla bu değerler noktalı hale getirilir.
def format_number(num):
return '{:,}'.replace(',', '.').format(int(num))
Bu fonksiyonu kullanarak HP ve SP değerleri şu şekilde yazdırılır:
HP: format_number(player.GetStatus(player.HP))
SP: format_number(player.GetStatus(player.SP))
Adım 2: Game Server Tarafı (C++)
Eğer değerler sunucudan farklı formatta geliyorsa, game server src üzerinde de gerekli ayarlamalar yapılmalıdır. Özellikle packet yapısı üzerinden HP ve SP verileri gönderilirken formatlama yapılabilir. Ancak genellikle bu formatlama client tarafında yapılır.
Adım 3: Pack Dosyası ile Dağıtım
Yaptığınız değişiklikleri pack dosyası haline getirip oyunculara dağıtabilirsiniz. Bu sayede tüm kullanıcılar aynı formatı görecektir.
Neden Noktalı Gösterim Kullanmalıyız?
Oyuncuların yüksek seviye karakterlerinde HP ve SP değerleri milyonlara ulaşabilir. Bu büyük sayıları okumak zorlaşır. Noktalı gösterim, kullanıcıların bu değerleri daha rahat takip etmesini sağlar. Ayrıca profesyonel bir görünüm kazandırır.
Sonuç
BeviS statü ekranında HP ve SP değerlerinin noktalı gösterimi, Metin2 özel sunucularında kullanıcı dostu bir geliştirme örneğidir. C++ ve Python bilgisiyle kolayca uygulanabilir.
How To Make HP and SP Display With Dots on BeviS Status Screen in Metin2?
When developing private servers for Metin2, you may want to customize the user interface. One such customization is making the HP and SP values display with dots on the BeviS status screen. This adjustment improves visual appeal and user experience. In this article, we will explain step-by-step how to implement this on both the C++ based game server side and the client src.
What Are HP and SP?
HP (Health Point) refers to the character's life value. SP (Skill Point) refers to skill points. These values are typically separated by dots every thousand units. For example: 1.000.000 HP. This format helps users read large numbers more easily.
How to Implement Dotted Display on BeviS Status Screen?
Step 1: Client Side (uiscript)
Firstly, modify the uiscript file where the BeviS UI is defined. Find the section in the statusboard.py file where HP and SP values are displayed. Use a Python function to format these values with dots.
def format_number(num):
return '{:,}'.replace(',', '.').format(int(num))
Using this function, HP and SP values can be displayed like so:
HP: format_number(player.GetStatus(player.HP))
SP: format_number(player.GetStatus(player.SP))
Step 2: Game Server Side (C++)
If the values come from the server in a different format, adjustments might be needed on the game server src. Especially within the packet structure, formatting can be done while sending HP and SP data. However, this formatting is usually handled on the client side.
Step 3: Distribution via Pack File
You can package your modifications into a pack file and distribute it to players so that everyone sees the same formatted values.
Why Should We Use Dotted Display?
In high-level characters, HP and SP values can reach millions, making them hard to read. Dotted number display allows players to track these values more easily and gives a professional appearance.
Conclusion
Displaying HP and SP values with dots on the BeviS status screen is a user-friendly customization for Metin2 private servers. It can be easily implemented using C++ and Python knowledge. Visit
