[C++] Metinlerdeki taşları kaldırmak.

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Öncelikle merhabalar sunduğum şey tam anlamıyla bir çözüm değildir.

Anlatım ;
game/src içerisinde constants.cpp açılır.
Kod:
const SStoneDropInfo aStoneDrop[STONE_INFO_MAX_NUM] = {     //  mob        pct    {+0    +1    +2    +3    +4}     {8005,    60,    {30,    30,    30,    9,    1}    },     {8006,    60,    {28,    29,    31,    11,    1}    },     {8007,    60,    {24,    29,    32,    13,    2}    },     {8008,    60,    {22,    28,    33,    15,    2}    },     {8009,    60,    {21,    27,    33,    17,    2}    },     {8010,    60,    {18,    26,    34,    20,    2}    },     {8011,    60,    {14,    26,    35,    22,    3}    },     {8012,    60,    {10,    26,    37,    24,    3}    },     {8013,    60,    {2,    26,    40,    29,    3}    },     {8014,    60,    {0,    26,    41,    30,    3}    }, };

Bu bölümdeki metin kodlarını değiştirdiğiniz zaman bu gereksiz taşlar o metinlerde mevcut olmucaktır.
VrZC4j.jpg

Ben bu gereksiz taşları paskalya metinlerine ekledim.
f0Vks6.jpg

Benim gibi yapmak isteyen olursa hazır kod;
Kod:
const SStoneDropInfo aStoneDrop[STONE_INFO_MAX_NUM] = {     //  mob        pct    {+0    +1    +2    +3    +4}     {8041,    60,    {30,    30,    30,    9,    1}    },     {8042,    60,    {28,    29,    31,    11,    1}    },     {8043,    60,    {24,    29,    32,    13,    2}    },     {8044,    60,    {22,    28,    33,    15,    2}    },     {8045,    60,    {21,    27,    33,    17,    2}    },     {8046,    60,    {18,    26,    34,    20,    2}    },     {8047,    60,    {14,    26,    35,    22,    3}    },     {8048,    60,    {10,    26,    37,    24,    3}    },     {8049,    60,    {2,    26,    40,    29,    3}    },     {8050,    60,    {0,    26,    41,    30,    3}    }, };

Metin2 Lobby olarak Metin2 özel sunucu geliştirme konusunda uzmanlaşmış bir ekip olarak, C++ dili üzerinden birçok sistemi geliştirmek ve mevcut sistemleri optimize etmek mümkündür.

Metin2[/BR] oyununda özel sistemler oluşturmak, geliştiriciler için hem zorlu hem de keyifli bir deneyimdir. Bu yazıda C++ kullanarak Metin2 oyunundaki taş sistemini nasıl kaldırabileceğinizi anlatacağız.

Taş Sistemi Nedir?
Metin2 oyununda oyuncuların bazı bölgelerde karşılaştığı 'taşlar', genellikle belirli haritalarda spawn edilen NPC'lerdir. Bu taşlar, oyuncuların belirli görevleri tamamlayabilmesi veya belirli bölgelere erişebilmesi için gerekli olabilir. Ancak özel sunucularda bu taşları kaldırmak isteyebilirsiniz. Özellikle PvP odaklı sunucularda bu tür engeller istenmeyebilir.

Taşları Kaldırmak Neden Gerekli Olabilir?
Metin2 özel sunucularında geliştiriciler, oyunun akışını kendi istedikleri yönde şekillendirebilirler. Taş sistemini kaldırmak:

- Oyuncuların daha serbest hareket etmesini sağlar.
- PvP oyun deneyimini artırabilir.
- Sunucu yöneticilerinin daha fazla kontrol sahibi olmasını sağlar.

Taşları C++ Kaynağından Kaldırmak
Taşları kaldırmak için game core üzerinde değişiklik yapmanız gerekir. Öncelikle Metin2 server src dosyalarını açarak ilgili taşların spawnlandığı kodları bulmalısınız. Genellikle bu taşlar map_info.txt veya mob_proto dosyasında tanımlanmıştır.

Örnek Kod Parçası:
Taşları kaldırmak için mob_spawn fonksiyonunu düzenlemek gerekir. Aşağıdaki gibi bir kod parçası ile taşların spawnlanmasını engelleyebilirsiniz:

Kod:
[COLOR=green]if (mobVnum == 1234) { // 1234 taş vnum[/COLOR][BR][/BR][COLOR=red]return; // Spawn etme[/COLOR][BR][/BR][COLOR=green]}[/COLOR][/BR][/BR]


Taşları DB Üzerinden Kaldırmak
Alternatif olarak, DB kısmında bulunan mob_spawn tablosundan ilgili taşların kayıtlarını silerek de bu sistemi devre dışı bırakabilirsiniz. Bu işlem doğrudan veritabanı üzerinde yapılmalıdır. Martysama gibi deneyimli geliştiriciler, bu işlemleri Python scriptleri ile de otomatikleştirebilirler.

Taş Sistemini Daha Fazla Özelleştirmek
Taşları kaldırmakla kalmayıp, alternatif görev sistemleri kurabilirsiniz. Bu sayede oyuncuların ilerlemesi daha kontrollü olur. Py GUI kullanarak bu sistemleri görsel arayüzle de yönetebilirsiniz.

Sonuç
Metin2 özel sunucularında taş sistemini kaldırmak, geliştiricilerin oyun deneyimini daha özgür hale getirmesini sağlar. C++ üzerinden yapılan bu tür değişiklikler, sunucu performansını da olumlu yönde etkileyebilir. Metin2 Lobby olarak bizler, bu tür gelişmiş sistemlerin nasıl yapılandırıldığını paylaşmaya devam edeceğiz.


Metin2 Lobby as a team specialized in Metin2 private server development, many systems can be developed and optimized using the C++ language.

In Metin2 game, creating special systems is both challenging and enjoyable for developers. In this article, we will explain how to remove the stone system in Metin2 game using C++.

What Is The Stone System?
Stones encountered by players in certain areas in Metin2 are usually NPCs spawned in specific maps. These stones may be required for players to complete certain quests or access certain areas. However, you might want to remove these stones on private servers. Especially on PvP-focused servers, such obstacles might not be desired.

Why Removing Stones Might Be Necessary?
On Metin2 private servers, developers can shape the flow of the game according to their preferences. Removing the stone system:

- Allows players to move more freely.
- Can enhance the PvP gameplay experience.
- Provides server administrators with greater control.

Removing Stones from C++ Source
To remove stones, you need to make changes in the game core. First, open your Metin2 server src files and find the code where the stones are spawning. Usually, these stones are defined in map_info.txt or mob_proto files.

Sample Code Piece:
To prevent stones from spawning, modify the mob_spawn function like this:

Kod:
[COLOR=green]if (mobVnum == 1234) { // 1234 stone vnum[/COLOR][BR][/BR][COLOR=red]return; // Do not spawn[/COLOR][BR][/BR][COLOR=green]}[/COLOR][/BR][/BR]


Removing Stones from DB
Alternatively, you can disable the system by deleting the relevant stone records from the mob_spawn table in the database. This operation must be performed directly on the database. Experienced developers like Martysama can automate these operations using Python scripts.

Customizing the Stone System Further
Instead of just removing the stones, you can set up alternative quest systems. This way, player progression becomes more controlled. You can also manage these systems with visual interfaces using Py GUI.

Conclusion
Removing the stone system on Metin2 private servers allows developers to create a more free gameplay experience. Such modifications via C++ can also positively impact server performance. As Metin2 Lobby, we will continue sharing how these advanced systems are configured.
 

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

Benzer konular

Geri
Üst Alt