Bazı haritalara çok npc yükleyince bununla ilgili bir paket gönderme sorunu oluşabiliyor. Bunun ile ilgili küçük bir fix vereceğim.
Kod:
arat SECTREE_MANAGER::instance().SendNPCPosition(ch); altında bulunan d->SetPhase(PHASE_GAME); kodunu bunun üstüne çek yani son hali şöyle gözüksün d->SetPhase(PHASE_GAME); SECTREE_MANAGER::instance().SendNPCPosition(ch);
son hali bu resimdeki gibi gözükmeli.
İyi forumlar.
Exygo'ya teşekkürler.
Metin2 Affectler için Bonus Düzenlemesi
Metin2 özel sunucularında geliştirme yaparken, oyuncu deneyimini artırmak adına affect sistemlerine bonuslar eklemek oldukça önemli bir özelliktir. Bu bonuslar sayesinde oyuncuların karakter güçlerini doğrudan etkileyen durumlar yaratılır ve PvP mücadelelerinde daha dengeli bir yapı kurulabilir. Bu makalede, Metin2 özel sunucularında affect sistemine bonus eklemeyi ele alacağız.
Affect Nedir?
Metin2'de affect, karakter üzerinde geçici veya kalıcı olarak etki eden durum efektleridir. Örnek verecek olursak, haste, regeneration, invisibility, poison gibi efektler affect olarak tanımlanır. Bu efektler genellikle item kullanımı, skill etkileri veya özel sistemlerle tetiklenir. Affect sistemleri, karakterin combat değerlerini doğrudan etkileyebilir.
Bonus Sistemleri ve Affect Entegrasyonu
Metin2 özel sunucularında geliştirilen bazı sistemlerde, belirli bir affect aktifken karakterin STR, DEX, INT, HTH gibi temel değerlerine bonus verilebilir. Bu bonuslar genellikle C++ ile yazılmış game core üzerinde düzenlenir. Oyuncu bir haste affect'i aktif ettiğinde, bu affect'e özel olarak DEX bonusu verilebilir. Bu tarz sistemler, oyuncuların farklı stratejiler geliştirmesine olanak tanır.
Bonus Eklemek için Gerekli Adımlar
1. Affect ID'sini belirleyin. Örneğin haste affect ID'si 10 olabilir.
2. game/src/char_affect.cpp dosyasında bu affect aktifken bonus uygulanmasını sağlayacak kodu yazın.
3. bonus_set fonksiyonu ile affect aktifken geçerli olacak bonusları belirtin.
4. Gerekirse client/src/uitooltip.py dosyasında affect tooltip bilgilerine bonus açıklaması ekleyin.
C++ Kod Örneği
Bir affect için bonus eklemek istiyorsanız, OnAffectAdd fonksiyonuna özel kod yazarak bu işlemi gerçekleştirebilirsiniz. Örneğin:
int OnAffectAdd(DWORD dwAffect, int iValue, int iDuration)
{
if (dwAffect == AFFECT_HASTE)
m_points.bonus_dex += 10; // Haste affect aktifse 10 DEX bonus
return 1;
}
Sunucu Taraflı ve Client Taraflı Etkileşim
Metin2 özel sunucularında affect sistemleri hem sunucu hem de client tarafında çalışır. Sunucu tarafında bonuslar aktif edilirken, client tarafında bu bonusların kullanıcıya gösterimi önemlidir. Python GUI sistemleri kullanılarak uiscript dosyalarında bonus bilgileri gösterilebilir. Bu sayede oyuncular, aktif affect'lerin bonuslarını net bir şekilde takip edebilir.
Sonuç
Metin2 özel sunucularında affect sistemlerine bonus eklemek, oyun deneyimini zenginleştiren güçlü bir özelliktir. Bu işlem, hem game core hem de client üzerinde değişiklik yapılmasını gerektirir. Doğru yapılandırılmış bonuslar sayesinde oyuncular, karakterlerini daha stratejik bir şekilde geliştirebilir. Bu tür gelişmeler, PvP sistemlerinde daha dengeli mücadelelerin oluşmasına da katkı sağlar.
Bonus Editing for Affects in Metin2
When developing custom Metin2 servers, adding bonuses to affect systems is crucial for enhancing the player experience. These bonuses directly influence character stats and can create more balanced PvP scenarios. In this article, we will explore how to add bonuses to affects within Metin2 private servers.
What Is an Affect?
In Metin2, an affect refers to temporary or permanent status effects applied to a character. Examples include haste, regeneration, invisibility, and poison. These effects are usually triggered by items, skills, or special systems. Affects can directly impact a character's combat stats.
Bonus Systems and Affect Integration
In custom Metin2 servers, certain systems allow bonuses to be applied to basic stats like STR, DEX, INT, or HTH while specific affects are active. These bonuses are typically coded into the game core using C++. For instance, activating a haste affect might grant additional DEX bonus. Such systems encourage players to develop varied strategies during gameplay.
Steps to Add Bonuses
1. Identify the affect ID; for example, haste may have ID 10.
2. Modify game/src/char_affect.cpp to apply bonuses when the affect is active.
3. Use the bonus_set function to define bonuses applicable during the affect.
4. Optionally, update client/src/uitooltip.py to display bonus details in tooltips.
C++ Code Example
To add a bonus to an affect, you can write custom code inside the OnAffectAdd function. For example:
int OnAffectAdd(DWORD dwAffect, int iValue, int iDuration)
{
if (dwAffect == AFFECT_HASTE)
m_points.bonus_dex += 10; // Add 10 DEX bonus while haste is active
return 1;
}
Server-Side and Client-Side Interaction
Affect systems in Metin2 run on both the server and client sides. While bonuses are activated server-side, their display on the client is equally important. Using Python GUI and modifying uiscript files allows for clear visualization of bonus stats related to active affects. This helps players track stat boosts effectively.
Conclusion
Adding bonuses to affects in Metin2 private servers enhances gameplay significantly. This process involves modifications on both the game core and client side. Properly implemented bonuses enable players to build characters strategically, leading to more balanced and engaging PvP experiences.
