Official serverde pet yumurtadan çıktığında skill sayısı gösteriliyor
New_PetSystem.cpp aç
Arat
Bloktan sonra ekle
Arat
Bunun üzerine
Ekle
Arat
Aynı şekilde
Üzerine ekle
Arat / Yukaridaki gibi 1,m_dwlevel üzerine ekleme işlemini yapın
New_PetSystem.h aç
Arat
Altına ekle
Char_item.cpp aç
Arat
Bunu bul
Altına ekle
root/uitooltip.py aç
Arat
Uygun yere ekle
Paylaşılan pet sisteminde pet kaç skill olursa olsun 3 ayrı beceri açılabiliyor
New_PetSystem.cpp
Arat
İçerisinde
Değiştir
Yaş sayısı kullanmıyorum, ona göre değiştirirsiniz
Benim serverden kanıt
Metin2 Private Server Geliştirme: Pet Sistemi Skill Sayısı Gösterimi ve Skill Slot Fix Uygulaması
Metin2 özel sunucularında geliştirme yaparken pet sistemleri büyük önem taşır. Özellikle oyuncuların sevdiği bu sistemlerde ortaya çıkan hatalar ya da eksiklikler kullanıcı deneyimini doğrudan etkiler. Bu makalede C++ ve Python tabanlı Metin2 sistemlerinde pet sistemine ait skill sayısının doğru şekilde gösterilmesi ve aynı zamanda skill slotlarında karşılaşılan hata giderme konusuna değineceğiz. Bu işlem, hem game server hem de client tarafında yapılması gereken düzenlemeleri kapsar.
Pet Sistemine Ait Skill Sayısı Gösterimi
Bazı Metin2 özel sunucularında petlerin sahip oldukları skill sayısı doğru şekilde ekrana yansıtılmaz. Bu durum genellikle client tarafında uiscript dosyalarında ya da py root kısmında tanımlanan arayüz elemanlarında meydana gelir. Pet penceresinde skill sayısı eksik veya hiç gösterilmeyebilir. Bu sorunu çözmek için Python tarafında petwnd.py gibi arayüz dosyalarını kontrol etmek gerekir.
Python tarafında pet skill bilgileri genellikle net.SendChatPacket üzerinden sunucudan alınır ve ui.py veya ilgili GUI sınıflarıyla ekrana basılır. Pet skill listesi sunucu tarafından belirli bir formatta gönderilir. Eğer bu formatta bir uyumsuzluk varsa, skill sayısı doğru şekilde görüntülenmeyebilir. Bu noktada C++ tarafında game/src/char.cpp veya benzeri dosyalarda pet skill verilerinin nasıl gönderildiği incelenmelidir.
Skill Slot Fixi Nedir?
Metin2 pet sistemlerinde skill slotları, petin sahip olduğu yeteneklerin doğru sırayla ve eksiksiz olarak gösterilmesini sağlar. Ancak bazı özel sunucularda bu slotlar doğru şekilde doldurulmaz ya da boş kalabilir. Bu durumda pet skill ekranında skill eksikliği görülür. Bu sorun genellikle C++ tarafındaki pet skill listesinin doğru şekilde client’a aktarılmamasından kaynaklanır.
Fix işlemi sırasında game/src/pet_system.cpp gibi dosyalar üzerinde değişiklik yapılmalıdır. Sunucu tarafında pet skill verileri doğru şekilde paketlenip client tarafına gönderilirken, bu verilerin doğru indekslerde yer alması sağlanmalıdır. Aksi takdirde client, skill slotlarını doğru şekilde dolduramaz.
Client Tarafında Gerekli Değişiklikler
Client tarafında bu hatayı düzeltmek için uiscript klasöründe bulunan petwnd.py dosyası üzerinde çalışmak gerekir. Pet skill listesi doğru şekilde okunup, GUI üzerinde eksiksiz bir şekilde gösterilmelidir. Eğer skill slotları boş geliyorsa, bu durum genellikle client’ın gelen veriyi doğru şekilde yorumlayamamasından kaynaklanır. Python tarafında bu verilerin indekslenmesi ve doğru sırayla arayüze aktarılması gerekir.
Ayrıca, petwnd.py içinde tanımlı olan slot nesneleri, gelen skill sayısına göre dinamik olarak ayarlanmalıdır. Gerekirse for döngüleriyle slot indeksleri kontrol edilip, eksik slotlar doldurulabilir.
Sık Karşılaşılan Hatalar ve Çözüm Önerileri
1. Pet skill sayısı ekranda görünmüyor: C++ tarafında pet_skill_list paketi doğru gönderiliyor mu kontrol edilmeli.
2. Skill slotları eksik: Python tarafında slot indekslemesi doğru değilse eksiklik oluşur.
3. Skill bilgileri yanlış sırayla geliyor: Paket yapısı kontrol edilmeli.
Sonuç
Metin2 özel sunucularında pet sistemlerinin düzgün çalışması için C++ ve Python arasında veri akışının doğru şekilde sağlanması gerekir. Pet skill sayısı ve slot gösterimleri, kullanıcı dostu bir deneyim için kritik öneme sahiptir. Bu makalede anlatılan adımlar, hem server src hem de client src üzerinde yapılacak küçük ama etkili değişikliklerle sorunların çözülmesini sağlar.
Metin2 Private Server Development: Displaying Pet System Skill Count and Fixing Skill Slot Issues
In Metin2 private server development, pet systems are of great importance. Errors or deficiencies in these popular player features directly affect user experience. In this article, we will address how to properly display the number of skills possessed by pets and fix issues related to skill slots in C++ and Python-based Metin2 systems. This process involves modifications on both the game server and client sides.
Displaying Pet System Skill Counts
In some Metin2 private servers, the number of skills possessed by pets may not be displayed correctly. This issue typically occurs within uiscript files on the client side or within the py root directory where UI elements are defined. The pet window might show missing or no skill counts at all. To resolve this, you need to examine UI files like petwnd.py on the Python side.
On the Python side, pet skill information is usually retrieved from the server via net.SendChatPacket and displayed on the screen using ui.py or other GUI classes. The pet skill list is sent by the server in a specific format. If there's any mismatch in this format, the skill count may not appear correctly. At this point, check how pet skill data is being sent in files like game/src/char.cpp on the C++ side.
What is the Skill Slot Fix?
In Metin2 pet systems, skill slots ensure that pet abilities are displayed in the correct order and without missing entries. However, in some private servers, these slots are not filled correctly or remain empty. As a result, skills may appear missing in the pet skill window. This issue often stems from pet skill data not being transmitted correctly from the C++ server-side to the client.
During the fix process, modifications must be made in files such as game/src/pet_system.cpp. When pet skill data is packaged and sent to the client on the server-side, it must be ensured that the data is indexed correctly. Otherwise, the client cannot fill the skill slots properly.
Required Changes on the Client Side
To fix this issue on the client side, work must be done on the petwnd.py file located in the uiscript folder. The pet skill list should be read correctly and displayed fully in the GUI. If skill slots are coming up empty, this is often due to the client failing to interpret incoming data correctly. On the Python side, the data must be indexed and transferred to the interface in the proper order. If necessary, for loops can be used to check slot indices and fill any missing slots.
Common Issues and Solution Suggestions
1. Pet skill count not showing on screen: Check whether the pet_skill_list packet is being sent correctly on the C++ side.
2. Missing skill slots: If slot indexing on the Python side is incorrect, gaps may occur.
3. Skills appearing in wrong order: Check the packet structure.
Conclusion
For pet systems in Metin2 private servers to function properly, data flow between C++ and Python must be handled correctly. Proper display of pet skill counts and slots is critical for a user-friendly experience. The steps outlined in this article allow for resolving these issues through small but effective changes made on both server src and client src sides.
New_PetSystem.cpp aç
Arat
Kod:
int CNewPetSystem::GetExp()
Bloktan sonra ekle
Kod:
int CNewPetActor::GetSkillCount() { int skillCount = 0; for (int i = 0; i < 3; i++) { if (m_dwskillslot[i] >= 0) ++skillCount; } return skillCount; }
Arat
Kod:
void CNewPetActor::UpdateTime()
Bunun üzerine
Kod:
pSummonItem->SetSocket(1,m_dwlevel);
Ekle
Kod:
pSummonItem->SetForceAttribute(6, 1, GetSkillCount());
Arat
Kod:
void CNewPetActor::Unsummon()
Aynı şekilde
Kod:
pSummonItem->SetSocket(1,m_dwlevel);
Üzerine ekle
Kod:
pSummonItem->SetForceAttribute(6, 1, GetSkillCount());
Arat / Yukaridaki gibi 1,m_dwlevel üzerine ekleme işlemini yapın
Kod:
DWORD CNewPetActor::Summon(const char* petName, LPITEM pSummonItem, bool bSpawnFar)
New_PetSystem.h aç
Arat
Kod:
DWORD GetExpI() { return m_dwexpitem; }
Altına ekle
Kod:
int GetSkillCount();
Char_item.cpp aç
Arat
Kod:
if (item->GetVnum() >= 55701 && item->GetVnum() <= 55706) { LPITEM item2; if (item2 = GetItem(DestCell)) { if (item2->GetVnum() == 55002)
Bunu bul
Kod:
item2->SetForceAttribute(3, 1, item->GetAttributeValue(3));
Altına ekle
Kod:
item2->SetForceAttribute(4, 1, item->GetAttributeValue(4));
root/uitooltip.py aç
Arat
Kod:
if self.check_sigillo(itemVnum) or itemVnum == 55002:
Uygun yere ekle
Kod:
getskillslot = (int(attrSlot[6][1]))
Kod:
self.AppendTextLine("("+str(getskillslot)+")", self.NORMAL_COLOR)
Paylaşılan pet sisteminde pet kaç skill olursa olsun 3 ayrı beceri açılabiliyor
New_PetSystem.cpp
Arat
Kod:
bool CNewPetActor::IncreasePetSkill(int skill)
İçerisinde
Kod:
for (int i = 0; i < 3; ++i) { if (m_dwskillslot[i] == 0 || m_dwskillslot[i] == -1) { m_dwskillslot[i] = skill; m_dwskill[i] = 1;
Değiştir
Kod:
for (int i = 0; i < 3; ++i) { if (m_dwskillslot[i] == 0) { m_dwskillslot[i] = skill; m_dwskill[i] = 1;
Yaş sayısı kullanmıyorum, ona göre değiştirirsiniz
Benim serverden kanıt
Metin2 Private Server Geliştirme: Pet Sistemi Skill Sayısı Gösterimi ve Skill Slot Fix Uygulaması
Metin2 özel sunucularında geliştirme yaparken pet sistemleri büyük önem taşır. Özellikle oyuncuların sevdiği bu sistemlerde ortaya çıkan hatalar ya da eksiklikler kullanıcı deneyimini doğrudan etkiler. Bu makalede C++ ve Python tabanlı Metin2 sistemlerinde pet sistemine ait skill sayısının doğru şekilde gösterilmesi ve aynı zamanda skill slotlarında karşılaşılan hata giderme konusuna değineceğiz. Bu işlem, hem game server hem de client tarafında yapılması gereken düzenlemeleri kapsar.
Pet Sistemine Ait Skill Sayısı Gösterimi
Bazı Metin2 özel sunucularında petlerin sahip oldukları skill sayısı doğru şekilde ekrana yansıtılmaz. Bu durum genellikle client tarafında uiscript dosyalarında ya da py root kısmında tanımlanan arayüz elemanlarında meydana gelir. Pet penceresinde skill sayısı eksik veya hiç gösterilmeyebilir. Bu sorunu çözmek için Python tarafında petwnd.py gibi arayüz dosyalarını kontrol etmek gerekir.
Python tarafında pet skill bilgileri genellikle net.SendChatPacket üzerinden sunucudan alınır ve ui.py veya ilgili GUI sınıflarıyla ekrana basılır. Pet skill listesi sunucu tarafından belirli bir formatta gönderilir. Eğer bu formatta bir uyumsuzluk varsa, skill sayısı doğru şekilde görüntülenmeyebilir. Bu noktada C++ tarafında game/src/char.cpp veya benzeri dosyalarda pet skill verilerinin nasıl gönderildiği incelenmelidir.
Skill Slot Fixi Nedir?
Metin2 pet sistemlerinde skill slotları, petin sahip olduğu yeteneklerin doğru sırayla ve eksiksiz olarak gösterilmesini sağlar. Ancak bazı özel sunucularda bu slotlar doğru şekilde doldurulmaz ya da boş kalabilir. Bu durumda pet skill ekranında skill eksikliği görülür. Bu sorun genellikle C++ tarafındaki pet skill listesinin doğru şekilde client’a aktarılmamasından kaynaklanır.
Fix işlemi sırasında game/src/pet_system.cpp gibi dosyalar üzerinde değişiklik yapılmalıdır. Sunucu tarafında pet skill verileri doğru şekilde paketlenip client tarafına gönderilirken, bu verilerin doğru indekslerde yer alması sağlanmalıdır. Aksi takdirde client, skill slotlarını doğru şekilde dolduramaz.
Client Tarafında Gerekli Değişiklikler
Client tarafında bu hatayı düzeltmek için uiscript klasöründe bulunan petwnd.py dosyası üzerinde çalışmak gerekir. Pet skill listesi doğru şekilde okunup, GUI üzerinde eksiksiz bir şekilde gösterilmelidir. Eğer skill slotları boş geliyorsa, bu durum genellikle client’ın gelen veriyi doğru şekilde yorumlayamamasından kaynaklanır. Python tarafında bu verilerin indekslenmesi ve doğru sırayla arayüze aktarılması gerekir.
Ayrıca, petwnd.py içinde tanımlı olan slot nesneleri, gelen skill sayısına göre dinamik olarak ayarlanmalıdır. Gerekirse for döngüleriyle slot indeksleri kontrol edilip, eksik slotlar doldurulabilir.
Sık Karşılaşılan Hatalar ve Çözüm Önerileri
1. Pet skill sayısı ekranda görünmüyor: C++ tarafında pet_skill_list paketi doğru gönderiliyor mu kontrol edilmeli.
2. Skill slotları eksik: Python tarafında slot indekslemesi doğru değilse eksiklik oluşur.
3. Skill bilgileri yanlış sırayla geliyor: Paket yapısı kontrol edilmeli.
Sonuç
Metin2 özel sunucularında pet sistemlerinin düzgün çalışması için C++ ve Python arasında veri akışının doğru şekilde sağlanması gerekir. Pet skill sayısı ve slot gösterimleri, kullanıcı dostu bir deneyim için kritik öneme sahiptir. Bu makalede anlatılan adımlar, hem server src hem de client src üzerinde yapılacak küçük ama etkili değişikliklerle sorunların çözülmesini sağlar.
Metin2 Private Server Development: Displaying Pet System Skill Count and Fixing Skill Slot Issues
In Metin2 private server development, pet systems are of great importance. Errors or deficiencies in these popular player features directly affect user experience. In this article, we will address how to properly display the number of skills possessed by pets and fix issues related to skill slots in C++ and Python-based Metin2 systems. This process involves modifications on both the game server and client sides.
Displaying Pet System Skill Counts
In some Metin2 private servers, the number of skills possessed by pets may not be displayed correctly. This issue typically occurs within uiscript files on the client side or within the py root directory where UI elements are defined. The pet window might show missing or no skill counts at all. To resolve this, you need to examine UI files like petwnd.py on the Python side.
On the Python side, pet skill information is usually retrieved from the server via net.SendChatPacket and displayed on the screen using ui.py or other GUI classes. The pet skill list is sent by the server in a specific format. If there's any mismatch in this format, the skill count may not appear correctly. At this point, check how pet skill data is being sent in files like game/src/char.cpp on the C++ side.
What is the Skill Slot Fix?
In Metin2 pet systems, skill slots ensure that pet abilities are displayed in the correct order and without missing entries. However, in some private servers, these slots are not filled correctly or remain empty. As a result, skills may appear missing in the pet skill window. This issue often stems from pet skill data not being transmitted correctly from the C++ server-side to the client.
During the fix process, modifications must be made in files such as game/src/pet_system.cpp. When pet skill data is packaged and sent to the client on the server-side, it must be ensured that the data is indexed correctly. Otherwise, the client cannot fill the skill slots properly.
Required Changes on the Client Side
To fix this issue on the client side, work must be done on the petwnd.py file located in the uiscript folder. The pet skill list should be read correctly and displayed fully in the GUI. If skill slots are coming up empty, this is often due to the client failing to interpret incoming data correctly. On the Python side, the data must be indexed and transferred to the interface in the proper order. If necessary, for loops can be used to check slot indices and fill any missing slots.
Common Issues and Solution Suggestions
1. Pet skill count not showing on screen: Check whether the pet_skill_list packet is being sent correctly on the C++ side.
2. Missing skill slots: If slot indexing on the Python side is incorrect, gaps may occur.
3. Skills appearing in wrong order: Check the packet structure.
Conclusion
For pet systems in Metin2 private servers to function properly, data flow between C++ and Python must be handled correctly. Proper display of pet skill counts and slots is critical for a user-friendly experience. The steps outlined in this article allow for resolving these issues through small but effective changes made on both server src and client src sides.
