Hey turkmmo!
You summon a lot of monsters, they attack your character and then you kill or purge monsters, but the damage still continues to be shown visually. Is this a familiar situation?
In addition, the damage is shown visually even after the death of the character... I love this game.
I haven't seen a fix for this problem, let's try to fix this sh..
I'm not saying that this is an ideal solution. If you have any ideas, please write comments.
Best regards, Masha
Metin2 Lobby forumunda yer alan [FIX] Damage Queue konusuna özel detaylı bir çözüm sunuyoruz. Bu yazıda, Metin2 özel sunucularında karşılaşılan hasar sırası (damage queue) sorunlarını nasıl çözeceğinizi adım adım anlatıyoruz. Bu sorun genellikle Metin2 PvP sistemlerinde oynayan oyuncular tarafından bildirilir ve oyun deneyimini ciddi şekilde etkileyebilir.
Damage Queue Nedir?
Hasar sırası olarak çevrilebilecek bu kavram, Metin2 sunucusunda bir oyuncunun verdiği hasarın doğru sırayla işlenmemesiyle ortaya çıkar. Bu durum, özellikle yüksek seviye PvP savaşlarında, bazı oyuncuların daha hızlı hasar verdirmesi ya da hasarların gecikmeli olarak uygulanması şeklinde kendini gösterir. Bu da adil bir mücadele ortamının oluşmasını engeller.
Sorunun Kaynağı Nedir?
Bu tür problemler genellikle Metin2 server src üzerinde yapılan değişikliklerden veya mevcut core dosyalarındaki eksikliklerden kaynaklanabilir. Özellikle game server programming alanında yetersizlikler varsa, hasar işleme mantığı doğru kurulmaz. Bu da damage queue gibi istenmeyen durumların ortaya çıkmasına neden olur.
Fix Uygulaması: C++ Core Düzeltmesi
Metin2 özel sunucu geliştirme yaparken C++ source edit işlemleri önemlidir. Sorunu çözmek için game/core dosyalarında bulunan hasar işleme fonksiyonlarının kontrol edilmesi gerekir. Özellikle char_battle.cpp ve battle.cpp dosyalarında bulunan sıralama algoritmaları gözden geçirilmelidir.
Hasar sırasını düzenlemek için şu adımlar izlenebilir:
- Oyuncuların saldırı sırasını belirleyen fonksiyon yeniden düzenlenmelidir.
- Hasar değerlerinin zaman damgası (timestamp) ile eşleştirilip doğru sırayla işlendiğinden emin olunmalıdır.
- Gecikmeleri azaltmak için network buffer ayarları optimize edilmelidir.
Python GUI Kullanımıyla Test Etme
Bu fixi test etmek için py gui tabanlı bir arayüz kullanılabilir. PyRoot üzerinde geliştirilen küçük test uygulamaları ile hasar sırası simülasyonları yapılabilir. Böylece damage queue düzeltmenin doğruluğu doğrudan test edilebilir.
Sunucu Tarafında Ayarlar
Ayrıca, db core tarafında da gerekli optimizasyonlar yapılmalıdır. Auth ve Game sunucuları arasındaki bağlantıda gecikmeler varsa, bu da hasar sırasını etkileyebilir. Sunucu yapılandırmasında pack ve channel ayarları gözden geçirilmelidir.
Yararlı Kaynaklar
Metin2 özel sunucu geliştirme sürecinde yararlanabileceğiniz kaynaklar arasında Martysama ve diğer Metin2Dev forumları yer alır. Buradaki source edit örnekleri, uiscript çözümleri ve client src güncellemeleri, bu tür hataların düzeltilmesinde yardımcı olabilir.
Sonuç
Hasar sırası sorunları, Metin2 PvP oyun deneyimini ciddi şekilde bozabilir. Ancak doğru server src düzenlemeleri ve C++ bilgisi ile bu tür hatalar kolayca giderilebilir. Metin2 Lobby olarak, bu konuda tecrübeli geliştiricilerle birlikte çözümler üretmeye devam ediyoruz.
Metin2 Lobby forum presents a detailed solution for the [FIX] Damage Queue issue. In this article, we explain step by step how to resolve damage queue issues commonly encountered on Metin2 private servers. This problem is frequently reported by players engaged in PvP battles and can significantly impact gameplay experience.
What is Damage Queue?
Also known as damage order, this issue occurs when damage dealt by a player is not processed in the correct sequence on the Metin2 server. Especially during high-level PvP fights, some players may deal damage faster than others, or damage might be applied with delays, leading to unfair combat scenarios.
What Causes This Issue?
Such problems often arise from modifications made to the Metin2 server source code or deficiencies within existing core files. Insufficient knowledge in game server programming can lead to incorrect implementation of damage processing logic, causing unwanted behaviors like damage queue.
Fix Implementation: C++ Core Correction
When developing Metin2 private servers, C++ source editing is crucial. To fix the issue, you should review damage handling functions located in game/core files. Particularly, sorting algorithms in char_battle.cpp and battle.cpp need to be revised.
Steps to adjust the damage order:
- Revise the function that determines the attack order of players.
- Ensure damage values are paired with timestamps and processed in the correct order.
- Optimize network buffer settings to reduce delays.
Testing with Python GUI
You can use a py gui based interface to test this fix. Small test applications built on PyRoot allow for damage queue simulations, enabling direct verification of the fix's effectiveness.
Server-Side Configurations
Additionally, optimizations must be made on the db core. Delays between Auth and Game servers can also affect damage queue. Server configurations such as pack and channel settings should be reviewed.
Helpful Resources
Among the resources available during Metin2 private server development are Martysama and other Metin2Dev forums. Examples of source edits, uiscript fixes, and client src updates provided there can assist in resolving such errors.
Conclusion
Damage queue issues can severely disrupt the Metin2 PvP gaming experience. However, with proper server src modifications and knowledge of C++, these errors can be easily resolved. At Metin2 Lobby, we continue to develop solutions alongside experienced developers.
You summon a lot of monsters, they attack your character and then you kill or purge monsters, but the damage still continues to be shown visually. Is this a familiar situation?
In addition, the damage is shown visually even after the death of the character... I love this game.
I haven't seen a fix for this problem, let's try to fix this sh..
Kod:
// game/src/packet.h -> search this: typedef struct packet_damage_info { BYTE header; DWORD dwVID; BYTE flag; int damage; } TPacketGCDamageInfo; // replace with this: typedef struct packet_damage_info { BYTE header; DWORD dwVictimVID; DWORD dwAttackerVID; BYTE flag; int damage; } TPacketGCDamageInfo; // game/src/char_battle.cpp //In function void CHARACTER::SendDamagePacket search this: damageInfo.dwVID = (DWORD)GetVID(); // replace with this: damageInfo.dwVictimVID = (DWORD)GetVID(); damageInfo.dwAttackerVID = (DWORD)pAttacker->GetVID(); //In function void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead) search this: if (IsRevive() == false && HasReviverInParty() == true) { m_pkDeadEvent = event_create(dead_event, pEventInfo, bImmediateDead ? 1 : PASSES_PER_SEC(3)); } else { m_pkDeadEvent = event_create(dead_event, pEventInfo, bImmediateDead ? 1 : PASSES_PER_SEC(10)); } // replace with this: m_pkDeadEvent = event_create(dead_event, pEventInfo, bImmediateDead ? 1 : PASSES_PER_SEC(1));
Kod:
// UserInterface/Packet.h -> search this: typedef struct packet_damage_info { BYTE header; DWORD dwVID; BYTE flag; int damage; } TPacketGCDamageInfo; // replace with this: typedef struct packet_damage_info { BYTE header; DWORD dwVictimVID; DWORD dwAttackerVID; BYTE flag; int damage; } TPacketGCDamageInfo; // UserInterface/InstanceBase.cpp -> search this: ProcessDamage(); // replace with this: ProcessRemoveOldDamage(); ProcessDamage(); // UserInterface/InstanceBase.h -> search this: struct SEffectDamage { DWORD damage; BYTE flag; BOOL bSelf; BOOL bTarget; }; typedef std::list<SEffectDamage> CommandDamageQueue; CommandDamageQueue m_DamageQueue; void ProcessDamage(); public: void AddDamageEffect(DWORD damage, BYTE flag, BOOL bSelf, BOOL bTarget); //replace struct SEffectDamage { DWORD damage; BYTE flag; BOOL bSelf; BOOL bTarget; DWORD dwVictimVID; DWORD dwAttackerVID; }; typedef std::list<SEffectDamage> CommandDamageQueue; CommandDamageQueue m_DamageQueue; void ProcessDamage(); void ProcessRemoveOldDamage(); public: void AddDamageEffect(DWORD damage, BYTE flag, BOOL bSelf, BOOL bTarget, DWORD dwVictimVID, DWORD dwAttackerVID); // UserInterface/InstanceBaseEffect.cpp -> add this to include: #include "PythonPlayer.h" // this is default added so check it #include "PythonApplication.h" #include "PythonCharacterManager.h" // UserInterface/InstanceBaseEffect.cpp -> search this: void CInstanceBase::AddDamageEffect(DWORD damage,BYTE flag,BOOL bSelf,BOOL bTarget) { if(CPythonSystem::Instance().IsShowDamage()) { SEffectDamage sDamage; sDamage.bSelf = bSelf; sDamage.bTarget = bTarget; sDamage.damage = damage; sDamage.flag = flag; m_DamageQueue.push_back(sDamage); } } // replace with this: void CInstanceBase::AddDamageEffect(DWORD damage,BYTE flag,BOOL bSelf,BOOL bTarget, DWORD dwVictimVID, DWORD dwAttackerVID) { if (CPythonSystem::Instance().IsShowDamage() && !CPythonApplication::Instance().IsMinimizedWnd()) { SEffectDamage sDamage; sDamage.bSelf = bSelf; sDamage.bTarget = bTarget; sDamage.damage = damage; sDamage.flag = flag; sDamage.dwVictimVID = dwVictimVID; sDamage.dwAttackerVID = dwAttackerVID; m_DamageQueue.push_back(sDamage); } } // UserInterface/InstanceBaseEffect.cpp //add this under void CInstanceBase::ProcessDamage() function void CInstanceBase::ProcessRemoveOldDamage() { if (m_DamageQueue.empty()) return; m_DamageQueue.remove_if([](CInstanceBase::SEffectDamage sed){ return ((CPythonCharacterManager::instance().IsDeadVID(sed.dwAttackerVID) || CPythonPlayer::Instance().NEW_GetMainActorPtr()->IsDead()) && (sed.flag != DAMAGE_POISON || sed.flag != DAMAGE_BLEEDING || sed.flag != DAMAGE_FIRE) && sed.bSelf); }); } // UserInterface/PythonNetworkStreamPhaseGame.cpp -> search this: bool CPythonNetworkStream::RecvDamageInfoPacket() { TPacketGCDamageInfo DamageInfoPacket; if (!Recv(sizeof(TPacketGCDamageInfo), &DamageInfoPacket)) { Tracen("Recv Target Packet Error"); return false; } CInstanceBase * pInstTarget = CPythonCharacterManager::Instance().GetInstancePtr(DamageInfoPacket.dwVID); bool bSelf = (pInstTarget == CPythonCharacterManager::Instance().GetMainInstancePtr()); bool bTarget = (pInstTarget==m_pInstTarget); if (pInstTarget) { if(DamageInfoPacket.damage >= 0) pInstTarget->AddDamageEffect(DamageInfoPacket.damage,DamageInfoPacket.flag,bSelf,bTarget); else TraceError("Damage is equal or below 0."); } return true; } // replace with this: bool CPythonNetworkStream::RecvDamageInfoPacket() { TPacketGCDamageInfo DamageInfoPacket; if (!Recv(sizeof(TPacketGCDamageInfo), &DamageInfoPacket)) { Tracen("Recv Target Packet Error"); return false; } CInstanceBase * pInstTarget = CPythonCharacterManager::Instance().GetInstancePtr(DamageInfoPacket.dwVictimVID); bool bSelf = (pInstTarget == CPythonCharacterManager::Instance().GetMainInstancePtr()); bool bTarget = (pInstTarget==m_pInstTarget); if (pInstTarget) { if(DamageInfoPacket.damage >= 0) pInstTarget->AddDamageEffect(DamageInfoPacket.damage, DamageInfoPacket.flag, bSelf, bTarget, DamageInfoPacket.dwVictimVID, DamageInfoPacket.dwAttackerVID); else TraceError("Damage is equal or below 0."); } return true; } // UserInterface/PythonApplication.h -> search this: void RenderGame(); // replace with this: void RenderGame(); bool IsMinimizedWnd(); // UserInterface/PythonApplication.cpp -> search this: void CPythonApplication::SkipRenderBuffering(DWORD dwSleepMSec) { m_dwBufSleepSkipTime=ELTimer_GetMSec()+dwSleepMSec; } // replace with this: void CPythonApplication::SkipRenderBuffering(DWORD dwSleepMSec) { m_dwBufSleepSkipTime=ELTimer_GetMSec()+dwSleepMSec; } bool CPythonApplication::IsMinimizedWnd() { return m_isMinimizedWnd; }
I'm not saying that this is an ideal solution. If you have any ideas, please write comments.
Best regards, Masha
Metin2 Lobby forumunda yer alan [FIX] Damage Queue konusuna özel detaylı bir çözüm sunuyoruz. Bu yazıda, Metin2 özel sunucularında karşılaşılan hasar sırası (damage queue) sorunlarını nasıl çözeceğinizi adım adım anlatıyoruz. Bu sorun genellikle Metin2 PvP sistemlerinde oynayan oyuncular tarafından bildirilir ve oyun deneyimini ciddi şekilde etkileyebilir.
Damage Queue Nedir?
Hasar sırası olarak çevrilebilecek bu kavram, Metin2 sunucusunda bir oyuncunun verdiği hasarın doğru sırayla işlenmemesiyle ortaya çıkar. Bu durum, özellikle yüksek seviye PvP savaşlarında, bazı oyuncuların daha hızlı hasar verdirmesi ya da hasarların gecikmeli olarak uygulanması şeklinde kendini gösterir. Bu da adil bir mücadele ortamının oluşmasını engeller.
Sorunun Kaynağı Nedir?
Bu tür problemler genellikle Metin2 server src üzerinde yapılan değişikliklerden veya mevcut core dosyalarındaki eksikliklerden kaynaklanabilir. Özellikle game server programming alanında yetersizlikler varsa, hasar işleme mantığı doğru kurulmaz. Bu da damage queue gibi istenmeyen durumların ortaya çıkmasına neden olur.
Fix Uygulaması: C++ Core Düzeltmesi
Metin2 özel sunucu geliştirme yaparken C++ source edit işlemleri önemlidir. Sorunu çözmek için game/core dosyalarında bulunan hasar işleme fonksiyonlarının kontrol edilmesi gerekir. Özellikle char_battle.cpp ve battle.cpp dosyalarında bulunan sıralama algoritmaları gözden geçirilmelidir.
Hasar sırasını düzenlemek için şu adımlar izlenebilir:
- Oyuncuların saldırı sırasını belirleyen fonksiyon yeniden düzenlenmelidir.
- Hasar değerlerinin zaman damgası (timestamp) ile eşleştirilip doğru sırayla işlendiğinden emin olunmalıdır.
- Gecikmeleri azaltmak için network buffer ayarları optimize edilmelidir.
Python GUI Kullanımıyla Test Etme
Bu fixi test etmek için py gui tabanlı bir arayüz kullanılabilir. PyRoot üzerinde geliştirilen küçük test uygulamaları ile hasar sırası simülasyonları yapılabilir. Böylece damage queue düzeltmenin doğruluğu doğrudan test edilebilir.
Sunucu Tarafında Ayarlar
Ayrıca, db core tarafında da gerekli optimizasyonlar yapılmalıdır. Auth ve Game sunucuları arasındaki bağlantıda gecikmeler varsa, bu da hasar sırasını etkileyebilir. Sunucu yapılandırmasında pack ve channel ayarları gözden geçirilmelidir.
Yararlı Kaynaklar
Metin2 özel sunucu geliştirme sürecinde yararlanabileceğiniz kaynaklar arasında Martysama ve diğer Metin2Dev forumları yer alır. Buradaki source edit örnekleri, uiscript çözümleri ve client src güncellemeleri, bu tür hataların düzeltilmesinde yardımcı olabilir.
Sonuç
Hasar sırası sorunları, Metin2 PvP oyun deneyimini ciddi şekilde bozabilir. Ancak doğru server src düzenlemeleri ve C++ bilgisi ile bu tür hatalar kolayca giderilebilir. Metin2 Lobby olarak, bu konuda tecrübeli geliştiricilerle birlikte çözümler üretmeye devam ediyoruz.
Metin2 Lobby forum presents a detailed solution for the [FIX] Damage Queue issue. In this article, we explain step by step how to resolve damage queue issues commonly encountered on Metin2 private servers. This problem is frequently reported by players engaged in PvP battles and can significantly impact gameplay experience.
What is Damage Queue?
Also known as damage order, this issue occurs when damage dealt by a player is not processed in the correct sequence on the Metin2 server. Especially during high-level PvP fights, some players may deal damage faster than others, or damage might be applied with delays, leading to unfair combat scenarios.
What Causes This Issue?
Such problems often arise from modifications made to the Metin2 server source code or deficiencies within existing core files. Insufficient knowledge in game server programming can lead to incorrect implementation of damage processing logic, causing unwanted behaviors like damage queue.
Fix Implementation: C++ Core Correction
When developing Metin2 private servers, C++ source editing is crucial. To fix the issue, you should review damage handling functions located in game/core files. Particularly, sorting algorithms in char_battle.cpp and battle.cpp need to be revised.
Steps to adjust the damage order:
- Revise the function that determines the attack order of players.
- Ensure damage values are paired with timestamps and processed in the correct order.
- Optimize network buffer settings to reduce delays.
Testing with Python GUI
You can use a py gui based interface to test this fix. Small test applications built on PyRoot allow for damage queue simulations, enabling direct verification of the fix's effectiveness.
Server-Side Configurations
Additionally, optimizations must be made on the db core. Delays between Auth and Game servers can also affect damage queue. Server configurations such as pack and channel settings should be reviewed.
Helpful Resources
Among the resources available during Metin2 private server development are Martysama and other Metin2Dev forums. Examples of source edits, uiscript fixes, and client src updates provided there can assist in resolving such errors.
Conclusion
Damage queue issues can severely disrupt the Metin2 PvP gaming experience. However, with proper server src modifications and knowledge of C++, these errors can be easily resolved. At Metin2 Lobby, we continue to develop solutions alongside experienced developers.
