Duyguları Harekete Geçirirken Silah Gizleme

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

Admin

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


Kod:
/// 1. // Add: #define __EMOTION_HIDE_WEAPON__

oyun/char.cpp
Kod:
/// 1. // Search @ CHARACTER::Initialize     memset(&m_tvLastSyncTime, 0, sizeof(m_tvLastSyncTime));     m_iSyncHackCount = 0; // Add below #ifdef __EMOTION_HIDE_WEAPON__     m_pkEmotionEvent = NULL; #endif /// 2. // Search @ CHARACTER::Destroy     StopHackShieldCheckCycle(); // Add above #ifdef __EMOTION_HIDE_WEAPON__     event_cancel(&m_pkEmotionEvent); #endif /// 3. // Search @ CHARACTER::OnMove     // MINING     mining_cancel();     // END_OF_MINING // Add below #ifdef __EMOTION_HIDE_WEAPON__     CancelEmotion(); #endif /// 4. // Add to the very bottom of the document #ifdef __EMOTION_HIDE_WEAPON__ void CHARACTER::CancelEmotion() {     if (m_pkEmotionEvent)     {         event_cancel(&m_pkEmotionEvent);         RefreshWeapon(this);     } } void CHARACTER::RefreshWeapon(LPCHARACTER ch) {     if (!ch->IsPC())         return;     const CItem* pWeapon = ch->GetWear(WEAR_WEAPON);     DWORD toSetValue = (NULL != pWeapon) ? pWeapon->GetVnum() : ch->GetOriginalPart(PART_WEAPON); #ifdef __CHANGE_LOOK_SYSTEM__     if (pWeapon)         toSetValue = pWeapon->GetTransmutation() != 0 ? pWeapon->GetTransmutation() : pWeapon->GetVnum(); #endif #ifdef __WEAPON_COSTUME_SYSTEM__     const CItem* pWeaponCostume = ch->GetWear(WEAR_COSTUME_WEAPON);     if (0 != ch->GetWear(WEAR_COSTUME_WEAPON))         toSetValue = (NULL != pWeaponCostume) ? pWeaponCostume->GetVnum() : ch->GetOriginalPart(PART_WEAPON); #endif

oyun/karakter.h
Kod:
/// 1. // Search         // MINING         void            mining(LPCHARACTER chLoad);         void            mining_cancel();         void            mining_take();         // END_OF_MINING // Add below #ifdef __EMOTION_HIDE_WEAPON__         void            CancelEmotion();         void            RefreshWeapon(LPCHARACTER ch); #endif /// 2. // Search         LPEVENT                m_pkPetSystemUpdateEvent; // Add below #ifdef __EMOTION_HIDE_WEAPON__         LPEVENT                m_pkEmotionEvent; #endif

oyun/cmd_emotion.cpp
Kod:
/* emotion_types[*] = {     { "키스",    "french_kiss",    NEED_PC | OTHER_SEX_ONLY | BOTH_DISARM,    4.000000f    },     { "뽀뽀",    "kiss",    NEED_PC | OTHER_SEX_ONLY | BOTH_DISARM,    1.5f    },     { "따귀",    "slap",    NEED_PC | SELF_DISARM,    2.0f    },     { "박수",    "clap",    0,    2.66667f    },     { "와",    "cheer1",    0,    2.33333f    },     { "만세",    "cheer2",    0,    2.33333f    },     // DANCE     { "댄스1",    "dance1",    0,    28.3333f    },     { "댄스2",    "dance2",    0,    4.76667f    },     { "댄스3",    "dance3",    0,    27.3333f    },     { "댄스4",    "dance4",    0,    30.3333f    },     { "댄스5",    "dance5",    0,    21.1f    },     { "댄스6",    "dance6",    0,    30.433332f    },     // END_OF_DANCE     { "축하",    "congratulation",    0,    6.33333f    },     { "용서",    "forgive",    0,    8.33333f    },     { "화남",    "angry",    0,    4.33333f    },     { "유혹",    "attractive",    0,    4.83333f    },     { "슬픔",    "sad",    0,    7.33333f    },     { "브끄",    "shy",    0,    4.66667f    },     { "응원",    "cheerup",    0,    5.0f    },     { "질투",    "banter",    0,    7.0f    },     { "기쁨",    "joy",    0,    5.33333f    }, */ /// 1. // Search #define NEED_TARGET    (1 << 0) // Add above #ifdef __EMOTION_HIDE_WEAPON__     #include "item.h" #endif /// 2. // Search ACMD(do_emotion) // Add above #ifdef __EMOTION_HIDE_WEAPON__ EVENTINFO(EmotionEventInfo) {     LPCHARACTER me;     LPCHARACTER target;     EmotionEventInfo()     : me(0)     , target(0)     {     } }; EVENTFUNC(EmotionEvent) {     EmotionEventInfo * info = dynamic_cast<EmotionEventInfo*>(event->info);     if (info == NULL)     {         sys_err("EmotionEventInfo> <Factor> Null pointer");         return 0;     }     LPCHARACTER me = info->me;     LPCHARACTER target = info->target;     if (me) me->RefreshWeapon(me);     if (target) target->RefreshWeapon(target);     return 0; } #endif /// 3. // Search             s_emotion_set.insert(std::make_pair(ch->GetVID(), victim->GetVID()));         }     } // Add above #ifdef __EMOTION_HIDE_WEAPON__             EmotionEventInfo * info = AllocEventInfo<EmotionEventInfo>();             info->target = victim;             victim->SetPart(PART_WEAPON, 0);             victim->UpdatePacket();             victim->m_pkEmotionEvent = event_create(EmotionEvent, info, PASSES_PER_SEC(emotion_types[i].extra_delay)); #endif /// 4. // Search     TPacketGCChat pack_chat;     pack_chat.header = HEADER_GC_CHAT;     pack_chat.size = sizeof(TPacketGCChat) + len;     pack_chat.type = CHAT_TYPE_COMMAND;     pack_chat.id = 0;     TEMP_BUFFER buf;     buf.write(&pack_chat, sizeof(TPacketGCChat));     buf.write(chatbuf, len); // Add above #ifdef __EMOTION_HIDE_WEAPON__     EmotionEventInfo * info = AllocEventInfo<EmotionEventInfo>();     info->me = ch;     ch->SetPart(PART_WEAPON, 0);     ch->UpdatePacket();     ch->m_pkEmotionEvent = event_create(EmotionEvent, info, PASSES_PER_SEC(emotion_types[i].extra_delay)); #endif

Metin2 Lobby olarak sunucu geliştirme dünyasında yerimizi alırken, oyuncuların deneyimini şekillendiren en önemli unsurlardan biri de duygusal etkileşimlerdir. Bu bağlamda duyguları harekete geçirirken silah gizleme sistemi, oyuncuların savaş sırasında daha gerçekçi ve stratejik bir atmosfer yaşamasını sağlar. Bu yazıda, Metin2 özel sunucularında silah gizleme mekanizmasının nasıl çalıştığını ve duygusal oyun deneyimini nasıl etkilediğini inceleyeceğiz.

Silah Gizleme Sisteminin Amacı
Silah gizleme, oyuncuların savaş esnasında silahlarını görünmez kılabilmesiyle sağlanan estetik ve stratejik bir özelliktir. Özellikle PvP ortamlarında, bu sistem hem görsel açıdan hem de taktiksel olarak büyük avantajlar sunar. Oyuncular, düşmanlarına daha hızlı ve sürpriz saldırılar yapabilmektedir. Bu da duygusal heyecanı artırır ve oyunun çekiciliğini yükseltir.

C++ ve Python ile Uygulama
Metin2 özel sunucularında silah gizleme sistemi genellikle C++ backend ve Python istemci tarafında geliştirilerek entegre edilir. Bu sistem, client src ve game server src üzerinde değişiklik yapılarak uygulanabilir. Martysama gibi sistemlerle birlikte geliştirilen bu modülasyonlar, sunucu sahiplerine yüksek düzeyde özelleştirme imkanı sunar.

Silah Görselini Kontrol Etme
Silah gizleme işlemi sırasında, uiscript dosyalarında belirli animasyon veya görünürlük parametreleri değiştirilir. Py GUI ile kullanıcı arayüzüne entegre edilen bu sistem, oyuncuların tuş kombinasyonları ile silahlarını anlık olarak görünür ya da görünmez yapmalarını sağlar. Bu sayede, oyuncular hem savaş hem de sosyal etkileşim anlarında daha özgür hissedebilirler.

Duygusal Etkileşim ve Taktiksel Derinlik
Silah gizleme sayesinde, oyuncular sadece fiziksel değil, aynı zamanda duygusal açıdan da daha derin bir deneyim yaşarlar. Bir silahın görünmemesi, düşman tarafından fark edilmeme hissiyatı yaratır. Bu da oyuncuda bir gerginlik ve heyecan duygusu uyandırır. Ayrıca, bu tür sistemler PvP mücadelelerinde daha stratejik düşünmeyi teşvik eder.

Sunucu Geliştirme İçin Öneriler
Metin2 özel sunucularında silah gizleme sistemi geliştirmek istiyorsanız, öncelikle source edit işlemlerini güvenilir bir şekilde yapmanız gerekir. Game ve auth sunucularında değişiklikler yaparken dikkatli olmalısınız. DB core üzerinde de bu sistemin veritabanı desteği bulunabilir. Metin2 compile işlemleri sonrası test aşaması önemlidir. Core seviyesinde yapılan düzenlemeler, sunucunuzun kararlılığını doğrudan etkiler.

Sonuç
Metin2 özel sunucularında duyguları harekete geçirirken silah gizleme sistemi, hem teknik hem de estetik açıdan çok değerlidir. Bu tür gelişmiş sistemler, oyuncuların daha fazla bağlanmasına ve sunucunuzun rekabet avantajı kazanmasına yardımcı olur. Metin2 Lobby olarak bizler de bu tür yenilikleri takip ediyor ve toplulukla paylaşıyoruz.


Metin2 Lobby as we establish our place in the world of server development, one of the most important elements that shape the player experience is emotional interaction. Within this context, hiding weapons while triggering emotions provides players with a more realistic and strategic atmosphere during combat. In this article, we will examine how the weapon hiding mechanism works in Metin2 private servers and how it affects the emotional gaming experience.

Purpose of Weapon Hiding System
Weapon hiding is an aesthetic and strategic feature that allows players to make their weapons invisible during combat. Especially in PvP environments, this system offers significant advantages both visually and tactically. Players can launch faster and surprise attacks on enemies, increasing emotional excitement and enhancing the game's appeal.

Implementation with C++ and Python
In Metin2 private servers, the weapon hiding system is typically developed using C++ for the backend and Python on the client side. This system can be applied by modifying client src and game server src. These modularizations, developed together with systems like Martysama, provide server owners with high levels of customization.

Controlling Weapon Visuals
During the weapon hiding process, certain animation or visibility parameters are altered in uiscript files. Integrated into the user interface via Py GUI, this system allows players to instantly toggle their weapons visible or invisible through key combinations. Thus, players feel more free during both combat and social interaction moments.

Emotional Interaction and Tactical Depth
Thanks to weapon hiding, players experience not only physical but also emotional depth. The invisibility of a weapon creates a feeling of not being noticed by the enemy, which awakens tension and excitement in the player. Additionally, such systems encourage more strategic thinking during PvP battles.

Suggestions for Server Development
If you aim to develop a weapon hiding system on Metin2 private servers, you must first ensure reliable source edit operations. Be careful when making changes on game and auth servers. Database support for this system may exist within the DB core. Testing after Metin2 compile processes is crucial. Adjustments made at the core level directly affect your server's stability.

Conclusion
In Metin2 private servers, the hiding weapons while triggering emotions system is highly valuable both technically and aesthetically. Such advanced systems help players connect more deeply and give your server competitive advantages. At Metin2 Lobby, we follow these kinds of innovations and share them with the community.
 

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

Benzer konular

Geri
Üst Alt