yapacağımız şeye gelecek olursak resimden bakarak anlayabilirsiniz. Yang yazısını kaldırmadığımızda Yang satırına yüksek yang miktarı eklediğimizde taşmalar meydana geliyordu bunu önlemek adına. yang yazısını kaldırmayı paylasıyorum.
root / localeinfo.py açılır ve en alta bu kod eklenir.
root / uiexchange.py açılır aratılır.
değiştirilir.
aratılır.
değiştirilir.
Üsttekini aratınca bulamayanlar bunları aratarak değiştirmeyi denesin !
arat
değiştir
arat
değiştir
Metin2 Özel Sunucularında Python ile Ticaret Sisteminde 'Yang' Yazısını Kaldırma Rehberi
Metin2 özel sunucu geliştirme sürecinde, oyuncuların ticaret ekranında görünen 'Yang' yazısını özelleştirmek veya tamamen kaldırmak isteyen geliştiriciler için bu rehber hazırlanmıştır. Bu işlem genellikle kullanıcı deneyimini artırmak, sunucuya özgü kişiselleştirme sağlamak veya farklı bir para birimi adı kullanmak amacıyla yapılır.
Python Script Yapısı ve Ticaret Arayüzü
Metin2 özel sunucularında arayüz ve oyun mantığı genellikle Python dili kullanılarak geliştirilen UI Script dosyaları üzerinden yönetilir. Ticaret penceresi de bu yapıya dahildir. Bu pencere genellikle uiscript.py veya benzeri bir dosya üzerinden tanımlanır. Ticaret sırasında Yang miktarı doğrudan bu arayüz üzerinden gösterilir. Bu nedenle, Yang yazısını kaldırmak veya değiştirmek için bu dosyalar üzerinde değişiklik yapılması gerekir.
UYARI: Bu tür değişiklikler sunucunuzun dengesini etkileyebileceğinden, önce yedek almanız önemlidir.
Adım Adım İşlem Rehberi
Öncelikle root dizininde yer alan exchangeDialog.py gibi dosyaları kontrol edin. Bu dosya, ticaret ekranını tanımlar. Burada Yang miktarının gösterildiği etiketi bulmanız gerekir. Genellikle bir TextLine veya EditLine nesnesi olarak tanımlıdır. Örneğin:
Buradaki 'Yang' ifadesini boş bırakabilir veya tamamen kaldırabilirsiniz. Eğer görünmesini istemiyorsanız şu şekilde değiştirin:
Alternatif Yöntem: Görsel Değişiklik
Bazı durumlarda, Yang yazısı doğrudan görsel bir eleman olarak atanmış olabilir. Bu durumda uiscript.py veya locale klasöründeki dil dosyalarında bu yazının yer aldığı kısmı düzenlemeniz gerekebilir. Bu dosyalar genellikle XML benzeri yapıdadır ve Yang kelimesinin yer aldığı satırları bulup düzenleyebilirsiniz.
Sunucu Tarafı ve DB Etkileşimi
Python dosyasındaki değişiklik sadece istemci tarafındadır. Sunucu tarafında Yang ile ilgili işlemler hâlâ aktif olabilir. Ancak bu, oyuncunun ekranda Yang yazısını görmesini engeller. Eğer sunucuda da farklı bir para birimi kullanmak isterseniz, bu durumda game core dosyalarında da değişiklik yapmanız gerekir. Bu konu daha ileri düzey C++ bilgisi gerektirir.
Test ve Uygulama
Değişikliklerinizi yaptıktan sonra test sunucunuzu başlatın ve bir karakterle giriş yaparak ticaret penceresini açın. Yang yazısının artık görünmediğini veya istediğiniz gibi değiştiğini gözlemleyin. Eğer bir hata oluşursa, logları kontrol edin.
Sonuç
Metin2 özel sunucularında Python kullanarak 'Yang' yazısını kaldırmak oldukça kolaydır. Sadece doğru dosyayı ve doğru etiketi bulmanız gerekir. Bu işlem, sunucunuzun markalaşması ve oyuncu deneyiminin artırılması açısından önemlidir.
Removing the 'Yang' Text in Trade System with Python on Metin2 Private Servers
In the process of developing Metin2 private servers, this guide is prepared for developers who wish to customize or completely remove the 'Yang' text displayed in the trade screen. This process is usually done to enhance user experience, provide server-specific customization, or use a different currency name.
Python Script Structure and Trade Interface
In Metin2 private servers, the interface and game logic are generally managed through UI Script files written in Python. The trade window is also part of this structure. It is typically defined via files like uiscript.py. The Yang amount during trading is directly displayed through this interface. Therefore, to remove or modify the Yang text, modifications must be made to these files.
WARNING: Since such modifications may affect your server's balance, it is important to take a backup first.
Step-by-Step Process Guide
First, check files like exchangeDialog.py located in the root directory. This file defines the trade screen. You need to locate the label where the Yang amount is displayed. Usually, it is defined as a TextLine or EditLine object. For example:
You can leave the 'Yang' text empty or remove it entirely. If you do not want it to appear, change it as follows:
Alternative Method: Visual Modification
In some cases, the Yang text might be assigned directly as a visual element. In such scenarios, you may need to adjust the parts containing this text in uiscript.py or language files within the locale folder. These files are often XML-like in structure, allowing you to find and edit lines containing the word 'Yang'.
Server-Side and DB Interaction
The changes in the Python file only affect the client-side. Server-side operations related to Yang may still be active. However, this prevents the player from seeing the Yang text on their screen. If you wish to use a different currency name on the server side as well, then modifications in the game core files will be required, which involves more advanced C++ knowledge.
Testing and Application
After making your modifications, launch your test server and log in with a character to open the trade window. Observe that the Yang text is no longer visible or has been changed as desired. If any errors occur, check the logs.
Conclusion
Removing the 'Yang' text using Python in Metin2 private servers is quite straightforward. You just need to locate the correct file and the correct label. This action is significant for branding your server and enhancing the player experience.
root / localeinfo.py açılır ve en alta bu kod eklenir.
Kod:
def NumberToMoneyString2(n) : if n <= 0 : return "0" return "%s" % ('.'.join([ i-3<0 and str(n)[:i] or str(n)[i-3:i] for i in range(len(str(n))%3, len(str(n))+1, 3) if i ]))
root / uiexchange.py açılır aratılır.
Kod:
self.OwnerMoney.SetText(localeInfo.NumberToMoneyString(str(exchange.GetElkFromSelf())))
değiştirilir.
Kod:
self.OwnerMoney.SetText(localeInfo.NumberToMoneyString2(str(exchange.GetElkFromSelf())))
aratılır.
Kod:
self.TargetMoney.SetText(localeInfo.NumberToMoneyString(str(exchange.GetElkFromTarget())))
değiştirilir.
Kod:
self.TargetMoney.SetText(localeInfo.NumberToMoneyString2(str(exchange.GetElkFromTarget())))
Üsttekini aratınca bulamayanlar bunları aratarak değiştirmeyi denesin !
arat
Kod:
self.OwnerMoney.SetText(str(exchange.GetElkFromSelf()))
değiştir
Kod:
self.OwnerMoney.SetText(localeInfo.NumberToMoneyString2(str(exchange.GetElkFromSelf())))
arat
Kod:
self.TargetMoney.SetText(str(exchange.GetElkFromTarget()))
değiştir
Kod:
self.TargetMoney.SetText(localeInfo.NumberToMoneyString2(str(exchange.GetElkFromTarget())))
Metin2 Özel Sunucularında Python ile Ticaret Sisteminde 'Yang' Yazısını Kaldırma Rehberi
Metin2 özel sunucu geliştirme sürecinde, oyuncuların ticaret ekranında görünen 'Yang' yazısını özelleştirmek veya tamamen kaldırmak isteyen geliştiriciler için bu rehber hazırlanmıştır. Bu işlem genellikle kullanıcı deneyimini artırmak, sunucuya özgü kişiselleştirme sağlamak veya farklı bir para birimi adı kullanmak amacıyla yapılır.
Python Script Yapısı ve Ticaret Arayüzü
Metin2 özel sunucularında arayüz ve oyun mantığı genellikle Python dili kullanılarak geliştirilen UI Script dosyaları üzerinden yönetilir. Ticaret penceresi de bu yapıya dahildir. Bu pencere genellikle uiscript.py veya benzeri bir dosya üzerinden tanımlanır. Ticaret sırasında Yang miktarı doğrudan bu arayüz üzerinden gösterilir. Bu nedenle, Yang yazısını kaldırmak veya değiştirmek için bu dosyalar üzerinde değişiklik yapılması gerekir.
UYARI: Bu tür değişiklikler sunucunuzun dengesini etkileyebileceğinden, önce yedek almanız önemlidir.
Adım Adım İşlem Rehberi
Öncelikle root dizininde yer alan exchangeDialog.py gibi dosyaları kontrol edin. Bu dosya, ticaret ekranını tanımlar. Burada Yang miktarının gösterildiği etiketi bulmanız gerekir. Genellikle bir TextLine veya EditLine nesnesi olarak tanımlıdır. Örneğin:
Kod:
[FONT=Courier New]self.yangText = ui.MakeTextLine(board, 'Yang', x, y)[/FONT]
Buradaki 'Yang' ifadesini boş bırakabilir veya tamamen kaldırabilirsiniz. Eğer görünmesini istemiyorsanız şu şekilde değiştirin:
Kod:
[FONT=Courier New]self.yangText = ui.MakeTextLine(board, '', x, y)[/FONT]
Alternatif Yöntem: Görsel Değişiklik
Bazı durumlarda, Yang yazısı doğrudan görsel bir eleman olarak atanmış olabilir. Bu durumda uiscript.py veya locale klasöründeki dil dosyalarında bu yazının yer aldığı kısmı düzenlemeniz gerekebilir. Bu dosyalar genellikle XML benzeri yapıdadır ve Yang kelimesinin yer aldığı satırları bulup düzenleyebilirsiniz.
Sunucu Tarafı ve DB Etkileşimi
Python dosyasındaki değişiklik sadece istemci tarafındadır. Sunucu tarafında Yang ile ilgili işlemler hâlâ aktif olabilir. Ancak bu, oyuncunun ekranda Yang yazısını görmesini engeller. Eğer sunucuda da farklı bir para birimi kullanmak isterseniz, bu durumda game core dosyalarında da değişiklik yapmanız gerekir. Bu konu daha ileri düzey C++ bilgisi gerektirir.
Test ve Uygulama
Değişikliklerinizi yaptıktan sonra test sunucunuzu başlatın ve bir karakterle giriş yaparak ticaret penceresini açın. Yang yazısının artık görünmediğini veya istediğiniz gibi değiştiğini gözlemleyin. Eğer bir hata oluşursa, logları kontrol edin.
Sonuç
Metin2 özel sunucularında Python kullanarak 'Yang' yazısını kaldırmak oldukça kolaydır. Sadece doğru dosyayı ve doğru etiketi bulmanız gerekir. Bu işlem, sunucunuzun markalaşması ve oyuncu deneyiminin artırılması açısından önemlidir.
Removing the 'Yang' Text in Trade System with Python on Metin2 Private Servers
In the process of developing Metin2 private servers, this guide is prepared for developers who wish to customize or completely remove the 'Yang' text displayed in the trade screen. This process is usually done to enhance user experience, provide server-specific customization, or use a different currency name.
Python Script Structure and Trade Interface
In Metin2 private servers, the interface and game logic are generally managed through UI Script files written in Python. The trade window is also part of this structure. It is typically defined via files like uiscript.py. The Yang amount during trading is directly displayed through this interface. Therefore, to remove or modify the Yang text, modifications must be made to these files.
WARNING: Since such modifications may affect your server's balance, it is important to take a backup first.
Step-by-Step Process Guide
First, check files like exchangeDialog.py located in the root directory. This file defines the trade screen. You need to locate the label where the Yang amount is displayed. Usually, it is defined as a TextLine or EditLine object. For example:
Kod:
[FONT=Courier New]self.yangText = ui.MakeTextLine(board, 'Yang', x, y)[/FONT]
You can leave the 'Yang' text empty or remove it entirely. If you do not want it to appear, change it as follows:
Kod:
[FONT=Courier New]self.yangText = ui.MakeTextLine(board, '', x, y)[/FONT]
Alternative Method: Visual Modification
In some cases, the Yang text might be assigned directly as a visual element. In such scenarios, you may need to adjust the parts containing this text in uiscript.py or language files within the locale folder. These files are often XML-like in structure, allowing you to find and edit lines containing the word 'Yang'.
Server-Side and DB Interaction
The changes in the Python file only affect the client-side. Server-side operations related to Yang may still be active. However, this prevents the player from seeing the Yang text on their screen. If you wish to use a different currency name on the server side as well, then modifications in the game core files will be required, which involves more advanced C++ knowledge.
Testing and Application
After making your modifications, launch your test server and log in with a character to open the trade window. Observe that the Yang text is no longer visible or has been changed as desired. If any errors occur, check the logs.
Conclusion
Removing the 'Yang' text using Python in Metin2 private servers is quite straightforward. You just need to locate the correct file and the correct label. This action is significant for branding your server and enhancing the player experience.
