Official Pet Sistemi Eksiklerini Tamamlama(TOPLU)

  • 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
Kaynak:
bkz.
[/FONT]
6.Madde Kaynak ( )
9.Madde Kaynak( )
Bunları yapmadan önce yaş fixini yapmalısınız.
bkz.

1.Pet Bilgilerini Official Yapmak:
Arat:

Kod:
pSummonItem->SetForceAttribute(4, 1, m_dwtduration);
Yaş Kısmının Altına Ekle(Aynı işlemi 3 kez yapın);
Kod:
pSummonItem->SetForceAttribute(6, 1, m_dwevolution);
root/uitooltip.py Açılır-Aratılır:
Kod:
if self.check_sigillo(itemVnum) or itemVnum == 55002:
Bu Şekilde Değiştirilir;
Kod:
if self.check_sigillo(itemVnum) or itemVnum == 55002:             if attrSlot[0][1] != 0:                 self.AppendSpace(2)                 blackyas = (int(attrSlot[5][1])/60)/24                 petevobl = (int(attrSlot[6][1]))                 self.AppendTextLine("Seviye: "+str(metinSlot[1]) + " (" + str(blackyas) + localeInfo.DAY + ")", self.NORMAL_COLOR)                 if (str(petevobl)) == "0":                     self.AppendTextLine(localeInfo.PET_TEXTT_7, self.NORMAL_COLOR)                 elif (str(petevobl)) == "1":                     self.AppendTextLine("Yabani", self.NORMAL_COLOR)                 elif (str(petevobl)) == "2":                     self.AppendTextLine("Cesur", self.NORMAL_COLOR)                 elif (str(petevobl)) == "3":                     self.AppendTextLine("Kahraman", self.NORMAL_COLOR)                 self.AppendSpace(2)                 self.AppendTextLine("Hp: +"+pointop(str(attrSlot[0][1]))+"%", self.SPECIAL_POSITIVE_COLOR)                 self.AppendTextLine("Defans: +"+pointop(str(attrSlot[1][1]))+"%", self.SPECIAL_POSITIVE_COLOR)                 self.AppendTextLine("Sp: +"+pointop(str(attrSlot[2][1]))+"%", self.SPECIAL_POSITIVE_COLOR)                 self.AppendSpace(5)                 if itemVnum != 55002:                     days = (int(attrSlot[3][1])/60)/24                     hours = (int(attrSlot[3][1]) - (days*60*24)) / 60                     mins = int(attrSlot[3][1]) - (days*60*24) - (hours*60)                     self.AppendTextLine(localeInfo.PET_TEXTT_1 % (days, hours, mins), self.SPECIAL_POSITIVE_COLOR)
locale/locale_game.txt'ye Eklenir;
Kod:
PET_TEXTT_1    Kalan süre: %d Gün %d Saat %d Dakika PET_TEXTT_7    Genç

2d63e24a7e.jpg

[FONT=&amp]2.Kahraman seviyesine yükselmek için en az 30 yaşında olmalı:
2d6bc4c468.jpg

New_PetSystem.cpp Açılır-Aratılır:
Kod:
int CNewPetSystem::GetExp(){     for (TNewPetActorMap::iterator iter = m_petActorMap.begin(); iter != m_petActorMap.end(); ++iter)     {         CNewPetActor* petActor = iter->second;         if (petActor != 0)         {             if (petActor->IsSummoned()) {                 return petActor->GetExp();             }         }     }     return 0; }
Altına Eklenir;
Kod:
int CNewPetSystem::GetYas()//for server {     for (TNewPetActorMap::iterator iter = m_petActorMap.begin(); iter != m_petActorMap.end(); ++iter)     {         CNewPetActor* petActor = iter->second;         if (petActor != 0)         {             if (petActor->IsSummoned())             {                 return petActor->GetPetYasi();//only CNewPetActor             }         }     }     return -1; }
New_PetSystem.h Açılır-Aratılır:
Kod:
DWORD            GetExpI() { return m_dwexpitem; }
Altına Eklenir;
Kod:
int             GetPetYasi() { return m_dwdurationYas/60/24; } //dakika->gun
Tekrar Aratılır:
Kod:
int            GetLevel();
Altına Eklenir;
Kod:
int            GetYas();
cmd_general.cpp Açılır-Aratılır:
Kod:
int tmpevo = ch->GetNewPetSystem()->GetEvolution();
Altına Eklenir;
Kod:
if (tmpevo == 2 && ch->GetNewPetSystem()->GetLevel() == 81 && ch->GetNewPetSystem()->GetYas() < 30)      {             ch->ChatPacket(CHAT_TYPE_INFO, "Petinizin yasi en az 30 gun olmali!");             return;         }
2d83f4873e.jpg
3.İtem-exp(nesne) %100 olsa bile item verilmeye devam ediyor:
New_PetSystem.cpp Açılır-Aratılır:

Kod:
else if(type == 3)
Bu Şekilde Değiştirilir;
Kod:
else if(type == 3)             {                 if(itemxp->GetType() == 1 || itemxp->GetType() == 2)                 {                     if (GetNextExpFromItem() - GetExpI() > 0)                     {                         SetExp(itemxp->GetShopBuyPrice() / 2, 1);                         ITEM_MANAGER::instance().RemoveItem(itemxp);                     }                     else                         m_pkOwner->ChatPacket(CHAT_TYPE_INFO, "Daha fazla item-exp veremezsiniz.");                 }             }
2d99f6480e.jpg
4.Pet Bilgileri tam olarak doğru değil onlar için düzenleme(Sıralaması ve kalan kısımları yanlış):
root/uipetsystem.py Açılır-Aratılır:

Kod:
self.tooltipexp[0].SetText
Alttakilerle Beraber Değiştirilir(Aynı işlemi 2 kez yapın);
Kod:
self.tooltipexp[0].SetText(localeInfo.PET_TEXTT_2 % expmp)         self.tooltipexp[1].SetText(localeInfo.PET_TEXTT_3 % (totexpm - expm, totexpm))         self.tooltipexp[2].SetText(localeInfo.PET_TEXTT_4 % expip)         self.tooltipexp[3].SetText(localeInfo.PET_TEXTT_5 % (totexpi - expi, totexpi))
locale/locale_game.txt'ye Eklenir;
Kod:
PET_TEXTT_2    Güncel tecrübe : %.2f%% PET_TEXTT_3    Kalan tecrübe : %d Olması gereken: %d PET_TEXTT_4    Güncel nesne : %.2f%% PET_TEXTT_5    Kalan nesne : %d Olması gereken %d
2f59beaef1.jpg
5.Mini-pet gui'deki exp gaugeleri veya skill gaugeleri ile pet iconu birbirine yaklaşmışsa bunu yapın:
uiscript/petminiinformationwindow.py açılır-aratılır:

Kod:
{             "name" : "mini_skill_slot0",             "type" : "slot",             "style" : ("attach",),             "x" : 36,             "y" : 25,             "width"    : 96,             "height" : 16,                       "x_scale" : SKILL_SLOT_SCALE_X,             "y_scale" : SKILL_SLOT_SCALE_Y,                       "image" : BASE_SLOT_FILE,             "slot" : ({"index":0, "x":-5, "y":0, "width":16, "height":16,},{"index":1, "x":58-36-5, "y":0, "width":16, "height":16,},{"index":2, "x":80-36-5, "y":0, "width":16, "height":16,},),         },
Bu Şekilde Değiştirilir;
Kod:
{             "name" : "mini_skill_slot0",             "type" : "slot",             "style" : ("attach",),             "x" : 0,             "y" : 0,             "width"    : 16,             "height" : 16,                       "x_scale" : SKILL_SLOT_SCALE_X,             "y_scale" : SKILL_SLOT_SCALE_Y,                       "image" : BASE_SLOT_FILE,             "slot" : ({"index":0, "x":36, "y":25, "width":16, "height":16,},{"index":1, "x":56, "y":25, "width":16, "height":16,},{"index":2, "x":76, "y":25, "width":16, "height":16,},),         },

2f6c526afb.jpg
6.Pet Kuluçkadan çıkarken isim için onay istiyor:
uipetincubatrice.py Açılır-İmportlara Eklenir;
Kod:
import uiCommon
Aratılır:
Kod:
def RequestHatching(self):
Sona Kadar Değiştirilir;
Kod:
def RequestHatching(self):        if self.petname.GetText() == "" or len(self.petname.GetText()) < 4:             chat.AppendChat(chat.CHAT_TYPE_INFO, "[Pet-Incubator] Il nome del pet non e' valido.")             return                  if player.GetElk() < 100000:             chat.AppendChat(chat.CHAT_TYPE_INFO, ""+str(localeInfo.NumberToMoneyString(100000)) +"yanga ihtiyacınız var.")             return         questionDialog = uiCommon.QuestionDialog()         questionDialog.SetText('Petine "'+self.petname.GetText()+'" ' + localeInfo.PET_TEXTT_8)         questionDialog.SetAcceptEvent(ui.__mem_func__(self  .evett))         questionDialog.SetCancelEvent(ui.__mem_func__(self  .hayirr))         questionDialog.Open()         self.questionDialog = questionDialog     def evett(self):         import chr         chr.RequestPetName(self.petname.GetText())         self.questionDialog.Close()         self.Close()     def hayirr(self):         self.questionDialog.Close()
locale/locale_game.txt'ye Eklenir;
Kod:
PET_TEXTT_8    adını vermek istiyor musun?
2fc49a80b2.jpg


7.Pet Skilleri'ni 81 level'de açabiliyorsun ama kod hatasından dolayı ancak 82'den itibaren skiller görünüyor(Skiller Mysql'de kayıtlı olsa bile gözükmüyor):
newpetstaff.quest Açılır-Aratılır:

Kod:
if newpet.getlevel() >= 80
Değiştirilir;
Kod:
if newpet.getlevel() >= 81
New_PetSystem.cpp Açılır-Aratılır(Summon içinde):
Kod:
if (GetLevel() > 81 && m_dwevolution == 3 )
Değiştirilir;
Kod:
if (GetLevel() >= 81 && m_dwevolution == 3 )
8.Pet Bilgilerinin Anında Güncellenmesi:
New_PetSystem.cpp Açılır-Aratılır:

Kod:
void CNewPetActor::UpdateTime()
Kod Bloğu Bu Şekilde Değiştirilir;
Kod:
void CNewPetActor::UpdateTime(){     m_dwTimePet += 1;     LPITEM pSummonItem = ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID());     if (pSummonItem != NULL)     {         pSummonItem->SetForceAttribute(3, 1, m_dwduration);         pSummonItem->SetForceAttribute(4, 1, m_dwtduration);         pSummonItem->SetForceAttribute(5, 1, m_dwdurationYas);         pSummonItem->SetForceAttribute(6, 1, m_dwevolution);         //lvl guncelleme         pSummonItem->SetSocket(1,m_dwlevel);     }     if (m_dwTimePet >= 60)     {         m_dwduration -= 1;         m_dwTimePet = 0;         m_dwdurationYas += 1;         m_pkOwner->ChatPacket(CHAT_TYPE_COMMAND, "PetDuration %d %d", m_dwduration, m_dwtduration);          m_pkOwner->ChatPacket(CHAT_TYPE_COMMAND, "PetDurationYas %d", m_dwdurationYas);      } }
9.Karışık Pet Skill Kitabı Veren Sandık(Pet Kitabı Sandığı):
char_item.cpp Açılır-Aratılır:

Kod:
if (-1 != iLimitRealtimeStartFirstUseFlagIndex)
Kod Bloğunun Üzerine Eklenir;
Kod:
if (item->GetVnum() == 55009)    {         int number1461 = number(55010,55027);//item kodları         AutoGiveItem(number1461);         item->SetCount(item->GetCount() - 1);     }
source.gif

Official Pet Sistemi Eksiklerini Tamamlama (TOPLU)

Metin2 özel sunucularında pet sistemleri, oyuncuların karakterlerini güçlendirmesi ve oyun içi deneyimi zenginleştirmesi açısından oldukça önemlidir. Ancak resmi olarak sunulan Official Pet sistemi bazı eksiklikler barındırabilir. Bu eksikliklerin giderilmesi, hem daha dengeli bir PvP ortamı hem de daha zengin bir oyun içi deneyim sunar. Bu makalede, Metin2 özel sunucu geliştiricileri için Official Pet sisteminde yer alan eksiklikleri topluca nasıl tamamlayabileceğinizi detaylı olarak ele alacağız.

Official Pet Sisteminin Temel Yapısı

Official Pet sistemi, Metin2 oyununda karakterlerin yanında yer alan ve savaşırken destek sağlayan sanal yaratıklardır. Bu sistem, genellikle C++ tabanlı server-side kodlamalarla entegre edilir. Ancak bazı durumlarda, petlerin AI yapısı, güçleri veya bonus sistemleri yeterince gelişmiş olmayabilir. Özellikle PvP sunucularında bu eksiklikler dikkat çekmektedir.

Pet AI Zayıflıkları

Bazı sunucularda petler, karakterin sahip olduğu düşmanları otomatik olarak hedeflemekte zorlanabilir. Bu durum, özellikle yoğun PvP anlarında ciddi dezavantajlar doğurur. Pet AI sistemlerinin geliştirilmesi için C++ kaynak kodlarda değişiklik yapılması gerekir. Bu değişiklikler, petlerin hedef alma mekanizmasını, saldırı menzillerini ve savunma davranışlarını kapsar.

Pet Bonus Eksiklikleri

Official sistemde petlerin sağladığı bonuslar bazen sınırlı kalabiliyor. Örneğin, pet seviyesi yükseldikçe bonuslar artmıyor ya da bazı bonuslar sadece belirli pet türlerinde aktif olabiliyor. Bu durum, oyuncuların pet sisteminden yeterince faydalanamamasına neden olur. Bu eksiklikleri gidermek için Python GUI veya Uiscript üzerinde düzenlemeler yapılabilir. Ayrıca py root dosyalarında bonus sistemleri genişletilebilir.

Pet Yetenek Sistemleri

Yetenek sistemleri, petlerin daha stratejik kullanımına olanak tanır. Ancak Official Pet sisteminde bu sistemler yetersiz olabilir. Oyuncuların petlerine yetenek noktaları atayabilmesi ve bu sayede petlerin攻击力, savunması veya hızı gibi özelliklerini geliştirebilmesi sağlanmalıdır. Bu işlem için game side kaynak kodlarında gerekli fonksiyonların yazılması gerekir.

Pet Gelişim Sistemleri

Petlerin gelişim sistemleri, oyuncuların uzun vadeli hedefler koymasını sağlar. Ancak bazı sunucularda bu sistemler yeterince detaylı değildir. Petlerin evrilmesi, farklı formlar alması ve seviye atlama mekanizmaları geliştirilmelidir. Bu sistemlerin doğru şekilde implement edilmesi için DB tarafında yeni tablolar oluşturulabilir. Auth ve game sunucuları arasında uyumlu veri aktarımı sağlanmalıdır.

C++ Kaynak Kodlarında Gerekli Değişiklikler

Official Pet sistemini tamamlamak için C++ server-side kaynak kodlarda bazı değişiklikler yapılmalıdır. Özellikle pet AI, bonus sistemleri ve PvP destek mekanizmaları için yeni fonksiyonlar yazılabilir. Bu değişiklikler sırasında server compile işlemleri dikkatli yapılmalıdır. Compile hatalarının önüne geçmek için test sunucularında adım adım kontrol edilmelidir.

Python GUI ve Py Root Entegrasyonları

Python GUI arayüzleri sayesinde, pet sistemleri daha kullanıcı dostu hale getirilebilir. Py root dosyalarında yapılan düzenlemelerle, petlerin UI üzerinde daha detaylı gösterimi sağlanabilir. Oyuncular, petlerinin bonuslarını, seviyelerini ve özelliklerini daha rahat takip edebilirler.

Sonuç

Official Pet sisteminde yer alan eksikliklerin toplu olarak tamamlanması, Metin2 özel sunucularında oyun deneyiminin ciddi anlamda artırılmasını sağlar. Bu süreçte C++, Python ve DB tarafında yapılacak geliştirmeler, hem oyuncular hem de sunucu geliştiricileri için büyük avantajlar sunar. MartySama gibi kaynaklar üzerinden örnek sistemler incelenebilir ve kendi sunucularınıza uyarlanabilir.


Completing Missing Parts of the Official Pet System (Collective)

In Metin2 private servers, pet systems are crucial for enhancing character strength and enriching the gameplay experience. However, the officially provided Official Pet system may have certain shortcomings. Addressing these deficiencies can create a more balanced PvP environment and improve the overall gaming experience. In this article, we will detail how to collectively address missing parts of the Official Pet system for Metin2 private server developers.

Basic Structure of the Official Pet System

The Official Pet system in Metin2 refers to virtual creatures that accompany characters and provide support during combat. This system is typically integrated through C++ based server-side coding. However, in some cases, the AI behavior, power values, or bonus systems of pets may not be sufficiently developed. Especially on PvP-focused servers, such shortcomings become noticeable.

Weaknesses in Pet AI

In some servers, pets struggle to automatically target enemies that the character faces. Such issues cause significant disadvantages during intense PvP moments. To improve pet AI systems, modifications are needed in the C++ source code. These changes involve the targeting mechanisms, attack ranges, and defensive behaviors of pets.

Pet Bonus Deficiencies

In the official system, bonuses provided by pets may sometimes be limited. For example, bonuses might not increase with pet levels or could only activate for specific pet types. This prevents players from fully benefiting from the pet system. To resolve these issues, adjustments can be made using Python GUI or Uiscript. Moreover, bonus systems can be expanded within py root files.

Pet Skill Systems

Skill systems allow for more strategic use of pets. However, in the Official Pet system, these systems might be insufficient. Players should be able to assign skill points to their pets and thereby enhance attributes like attack, defense, or speed. Implementing this requires writing necessary functions in the game-side source code.

Pet Development Systems

Development systems encourage long-term goals among players. However, on some servers, these systems lack sufficient depth. Pets should be able to evolve, take on different forms, and advance levels. Proper implementation requires creating new tables in the database. Data transmission between auth and game servers must remain consistent.

Required Changes in C++ Source Code

To complete the Official Pet system, modifications in the C++ server-side source code are necessary. Particularly, new functions for pet AI, bonus systems, and PvP support mechanisms need to be written. During compilation, errors must be avoided by testing step-by-step on test servers.

Integration with Python GUI and Py Root

Through Python GUI interfaces, pet systems can become more user-friendly. Modifications in py root files allow more detailed display of pets in the UI. Players can easily monitor their pets’ bonuses, levels, and attributes.

Conclusion

Collectively addressing the missing components of the Official Pet system significantly enhances the gaming experience on Metin2 private servers. Improvements made in C++, Python, and database aspects offer substantial advantages for both players and server developers. Examples from resources like MartySama can be studied and adapted to your own servers.​
 

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

Benzer konular

Geri
Üst Alt