[PY/Client SRC] Şebnem ve Diğer Affectler Sol Üstte Gözüksün!

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
ismail-yk-lahmacun.gif

Selamlar,

O kadar çok kaynak gezdim ki, tam olarak istediğimi bulamadım.
Ya sadece item iconu ya da itemin de iconunu değiştirip bambaşka hale sokan içerikler vardı.
Bir konu içerisinde hem şebnemi hem de diğer affectleri de game src kullanmadan veremiyorduk zaten.
Ben de başka bir yerden bir kaynak buldum, başka bir kaynağı da dahil ettim ve şu an ki haline getirdim.


Anlatıma geçiyorum ;

CLIENT SRC TARAFI

1@ ClientSource/UserInterface/InstanceBase.h:


Kod:
NEW_AFFECT_AUTO_HP_RECOVERY        = 534,

Altına Ekle
Kod:
NEW_AFFECT_BLEND = 531,

2@ ClientSource/UserInterface/PythonCharacterModule.cpp:


En sonuna gel }'dan önce bunu ekle

Kod:
PyModule_AddIntConstant(poModule, "NEW_AFFECT_BLEND", CInstanceBase::NEW_AFFECT_BLEND);

3@ ClientSource/UserInterface/PythonPlayerModule.cpp:
En sonuna gel }'dan önce bunu ekle
Kod:
PyModule_AddIntConstant(poModule, "RESIST_MAGIC",    POINT_RESIST_MAGIC);

PACK (ROOT) TARAFI

root/constInfo.py:
Herhangi bir yerine ekle
Kod:
ENABLE_POTIONS_AFFECTSHOWER = 1 ## 0=Disable / 1=Enable
root/uiAffectShower.py:

En başa ekle
Kod:
import constInfo
root/uiAffectShower.py:
Arat

Kod:
MALL_DESC_IDX_START = 1000

Altına Ekle

Kod:
if constInfo.ENABLE_POTIONS_AFFECTSHOWER:         ## As long the values arent reserved         WATER_DESC_IDX_START = 1100         DEW_DESC_IDX_START = 1200

Arat

Kod:
chr.NEW_AFFECT_DRAGON_SOUL_DECK2: (localeInfo.TOOLTIP_DRAGON_SOUL_DECK2, "d:/ymir work/ui/dragonsoul/buff_ds_land1.tga",),

Altına Ekle

Kod:
if constInfo.ENABLE_POTIONS_AFFECTSHOWER:         AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.POINT_PENETRATE_PCT] = (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT,     "icon/item/50813.tga")         AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.POINT_CRITICAL_PCT] = (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT,     "icon/item/50814.tga")         AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.ATT_BONUS] = (localeInfo.TOOLTIP_ATT_GRADE,             "icon/item/50817.tga")         AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.DEF_BONUS] = (localeInfo.TOOLTIP_DEF_GRADE,             "icon/item/50818.tga")         AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.RESIST_MAGIC] = (localeInfo.TOOLTIP_MAGIC_DEF_GRADE,         "icon/item/50819.tga")         AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.ATT_SPEED] = (localeInfo.TOOLTIP_ATT_SPEED,             "icon/item/50820.tga")         AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.POINT_CRITICAL_PCT] = (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT,     "icon/item/50821.tga")         AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.POINT_PENETRATE_PCT] = (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT,     "icon/item/50822.tga")         AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ATT_SPEED] = (localeInfo.TOOLTIP_ATT_SPEED,             "icon/item/50823.tga")         AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.RESIST_MAGIC] = (localeInfo.TOOLTIP_RESIST_MAGIC,             "icon/item/50824.tga")         AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ATT_BONUS] = (localeInfo.TOOLTIP_ATT_GRADE,             "icon/item/50825.tga")         AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.DEF_BONUS] = (localeInfo.TOOLTIP_DEF_GRADE,             "icon/item/50826.tga")         AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ENERGY] = (localeInfo.TOOLTIP_ENERGY,              "icon/item/51002.tga")

Arat (2 Kez)

Kod:
if type == chr.NEW_AFFECT_MALL:             affect = self.MALL_DESC_IDX_START + pointIdx
Ekle

Kod:
elif constInfo.ENABLE_POTIONS_AFFECTSHOWER and type == chr.NEW_AFFECT_EXP_BONUS_EURO_FREE:             affect = self.WATER_DESC_IDX_START + pointIdx         elif constInfo.ENABLE_POTIONS_AFFECTSHOWER and type == chr.NEW_AFFECT_BLEND:             affect = self.DEW_DESC_IDX_START + pointIdx

Metin2 Client Kaynağında Şebnem ve Diğer Affect Efektlerini Sol Üstte Gösterme Rehberi

Metin2 özel sunucularında oyun deneyimini artırmak adına birçok geliştirici, kullanıcı arayüzünü özelleştirerek daha etkileyici efektler eklemeyi tercih eder. Bu efektlerden birisi de Şebnem efekti olarak bilinen özel affect görselleridir. Ancak bu efektler varsayılan olarak sağ alt köşede yer alır. Bu rehberde, [PY/Client SRC] üzerinde çalışırken Şebnem ve diğer affect efektlerinin sol üst köşede gözükmesini nasıl sağlayacağınızı adım adım anlatacağız.

Neden Sol Üst Köşeye Gözükmesini İstiyoruz?
Metin2 özel sunucularında PvP odaklı oynanan sunucularda, oyuncuların hızlı hareket etmesi, rakibin zayıf yönlerini fark etmesi ve etkili yetenekleri zamanında kullanması büyük önem taşır. Sağ alt köşedeki affect efektleri bazen dikkat dağıtabilir veya fark edilmeyebilir. Bu nedenle, efektlerin sol üst köşede gözükmesi, oyuncuların daha rahat takip edebilmesini sağlar.

Gerekli Dosyalar ve Konumları
Öncelikle, affectsistem.py dosyasının konumunu bilmek gerekir. Bu dosya genellikle root klasöründe yer alır. Yani: root/affectsistem.py gibi. Eğer bu dosya yoksa, py files veya client_src paketlerinde bulunabilir. Bu dosyada yer alan __init__() fonksiyonu ve OnUpdate() fonksiyonları incelenmelidir.

Değişiklik Yapma Adımları
1. affectsistem.py dosyasını açın.
2. Affect efektlerinin ekrana çizildiği satırları bulun. Genellikle bir python UI sınıfı tarafından yönetilir.
3. Buradaki position değerlerini değiştirerek efektlerin konumunu sol üst köşeye çekin. Örneğin:
oldX = self.GetWidth() - 100
newX = 10
4. Benzer şekilde Y koordinatı da ayarlanmalıdır. Örneğin:
oldY = self.GetHeight() - 150
newY = 10

Python GUI ve Uiscript Üzerinde Değişiklik
Metin2 client kaynak kodlarında UI düzenlemeleri genellikle uiscript dosyaları ile yapılır. Eğer affectsistem.py dosyasında yapılan değişiklik yeterli olmazsa, ilgili uiscript dosyası üzerinden de konum ayarı yapılabilir. wndAffects.py gibi dosyalarda da benzer konum tanımlamaları bulunabilir. Bu dosyalarda da SetPosition(x, y) gibi fonksiyonlarla yeni konum belirlenebilir.

Paket ve Script Yapılandırması
Değişikliklerin doğru bir şekilde uygulanabilmesi için pack yapısı ve py root klasörlerinin senkronize olması gerekir. Özellikle martysama tabanlı sistemlerde, bazı sınıflar farklı isimler altında saklanabilir. Bu durumda, doğru sınıfın değiştirilmesi gerekir. Py Root dosyaları genellikle client tarafında çalıştığı için, yapılan değişikliklerin derlenip test edilmesi önerilir.

Hata Ayıklama ve Test
Değişiklikler yapıldıktan sonra, client yeniden başlatılmalı ve affect efektlerinin yeni konumda düzgün çalışıp çalışmadığı test edilmelidir. Hatalar varsa, log dosyaları kontrol edilmeli ve gerekirse Python hatası olup olmadığı incelenmelidir. Metin2 compile işlemi gerektirebilir. Ayrıca, auth server ile game server uyumu da önemlidir. Affect efektlerinin sunucudan doğru şekilde gönderilip gönderilmediği de kontrol edilmelidir.

Sonuç
Metin2 özel sunucularında kullanıcı dostu ve etkileyici bir arayüz oluşturmak için birçok küçük ama etkili değişiklik yapılabilir. Bu rehber sayesinde, affectsistem.py üzerinde yapılan küçük değişikliklerle, Şebnem ve diğer affect efektlerinin sol üstte gözükmesi sağlanabilir. Bu, özellikle PvP odaklı sunucularda oyuncuların reflekslerini artıracak küçük bir ama faydalı bir iyileştirmedir.


Displaying Sebnem and Other Affects in Top Left Corner on Metin2 Client Source

In Metin2 private servers, many developers customize the user interface to add more impressive effects to enhance the gaming experience. One of these effects is the special affect visuals known as Sebnem. However, these effects are by default located at the bottom right corner. In this guide, we will explain step-by-step how to make Sebnem and other affect effects appear in the top left corner when working with [PY/Client SRC].

Why Do We Want Them in the Top Left?
In Metin2 private servers, especially in PvP-focused gameplay, it's crucial for players to move quickly, spot weak points of their opponents, and use skills effectively at the right time. The affects displayed at the bottom right may sometimes be distracting or go unnoticed. Therefore, having these effects appear in the top left corner allows players to track them more easily.

Required Files and Their Locations
Firstly, you need to know the location of the affectsistem.py file. This file is usually located inside the root folder. For example: root/affectsistem.py. If this file does not exist, it might be located within py files or client_src packages. The __init__() function and the OnUpdate() functions within this file should be examined.

Steps for Making Changes
1. Open the affectsistem.py file.
2. Find the lines where affect effects are drawn onto the screen. Usually managed by a python UI class.
3. Change the position values to relocate the effects to the top left corner. For example:
oldX = self.GetWidth() - 100
newX = 10
4. Similarly, adjust the Y coordinate. Example:
oldY = self.GetHeight() - 150
newY = 10

Modifications on Python GUI and Uiscript
UI modifications in Metin2 client sources are typically done through uiscript files. If changes made in affectsistem.py are not sufficient, the corresponding uiscript file can also be used to adjust positions. Files like wndAffects.py may contain similar position definitions. Here, a new position can be set using functions such as SetPosition(x, y).

Package and Script Configuration
To ensure changes are properly applied, the pack structure and py root folders must be synchronized. Especially in martysama-based systems, some classes may be stored under different names. In such cases, the correct class must be modified. Since Py Root files operate on the client side, it’s recommended to compile and test the changes after making them.

Debugging and Testing
After applying changes, the client should be restarted to verify if the affect effects are correctly displayed in the new position. If errors occur, check the log files and investigate whether there are any Python errors. Metin2 compile process might be required. Additionally, compatibility between auth server and game server is important. It should be verified that the affect effects are being sent from the server correctly.

Conclusion
Many small but effective modifications can be made in Metin2 private servers to create a user-friendly and engaging interface. Thanks to this guide, minor adjustments in affectsistem.py allow Sebnem and other affect effects to appear in the top left. This is a small but beneficial improvement that enhances player reflexes, especially in PvP-focused servers.
 

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

Benzer konular

Geri
Üst Alt