güncel msmyi eski proto .txt ekle

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Kod:
import os import re # --- AYARLAR --- # --- AYARLAR --- START_VNUM = 91312  # Başlangıç VNUM bu hiç olmiycak sayıdan başlat ben çok yüskek seçtim akrışmaz .txtdeki sayılar olcak. # Sadece belirli bir index üzerindekileri almak istersen (Örn: 41000'den büyük olanlar) INDEX_LIMIT = 100 #burası index nerden başlasın. def clean_model_name(model_path):     # "warrior_soccer1_Germany.gr2" -> "warrior soccer1 Germany"     file_name = os.path.basename(model_path)     name_without_ext = os.path.splitext(file_name)[0]     return name_without_ext.replace("_", " ") def parse_msm(file_path):     try:         with open(file_path, 'r', encoding='iso-8859-9') as f:             content = f.read()         # ShapeIndex ve Model bilgisini yakala         groups = re.findall(r'Group\s+ShapeData\d+.*?ShapeIndex\s+(\d+).*?Model\s+"(.*?)"', content, re.DOTALL)         return [(idx, model) for idx, model in groups if int(idx) >= INDEX_LIMIT]     except:         return [*] def generate():     # Sadece erkek msm'lerini baz alarak ikili set oluşturacağız     # (Genelde msm'lerde indexler aynıdır, değilse script msm_m üzerinden yürür)     msm_files = [f for f in os.listdir('.') if f.endswith('_m.msm')]         proto_lines = [*]     name_lines = [*]     vnum_counter = START_VNUM     for msm in sorted(msm_files):         data = parse_msm(msm)                 for idx, model_path in data:             display_name = clean_model_name(model_path)                         # --- 1. SATIR: ERKEK (ANTI_FEMALE) --- burayı kendi .txt protaya göre ayarlayın                        # --- mesela 41003 çöl ksotümünü örnek alarak ekleyebilirsiniz.                        # --- benim proto.txt böyle ben buan göre yaptım             # ---41003    abc    ITEM_COSTUME    COSTUME_BODY    2    ANTI_FEMALE    NONE    NONE    NONE    0    0    0    0    0    LIMIT_NONE    0    LIMIT_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    APPLY_NONE    0    5    0    0    40032    0    0    100    0    0 # ---üsttekine göre kendi protonuza güncelliyceksiniz.sizdeki neyse                         proto_m = f"{vnum_counter}\tabc\tITEM_COSTUME\tCOSTUME_BODY\t2\tANTI_FEMALE\tNONE\tNONE\tNONE\t0\t0\t0\t0\t0\tLIMIT_NONE\t0\tLIMIT_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\t5\t0\t0\t{idx}\t0\t0\t0\t0\t0"             proto_lines.append(proto_m)             name_lines.append(f"{vnum_counter}\t{display_name}")             vnum_counter += 1                         # --- 2. SATIR: KADIN (ANTI_MALE) ---             proto_w = f"{vnum_counter}\tabc\tITEM_COSTUME\tCOSTUME_BODY\t2\tANTI_MALE\tNONE\tNONE\tNONE\t0\t0\t0\t0\t0\tLIMIT_NONE\t0\tLIMIT_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\tAPPLY_NONE\t0\t5\t0\t0\t{idx}\t0\t0\t0\t0\t0"             proto_lines.append(proto_w)             name_lines.append(f"{vnum_counter}\t{display_name}")             vnum_counter += 1     # Dosyaları Kaydet     with open("item_proto_output.txt", "w", encoding="utf-8") as f:         f.write("\n".join(proto_lines))     with open("item_names.txt", "w", encoding="utf-8") as f:         f.write("\n".join(name_lines))     print(f"Bitti! Çiftli setler halinde {len(proto_lines)} satır oluşturuldu.") if __name__ == "__main__":     generate()


1-güncel tr unpackı bul.
2-rootdaki .msmleri
roota
locale tr
item list.txt locale trye

iconlar iconla.

pc pc2 pc3 değişcek.

bu pack kısmı.

sonrasında


c ye klasörü ekle


örneğin warrior msmleri at.

sadece 1 karakterin msmsi olsun
warrior erkek ve kadın mesela

start.batla çalıştır.

dikkat etmeniz gereken yerleri .py içine yazdım ordan bakabilrsiniz.




289899_5a4b335501d7443ed3c04d397cd5166d.png




Metin2 Sunucularında Güncel msmyi Eski Protokol .txt Dosyasına Ekleme

Metin2 özel sunucu geliştirme sürecinde, özellikle eski protokollerin desteklenmesi gereken durumlarda, güncel msm dosyalarının eski .txt formatındaki protokollere entegre edilmesi önemli bir adımdır. Bu işlem, hem client src üzerinde hem de game server programming süreçlerinde dikkatle yapılmalıdır. Bu yazıda, nasıl güncel msm dosyalarını eski proto.txt formatına ekleyeceğinizi adım adım anlatacağız.

Metin2 özel sunucularında, item, npc, mob gibi verilerin doğru şekilde çalışması için db core ile game core arasında tutarlılık sağlanmalıdır. Özellikle martysama tarzı sistemlerde, bu yapılar daha da karmaşıklaşabilir. Bu nedenle, yeni msm dosyalarının doğru bir şekilde proto.txt dosyasına entegrasyonu, source edit aşamasında dikkat isteyen bir işlemdir.

Proto.txt dosyası, Metin2 sunucularında tüm eşya ve NPC verilerinin bulunduğu temel protokol dosyasıdır. Yeni eklenen eşyaların, güncel msm formatında üretilmişse bile, eski sistemlerde .txt formatında uyumlu olması gerekir. Bu nedenle, pack dosyaları ile birlikte gelen msm dosyalarını manuel olarak proto.txt içine eklemek gerekebilir.

msm dosyası genellikle uiscript ve py root ile ilişkili olup, grafiksel arayüzde kullanılan verileri içerir. Ancak, bu dosyalar doğrudan server src içindeki db veya game katmanında işlenmez. Bu yüzden, msm dosyasındaki verilerin proto.txt dosyasına dönüştürülmesi gerekir.

msm dosyasını açıp, her bir itemin ID, isim, level, sınıflandırma gibi verilerini almanız gerekir. Ardından bu verileri proto.txt formatına uygun şekilde elle veya betik yardımıyla dönüştürerek eklersiniz. Bu işlem sırasında C++ bilginiz oldukça faydalı olacaktır. Python tabanlı sistemlerde, Py GUI gibi arayüzlerle bu dönüşümü kolaylaştıran betikler yazılabilir.

Metin2 compile aşamasında, proto.txt dosyasının doğru okunup okunmadığı kontrol edilmelidir. Aksi takdirde, yeni eklenen eşyalar sunucuda görünmeyebilir veya hatalı çalışabilir. Bu nedenle, auth ve game sunucuları senkronize edilirken, proto.txt dosyasının da her iki ortamda aynı olduğundan emin olunmalıdır.

Metin2 lobby kullanıcıları olarak, bu tür teknik sorunlara karşı hazırlıklı olmak önemlidir. Özellikle PvP sistem sunucularında, yeni itemlerin hatalı eklenmesi dengesizliklere yol açabilir. Bu nedenle, C++ system ve Python system bilgisi olan geliştiricilerin bu işlemleri yapması önerilir.

Sonuç olarak, güncel msm dosyalarını eski proto.txt formatına eklemek, Metin2 özel sunucu geliştirme sürecinde sıkça karşılaşılan bir durumdur. Doğru yapılandırılmış bir proto.txt dosyası, core sistemlerin sağlıklı çalışmasını sağlar. Bu nedenle, Metin2Dev sürecinde dikkatli hareket etmek ve db ve game katmanlarını ayrı ayrı test etmek büyük önem taşır.


Adding Current msm to Legacy Protocol .txt File in Metin2 Servers

Metin2 private server development often requires integrating newer msm files into older protocol formats like .txt. This process must be handled carefully in both client src and game server programming. In this article, we'll explain step-by-step how to add current msm files into legacy proto.txt formats.

In Metin2 private servers, consistency between db core and game core is crucial for items, NPCs, and mobs to function properly. Especially with systems like martysama, these structures can become more complex. Therefore, integrating new msm files correctly into proto.txt during the source edit phase requires attention.

The proto.txt file contains all item and NPC data in Metin2 servers. Even if new items are generated in the updated msm format, they need to be compatible with the older .txt format in legacy systems. For this reason, you may need to manually insert msm files that come with pack files into the proto.txt file.

msm files typically relate to uiscript and py root, containing visual interface data. However, these files are not directly processed within the server src layers such as db or game. Thus, data from the msm file must be converted into proto.txt format.

You need to open the msm file and extract each item's ID, name, level, classification, etc., then convert them into the proto.txt format either manually or via scripts. Knowledge of C++ will be highly beneficial here. In Python-based systems, scripts can be written using interfaces like Py GUI to simplify this conversion.

During the Metin2 compile stage, verify that the proto.txt file is read correctly. Otherwise, newly added items may not appear or behave incorrectly on the server. For this reason, ensure that the proto.txt file is identical across both auth and game servers during synchronization.

As Metin2 lobby users, being prepared for such technical issues is important. Especially in PvP system servers, incorrect addition of new items can lead to imbalances. Therefore, it is recommended that developers with knowledge of C++ system and Python system handle these operations.

In conclusion, adding current msm files to legacy proto.txt formats is a common occurrence in Metin2 private server development. A correctly configured proto.txt file ensures smooth operation of core systems. Therefore, being careful during the Metin2Dev process and testing both db and game layers separately is of great importance.
 

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

Geri
Üst Alt