İçerik daha önce paylaşıldıysa RAPOR butonunu kullanarak bildirebilirsiniz.
Regen.h'ye gidin ve değiştirin:
ve
questlua_dungeon.cpp'ye gidin, değiştirin:
ve
char_manager.cpp
Regen.h'ye gidin ve değiştirin:
Kod:
BYTE direction;
ve
Kod:
uint16_t direction;
questlua_dungeon.cpp'ye gidin, değiştirin:
Kod:
BYTE dir = (int) lua_tonumber(L, 4);
ve
Kod:
uint16_t dir = static_cast<uint16_t>(lua_tonumber(L, 4));
char_manager.cpp
Kod:
LPCHARACTER CHARACTER_MANAGER::SpawnMob(DWORD dwVnum, long lMapIndex, long x, long y, long z, bool bSpawnMotion, int iRot, bool bShow)
Kod:
if(iRot > 359){ iRot = 359; }
Kod:
if (iRot == -1) iRot = number(0, 360);
Regen Type Fix Nedir?
Metin2 özel sunucularında geliştirme yaparken bazı sistemsel sorunlarla karşılaşabilirsiniz. Bu sorunlardan biri de 'Regen Type Fix'tir. Bu sistem, karakterlerin can, mana veya stamina gibi değerlerinin yenilenmesiyle ilgilidir. Hatalı regenerasyon türleri nedeniyle oyuncuların karakterleri beklenmedik şekilde canlanabilir ya da yenilenmeyebilir. Bu durum hem oyun deneyimini düşürür hem de sunucu dengesini bozabilir.
Regen Sistemi Nasıl Çalışır?
Metin2'de regenerasyon sistemi, karakterin HP (can), SP (mana) ve stamina gibi değerlerinin belirli aralıklarla otomatik olarak yenilenmesini sağlar. Bu süreç, karakterin hareket halinde olup olmadığına göre değişiklik gösterebilir. Örneğin bir karakter hareketsizken daha hızlı HP yenileyebilir. Ancak bazı özel sunucularda bu sistem doğru ayarlanmadığında regen türü hataları oluşur.
Neden Regen Type Fix Gerekir?
Yanlış regen türleri, karakterlerin HP veya SP değerlerinin anormal şekilde artmasına veya azalmasına neden olabilir. Bu durum, PvP savaşlarında ciddi avantajlar yaratabilir veya tam tersi karakterin savunmasız kalmasına sebep olabilir. Özellikle Metin2 PvP sistemlerinde bu tür hatalar büyük farklar yaratabilir. Bu nedenle regen türlerinin doğru tanımlanması büyük önem taşır.
C++ Kaynak Kodlarda Regen Type Ayarı
Metin2 sunucu kaynak kodları genellikle C++ dilinde yazılmıştır. Regen sistemini etkileyen değerler, oyun sunucusunun 'game' modülünde yer alır. Bu modülde bulunan 'regen_type' tanımlamaları incelenerek hata ayıklanabilir. Örneğin, HP regenerasyonunda bir gecikme varsa, bu değerlerin kontrol edilmesi gerekir. Aynı zamanda regen hızı karakter sınıfına göre değişebilir, bu yüzden sınıf bazlı ayarlamalar da yapılmalıdır.
Fix Uygulama Adımları
Regen type fix için ilk adım, kaynak kodda yer alan regenerasyon değerlerini kontrol etmektir. Bunun için game_core dosyasında bulunan ilgili sınıflar incelenmelidir. Ardından, regen fonksiyonları doğru şekilde tanımlanmalı ve karakter türüne göre ayarlanmalıdır. Bu işlem sırasında DB-Core ile uyumlu çalışılması da önemlidir. Sunucunuzda DB-Core kullanıyorsanız, regen değerlerinin veritabanı ile uyumlu olması gerekir.
Python Script ile Kontrol
Bazı sunucular, regen sistemini Python scriptleri ile yönetebilir. PyRoot altında yer alan scriptlerle karakterin regen davranışlarını kontrol edebilirsiniz. Bu scriptlerin doğru şekilde yapılandırılması, regen type hatasının önüne geçebilir. PyGUI ile bu sistemleri görsel arayüz üzerinden test etmek de mümkündür. Bu sayede hatalar daha çabuk tespit edilebilir.
MartySama ve Regen Sistemleri
Metin2 geliştirme dünyasında MartySama, birçok geliştirici tarafından kullanılan popüler bir kaynak sunucusudur. MartySama kaynak kodları üzerinde yapılan regen type fix örnekleri, birçok geliştiriciye rehber niteliğindedir. Bu sistemler, hem 'game' hem de 'auth' katmanında etkili olabilir. Doğru yapılandırılmış bir regen sistemi, MartySama tabanlı sunucularda daha dengeli bir oyun ortamı sağlar.
Sunucu Performansı ve Regen Type
Regen türü yanlış tanımlanmış bir sunucuda, gereğinden fazla veri işlemesi gerekebilir. Bu da sunucu performansını düşürebilir. Özellikle çok oyunculu sunucularda bu durum kritik olabilir. Doğru regen türleri ayarlandığında hem karakterler daha stabil oynar hem de sunucu daha az yük taşır. Bu nedenle regen type fix, sadece oyun deneyimi değil, aynı zamanda sunucu optimizasyonu için de önemlidir.
What is Regen Type Fix?
While developing private Metin2 servers, you may encounter certain systematic issues. One of these issues is 'Regen Type Fix'. This system deals with the regeneration of character values such as health, mana, or stamina. Due to incorrect regeneration types, characters might unexpectedly heal or fail to regenerate at all. This situation not only reduces the gaming experience but also disrupts server balance.
How Does the Regen System Work?
In Metin2, the regeneration system automatically restores a character's HP (health), SP (mana), and stamina at specific intervals. This process can vary depending on whether the character is moving or stationary. For example, a character might regenerate HP faster while idle. However, if this system is not properly configured on some private servers, regeneration type errors occur.
Why Is Regen Type Fix Needed?
Incorrect regen types can cause abnormal increases or decreases in a character's HP or SP values. This can provide unexpected advantages during PvP battles or conversely leave the character defenseless. Particularly in Metin2 PvP systems, such errors can have significant impacts. Therefore, correctly defining regen types is very important.
Regen Type Settings in C++ Source Code
Metin2 server source codes are generally written in C++. The values affecting the regeneration system are located within the 'game' module of the server. These 'regen_type' definitions can be debugged by examining them. For instance, if there's a delay in HP regeneration, these values should be checked. Additionally, regen speed can vary based on character class, so adjustments must be made accordingly.
Steps for Applying the Fix
The first step for a regen type fix is to check the regeneration values in the source code. This requires examining the relevant classes in the game_core file. Then, regen functions must be correctly defined and adjusted according to character type. Compatibility with DB-Core must also be maintained during this process. If your server uses DB-Core, regeneration values must be compatible with the database.
Control via Python Scripts
Some servers manage the regeneration system through Python scripts. You can control character regeneration behaviors via scripts located under PyRoot. Properly configuring these scripts can prevent regen type errors. Testing these systems visually via PyGUI is also possible, allowing errors to be detected more quickly.
MartySama and Regen Systems
In the world of Metin2 development, MartySama is a popular resource server used by many developers. Examples of regen type fixes applied to MartySama source codes serve as guides for many developers. These systems can affect both the 'game' and 'auth' layers. A properly configured regeneration system provides a more balanced gameplay environment for MartySama-based servers.
Server Performance and Regen Type
On a server where regen types are incorrectly defined, excessive data processing might occur. This can reduce server performance. Especially on multiplayer servers, this situation can become critical. When correct regen types are set, characters play more stably and the server carries less load. Therefore, regen type fix is important not only for the gaming experience but also for server optimization.
