Merhabalar. Bugün ki konumuz aşağıdaki ekte bulunan sistem. Güle güle kullanın. 
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 Grup Ortak Duygu Sistemi Geliştirme Rehberi (C++ / Python)
Metin2 özel sunucularında geliştirilen Grup Ortak Duygu Sistemi, oyuncuların grup arkadaşlarıyla daha fazla etkileşim kurmasını sağlar. Bu sistem sayesinde bir oyuncu bir duygu ifadesi kullandığında, aynı gruptaki diğer üyeler de otomatik olarak aynı duygu ifadesini kullanabilir. Bu yazıda, C++ tarafında game core üzerinde değişiklik yaparak ve Python tarafında GUI düzenlemeleriyle bu sistemi nasıl entegre edebileceğinizi detaylıca anlatacağız.
Sistem Nedir ve Ne İşe Yarar?
Grup Ortak Duygu Sistemi, oyuncuların grup içindeyken belirli bir duygu komutunu kullandığında, grubun diğer üyeleri tarafından da aynı duygunun paylaşılması prensibine dayanır. Örneğin, bir oyuncu /sevgi komutunu girdiğinde, grubundaki tüm oyuncuların aynı anda sevgi animasyonunu yapması sağlanır. Bu, grup içi sosyal deneyimi artırır ve birlik beraberliği hissini güçlendirir.
Geliştirme Ortamı Hazırlığı
Öncelikle, Metin2 server src dosyalarınızın bulunduğu ortamda game core ve auth core yapılarını iyi tanımanız gerekir. Sistem, hem sunucu tarafında (C++) hem de istemci tarafında (Python) çalışır. Bu nedenle, uiscript, py root ve client src gibi klasörlerde değişiklik yapabilecek teknik bilgiye sahip olmalısınız.
C++ Tarafında Uygulama
Sistem, öncelikle game server programming üzerinden çalışır. char.cpp veya char_emotion.cpp gibi dosyalarda duygu sistemini genişletmeniz gerekir. Grup kontrolü için party_manager.cpp dosyasına fonksiyon eklenir. Bu fonksiyon, bir oyuncu duygu komutu gönderdiğinde, grubun diğer üyelerine de aynı duygunun gönderilmesini sağlar.
Aşağıda örnek bir fonksiyon yapısı verilmiştir:
Kod:
void SendGroupEmotion(LPCHARACTER ch, int emotion_index){[BR][/BR] if (!ch || !ch->GetParty()) return;[BR][/BR][BR][/BR] const auto& party = ch->GetParty();[BR][/BR] for (int i = 0; i < party->GetMemberCount(); ++i) {[BR][/BR] LPCHARACTER member = party->GetMemberByIndex(i);[BR][/BR] if (member && member != ch) {[BR][/BR] member->SendEmotion(emotion_index, 0);[BR][/BR] }[BR][/BR] }[BR][/BR]}
Python Tarafında GUI Entegrasyonu
Python tarafında, py gui modüllerini kullanarak kullanıcı arayüzüne bir onay kutusu (checkbox) ekleyebilirsiniz. Bu kutucuk, 'Grup Ortak Duygu Modu' açık olduğunda duygu komutlarının grubu etkileyip etkilemeyeceğini belirler. Bu işlem için uiscript dosyalarında GUI bileşenleri düzenlenmelidir.
Veritabanı ve Güvenlik
Sistemin doğru çalışabilmesi için db core üzerinden grup verilerine hızlı erişim önemlidir. Oyuncu grup üyeliği, duygu kullanım sıklığı gibi verileri saklamak için MySQL veya MSSQL tablolarında gerekli alanlar oluşturulmalıdır. Ayrıca, sistemin kötüye kullanımını önlemek için komut kullanım limiti getirmek iyi bir güvenlik adımıdır.
Kurulum ve Test
Sistemi derlemeden önce, metin2 compile işlemlerini doğru bir şekilde yapmış olmanız gerekir. Sistem, hem channel sunucularında hem de core yapılarında test edilmelidir. Hata ayıklama için loglama sistemini aktif edin ve grup duygu aktivitelerini izleyin.
Sonuç
Grup Ortak Duygu Sistemi, Metin2 özel sunucularında grup deneyimini artırmak için harika bir özelliktir. Hem C++ hem de Python tarafında küçük ama etkili değişikliklerle bu sistemi entegre edebilirsiniz. Bu sayede oyuncularınız daha fazla birlikte oynama eğiliminde olur. Daha fazla Metin2 development içeriği için Metin2Lobby sitesini takip etmeyi unutmayın.
Metin2 Group Shared Emotion System Development Guide (C++ / Python)
The Group Shared Emotion System developed for Metin2 private servers allows players to interact more with their group members. With this system, when a player uses an emotion expression, other members in the same group automatically perform the same emotion. In this article, we will explain in detail how to integrate this system by making modifications in the game core using C++ and adjusting the GUI using Python.
What Is This System and What Does It Do?
The Group Shared Emotion System is based on the principle that when a player enters a specific emotion command while in a group, all other members of the group also share the same emotion. For example, if one player types /love, all members of the group will simultaneously perform the love animation. This increases the social experience within the group and strengthens team unity.
Setting Up the Development Environment
Firstly, you need to be familiar with structures such as game core and auth core in your Metin2 server src files. The system operates both on the server side (C++) and the client side (Python). Therefore, you must have technical knowledge to make changes in folders like uiscript, py root, and client src.
Implementation in C++
The system primarily works through game server programming. You need to expand the emotion system in files like char.cpp or char_emotion.cpp. A function must be added to party_manager.cpp for group checks. This function ensures that when a player sends an emotion command, the same emotion is sent to other members of the group.
An example function structure is shown below:
Kod:
void SendGroupEmotion(LPCHARACTER ch, int emotion_index){[BR][/BR] if (!ch || !ch->GetParty()) return;[BR][/BR][BR][/BR] const auto& party = ch->GetParty();[BR][/BR] for (int i = 0; i < party->GetMemberCount(); ++i) {[BR][/BR] LPCHARACTER member = party->GetMemberByIndex(i);[BR][/BR] if (member && member != ch) {[BR][/BR] member->SendEmotion(emotion_index, 0);[BR][/BR] }[BR][/BR] }[BR][/BR]}
GUI Integration in Python
On the Python side, you can add a checkbox to the user interface using the py gui modules. This checkbox determines whether emotion commands affect the group when 'Group Shared Emotion Mode' is enabled. For this purpose, GUI components in uiscript files should be modified.
Database and Security
To ensure the system works correctly, fast access to group data via the db core is important. Tables in MySQL or MSSQL must be created to store data such as player group membership and frequency of emotion usage. Additionally, setting a command usage limit is a good security step to prevent misuse of the system.
Installation and Testing
Before compiling the system, you must properly perform metin2 compile operations. The system should be tested on both channel servers and core structures. Activate logging for debugging and monitor group emotion activities.
Conclusion
The Group Shared Emotion System is an excellent feature to enhance the group experience in Metin2 private servers. By making small but effective changes in both C++ and Python, you can integrate this system. This way, your players will tend to play together more. Don't forget to follow Metin2Lobby for more Metin2 development content.
