- Katılım
- 6 Mayıs 2022
- Konular
- 48,291
- Mesajlar
- 48,601
- Tepkime puanı
- 75
- M2 Yaşı
- 3 yıl 11 ay 10 gün
- Trophy Puan
- 48
- M2 Yang
- 488,879
Öncelikle Bir Arkadaşım Aradığı İçin Paylaşıyorum C++ Bana Ait Değildir Alıntı Olarak Paylaşıyorum Bunu Belirtiyim Konuya Geçelim
[/CENTER]
. Her şey sunucu tarafında ise
char.cpp açılır
aşağıdaki kod aratılır
Kodu:
Orada eğer bu gibi görünüyor böylece değiştirin:
Şimdi biz bir evcil hayvan sistemi içine daha ekleyin.
---> açılır PetSystem.cpp ve orada okudu:
Kodu:
Onu dahil ekliyor:
Kodu:
Ve evet ben bu örnekte orada değerler sabit ama düşünceleri hakkında yapmak herkes için sadece bir düşünce teşvik olması gerektiğini biliyorum.
İşleri rütbe noktaları vb da harika olan yol ^^
Metin2 Oyunu İçin Evcil Hayvan Seviye Ekranı Sistemi - C++ ve Kaynak Kodlama ile Geliştirme
Metin2 özel sunucularında kullanıcı deneyimini artırmak için birçok sistem geliştirilmektedir. Bu sistemlerden biri olan evcil hayvan seviye ekranı, oyuncuların sahip oldukları evcil hayvanların gelişimini takip edebilmesini sağlar. Bu yazıda, C++ ve Source kodları üzerinden nasıl bir evcil hayvan seviye ekranı sistemi geliştirileceği anlatılacaktır.
Sistem Hakkında Genel Bilgi
Metin2 oyununda evcil hayvanlar, oyuncuların savaşta destek alabileceği önemli varlıklardır. Bu hayvanlar belirli görevleri yerine getirerek, seviyelerini artırabilir. Ancak bu gelişim sürecini görsel olarak izlemek isteyen oyuncular için bir arayüz tasarımı oldukça önemlidir. Bu sistem sayesinde oyuncular evcil hayvanlarının mevcut seviyesini,经验值 (EXP), gerekli EXP miktarını ve seviye atlaması için kalan süreyi görebilirler.
C++ ile Kaynak Kodlarda Gerekli Değişiklikler
Evcil hayvan seviye ekranı sisteminin entegrasyonu için öncelikle game sunucusuna ait kaynak kodlarda değişiklik yapılması gerekir. Bu değişiklikler genellikle char_data.cpp, pet_system.cpp ve packet.h gibi dosyalarda yapılır. Bu dosyalar üzerinden evcil hayvanla ilgili verilerin alınması ve istemciye gönderilmesi sağlanır.
1. Pet Verilerinin Tanımlanması:
Pet verileri için yeni bir yapı tanımlamak gerekir. Örneğin, pet_level, current_exp, required_exp gibi veriler tutulur. Bu veriler, pet nesnesi ile ilişkilendirilir.
2. Packet Tanımı:
Client tarafına bu verileri göndermek için yeni bir packet tanımlanmalıdır. Bu packet, client tarafından alınarak arayüzde gösterilir. Örneğin, HEADER_CG_PET_INFO_REQUEST gibi bir komut kullanılabilir.
3. Client Tarafı Kodlama:
Client tarafında ise Python GUI (uiscript) kullanılarak bir pencere tasarlanır. Bu pencerede evcil hayvanın seviyesi, EXP çubuğu ve diğer detaylar gösterilir. py root dizinindeki dosyalara yeni bir UI sınıfı eklenir.
Python GUI ile Arayüz Tasarımı
Metin2 client tarafında UI tasarımı genellikle uiscript dosyaları ile yapılır. Yeni bir pencere açmak için wndMgr.RegisterWindow ve benzeri fonksiyonlar kullanılır. Pet level screen için bir pencere sınıfı oluşturulur. Bu sınıf, pet verilerini alır ve ekranda gösterir. UI elemanları olarak progress bar, text label ve buttonlar kullanılabilir.
Örnek Kod Parçası (Python):
class PetLevelWindow(ui.Window):
def __init__(self):
ui.Window.__init__(self)
self.LoadWindow()
def LoadWindow(self):
...
Sunucu ve Client Uyumluğu
Sunucu tarafında tanımlanan veri yapısı ile client tarafındaki arayüz arasında uyum olmalıdır. Paket boyutları, veri tipleri ve sıralar doğru şekilde eşleştirilmelidir. Aksi halde veri aktarımı başarısız olur ve sistem çalışmayabilir.
Test ve Debugging
Sistem entegrasyonundan sonra test aşaması çok önemlidir. Oyuncuların evcil hayvanlarını seviye atlattığı senaryolar test edilmeli, veriler doğru şekilde ekrana yansıyor mu kontrol edilmelidir. Hata mesajları loglara yazılmalı ve debugging işlemleri yapılmalıdır.
Sonuç
Metin2 özel sunucularında evcil hayvan seviye ekranı sistemi, oyuncuların daha fazla ilgisini çekebilir. Bu tür küçük ama etkili sistemler, sunucu kalitesini artırır. C++ ve Python tabanlı geliştirme ile bu sistem kolayca entegre edilebilir. Kaynak kodlara yapılan değişiklikler ile hem backend hem de frontend tarafında etkili bir sistem kurulabilir.
Pet Level Screen System for Metin2 - Development with C++ and Source Code
In order to enhance the user experience on Metin2 private servers, various systems are being developed. One of these systems is the pet level screen, which allows players to track the progression of their pets. In this article, we will explain how to develop a pet level screen system using C++ and source code.
General Information about the System
In the Metin2 game, pets are important assets that can assist players during combat. These pets can level up by completing certain tasks. However, for players who wish to visually track this progression, a visual interface is essential. This system allows players to view the current level of their pet,经验值 (EXP), required EXP, and remaining EXP needed to level up.
Necessary Changes in C++ Source Codes
To integrate the pet level screen system, modifications must be made to the source code of the game server. These changes are typically done in files such as char_data.cpp, pet_system.cpp, and packet.h. Through these files, data related to pets are retrieved and sent to the client.
1. Defining Pet Data:
A new structure must be defined to store pet data. For example, pet_level, current_exp, required_exp and similar values are stored. These values are associated with the pet object.
2. Packet Definition:
To send these data to the client side, a new packet must be defined. This packet is received by the client and displayed in the UI. For instance, a command like HEADER_CG_PET_INFO_REQUEST could be used.
3. Client-Side Coding:
On the client side, a window is designed using Python GUI (uiscript). In this window, the pet's level, EXP bar, and other details are displayed. A new UI class is added to the files in the py root directory.
UI Design with Python GUI
UI design in Metin2 clients is generally done with uiscript files. To open a new window, functions like wndMgr.RegisterWindow are used. A window class for the pet level screen is created. This class receives pet data and displays it on the screen. UI elements such as progress bars, text labels, and buttons can be used.
Sample Code (Python):
class PetLevelWindow(ui.Window):
def __init__(self):
ui.Window.__init__(self)
self.LoadWindow()
def LoadWindow(self):
...
Server and Client Compatibility
There must be compatibility between the data structure defined on the server side and the interface on the client side. Packet sizes, data types, and sequences should be correctly matched. Otherwise, data transfer will fail and the system may not work.
Testing and Debugging
The testing phase is very important after system integration. Scenarios where players level up their pets must be tested, and it should be checked whether the data is correctly displayed on the screen. Error messages should be logged and debugging processes should be performed.
Conclusion
The pet level screen system in Metin2 private servers can attract more interest from players. Such small but effective systems improve the quality of the server. With C++ and Python-based development, this system can be easily integrated. Modifications made to the source codes allow for an effective system to be established on both the backend and frontend sides.
. Her şey sunucu tarafında ise
char.cpp açılır
aşağıdaki kod aratılır
Kodu:
Kod:
[COLOR=#000088]IF [/COLOR] [COLOR=#666600]( [/COLOR][COLOR=#660066]ISPC [/COLOR][COLOR=#666600]() [/COLOR] [COLOR=#666600]== [/COLOR] [COLOR=#000088]true [/COLOR] [COLOR=#666600]&& [/COLOR] [COLOR=#666600]( [/COLOR]LC_IsEurope [COLOR=#666600]() [/COLOR] [COLOR=#666600]== [/COLOR] [COLOR=#000088]true [/COLOR] [COLOR=#666600]|| [/COLOR]LC_IsCanada [COLOR=#666600]() [/COLOR] [COLOR=#666600]== [/COLOR] [COLOR=#000088]true [/COLOR] [COLOR=#666600]|| [/COLOR]LC_IsSingapore [COLOR=#666600]() [/COLOR] [COLOR=#666600]== [/COLOR] [COLOR=#000088]true [/COLOR][COLOR=#666600]))[/COLOR]
Kod:
[COLOR=#000088][FONT=monospace]if [/FONT][/COLOR][COLOR=#666600][FONT=monospace]( [/FONT][/COLOR][COLOR=#660066][FONT=monospace]IsPC [/FONT][/COLOR][COLOR=#666600][FONT=monospace]() [/FONT][/COLOR][COLOR=#666600][FONT=monospace]== [/FONT][/COLOR][COLOR=#000088][FONT=monospace]true [/FONT][/COLOR][COLOR=#666600][FONT=monospace]&& [/FONT][/COLOR][COLOR=#666600][FONT=monospace]( [/FONT][/COLOR][COLOR=#000000][FONT=monospace]LC_IsEurope [/FONT][/COLOR][COLOR=#666600][FONT=monospace]() [/FONT][/COLOR][COLOR=#666600][FONT=monospace]== [/FONT][/COLOR][COLOR=#000088][FONT=monospace]true [/FONT][/COLOR][COLOR=#666600][FONT=monospace]|| [/FONT][/COLOR][COLOR=#000000][FONT=monospace]LC_IsCanada [/FONT][/COLOR][COLOR=#666600][FONT=monospace]() [/FONT][/COLOR][COLOR=#666600][FONT=monospace]== [/FONT][/COLOR][COLOR=#000088][FONT=monospace]true [/FONT][/COLOR][COLOR=#666600][FONT=monospace]|| [/FONT][/COLOR][COLOR=#000000][FONT=monospace]LC_IsSingapore [/FONT][/COLOR][COLOR=#666600][FONT=monospace]() [/FONT][/COLOR][COLOR=#666600][FONT=monospace]== [/FONT][/COLOR][COLOR=#000088][FONT=monospace]true [/FONT][/COLOR][COLOR=#666600][FONT=monospace])) [/FONT][/COLOR] [COLOR=#666600]{ [/COLOR] addPacket [COLOR=#666600]. [/COLOR]dwLevel [COLOR=#666600]= [/COLOR] [COLOR=#660066]GetLevel [/COLOR][COLOR=#666600](); [/COLOR] [COLOR=#666600]} [/COLOR] [COLOR=#000088]else [/COLOR] [COLOR=#666600]{ [/COLOR] [COLOR=#000088]if [/COLOR][COLOR=#666600]( [/COLOR][COLOR=#660066]IsPet [/COLOR][COLOR=#666600]()){ [/COLOR] addPacket [COLOR=#666600]. [/COLOR]dwLevel [COLOR=#666600]= [/COLOR] [COLOR=#660066]GetLevel [/COLOR][COLOR=#666600](); [/COLOR] [COLOR=#666600]} [/COLOR][COLOR=#000088]else [/COLOR][COLOR=#666600]{ [/COLOR] addPacket [COLOR=#666600]. [/COLOR]dwLevel [COLOR=#666600]= [/COLOR] [COLOR=#006666]0 [/COLOR][COLOR=#666600]; [/COLOR] [COLOR=#666600]} [/COLOR] [COLOR=#666600]}[/COLOR] [COLOR=#666600]}[/COLOR]
Şimdi biz bir evcil hayvan sistemi içine daha ekleyin.
---> açılır PetSystem.cpp ve orada okudu:
Kodu:
Kod:
[COLOR=#000000][FONT=monospace]m_pkChar [/FONT][/COLOR][COLOR=#666600][FONT=monospace]-> [/FONT][/COLOR][COLOR=#660066][FONT=monospace]SetPet [/FONT][/COLOR][COLOR=#666600][FONT=monospace]();[/FONT][/COLOR]
Kodu:
Kod:
m_pkChar [COLOR=#666600]-> [/COLOR][COLOR=#660066]SetLevel [/COLOR][COLOR=#666600]( [/COLOR][COLOR=#006666]100 [/COLOR][COLOR=#666600]);[/COLOR]
İşleri rütbe noktaları vb da harika olan yol ^^
Metin2 Oyunu İçin Evcil Hayvan Seviye Ekranı Sistemi - C++ ve Kaynak Kodlama ile Geliştirme
Metin2 özel sunucularında kullanıcı deneyimini artırmak için birçok sistem geliştirilmektedir. Bu sistemlerden biri olan evcil hayvan seviye ekranı, oyuncuların sahip oldukları evcil hayvanların gelişimini takip edebilmesini sağlar. Bu yazıda, C++ ve Source kodları üzerinden nasıl bir evcil hayvan seviye ekranı sistemi geliştirileceği anlatılacaktır.
Sistem Hakkında Genel Bilgi
Metin2 oyununda evcil hayvanlar, oyuncuların savaşta destek alabileceği önemli varlıklardır. Bu hayvanlar belirli görevleri yerine getirerek, seviyelerini artırabilir. Ancak bu gelişim sürecini görsel olarak izlemek isteyen oyuncular için bir arayüz tasarımı oldukça önemlidir. Bu sistem sayesinde oyuncular evcil hayvanlarının mevcut seviyesini,经验值 (EXP), gerekli EXP miktarını ve seviye atlaması için kalan süreyi görebilirler.
C++ ile Kaynak Kodlarda Gerekli Değişiklikler
Evcil hayvan seviye ekranı sisteminin entegrasyonu için öncelikle game sunucusuna ait kaynak kodlarda değişiklik yapılması gerekir. Bu değişiklikler genellikle char_data.cpp, pet_system.cpp ve packet.h gibi dosyalarda yapılır. Bu dosyalar üzerinden evcil hayvanla ilgili verilerin alınması ve istemciye gönderilmesi sağlanır.
1. Pet Verilerinin Tanımlanması:
Pet verileri için yeni bir yapı tanımlamak gerekir. Örneğin, pet_level, current_exp, required_exp gibi veriler tutulur. Bu veriler, pet nesnesi ile ilişkilendirilir.
2. Packet Tanımı:
Client tarafına bu verileri göndermek için yeni bir packet tanımlanmalıdır. Bu packet, client tarafından alınarak arayüzde gösterilir. Örneğin, HEADER_CG_PET_INFO_REQUEST gibi bir komut kullanılabilir.
3. Client Tarafı Kodlama:
Client tarafında ise Python GUI (uiscript) kullanılarak bir pencere tasarlanır. Bu pencerede evcil hayvanın seviyesi, EXP çubuğu ve diğer detaylar gösterilir. py root dizinindeki dosyalara yeni bir UI sınıfı eklenir.
Python GUI ile Arayüz Tasarımı
Metin2 client tarafında UI tasarımı genellikle uiscript dosyaları ile yapılır. Yeni bir pencere açmak için wndMgr.RegisterWindow ve benzeri fonksiyonlar kullanılır. Pet level screen için bir pencere sınıfı oluşturulur. Bu sınıf, pet verilerini alır ve ekranda gösterir. UI elemanları olarak progress bar, text label ve buttonlar kullanılabilir.
Örnek Kod Parçası (Python):
class PetLevelWindow(ui.Window):
def __init__(self):
ui.Window.__init__(self)
self.LoadWindow()
def LoadWindow(self):
...
Sunucu ve Client Uyumluğu
Sunucu tarafında tanımlanan veri yapısı ile client tarafındaki arayüz arasında uyum olmalıdır. Paket boyutları, veri tipleri ve sıralar doğru şekilde eşleştirilmelidir. Aksi halde veri aktarımı başarısız olur ve sistem çalışmayabilir.
Test ve Debugging
Sistem entegrasyonundan sonra test aşaması çok önemlidir. Oyuncuların evcil hayvanlarını seviye atlattığı senaryolar test edilmeli, veriler doğru şekilde ekrana yansıyor mu kontrol edilmelidir. Hata mesajları loglara yazılmalı ve debugging işlemleri yapılmalıdır.
Sonuç
Metin2 özel sunucularında evcil hayvan seviye ekranı sistemi, oyuncuların daha fazla ilgisini çekebilir. Bu tür küçük ama etkili sistemler, sunucu kalitesini artırır. C++ ve Python tabanlı geliştirme ile bu sistem kolayca entegre edilebilir. Kaynak kodlara yapılan değişiklikler ile hem backend hem de frontend tarafında etkili bir sistem kurulabilir.
Pet Level Screen System for Metin2 - Development with C++ and Source Code
In order to enhance the user experience on Metin2 private servers, various systems are being developed. One of these systems is the pet level screen, which allows players to track the progression of their pets. In this article, we will explain how to develop a pet level screen system using C++ and source code.
General Information about the System
In the Metin2 game, pets are important assets that can assist players during combat. These pets can level up by completing certain tasks. However, for players who wish to visually track this progression, a visual interface is essential. This system allows players to view the current level of their pet,经验值 (EXP), required EXP, and remaining EXP needed to level up.
Necessary Changes in C++ Source Codes
To integrate the pet level screen system, modifications must be made to the source code of the game server. These changes are typically done in files such as char_data.cpp, pet_system.cpp, and packet.h. Through these files, data related to pets are retrieved and sent to the client.
1. Defining Pet Data:
A new structure must be defined to store pet data. For example, pet_level, current_exp, required_exp and similar values are stored. These values are associated with the pet object.
2. Packet Definition:
To send these data to the client side, a new packet must be defined. This packet is received by the client and displayed in the UI. For instance, a command like HEADER_CG_PET_INFO_REQUEST could be used.
3. Client-Side Coding:
On the client side, a window is designed using Python GUI (uiscript). In this window, the pet's level, EXP bar, and other details are displayed. A new UI class is added to the files in the py root directory.
UI Design with Python GUI
UI design in Metin2 clients is generally done with uiscript files. To open a new window, functions like wndMgr.RegisterWindow are used. A window class for the pet level screen is created. This class receives pet data and displays it on the screen. UI elements such as progress bars, text labels, and buttons can be used.
Sample Code (Python):
class PetLevelWindow(ui.Window):
def __init__(self):
ui.Window.__init__(self)
self.LoadWindow()
def LoadWindow(self):
...
Server and Client Compatibility
There must be compatibility between the data structure defined on the server side and the interface on the client side. Packet sizes, data types, and sequences should be correctly matched. Otherwise, data transfer will fail and the system may not work.
Testing and Debugging
The testing phase is very important after system integration. Scenarios where players level up their pets must be tested, and it should be checked whether the data is correctly displayed on the screen. Error messages should be logged and debugging processes should be performed.
Conclusion
The pet level screen system in Metin2 private servers can attract more interest from players. Such small but effective systems improve the quality of the server. With C++ and Python-based development, this system can be easily integrated. Modifications made to the source codes allow for an effective system to be established on both the backend and frontend sides.
