- Katılım
- 6 Mayıs 2022
- Konular
- 48,291
- Mesajlar
- 48,601
- Tepkime puanı
- 75
- M2 Yaşı
- 3 yıl 11 ay 10 gün
- Trophy Puan
- 48
- M2 Yang
- 488,879
Eğer bir taşa (örneğin: Hız Taşı) daha fazla bonus (özellik) eklemek isterseniz, bunlar oyunda görüntülenmez.
Örneğin, Hız Taşı +4 üzerinde sadece Hareket Hızı değil, buna ek olarak 2 adet ekstra bonus daha eklemek istiyorsan
Sistem Başka Forumdan Alıntıdır İşine yaran olur arayan olur iyi kullanımlar....
Örneğin, Hız Taşı +4 üzerinde sadece Hareket Hızı değil, buna ek olarak 2 adet ekstra bonus daha eklemek istiyorsan
Sistem Başka Forumdan Alıntıdır İşine yaran olur arayan olur iyi kullanımlar....
- Saldırı hızı +30%
- Büyü hızı +20%
Gibi....
Metin2'de Taşlar Üzerinde Birden Fazla Efsun Gösterme Sorunu ve [FIX] Yöntemi
Metin2 özel sunucularında geliştirme yaparken karşılaşılan yaygın sorunlardan birisi, taşlar üzerinde birden fazla efsunun doğru şekilde gösterilmemesidir. Bu durum özellikle PvP sistemlerinde büyük bir dezavantaj oluşturabilir çünkü oyuncular efsun seviyesi veya türü hakkında eksik bilgi sahibi olurlar. Bu yazıda, Taşlar üzerinde birden fazla efsun gösterme sorununu ele alacak ve çözümü olan [FIX] yöntemini detaylı olarak açıklayacağız.
Sorun Nedir?
Metin2 sistemlerinde, oyuncular efsunları taşlara takarak karakterlerini güçlendirirler. Ancak bazı özel sunucularda, aynı taşa birden fazla efsun takıldığında sadece son efsunun bilgileri gösterilir. Bu durum, hem oyun içi deneyimi olumsuz etkiler hem de PvP dengelerini bozar. Oyuncuların sahip oldukları gerçek güçleri gizlenmiş olur ve bu da adil bir mücadele ortamı oluşturmada engel teşkil eder.
Çözüm İçin Gerekli Dosyalar
Bu hatayı düzeltmek için öncelikle aşağıdaki dosyalar üzerinde değişiklik yapmamız gerekmektedir:
Fix Uygulama Adımları
Öncelikle char_item.cpp dosyasında, efsun verilerinin işlendiiği fonksiyonu güncellememiz gerekir. Burada GetAttributeString() fonksiyonunun birden fazla efsun verisini döndürmesini sağlamalıyız. Ardından, istemci tarafında Py Root üzerinde yer alan uimodule.py dosyasında, tooltip verileri alınırken birden fazla efsunun işlenebilmesi için gerekli düzenlemeler yapılmalıdır. Son olarak, uiscript/tooltipwindow.py dosyasında, bu verilerin doğru şekilde kullanıcıya gösterilmesi sağlanmalıdır.
C++ ve Py Kaynak Kodlarında Yapılan Değişiklikler
Bu fix sırasında source edit işlemleri oldukça önemlidir. Özellikle game server programming bilgisi olmayan geliştiriciler için bu işlem karmaşık görünebilir. Ancak doğru şekilde uygulandığında, sistemde kalıcı ve stabil bir çözüm sağlar. Örnek olarak, game/src/char_item.cpp dosyasında şu satırlar eklenebilir:
Test ve Doğrulama
Fix uygulandıktan sonra, sunucu yeniden derlenmelidir. Derleme işlemi için compile araçları kullanılmalıdır. Ardından test sunucusunda birden fazla efsunlu taşlar takılarak tooltip verilerinin doğru şekilde gösterilip gösterilmediği kontrol edilmelidir. Eğer her şey doğruysa, oyuncular artık taşlar üzerindeki tüm efsunları görebileceklerdir.
Sonuç
Metin2 özel sunucularında taşlara takılan birden fazla efsunun doğru şekilde gösterilmesi, hem oyuncu deneyimini artırır hem de PvP dengelerini olumlu yönde etkiler. Bu fix, Metin2 development konusunda çalışan geliştiriciler için önemli bir adımdır ve core sistemlerin daha stabil çalışmasını sağlar.
Issue of Displaying Multiple Enchantments on Stones in Metin2 and the [FIX] Method
One of the common issues encountered while developing Metin2 private servers is that multiple enchantments on stones are not displayed correctly. This situation can create a significant disadvantage especially in PvP systems since players may lack accurate information about enchantment levels or types. In this article, we will address the issue of displaying multiple enchantments on stones and provide a detailed solution known as [FIX].
What is the Problem?
In Metin2 systems, players enhance their characters by attaching enchantments to stones. However, in some private servers, only the last enchantment's details are shown even when multiple enchantments are applied to the same stone. This affects in-game experience negatively and disrupts PvP balance. Players’ true power remains hidden, which hinders fair gameplay.
Required Files for the Solution
To fix this bug, we need to modify the following files:
Steps for Applying the Fix
Firstly, in the char_item.cpp file, we must update the function that processes enchantment data. Here, the GetAttributeString() function should return multiple enchantment data. Then, on the client side, in the uimodule.py file located under Py Root, necessary modifications must be made to handle multiple enchantments when retrieving tooltip data. Finally, in the uiscript/tooltipwindow.py file, ensure that this data is correctly displayed to the user.
Changes Made in C++ and Py Source Code
During this fix, source edit operations are crucial. For developers without game server programming experience, this might seem complex. However, when properly applied, it provides a permanent and stable solution within the system. As an example, the following lines can be added in the game/src/char_item.cpp file:
Testing and Validation
After applying the fix, the server must be recompiled. Compile tools should be used for this process. Then, multiple enchanted stones should be tested on a test server to verify if the tooltip data is displayed correctly. If everything works as expected, players will now see all enchantments on stones.
Conclusion
Correctly displaying multiple enchantments on stones in Metin2 private servers enhances player experience and positively impacts PvP balance. This fix is an important step for developers working in Metin2 development and ensures more stable operation of core systems.
- Büyü hızı +20%
Gibi....
Kod:
def AppendMetinInformation(self):
Kod:
def AppendMetinInformation(self): for i in xrange(item.ITEM_APPLY_MAX_NUM): (affectType, affectValue) = item.GetAffect(i) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self.AppendSpace(5) self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue))
Kod:
if custumAffectString2:
Kod:
if (not custumAffectString2) and (itemIndex != -1): custumAffectString2 = self.__GetAffectString(*item.GetAffect(1)) if custumAffectString3: affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() affectTextLine.SetText(custumAffectString3) self.childrenList.append(affectTextLine) self.toolTipHeight += 16 + 2 if (not custumAffectString3) and (itemIndex != -1): custumAffectString3 = self.__GetAffectString(*item.GetAffect(2))
Kod:
def __AppendMetinSlotInfo_AppendMetinSocketData
Kod:
custumAffectString3="",
Kod:
custumAffectString3="",
Metin2'de Taşlar Üzerinde Birden Fazla Efsun Gösterme Sorunu ve [FIX] Yöntemi
Metin2 özel sunucularında geliştirme yaparken karşılaşılan yaygın sorunlardan birisi, taşlar üzerinde birden fazla efsunun doğru şekilde gösterilmemesidir. Bu durum özellikle PvP sistemlerinde büyük bir dezavantaj oluşturabilir çünkü oyuncular efsun seviyesi veya türü hakkında eksik bilgi sahibi olurlar. Bu yazıda, Taşlar üzerinde birden fazla efsun gösterme sorununu ele alacak ve çözümü olan [FIX] yöntemini detaylı olarak açıklayacağız.
Sorun Nedir?
Metin2 sistemlerinde, oyuncular efsunları taşlara takarak karakterlerini güçlendirirler. Ancak bazı özel sunucularda, aynı taşa birden fazla efsun takıldığında sadece son efsunun bilgileri gösterilir. Bu durum, hem oyun içi deneyimi olumsuz etkiler hem de PvP dengelerini bozar. Oyuncuların sahip oldukları gerçek güçleri gizlenmiş olur ve bu da adil bir mücadele ortamı oluşturmada engel teşkil eder.
Çözüm İçin Gerekli Dosyalar
Bu hatayı düzeltmek için öncelikle aşağıdaki dosyalar üzerinde değişiklik yapmamız gerekmektedir:
- game/core/src/char_item.cpp
- client/root/uimodule.py
- uiscript/tooltipwindow.py
Fix Uygulama Adımları
Öncelikle char_item.cpp dosyasında, efsun verilerinin işlendiiği fonksiyonu güncellememiz gerekir. Burada GetAttributeString() fonksiyonunun birden fazla efsun verisini döndürmesini sağlamalıyız. Ardından, istemci tarafında Py Root üzerinde yer alan uimodule.py dosyasında, tooltip verileri alınırken birden fazla efsunun işlenebilmesi için gerekli düzenlemeler yapılmalıdır. Son olarak, uiscript/tooltipwindow.py dosyasında, bu verilerin doğru şekilde kullanıcıya gösterilmesi sağlanmalıdır.
C++ ve Py Kaynak Kodlarında Yapılan Değişiklikler
Bu fix sırasında source edit işlemleri oldukça önemlidir. Özellikle game server programming bilgisi olmayan geliştiriciler için bu işlem karmaşık görünebilir. Ancak doğru şekilde uygulandığında, sistemde kalıcı ve stabil bir çözüm sağlar. Örnek olarak, game/src/char_item.cpp dosyasında şu satırlar eklenebilir:
Kod:
if (pItem->GetAttributeCount() > 1) {[BR][/BR]for (int i = 0; i < pItem->GetAttributeCount(); ++i) {[BR][/BR]string += GetAttributeName(pItem->GetAttributeType(i)) + ': ' + pItem->GetAttributeValue(i);[BR][/BR]}[BR][/BR]}
Test ve Doğrulama
Fix uygulandıktan sonra, sunucu yeniden derlenmelidir. Derleme işlemi için compile araçları kullanılmalıdır. Ardından test sunucusunda birden fazla efsunlu taşlar takılarak tooltip verilerinin doğru şekilde gösterilip gösterilmediği kontrol edilmelidir. Eğer her şey doğruysa, oyuncular artık taşlar üzerindeki tüm efsunları görebileceklerdir.
Sonuç
Metin2 özel sunucularında taşlara takılan birden fazla efsunun doğru şekilde gösterilmesi, hem oyuncu deneyimini artırır hem de PvP dengelerini olumlu yönde etkiler. Bu fix, Metin2 development konusunda çalışan geliştiriciler için önemli bir adımdır ve core sistemlerin daha stabil çalışmasını sağlar.
Issue of Displaying Multiple Enchantments on Stones in Metin2 and the [FIX] Method
One of the common issues encountered while developing Metin2 private servers is that multiple enchantments on stones are not displayed correctly. This situation can create a significant disadvantage especially in PvP systems since players may lack accurate information about enchantment levels or types. In this article, we will address the issue of displaying multiple enchantments on stones and provide a detailed solution known as [FIX].
What is the Problem?
In Metin2 systems, players enhance their characters by attaching enchantments to stones. However, in some private servers, only the last enchantment's details are shown even when multiple enchantments are applied to the same stone. This affects in-game experience negatively and disrupts PvP balance. Players’ true power remains hidden, which hinders fair gameplay.
Required Files for the Solution
To fix this bug, we need to modify the following files:
- game/core/src/char_item.cpp
- client/root/uimodule.py
- uiscript/tooltipwindow.py
Steps for Applying the Fix
Firstly, in the char_item.cpp file, we must update the function that processes enchantment data. Here, the GetAttributeString() function should return multiple enchantment data. Then, on the client side, in the uimodule.py file located under Py Root, necessary modifications must be made to handle multiple enchantments when retrieving tooltip data. Finally, in the uiscript/tooltipwindow.py file, ensure that this data is correctly displayed to the user.
Changes Made in C++ and Py Source Code
During this fix, source edit operations are crucial. For developers without game server programming experience, this might seem complex. However, when properly applied, it provides a permanent and stable solution within the system. As an example, the following lines can be added in the game/src/char_item.cpp file:
Kod:
if (pItem->GetAttributeCount() > 1) {[BR][/BR]for (int i = 0; i < pItem->GetAttributeCount(); ++i) {[BR][/BR]string += GetAttributeName(pItem->GetAttributeType(i)) + ': ' + pItem->GetAttributeValue(i);[BR][/BR]}[BR][/BR]}
Testing and Validation
After applying the fix, the server must be recompiled. Compile tools should be used for this process. Then, multiple enchanted stones should be tested on a test server to verify if the tooltip data is displayed correctly. If everything works as expected, players will now see all enchantments on stones.
Conclusion
Correctly displaying multiple enchantments on stones in Metin2 private servers enhances player experience and positively impacts PvP balance. This fix is an important step for developers working in Metin2 development and ensures more stable operation of core systems.
