[Client] Pack yolunu değiştirme

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 112

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
selamun aleyküm, konuya direk dalayım :)
daha önce forumda paylaşıldı mı bilmiyorum biraz araştırdım ama göremedim
kısaca anlatayım:

client klasörümüzdeki pack yolunu istediğiniz gibi değiştirmenize yarıyor bknz. Saltanatmt2'de data olarak.


Metin2 Client Pack Yolunu Değiştirme Rehberi

Metin2 özel sunucu geliştirme sürecinde, client tarafında bulunan 'pack' dosyasının konumunu değiştirmek isteyebilirsiniz. Bu işlem, güvenlik, performans veya yapısal düzenlemeler açısından önemlidir. Bu rehberde, client üzerinde pack dosyasının yolunu nasıl değiştireceğinizi adım adım anlatacağız.

Pack Dosyası Nedir?
Metin2 client yapısı, oyunun görsel, ses ve veri dosyalarını barındıran 'pack' adlı arşiv dosyalarını kullanır. Bu dosyalar genellikle '.epk', '.eix', '.mix' gibi uzantılara sahiptir. Client, başlatıldığında bu dosyalardan verileri çeker. Varsayılan olarak bu dosyalar client dizini altında belirli bir klasörde bulunur.

Neden Pack Yolunu Değiştirmek İstersiniz?
  • Olası modifikasyonları gizlemek
  • Sunucuya özel içerikleri daha iyi organize etmek
  • Oyun içi verilerin dışarıdan erişime karşı korunmasını artırmak
  • Yeni sistem entegrasyonları için yapısal esneklik kazandırmak

Pack Yolunu Değiştirmek için Gerekli Adımlar
1. Kaynak Kodlara Erişim
Metin2 client'in C++ kaynak kodlarına erişiminiz olması gerekir. Eğer client source kodlarını elinizde değilse, Martysama ya da diğer Metin2 development platformlarından temin edebilirsiniz.

2. Pack Yükleme Fonksiyonunu Bulmak
Client başlatılırken pack dosyalarının okunduğu fonksiyon genellikle 'CResourceManager::LoadPack' ya da benzeri isimlerle tanımlıdır. Bu fonksiyonun bulunduğu dosyayı açın.

3. Pack Yolu Tanımlamasını Değiştirme
Fonksiyon içinde pack dosyasının yolunu belirten sabit string değerlerini güncelleyin. Örneğin:
Eski Hali:
Kod:
CString path = 'locale/tr/data/pack.eix';

Yeni Hali:
Kod:
CString path = '../custom_folder/pack.eix';


4. Derleme ve Test
Değişiklikleri yaptıktan sonra client'i yeniden derleyin. Pack dosyasının yeni belirttiğiniz yoldan yüklenip yüklemediğini test edin. Eğer doğru tanımlanmazsa, client başlatılamaz veya görsel içerikler eksik görünebilir.

Olası Hatalar ve Çözümleri
Pack Dosyası Bulunamıyor Hatası
Yeni yol doğru girildiğinden emin olun. Göreli ya da mutlak yol tercihinize göre ayarlanabilir. Ancak yolun geçerli olduğundan ve dosyanın mevcut olduğundan emin olun.

Client Çalışmıyor
Kodlama hatası veya yol belirtimindeki küçük bir yazım hatası sebebiyle client çalışmayabilir. Hata ayıklama modunda derleyip logları kontrol edin.

Sonuç
Metin2 client üzerinde pack dosyasının yolunu değiştirmek, güvenliği artırmanın ve yapısal düzeni sağlamanın etkili bir yoludur. Ancak bu işlem, C++ bilgisi gerektirdiği için dikkatli yapılmalıdır. Doğru yapılandırıldığında, client tarafında daha esnek ve kontrollü bir yapı elde edebilirsiniz.

Daha fazla Metin2 geliştirici rehberi için Metin2Lobby'i takip etmeyi unutmayın.


Changing the Client Pack Path in Metin2

During Metin2 private server development, you may want to change the location of the 'pack' file on the client side. This process is important for security, performance, or structural adjustments. In this guide, we will explain step-by-step how to change the pack file's path within the client.

What is the Pack File?
The Metin2 client structure uses archive files called 'pack' to store visual, audio, and data files of the game. These files typically have extensions like '.epk', '.eix', '.mix'. When the client starts, it fetches data from these files. By default, these files are located in a specific folder within the client directory.

Why Change the Pack Path?
  • To hide potential modifications
  • Better organization of server-specific content
  • Increased protection of in-game data against external access
  • Enhanced structural flexibility for new system integrations

Steps to Change the Pack Path
1. Accessing the Source Code
You need to have access to the C++ source code of the Metin2 client. If you do not have the client source codes, you can obtain them from platforms like Martysama or other Metin2 development sources.

2. Locating the Pack Loading Function
The function that loads the pack files upon startup is usually named something like 'CResourceManager::LoadPack'. Open the file containing this function.

3. Modifying the Pack Path Definition
Update the constant string values defining the pack file path within the function. For example:
Old Version:
Kod:
CString path = 'locale/tr/data/pack.eix';

New Version:
Kod:
CString path = '../custom_folder/pack.eix';


4. Compiling and Testing
After making changes, recompile the client. Test whether the pack file is loading from the newly specified path. If not correctly defined, the client may fail to start or visuals may appear missing.

Possible Errors and Solutions
Pack File Not Found Error
Ensure the new path is correctly entered. You can use relative or absolute paths based on your preference. However, make sure the path is valid and the file exists.

Client Won't Start
Minor coding errors or typos in the path definition might cause the client not to run. Compile in debug mode and check the logs.

Conclusion
Changing the pack file path on the Metin2 client is an effective way to enhance security and provide structural organization. However, since this process requires C++ knowledge, it must be done carefully. When properly configured, you can achieve a more flexible and controlled structure on the client side.

Follow Metin2Lobby for more Metin2 developer guides.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt