Renkli Sohbet Sistemi / Chat Color System (biraz Calliope2 barındırır) [C++ / PYTHON]
Metin2 Lobby olarak sunucu geliştiricileri için en etkili ve özgün sistemlerden biri olan Renkli Sohbet Sistemi, oyuncuların sohbet ederken daha renkli ve ifade dolu bir deneyim yaşamasını sağlar. Bu sistem, özellikle özel sunucularda Metin2 PvP sistemlerinde, kullanıcıların birbirlerini ayırt edebilmeleri, rol tanımları yapabilmeleri ve daha organize bir şekilde iletişim kurabilmeleri için oldukça önemlidir.
Sistem Nedir?
Renkli Sohbet Sistemi, oyuncuların adlarının, mesajlarının ya da belirli sistemsel metinlerin farklı renklerde görünmesini sağlayan gelişmiş bir C++ ve Python tabanlı yapıdır. Bu sistem, Calliope2 gibi modüler yapılarla entegre çalışabilir. Calliope2, Metin2 özel sunucularında sıklıkla kullanılan bir sistemdir ve bu chat sistemi ile doğrudan veya dolaylı olarak etkileşime girebilir.
C++ Tarafında Uygulama
C++ tarafında chat sistemine müdahale etmek için genellikle game core üzerinde değişiklik yapılır. Oyuncudan gelen mesajlar işlenmeden önce renk atamaları yapılır. Örneğin, adminler mavi, VIP kullanıcılar turuncu, normal oyuncular ise beyaz renkte mesaj gönderebilir. Bu, game server programming bilgisi gerektiren bir işlemdir. Özellikle source edit süreçlerinde bu yapıyı entegre etmek için server src dosyalarında belirli fonksiyonlar yazılır.
Python Tarafında Uygulama
Python tarafında ise bu sistem genellikle uiscript üzerinden kullanıcı arayüzünde desteklenir. Py GUI kullanılarak mesajların renkli olarak ekrana yansıması sağlanır. Py Root klasörlerindeki chat.py dosyası değiştirilerek renkli mesaj formatları belirlenir. Bu işlem sırasında dikkat edilmesi gereken konu, JSON formatının bozulmamasıdır. Bu nedenle, tırnak işaretleri yerine tek tırnak (') kullanılmalıdır.
Neden Gerekli?
Oyun içi sohbet sistemi, sadece mesaj gönderme aracı değil aynı zamanda sosyal yapı kurma ve rolleri tanımlama ortamıdır. Renkli sohbet sistemi sayesinde, yetkililer, VIP üyeler ve diğer kullanıcı grupları kolayca ayırt edilebilir. Bu da hem oyun içi deneyimi artırır hem de yönetim kolaylığı sağlar. Özellikle Metin2 PvP sunucularında bu sistem çok büyük avantaj sağlar.
Teknik Detaylar
Bu sistem için db core üzerinden kullanıcı seviyesine göre renk ataması yapılabilir. Kullanıcı yetki seviyesi veritabanında tutulur ve sunucu tarafında bu bilgiye göre mesaj rengi dinamik olarak atanır. Bu, auth ve game sunucuları arasında senkronize çalışmayı gerektirir. Ayrıca, sistem Martysama gibi script yapılarıyla da entegre olabilir.
Kurulum ve Geliştirme
Sistemin kurulumu için Metin2Dev standartlarına uygun kodlama yapılır. Compile işlemi sonrasında test aşaması başlar. Geliştirme sürecinde client src tarafında da bazı düzenlemeler gerekebilir. Pack dosyaları ile uyumlu olması sağlanır. Core yapıya entegre edilen bu sistem, Channel bazlı olarak da farklılaşabilir.
Sonuç
Renkli Sohbet Sistemi, Metin2 özel sunucularında kullanıcı deneyimini ciddi anlamda artıran etkileyici bir özelliktir. C++ ve Python dilleri ile yazılmış bu sistem, hem backend hem de frontend tarafında değişiklikler içerir. Calliope2 gibi yapılarla uyumlu olması, onu daha da esnek kılar. Metin2 Lobby olarak bu sistemi geliştirmeye ve topluluğa sunmaya devam ediyoruz.
Colorful Chat System / Chat Color System (contains some Calliope2 features) [C++ / PYTHON]
Metin2 Lobby offers one of the most effective and original systems for server developers: the Colorful Chat System. This system allows players to have a more colorful and expressive experience while chatting, especially in custom Metin2 PvP servers, where users can distinguish each other, assign roles, and communicate in a more organized manner.
What Is The System?
The Colorful Chat System is an advanced structure based on C++ and Python that enables player names, messages, or certain system texts to appear in different colors. This system can integrate directly or indirectly with modular structures like Calliope2. Calliope2 is frequently used in Metin2 private servers and can interact with this chat system.
Implementation in C++
To modify the chat system on the C++ side, changes are typically made within the game core. Before messages from players are processed, color assignments are applied. For instance, admins may appear in blue, VIP users in orange, and regular players in white. This requires knowledge of game server programming. Integrating this structure during source edit processes involves writing specific functions in the server src files.
Implementation in Python
On the Python side, the system usually supports the user interface via uiscript. With Py GUI, messages are displayed in their assigned colors. By modifying the chat.py file located in the Py Root folders, colorful message formats are defined. During this process, care must be taken not to break the JSON format, which is why single quotes (') are preferred over double quotes.
Why Is It Needed?
The in-game chat system is not only a messaging tool but also a medium for forming social structures and role definitions. Thanks to the colorful chat system, administrators, VIP members, and other user groups can be easily distinguished. This enhances the gaming experience and simplifies management. Particularly in Metin2 PvP servers, this system provides significant advantages.
Technical Details
Color assignments according to user levels can be made through the db core. User authority levels are stored in the database, and message colors are dynamically assigned on the server side based on this information. This requires synchronized operation between auth and game servers. Additionally, the system can also integrate with script structures like Martysama.
Installation and Development
For installation, coding is done in accordance with Metin2Dev standards. After the compile process, the testing phase begins. Some modifications may be required on the client src side during development. Compatibility with pack files is ensured. This system, integrated into the core structure, can vary by channel.
Conclusion
The Colorful Chat System is an impressive feature that significantly enhances the user experience in Metin2 private servers. Written in C++ and Python, this system involves changes on both the backend and frontend sides. Its compatibility with structures like Calliope2 makes it even more flexible. As Metin2 Lobby, we continue developing and offering this system to the community.
