belirli itemlerde nadirlik ikon

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
259986_0ceb1ade2a9c3ba4fa8d4420076012a1.png


uitooltip.py aç ve

<blockquote data-attributes="" data-quote="" data-source="" class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch">
Kod:
def __SetFeaturesToolTip(self, itemVnum):         image = ui.ImageBox()         image.SetParent(self)         image.Show()         self.main = {             "vnums" : [                 140, 150, 3130, 270, 12010, 12020, 12030, 12040, 480, 460, 470, 5120, 7120, 20250, 20750, 20000, 180, 190#(hangi itemlerden balataca縱n??ayarlayaca縱n? blok!)             ]         }         ######################################################################################################         # Example: vnums[480] = 480, 481, 482, 483, 484, 485, 486, 487, 488, 489 Daha Fazla Item ekleyebilirsiniz. (+0 dan +9a kadar olan b?? y?sek level itemlerde ileyecektir!)         for k in xrange(10):             for v in xrange(len(self.main["vnums"])):                 tokens, index, iterator = self.main["vnums"][v], str(itemVnum)[-1:], str(k)                 if ((tokens &lt;= itemVnum and itemVnum &lt;= tokens + 9) and (index == iterator)):                     image.LoadImage("icon/item/df2_tooltip/%d.tga" % (k))                     image.SetPosition(self.toolTipWidth/2 - 75, self.toolTipHeight)                     self.toolTipHeight += 18                     self.childrenList.append(image)                     self.ResizeToolTip()

son olarak burayı bulmak için aşağıdaki kodu arat

259988_c77acb5fe8aac26249f9c6bb92389d27.png


Kod:
self.__SetItemTitle(itemVnum, metinSlot, attrSlot)

altına ekle

Kod:
self.__SetFeaturesToolTip(itemVnum)



Metin2 Lobby olarak sunucu geliştiricileri için önemli bir konuya değiniyoruz: Belirli Itemlerde Nadirlik İkon. Bu sistem özellikle Metin2 özel sunucularında oyuncu deneyimini artırmak ve ödüllerin görünürlüğünü yükseltmek için kritik öneme sahiptir. Bu yazıda, C++ tabanlı sunucularda nasıl bir nadirlık ikon sistemi kurulabileceğini, hangi dosyaların düzenleneceğini ve bu sistemin oyuncu etkileşimine nasıl katkı sağladığını detaylıca ele alacağız.

Nadirlilik Sistemi Nedir?
Metin2 özel sunucularında bazı itemlerin değerli ya da nadir olması, onlara özel bir anlam katmaktadır. Bu nadir itemler genellikle PVP zaferleri, klan savaşları, özel etkinlikler veya zorlu boss avları ile kazanılır. Bu nedenle bu itemlerin görünümü ve tanınabilirliği önemlidir. Nadirlilik ikon sistemi sayesinde, oyuncular bu itemleri bir bakışta tanıyabilir. Bu da hem oyuncu motivasyonunu artırır hem de sunucu sadakatini güçlendirir.

C++ Sunucu Tarafında Nadirlik Sistemi Uygulaması
Metin2 özel sunucularında nadirlilik ikon sistemi genellikle client tarafında, yani oyun arayüzüne entegre edilir. Bunun için uiscript dosyalarında değişiklik yapılması gerekir. ItemWindow.py, InventoryWindow.py gibi arayüz dosyalarında, itemlere özel ikonlar tanımlanabilir. Bu ikonlar, itemin vnum numarasına göre dinamik olarak atanabilir.

Sunucu tarafında (game server), itemlere özel flag değerleri tanımlanabilir. Örneğin, bir itemin nadir olduğunu belirtmek için özel bir flag değeri atanabilir. Client tarafında bu flag kontrol edilerek uygun ikon gösterilir. Bu işlem için Python GUI bilgisi gerekebilir. PyRoot üzerinde geliştirilen arayüzlerde bu tür özelleştirmeler kolayca yapılabilir.

Örnek Kod Yapısı (PyRoot)
Bir itemin nadir olduğunu belirtmek için inventorySlot içinde iconName veya overlayImage gibi alanlara özel ikon atamaları yapılabilir. Örneğin:

- Eğer itemin vnum değeri belirli bir listeye eşitse
- OverlayImage olarak 'rare_icon.dds' gibi bir dosya yüklenir
- Bu sayede item üzerine gelindiğinde ya da envanterde durduğunda ikon görünür

Martysama ve Diğer Geliştirici Kaynakları
Metin2 geliştirme sürecinde Martysama gibi kaynaklar büyük kolaylık sağlar. C++ source düzenlemeleri, DB core yapılandırmaları, auth-server ve game-server senkronizasyonu gibi konularda örnekler sunar. Aynı zamanda source edit işlemlerinde dikkat edilmesi gereken güvenlik önlemleri de burada öğrenilebilir.

Olası Hatalar ve Çözümler
- Client crash: Yanlış icon formatı veya eksik dosya yolu nedeniyle crash oluşabilir. Dosya uzantılarının doğru olduğundan emin olun.
- Icon görünmüyor: Item slotuna eklenen overlay fonksiyonu kontrol edilmeli. Python GUI kodlarında eksiklik varsa ikon görünmez.
- Sunucu ile uyumsuzluk: Flag kontrolü sunucu ile uyumlu olmalı. Game server tarafında tanımlanan flag, client tarafında da aynı şekilde okunmalıdır.

Sonuç
Metin2 özel sunucularında belirli itemlerde nadirlik ikon sistemi oluşturmak, hem oyun deneyimini zenginleştirir hem de oyuncuların sunucuya olan bağlılığını artırır. C++ server tarafında doğru yapılandırma ve PyRoot üzerinden arayüz geliştirmeleri ile bu sistemler kolayca entegre edilebilir. Metin2Lobby.com olarak, bu gibi gelişmiş sistemlerin nasıl kurulacağını öğrenmek isteyen geliştiriciler için kaynaklar sunmaya devam ediyoruz.


Metin2 Lobby addresses an important topic for server developers: Rarity Icons for Specific Items. This system is critical especially in Metin2 private servers to enhance player experience and increase visibility of rewards. In this article, we will explain in detail how to set up a rarity icon system on C++ based servers, which files need modification, and how this system contributes to player engagement.

What is a Rarity System?
In Metin2 private servers, certain items are considered valuable or rare, giving them special meaning. These rare items are typically earned through PVP victories, clan wars, special events, or challenging boss hunts. Therefore, the appearance and recognition of these items is important. With the rarity icon system, players can identify these items at first glance. This increases both player motivation and server loyalty.

Implementing Rarity System on C++ Server Side
In Metin2 private servers, the rarity icon system is usually integrated into the client side, meaning into the game interface. For this, modifications must be made to uiscript files. Special icons can be defined for items in interface files such as ItemWindow.py and InventoryWindow.py. These icons can be dynamically assigned based on the item's vnum value.

On the server side (game server), special flag values can be assigned to items. For example, a specific flag value can indicate that an item is rare. On the client side, this flag is checked and the appropriate icon is displayed. This requires knowledge of Python GUI. Such customizations can easily be done on interfaces developed over PyRoot.

Sample Code Structure (PyRoot)
To mark an item as rare, special icon assignments can be made to fields like iconName or overlayImage within inventorySlot. For example:

- If the item's vnum matches a specific list
- Load 'rare_icon.dds' as OverlayImage
- This way, the icon appears when hovering over the item or while it is in the inventory

Martysama and Other Developer Resources
During the Metin2 development process, sources like Martysama provide great convenience. They offer examples on topics such as C++ source modifications, DB core configurations, auth-server and game-server synchronization. Additionally, security measures to consider during source edit operations can be learned here.

Potential Errors and Solutions
- Client crash: Crashes may occur due to incorrect icon formats or missing file paths. Ensure file extensions are correct.
- Icon not showing: Check the overlay function added to the item slot. If there is a missing part in the Python GUI code, the icon won't appear.
- Server incompatibility: Flag checks must be compatible with the server. The flag defined on the game server side must be read the same way on the client side.

Conclusion
Creating a rarity icon system for specific items in Metin2 private servers enriches the gaming experience and increases player attachment to the server. With proper configuration on the C++ server side and interface improvements via PyRoot, these systems can be easily integrated. As Metin2Lobby.com, we continue to provide resources for developers who want to learn how to set up such advanced systems.
 

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

Benzer konular

Geri
Üst Alt