common/length.h açılır ve aratılır
Alttaki Gibi Değiştirilir
Tekrar Aratılır
Alttaki Gibi Değiştirilir
game/shop.cpp açılır ve aratılır
Alttaki Gibi Değiştirilir
game/shop_manager.cpp açılır ve aratılır
Alttaki Gibi Değiştirilir
CLİENT
UserInterface/Packet.h Açılır ve Aratılır
Alttaki Gibi Değiştirilir
Pysi için AVEIRO Teşekkürler
İyi Forumlar [PEGASUS]
YARDIMCI OLUPDA YORUM ATMAYANA HARAM OLSUN
Metin2 Sunucularında NPC Slotlarını 40'a Düşürme Yöntemi
Neden NPC Slotları Önemlidir?
Metin2 özel sunucularında performans optimizasyonu yaparken karşılaşılan en popüler sorunlardan birisi NPC (Non-Player Character) slotlarının fazla olmasıdır. Varsayılan olarak çoğu Metin2 sunucusu 80 NPC slotuna sahiptir. Ancak bazı sunucuların hedefi daha az NPC ile daha stabil ve hızlı bir oyun deneyimi sunmaktır. Bu nedenle, bazı geliştiriciler NPC slot sayısını 40 gibi daha düşük bir değere çekmeyi tercih eder. Bu işlem, özellikle PVP sistemlerinde daha hızlı ve daha az gecikmeli bir oyun ortamı sağlamak için önemlidir.
NPC Slotlarını Değiştirmek Ne Sağlar?
NPC slotlarını düşürmek, sunucu üzerindeki yükü azaltarak daha az CPU tüketimi sağlar. Bu da sunucu cevap süresini düşürür ve daha fazla oyuncu alımına olanak tanır. Ayrıca, bazı Metin2 sunucularında yüksek NPC sayısı nedeniyle oyun içinde donmalar, FPS düşmeleri gibi sorunlar yaşanabiliyor. Bu sebeple, özellikle C++ kaynak kod üzerinde değişiklik yapabilen geliştiriciler, NPC slotlarını manuel olarak ayarlayabilir.
Nasıl Yapılır?
NPC slotlarını değiştirmek için öncelikle game server programming[/COORD] dosyalarına erişim gereklidir. Genellikle srcs (source) içinde bulunan game core kısmında tanımlanmıştır. Burada bulunan MAX_NPC_SLOTS adlı sabit değer, NPC slot sayısını belirler. Bu değeri 80'den 40'a çekmek için kodda şu değişikliği yapmalısınız:
Değiştirilecek Satır:
Yeni Hali:
Bu değişikliği yaptıktan sonra compile işlemini tekrar yapmanız gerekir. Metin2 compile işlemi sırasında hata alınırsa, derleme ortamınızda eksik kütüphane veya yapılandırma hatası olabilir. Derleme tamamlandıktan sonra yeni исполняемый файл ile sunucuyu yeniden başlatın.
Client Tarafında Ek Ayarlar Gerekebilir
NPC slot sayısının değiştirilmesi sadece sunucu tarafında değil, bazen client tarafında da bazı değişiklikler gerektirebilir. Özellikle client src dosyalarında NPC sayısıyla ilgili sınırlamalar varsa, bu da güncellenmelidir. Client tarafında da aynı şekilde MAX_NPC_SLOTS benzeri sabitler bulunabilir. Bu dosyalar genellikle uiscript veya py root klasörlerinde yer alabilir. Bu klasörlerdeki .py dosyalarında NPC ile ilgili sınırlamalar varsa, onlar da 40'a göre ayarlanmalıdır.
Paketleme ve Dağıtım[/COORD]
Yaptığınız değişikliklerden sonra, yeni derlenen sunucu dosyalarını pack etmeyi unutmayın. Oyuncuların doğru çalışması için hem sunucu hem de client tarafında uyumlu olması şarttır. Paketleme sırasında dikkat edilmesi gereken diğer bir konu, db core ve auth dosyalarının da doğru şekilde entegre edilmesidir. Aksi takdirde, oyuncular bağlanamayabilir veya sunucuda hatalar oluşabilir.
Sonuç
NPC slotlarını 80'den 40'a düşürmek, Metin2 özel sunucularında performans artışı sağlamanın etkili yollarından biridir. Bu işlem, C++ sistem bilgisi olan geliştiriciler tarafından kolayca yapılabilir. Ancak dikkatli bir şekilde hem sunucu hem de client tarafında değişiklikler yapılmalı ve test edilmelidir. Bu sayede, daha az kaynak tüketen ve daha hızlı çalışan bir Metin2 sunucusu elde edebilirsiniz.
How to Reduce NPC Slots from 80 to 40 in Metin2 Servers
Why Are NPC Slots Important?
One of the most common issues encountered during performance optimization in Metin2 private servers is the high number of NPC (Non-Player Character) slots. Most Metin2 servers come with 80 NPC slots by default. However, some server owners aim for a more stable and faster gameplay experience by reducing this number. Therefore, some developers prefer to lower the NPC slot count down to 40. This adjustment is especially important in PVP-focused environments where faster and less laggy gameplay is essential.
What Does Reducing NPC Slots Offer?
Reducing NPC slots decreases the load on the server, resulting in lower CPU usage. This also reduces server response times and allows the server to support more players simultaneously. Additionally, in some Metin2 servers, high NPC counts can cause freezing or FPS drops. That’s why developers skilled in C++ source code often manually adjust NPC limits to improve performance.
How to Do It?
To modify NPC slots, you first need access to the game server programming files. Usually located within the srcs (source) directory, the game core section defines these values. The constant named MAX_NPC_SLOTS determines the maximum number of NPCs. To change this value from 80 to 40, apply the following modification:
Original Line:
New Version:
After making this change, you must compile the project again. If any errors occur during the Metin2 compile process, it could be due to missing libraries or configuration errors. Once compilation is complete, restart your server with the newly generated executable file.
Additional Client-Side Adjustments May Be Required
Adjusting the NPC slot count may not only affect the server side but sometimes also requires modifications on the client side. Particularly in client src files, there might be limitations related to NPC counts that need updating. In such cases, constants similar to MAX_NPC_SLOTS must also be adjusted accordingly. These files are typically located in the uiscript or py root folders, and any Python files (.py) containing NPC-related restrictions should be updated to reflect the new limit of 40.
Packaging and Distribution
After making the necessary changes, don’t forget to pack your updated server files. For the game to function correctly, both the server and client sides must remain synchronized. Another important consideration during packaging is ensuring that db core and auth files are properly integrated. Otherwise, players may fail to connect or experience errors within the game.
Conclusion
Reducing NPC slots from 80 to 40 is one of the effective ways to enhance performance on Metin2 private servers. This task can be easily performed by developers familiar with C++ systems. However, careful adjustments must be made on both server and client sides and thoroughly tested. By doing so, you can achieve a Metin2 server that consumes fewer resources and runs faster.
Kod:
SHOP_HOST_ITEM_MAX_NUM = 80
Alttaki Gibi Değiştirilir
Kod:
SHOP_HOST_ITEM_MAX_NUM = 40
Tekrar Aratılır
Kod:
SHOP_PRICELIST_MAX_NUM = 80
Alttaki Gibi Değiştirilir
Kod:
SHOP_PRICELIST_MAX_NUM = 40
game/shop.cpp açılır ve aratılır
Kod:
m_pGrid = M2_NEW CGrid(10, 9)
Alttaki Gibi Değiştirilir
Kod:
m_pGrid = M2_NEW CGrid(5, 9)
game/shop_manager.cpp açılır ve aratılır
Kod:
CGrid grid = CGrid(10, 9)
Alttaki Gibi Değiştirilir
Kod:
CGrid grid = CGrid(5, 9)
CLİENT
UserInterface/Packet.h Açılır ve Aratılır
Kod:
SHOP_HOST_ITEM_MAX_NUM = 80
Alttaki Gibi Değiştirilir
Kod:
SHOP_HOST_ITEM_MAX_NUM = 40
Pysi için AVEIRO Teşekkürler
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
İyi Forumlar [PEGASUS]
YARDIMCI OLUPDA YORUM ATMAYANA HARAM OLSUN
Metin2 Sunucularında NPC Slotlarını 40'a Düşürme Yöntemi
Neden NPC Slotları Önemlidir?
Metin2 özel sunucularında performans optimizasyonu yaparken karşılaşılan en popüler sorunlardan birisi NPC (Non-Player Character) slotlarının fazla olmasıdır. Varsayılan olarak çoğu Metin2 sunucusu 80 NPC slotuna sahiptir. Ancak bazı sunucuların hedefi daha az NPC ile daha stabil ve hızlı bir oyun deneyimi sunmaktır. Bu nedenle, bazı geliştiriciler NPC slot sayısını 40 gibi daha düşük bir değere çekmeyi tercih eder. Bu işlem, özellikle PVP sistemlerinde daha hızlı ve daha az gecikmeli bir oyun ortamı sağlamak için önemlidir.
NPC Slotlarını Değiştirmek Ne Sağlar?
NPC slotlarını düşürmek, sunucu üzerindeki yükü azaltarak daha az CPU tüketimi sağlar. Bu da sunucu cevap süresini düşürür ve daha fazla oyuncu alımına olanak tanır. Ayrıca, bazı Metin2 sunucularında yüksek NPC sayısı nedeniyle oyun içinde donmalar, FPS düşmeleri gibi sorunlar yaşanabiliyor. Bu sebeple, özellikle C++ kaynak kod üzerinde değişiklik yapabilen geliştiriciler, NPC slotlarını manuel olarak ayarlayabilir.
Nasıl Yapılır?
NPC slotlarını değiştirmek için öncelikle game server programming[/COORD] dosyalarına erişim gereklidir. Genellikle srcs (source) içinde bulunan game core kısmında tanımlanmıştır. Burada bulunan MAX_NPC_SLOTS adlı sabit değer, NPC slot sayısını belirler. Bu değeri 80'den 40'a çekmek için kodda şu değişikliği yapmalısınız:
Değiştirilecek Satır:
Kod:
#define MAX_NPC_SLOTS 80
Yeni Hali:
Kod:
#define MAX_NPC_SLOTS 40
Bu değişikliği yaptıktan sonra compile işlemini tekrar yapmanız gerekir. Metin2 compile işlemi sırasında hata alınırsa, derleme ortamınızda eksik kütüphane veya yapılandırma hatası olabilir. Derleme tamamlandıktan sonra yeni исполняемый файл ile sunucuyu yeniden başlatın.
Client Tarafında Ek Ayarlar Gerekebilir
NPC slot sayısının değiştirilmesi sadece sunucu tarafında değil, bazen client tarafında da bazı değişiklikler gerektirebilir. Özellikle client src dosyalarında NPC sayısıyla ilgili sınırlamalar varsa, bu da güncellenmelidir. Client tarafında da aynı şekilde MAX_NPC_SLOTS benzeri sabitler bulunabilir. Bu dosyalar genellikle uiscript veya py root klasörlerinde yer alabilir. Bu klasörlerdeki .py dosyalarında NPC ile ilgili sınırlamalar varsa, onlar da 40'a göre ayarlanmalıdır.
Paketleme ve Dağıtım[/COORD]
Yaptığınız değişikliklerden sonra, yeni derlenen sunucu dosyalarını pack etmeyi unutmayın. Oyuncuların doğru çalışması için hem sunucu hem de client tarafında uyumlu olması şarttır. Paketleme sırasında dikkat edilmesi gereken diğer bir konu, db core ve auth dosyalarının da doğru şekilde entegre edilmesidir. Aksi takdirde, oyuncular bağlanamayabilir veya sunucuda hatalar oluşabilir.
Sonuç
NPC slotlarını 80'den 40'a düşürmek, Metin2 özel sunucularında performans artışı sağlamanın etkili yollarından biridir. Bu işlem, C++ sistem bilgisi olan geliştiriciler tarafından kolayca yapılabilir. Ancak dikkatli bir şekilde hem sunucu hem de client tarafında değişiklikler yapılmalı ve test edilmelidir. Bu sayede, daha az kaynak tüketen ve daha hızlı çalışan bir Metin2 sunucusu elde edebilirsiniz.
How to Reduce NPC Slots from 80 to 40 in Metin2 Servers
Why Are NPC Slots Important?
One of the most common issues encountered during performance optimization in Metin2 private servers is the high number of NPC (Non-Player Character) slots. Most Metin2 servers come with 80 NPC slots by default. However, some server owners aim for a more stable and faster gameplay experience by reducing this number. Therefore, some developers prefer to lower the NPC slot count down to 40. This adjustment is especially important in PVP-focused environments where faster and less laggy gameplay is essential.
What Does Reducing NPC Slots Offer?
Reducing NPC slots decreases the load on the server, resulting in lower CPU usage. This also reduces server response times and allows the server to support more players simultaneously. Additionally, in some Metin2 servers, high NPC counts can cause freezing or FPS drops. That’s why developers skilled in C++ source code often manually adjust NPC limits to improve performance.
How to Do It?
To modify NPC slots, you first need access to the game server programming files. Usually located within the srcs (source) directory, the game core section defines these values. The constant named MAX_NPC_SLOTS determines the maximum number of NPCs. To change this value from 80 to 40, apply the following modification:
Original Line:
Kod:
#define MAX_NPC_SLOTS 80
New Version:
Kod:
#define MAX_NPC_SLOTS 40
After making this change, you must compile the project again. If any errors occur during the Metin2 compile process, it could be due to missing libraries or configuration errors. Once compilation is complete, restart your server with the newly generated executable file.
Additional Client-Side Adjustments May Be Required
Adjusting the NPC slot count may not only affect the server side but sometimes also requires modifications on the client side. Particularly in client src files, there might be limitations related to NPC counts that need updating. In such cases, constants similar to MAX_NPC_SLOTS must also be adjusted accordingly. These files are typically located in the uiscript or py root folders, and any Python files (.py) containing NPC-related restrictions should be updated to reflect the new limit of 40.
Packaging and Distribution
After making the necessary changes, don’t forget to pack your updated server files. For the game to function correctly, both the server and client sides must remain synchronized. Another important consideration during packaging is ensuring that db core and auth files are properly integrated. Otherwise, players may fail to connect or experience errors within the game.
Conclusion
Reducing NPC slots from 80 to 40 is one of the effective ways to enhance performance on Metin2 private servers. This task can be easily performed by developers familiar with C++ systems. However, careful adjustments must be made on both server and client sides and thoroughly tested. By doing so, you can achieve a Metin2 server that consumes fewer resources and runs faster.
