[C++][Py][Lua] Köstüm Gizleme Sistemi

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Merhaba,

Sistem köstüm üzerinizde giyili olduğu halde köstümü gizlemye yarar anlatım içindedir.

İyi forumlar

asd.png



Anlatım Düzenlendi Yeniden İndirin




Kanıtlar:

PMLXq9.jpg


go3m53.jpg


Metin2 Lobby'de Gelişmiş Köstüm Gizleme Sistemi


Metin2 özel sunucularında kullanıcı deneyimini artırmak ve oyuncuların karakterlerini özelleştirmelerine olanak sağlamak adına birçok geliştirici, köstüm gizleme sistemleri gibi gelişmiş özellikler entegre eder.
Bu yazıda, C++, Python ve Lua dillerinde geliştirilmiş, köstüm gizleme sistemlerinden bahsedeceğiz.

Köstüm Nedir?
Metin2 oyununda köstüm, karakterin giydiği görsel efektlerdir; ancak bu efektler bazen estetikten veya dengeden uzak olabilir.
Oyuncular, PvP savaşları sırasında ya da belirli etkinliklerde köstümleri devre dışı bırakmak isteyebilir.
Bu durumda, köstüm gizleme sistemi devreye girer.

Sistem Mimarisine Genel Bakış
Bu sistem genellikle 3 ana bileşenden oluşur:
1. C++ Oyun Sunucusu: Karakter verileri ve köstüm durumu burada yönetilir.
2. Python Arayüz: Oyuncu tarafında ayarlar paneli sunulur.
3. Lua Script: İstemci tarafında görsel değişiklikler yapılır.

C++ Tarafında Geliştirme
Sunucu tarafında, köstüm verisi karakter veritabanında tutulur.
Her oyuncu için bir toggle değeri tanımlanarak köstümün açık ya da kapalı olması sağlanır.
Örnek olarak, CharacterManager.cpp dosyasında bir fonksiyon oluşturulabilir:
Kod:
[B]void ToggleCostume(int pid, bool hide)[/B]

Bu fonksiyon, oyuncunun köstümünü aktif ya da pasif yapar.

Python GUI Tarafı
Metin2 client tarafında, oyuncuya bir arayüz sunulur.
Python ile geliştirilen bu GUI, oyuncunun köstümünü açıp kapamasını sağlar.
Bu arayüz genellikle uiscript ile tasarlanır ve py root dosyalarıyla çalışır.

Lua Script Entegrasyonu
Lua, istemci tarafında görsel değişikliklerin yapılmasında kullanılır.
Köstüm görünümü, Lua script ile kontrol edilir ve toggle durumuna göre görünüm değiştirilir.

Veri Tabanı ve Senkronizasyon
Köstüm ayarları veritabanında tutulur.
Her karakterin costume_hidden adında bir boolean değeri vardır.
Sunucu başlatıldığında bu değer okunur ve köstüm görünürlüğü buna göre ayarlanır.

Köstüm Gizleme Sisteminin Avantajları
- PvP dengesini artırır.
- Karakter görünümünü kişiselleştirilebilir kılar.
- Görsel kirliliği azaltır.
- Sunucu farklılaşmasını sağlar.

Sonuç
Metin2 özel sunucularında köstüm gizleme sistemi, hem oyun içi dengeyi hem de kullanıcı memnuniyetini artıran önemli bir özelliktir.
C++, Python ve Lua gibi teknolojilerin doğru kullanılmasıyla bu sistem güçlü ve esnek hale getirilebilir.
Detaylı source edit ve testlerle, sunucunuzda bu sistemi sorunsuzca kullanabilirsiniz.

Kaynak Kod Paylaşımları
Metin2Lobby.com üzerinden martysama ve diğer geliştiricilerin katkılarıyla paylaşılan kaynak kodlar sayesinde bu tür sistemleri daha hızlı ve güvenli bir şekilde entegre edebilirsiniz.


Advanced Costume Hide System at Metin2 Lobby


To enhance user experience in Metin2 private servers and allow players to customize their characters, many developers integrate advanced features like costume hiding systems.
In this article, we will discuss costume hiding systems developed in C++, Python, and Lua.

What is a Costume?
In Metin2, costumes are visual effects worn by the character; however, these effects may sometimes be aesthetically displeasing or unbalanced.
Players might want to disable costumes during PvP battles or specific events.
In such cases, the costume hiding system comes into play.

Overview of System Architecture
This system generally consists of three main components:
1. C++ Game Server: Character data and costume status are managed here.
2. Python UI: Provides a settings panel for the player.
3. Lua Script: Handles visual changes on the client side.

Development on C++ Side
On the server side, costume data is stored in the character database.
A toggle value is defined for each player to activate or deactivate the costume.
As an example, a function can be created in the CharacterManager.cpp file:
Kod:
[B]void ToggleCostume(int pid, bool hide)[/B]

This function activates or deactivates the player's costume.

Python GUI Implementation
On the client side, an interface is provided to the player.
This GUI, developed with Python, allows the player to toggle their costume on or off.
The interface is usually designed with uiscript and works with py root files.

Lua Script Integration
Lua is used to handle visual changes on the client side.
The costume appearance is controlled via Lua script and adjusted based on the toggle state.

Database and Synchronization
Costume settings are stored in the database.
Each character has a boolean value named costume_hidden.
When the server starts, this value is read and costume visibility is set accordingly.

Advantages of the Costume Hide System
- Improves PvP balance.
- Allows customization of character appearance.
- Reduces visual clutter.
- Differentiates the server.

Conclusion
The costume hiding system in Metin2 private servers is an important feature that enhances both in-game balance and user satisfaction.
With correct usage of technologies like C++, Python, and Lua, this system can be made robust and flexible.
Through detailed source edits and testing, you can seamlessly implement this system on your server.

Source Code Sharing
Thanks to shared source codes by martysama and other contributors on Metin2Lobby.com, you can integrate such systems faster and more securely.
 

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

Geri
Üst Alt