GİRİŞ & PROBLEM
Merhaba, yabancı bir forumda bu sorunu keşfeden bir arkadaşın açıklamasını ve çözümünü içeren konuyu görünce incelediğim, sonrasında da server src taraflı detaylı bir kontrol gerektirdiğine karar verdiğim bir açık için bu fixi paylaşıyorum, açıktan kısaca bahsetmek gerekirse bu sorundan bahseden ilk konunun sahibi arkadaştan bir alıntı yapayım;
[/RIGHT]
NELERİ DEĞİŞTİRDİK ?
Orijinal konuda bu sorun Client Src üzerinden çözülmüş fakat bu oldukça sağlıksız bir yöntem, zira Client tarafındaki bir kontrolü bypass etmek bazen düşündüğünüzden çok daha kolay olabilir dolayısıyla bunun için daha sağlam bir fix oluşturdum, içerisinde sadece Buket yok, evlilik eşyalarının tamamı ve Olta/Kazma gibi eşyaların da server taraflı kontrolü mevcut, bu fix sonrasında bu yöntemi kullanan hileler çalışmayacaktır.
NASIL YAPILIR ?
Başlayalım, öncelikle Game Src içinden "char.cpp" dosyası açılır.
Daha sonra "char.h" dosyası açılır.
Son olarak "char_battle.cpp" açılır.
Merhaba, yabancı bir forumda bu sorunu keşfeden bir arkadaşın açıklamasını ve çözümünü içeren konuyu görünce incelediğim, sonrasında da server src taraflı detaylı bir kontrol gerektirdiğine karar verdiğim bir açık için bu fixi paylaşıyorum, açıktan kısaca bahsetmek gerekirse bu sorundan bahseden ilk konunun sahibi arkadaştan bir alıntı yapayım;
NELERİ DEĞİŞTİRDİK ?
Orijinal konuda bu sorun Client Src üzerinden çözülmüş fakat bu oldukça sağlıksız bir yöntem, zira Client tarafındaki bir kontrolü bypass etmek bazen düşündüğünüzden çok daha kolay olabilir dolayısıyla bunun için daha sağlam bir fix oluşturdum, içerisinde sadece Buket yok, evlilik eşyalarının tamamı ve Olta/Kazma gibi eşyaların da server taraflı kontrolü mevcut, bu fix sonrasında bu yöntemi kullanan hileler çalışmayacaktır.
NASIL YAPILIR ?
Başlayalım, öncelikle Game Src içinden "char.cpp" dosyası açılır.
Kod:
// BUL; bool CHARACTER::CanMove() const // ÜSTÜNE EKLE; (EĞER PROJENİZDE; C++17 ve üstü destekleniyorsa bunu ekleyin) // START OF DevFix 129 bool CHARACTER::IsPCAbleToAttack() const { if (!IsPC()) { sys_log (2, "<CHARACTER::IsPCAbleToAttack> Only PCs able to use this function! %s Try to use this!", GetName()); return false; } // Wedding Item Vnums. - [MT2Dev Note] constexpr int BOUQUET_VNUM_MIN = 50201; constexpr int BOUQUET_VNUM_MAX = 50204; constexpr int WEDDING_S_VNUM_MIN = 11901; constexpr int WEDDING_S_VNUM_MAX = 11904; constexpr int WEDDING_D_VNUM_MIN = 11911; constexpr int WEDDING_D_VNUM_MAX = 11914; // If PC try to attack while wearing rod or pick, return false. - [MT2Dev Note] if (const auto Wear_Weapon = GetWear (WEAR_WEAPON)) { if (Wear_Weapon->GetType() == ITEM_ROD || Wear_Weapon->GetType() == ITEM_PICK) { sys_log (2, "<CHARACTER::IsPCAbleToAttack> %s tried to attack with pick/rod!", GetName()); return false; } } // If PC try to attack while wearing bouquet, return false. - [MT2Dev Note] if (const auto Part_Weapon = GetWear (PART_WEAPON)) { if (Part_Weapon->GetVnum() >= BOUQUET_VNUM_MIN && Part_Weapon->GetVnum() <= BOUQUET_VNUM_MAX) { sys_log (2, "<CHARACTER::IsPCAbleToAttack> %s tried to attack with bouquet!", GetName()); return false; } } // If PC try to attack while wearing wedding suit/dresses, return false. - [MT2Dev Note] if (const auto Part_Body = GetWear (PART_MAIN)) { if ((Part_Body->GetVnum() >= WEDDING_S_VNUM_MIN && Part_Body->GetVnum() <= WEDDING_S_VNUM_MAX) || (Part_Body->GetVnum() >= WEDDING_D_VNUM_MIN && Part_Body->GetVnum() <= WEDDING_D_VNUM_MAX)) { sys_log (2, "<CHARACTER::IsPCAbleToAttack> %s tried to attack while wearing marriage suit/dress!", GetName()); return false; } } return true; } // END OF DevFix 129 (EĞER PROJENİZDE; C++17 ve üstü DESTEKLENMİYORSA bunu ekleyin) // START OF DevFix 129 bool CHARACTER::IsPCAbleToAttack() const { if (!IsPC()) { sys_log (2, "<CHARACTER::IsPCAbleToAttack> Only PCs able to use this function! %s Try to use this!", GetName()); return false; } const auto Wear_Weapon = GetWear (WEAR_WEAPON); const auto Part_Weapon = GetWear (PART_WEAPON); const auto Part_Body = GetWear (PART_MAIN); // If PC try to attack while wearing rod or pick, return false. - [MT2Dev Note] if (Wear_Weapon && (Wear_Weapon->GetType() == ITEM_ROD || Wear_Weapon->GetType() == ITEM_PICK)) { sys_log (2, "<CHARACTER::IsPCAbleToAttack> %s tried to attack with pick/rod!", GetName()); return false; } // If PC try to attack while wearing bouquet, return false. - [MT2Dev Note] if (Part_Weapon && (Part_Weapon->GetVnum() >= 50201 && Part_Weapon->GetVnum() <= 50204)) // Bouquet vnums hard-coded in here.. - [MT2Dev Note] { sys_log (2, "<CHARACTER::IsPCAbleToAttack> %s tried to attack with bouquet!", GetName()); return false; } // If PC try to attack while wearing wedding suit/dresses, return false. - [MT2Dev Note] if (Part_Body && ((Part_Body->GetVnum() >= 11901 && Part_Body->GetVnum() <= 11904) || (Part_Body->GetVnum() >= 11911 && Part_Body->GetVnum() <= 11914))) // Suit/dress vnums hard-coded in here.. - [MT2Dev Note] { sys_log (2, "<CHARACTER::IsPCAbleToAttack> %s tried to attack while wearing marriage suit/dress!", GetName()); return false; } return true; } // END OF DevFix 129
Daha sonra "char.h" dosyası açılır.
Kod:
// BUL; bool CanMove() const; // ÜSTÜNE EKLE; // START OF DevFix 129 bool IsPCAbleToAttack() const; // Is this PC able to attack someone ? - [MT2Dev Note] // END OF DevFix 129
Son olarak "char_battle.cpp" açılır.
Kod:
// bool CHARACTER::Attack (LPCHARACTER pkVictim, BYTE bType) FONKSİYONUNUN İÇİNDE EN ÜSTTE BUL; if (!CanMove()) { return false; } // ALTINA EKLE; // START OF DevFix 129 if (IsPC() && !IsPCAbleToAttack()) { if (test_server) { ChatPacket (CHAT_TYPE_INFO, "<Control> Cannot attack while wearing this equipments!"); } return false; } // END OF DevFix 129 // bool CHARACTER::Damage (LPCHARACTER pAttacker, int dam, EDamageType type) FONKSIYONUNUN İÇİNDE EN BAŞTA BUL; if (DAMAGE_TYPE_MAGIC == type) { dam = (int) ((float) dam * (100 + (pAttacker->GetPoint (POINT_MAGIC_ATT_BONUS_PER) + pAttacker->GetPoint (POINT_MELEE_MAGIC_ATT_BONUS_PER))) / 100.f + 0.5f); } // ÜSTÜNE EKLE (DİKKAT: FONKSIYONUN İÇİNE EKLENECEK!); // START OF DevFix 129 if (pAttacker && pAttacker->IsPC() && !pAttacker->IsPCAbleToAttack()) { SendDamagePacket (pAttacker, 0, DAMAGE_BLOCK); return false; } // END OF DevFix 129
Sevgiler, MT2Dev.
Metin2 Texture Kalitesini Artırma Rehberi
Texture kalitesini artırmak, Metin2 özel sunucularında görsel deneyimi ciddi anlamda iyileştiren önemli bir özelliktir. Bu rehberde, texture dosyalarının nasıl değiştirileceği, yüksek çözünürlüklü texture paketlerinin nasıl entegre edileceği ve bununla ilgili dikkat edilmesi gereken teknik detaylara değineceğiz. Özellikle Metin2 özel sunucu geliştirme ve client src üzerinde çalışan geliştiriciler için faydalı olacaktır.
Texture Nedir?
Texture, oyun içinde nesnelerin, karakterlerin, arka planların ve diğer görsel öğelerin yüzeylerinde kullanılan resim dosyalarıdır. Metin2'de texture dosyaları genellikle .dds veya .tga formatında bulunur. Bu dosyalar client klasörü altında bulunan 'locale' veya 'root' dizinlerinde yer alabilir. Texture kalitesi düşükse, oyun görsel olarak bulanık veya pikselli görünebilir.
Texture Kalitesini Artırmak Neden Gerekli?
Oyuncuların daha iyi bir görsel deneyim yaşaması için texture kalitesini yükseltmek büyük önem taşır. Yüksek çözünürlüklü texturelar sayesinde;
- Karakter modelleri daha net ve detaylı görünür.
- Harita dokuları daha keskin hale gelir.
- Oyun atmosferi daha gerçekçi hissi verir.
Bu durum, özellikle PvP sunucularında oyuncuların oyun içi deneyimini ciddi derecede artırır.
Yüksek Kaliteli Texture Paketlerini Kullanmak
Metin2 özel sunucularında texture kalitesini artırmak için mevcut texture dosyalarının yüksek çözünürlüklü versiyonları olan 'texture pack' dosyalarını değiştirmek gerekir. Bu dosyalar genellikle bir 'pack' sistemiyle client'e entegre edilir. Pack sistemi, client tarafından yüklenen dosyaları sıkıştırılmış halde tutar ve performansı artırır.
Texture Değiştirme Adımları
1. Öncelikle, yüksek çözünürlüklü texture dosyalarını güvenilir kaynaklardan temin edin.
2. Bu dosyaları doğru format ve boyutlarda olduğundan emin olun. DDS formatı tercih edilir.
3. Texture dosyalarını clientin 'locale' klasöründe uygun alt dizinlere yerleştirin.
4. Eğer texture pack sistemi kullanıyorsanız, bu dosyaları pack içine eklemek için uygun araçları kullanın. Bu işlem sırasında uiscript ve py root dosyalarının da güncellenmesi gerekebilir.
Texture Cache Sorunlarını Önlemek
Oyuncular yeni texturelar yüklediğinde, eski texture'lar cache'te kalabilir ve yeni texturelar gözükmeyebilir. Bunu önlemek için, texture cache temizliği yapılmalıdır. Bazı sistemlerde bu işlem otomatik yapılırken, bazılarında manuel müdahale gerekir. Client tarafında texture cache temizleme işlemi için 'system' klasöründe yer alan ayarlar düzenlenebilir.
Texture Performans Etkisi
Yüksek kaliteli texturelar görsel açıdan etkileyici olabilir ancak aynı zamanda donanım üzerinde daha fazla yük oluşturabilir. Bu nedenle texture boyutlarını optimize etmek önemlidir. Çok büyük dosya boyutları, oyunun yavaşlamasına veya donmalarına sebep olabilir. Bu yüzden texture boyutlarını optimize ederken hem kaliteyi hem de performansı göz önünde bulundurmak gerekir.
Texture Sistemlerini Geliştirmek
Metin2 özel sunucularında texture sistemini geliştirmek istiyorsanız, C++ system ve Python system bilginizi kullanabilirsiniz. Özellikle client src üzerinde değişiklik yaparak texture yükleme sistemini özelleştirebilirsiniz. Bu işlem, kaynak kod üzerinde çalışmayı gerektirir ve tecrübeli geliştiriciler için uygundur.
Sonuç
Texture kalitesini artırmak, Metin2 özel sunucularında kullanıcı deneyimini ciddi şekilde artırabilir. Doğru texture paketleriyle ve doğru yöntemlerle görsel kaliteyi optimize edebilirsiniz. Ancak bu işlem sırasında performans etkilerini göz ardı etmemek, aynı zamanda texture cache gibi teknik detaylara dikkat etmek önemlidir.
Guide to Improving Texture Quality in Metin2
Improving texture quality is an important feature that significantly enhances the visual experience in Metin2 private servers. In this guide, we will discuss how to replace texture files, integrate high-resolution texture packs, and address technical details that require attention. This guide will be especially useful for developers working on Metin2 private server development and client src.
What is a Texture?
Textures are image files used on surfaces of objects, characters, backgrounds, and other visual elements in the game. In Metin2, texture files are usually in .dds or .tga formats. These files can be located within the 'locale' or 'root' directories inside the client folder. If texture quality is low, the game may appear blurry or pixelated visually.
Why Improving Texture Quality Is Necessary?
Enhancing texture quality is crucial for players to enjoy a better visual experience. With high-resolution textures:
- Character models appear clearer and more detailed.
- Map textures become sharper.
- The game atmosphere feels more realistic.
This significantly improves the in-game experience, especially in PvP servers.
Using High-Quality Texture Packs
To improve texture quality in Metin2 private servers, you need to replace existing texture files with their high-resolution versions found in 'texture packs'. These files are often integrated into the client via a 'pack' system. The pack system stores loaded files in compressed form, improving performance.
Steps to Replace Textures
1. First, obtain high-resolution texture files from reliable sources.
2. Ensure these files are in correct format and size. DDS format is preferred.
3. Place the texture files in the appropriate subdirectories within the client's 'locale' folder.
4. If using a texture pack system, use proper tools to add these files into the pack. During this process, it might also be necessary to update uiscript and py root files.
Preventing Texture Cache Issues
When players install new textures, old textures may remain cached and prevent new ones from showing. To avoid this, texture cache should be cleared. While some systems handle this automatically, others require manual intervention. Cache clearing operations can be adjusted in settings located within the 'system' folder on the client side.
Performance Impact of Textures
High-quality textures can be visually impressive but may also place higher demand on hardware. Therefore, optimizing texture sizes is important. Very large file sizes can cause the game to slow down or freeze. When optimizing texture sizes, both quality and performance must be considered.
Enhancing Texture Systems
If you want to enhance the texture system in Metin2 private servers, you can utilize your knowledge of C++ system and Python system. By making modifications on the client src, you can customize the texture loading system. This requires working with source code and is suitable for experienced developers.
Conclusion
Improving texture quality can significantly enhance user experience in Metin2 private servers. You can optimize visual quality using the right texture packs and methods. However, during this process, it's important not to overlook performance impacts and pay attention to technical details like texture cache.
Metin2 Texture Kalitesini Artırma Rehberi
Texture kalitesini artırmak, Metin2 özel sunucularında görsel deneyimi ciddi anlamda iyileştiren önemli bir özelliktir. Bu rehberde, texture dosyalarının nasıl değiştirileceği, yüksek çözünürlüklü texture paketlerinin nasıl entegre edileceği ve bununla ilgili dikkat edilmesi gereken teknik detaylara değineceğiz. Özellikle Metin2 özel sunucu geliştirme ve client src üzerinde çalışan geliştiriciler için faydalı olacaktır.
Texture Nedir?
Texture, oyun içinde nesnelerin, karakterlerin, arka planların ve diğer görsel öğelerin yüzeylerinde kullanılan resim dosyalarıdır. Metin2'de texture dosyaları genellikle .dds veya .tga formatında bulunur. Bu dosyalar client klasörü altında bulunan 'locale' veya 'root' dizinlerinde yer alabilir. Texture kalitesi düşükse, oyun görsel olarak bulanık veya pikselli görünebilir.
Texture Kalitesini Artırmak Neden Gerekli?
Oyuncuların daha iyi bir görsel deneyim yaşaması için texture kalitesini yükseltmek büyük önem taşır. Yüksek çözünürlüklü texturelar sayesinde;
- Karakter modelleri daha net ve detaylı görünür.
- Harita dokuları daha keskin hale gelir.
- Oyun atmosferi daha gerçekçi hissi verir.
Bu durum, özellikle PvP sunucularında oyuncuların oyun içi deneyimini ciddi derecede artırır.
Yüksek Kaliteli Texture Paketlerini Kullanmak
Metin2 özel sunucularında texture kalitesini artırmak için mevcut texture dosyalarının yüksek çözünürlüklü versiyonları olan 'texture pack' dosyalarını değiştirmek gerekir. Bu dosyalar genellikle bir 'pack' sistemiyle client'e entegre edilir. Pack sistemi, client tarafından yüklenen dosyaları sıkıştırılmış halde tutar ve performansı artırır.
Texture Değiştirme Adımları
1. Öncelikle, yüksek çözünürlüklü texture dosyalarını güvenilir kaynaklardan temin edin.
2. Bu dosyaları doğru format ve boyutlarda olduğundan emin olun. DDS formatı tercih edilir.
3. Texture dosyalarını clientin 'locale' klasöründe uygun alt dizinlere yerleştirin.
4. Eğer texture pack sistemi kullanıyorsanız, bu dosyaları pack içine eklemek için uygun araçları kullanın. Bu işlem sırasında uiscript ve py root dosyalarının da güncellenmesi gerekebilir.
Texture Cache Sorunlarını Önlemek
Oyuncular yeni texturelar yüklediğinde, eski texture'lar cache'te kalabilir ve yeni texturelar gözükmeyebilir. Bunu önlemek için, texture cache temizliği yapılmalıdır. Bazı sistemlerde bu işlem otomatik yapılırken, bazılarında manuel müdahale gerekir. Client tarafında texture cache temizleme işlemi için 'system' klasöründe yer alan ayarlar düzenlenebilir.
Texture Performans Etkisi
Yüksek kaliteli texturelar görsel açıdan etkileyici olabilir ancak aynı zamanda donanım üzerinde daha fazla yük oluşturabilir. Bu nedenle texture boyutlarını optimize etmek önemlidir. Çok büyük dosya boyutları, oyunun yavaşlamasına veya donmalarına sebep olabilir. Bu yüzden texture boyutlarını optimize ederken hem kaliteyi hem de performansı göz önünde bulundurmak gerekir.
Texture Sistemlerini Geliştirmek
Metin2 özel sunucularında texture sistemini geliştirmek istiyorsanız, C++ system ve Python system bilginizi kullanabilirsiniz. Özellikle client src üzerinde değişiklik yaparak texture yükleme sistemini özelleştirebilirsiniz. Bu işlem, kaynak kod üzerinde çalışmayı gerektirir ve tecrübeli geliştiriciler için uygundur.
Sonuç
Texture kalitesini artırmak, Metin2 özel sunucularında kullanıcı deneyimini ciddi şekilde artırabilir. Doğru texture paketleriyle ve doğru yöntemlerle görsel kaliteyi optimize edebilirsiniz. Ancak bu işlem sırasında performans etkilerini göz ardı etmemek, aynı zamanda texture cache gibi teknik detaylara dikkat etmek önemlidir.
Guide to Improving Texture Quality in Metin2
Improving texture quality is an important feature that significantly enhances the visual experience in Metin2 private servers. In this guide, we will discuss how to replace texture files, integrate high-resolution texture packs, and address technical details that require attention. This guide will be especially useful for developers working on Metin2 private server development and client src.
What is a Texture?
Textures are image files used on surfaces of objects, characters, backgrounds, and other visual elements in the game. In Metin2, texture files are usually in .dds or .tga formats. These files can be located within the 'locale' or 'root' directories inside the client folder. If texture quality is low, the game may appear blurry or pixelated visually.
Why Improving Texture Quality Is Necessary?
Enhancing texture quality is crucial for players to enjoy a better visual experience. With high-resolution textures:
- Character models appear clearer and more detailed.
- Map textures become sharper.
- The game atmosphere feels more realistic.
This significantly improves the in-game experience, especially in PvP servers.
Using High-Quality Texture Packs
To improve texture quality in Metin2 private servers, you need to replace existing texture files with their high-resolution versions found in 'texture packs'. These files are often integrated into the client via a 'pack' system. The pack system stores loaded files in compressed form, improving performance.
Steps to Replace Textures
1. First, obtain high-resolution texture files from reliable sources.
2. Ensure these files are in correct format and size. DDS format is preferred.
3. Place the texture files in the appropriate subdirectories within the client's 'locale' folder.
4. If using a texture pack system, use proper tools to add these files into the pack. During this process, it might also be necessary to update uiscript and py root files.
Preventing Texture Cache Issues
When players install new textures, old textures may remain cached and prevent new ones from showing. To avoid this, texture cache should be cleared. While some systems handle this automatically, others require manual intervention. Cache clearing operations can be adjusted in settings located within the 'system' folder on the client side.
Performance Impact of Textures
High-quality textures can be visually impressive but may also place higher demand on hardware. Therefore, optimizing texture sizes is important. Very large file sizes can cause the game to slow down or freeze. When optimizing texture sizes, both quality and performance must be considered.
Enhancing Texture Systems
If you want to enhance the texture system in Metin2 private servers, you can utilize your knowledge of C++ system and Python system. By making modifications on the client src, you can customize the texture loading system. This requires working with source code and is suitable for experienced developers.
Conclusion
Improving texture quality can significantly enhance user experience in Metin2 private servers. You can optimize visual quality using the right texture packs and methods. However, during this process, it's important not to overlook performance impacts and pay attention to technical details like texture cache.
