Client İçin Su Değiştirme Eklentisi

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
PythonBackgroundModule.cpp aratılır;

Kod:
PyObject *[/FONT] backgroundEnableSnow(PyObject * poSelf, PyObject * poArgs)

Üstüne eklenir;


Kod:
PyObject * backgroundSuDegistir(PyObject * poSelf, PyObject * poArgs) {     char * szFileName;     if (!PyTuple_GetString(poArgs, 0, &szFileName)){ return Py_BuildException(); }     CPythonBackground& rkBG = CPythonBackground::Instance();     CMapOutdoor& rkMap = rkBG.GetMapOutdoorRef();     rkMap.SuDegistir(szFileName);     return Py_BuildNone(); }

Aratılır

Kod:
{ "EnableSoftwareTiling",                backgroundEnableSoftwareTiling,                METH_VARARGS },

üstüne veya altına eklenir.

Kod:
{ "SuDegistir", backgroundSuDegistir,METH_VARARGS },

GameLib/MapOutdoor.h aratılır;

Kod:
void            SetWireframe(bool bWireFrame);

üstüne eklenir;

Kod:
void              SuDegistir(const char * c_szFileName);

aratılır;

Kod:
void                    UnloadWaterTexture();

altına eklenir;

Kod:
void LoadOzelSu(const char * szDosyaAdi);


GameLib/MapOutdoor.cpp aratılır;

Kod:
void CMapOutdoor::SetEnvironmentSkyBox()

üstüne eklenir;

Kod:
void CMapOutdoor::SuDegistir(const char * c_szFileName) {     LoadOzelSu(c_szFileName); }


GameLib/MapOutdoorWater.cpp aratılır;

Kod:
void CMapOutdoor::RenderWater()

üstüne eklenir;


Kod:
void CMapOutdoor::LoadOzelSu(const char * szDosyaAdi) {     UnloadWaterTexture();     char buf[256];     for (BYTE i = 0; i < 30; ++i)     {         _snprintf(buf, sizeof(buf), ((std::string)szDosyaAdi+"/%02d.dds").c_str(), i + 1);         m_WaterInstances[i].SetImagePointer((CGraphicImage *)CResourceManager::Instance().GetResourcePointer(buf));     } }


Python örnek kullanımı

Kod:
import background background.SuDegistir("d:/ymir Work/special/water")


341bdf5b6051b9fe36fe6eed287f1ce0.gif

Client İçin Su Değiştirme Eklentisi Nedir?
Metin2 özel sunucularında görsellik ve oyun deneyimi üzerinde büyük etkisi olan sistemlerden biri de su değişikliği eklentisidir. Bu eklenti sayesinde oyuncular, oyun içi su yüzeyinin görünümünü kişiselleştirebilir veya farklı su efektleriyle daha estetik bir atmosfer yaratabilir. Özellikle PvP sistemlerinin yoğun olduğu sunucularda, görsel olarak dikkat çeken detaylar oyuncu katılımını artırabilir. Bu nedenle, client için su değiştirme eklentisi, Metin2 özel sunucularında popüler bir özelliktir.

Metin2 Client Kaynak Kodlarında Su Sistemleri
Metin2 client tarafında su görünümü, genellikle 3D motor tarafından işlenen bir shader dosyası ile belirlenir. Bu dosya değiştirilerek ya da yeniden yapılandırılarak su yüzeyinin rengi, parlaklığı, dalga efekti gibi detaylar özelleştirilebilir. Client src üzerinde yapılan bu değişiklikler, tüm oyuncuların gördüğü su görünümünü etkiler. Bu işlem sırasında dikkat edilmesi gereken en önemli konu, source edit sırasında mevcut yapıyı bozmamaktır. Bu tür sistemler genellikle C++ tabanlıdır ve doğrudan render motoruna bağlanır.

Python GUI Kullanarak Su Ayarlarını Kontrol Etme
Gelişmiş sunucularda, bazı geliştiriciler su ayarlarını oyun içinden değiştirmek isteyebilir. Bu durumda Py GUI kullanarak bir arayüz oluşturulabilir. Örneğin, bir menü yardımıyla su rengi, derinlik efekti veya yansıtma kalitesi gibi parametreler, oyuncu tarafından ayarlanabilir. Bu işlem için py root üzerinden bir arayüz dosyası (.py) geliştirilir ve client src ile entegre edilir. Böylece kullanıcı dostu bir yapı ortaya çıkar.

Client İçin Su Değiştirme Eklentisinin Kurulumu
Kurulum işlemi genellikle 3 ana adımdan oluşur:
- Shader dosyalarının değiştirilmesi veya modifiye edilmesi
- Gerekirse Py GUI üzerinden oyun içi kontrol paneli oluşturma
- Sunucu tarafında yansıması istenen durumlarda DB-Core ile entegrasyon sağlanması
Bu işlemler sırasında martysama gibi sistemlerden alınan örnek kodlar yardımcı olabilir. Ancak her zaman kendi sistemlerinize uygun şekilde özelleştirme yapmalısınız. Ayrıca bu tür sistemlerin doğru çalışması için client compile işlemi eksiksiz yapılmalıdır.

Neden Su Değiştirme Eklentisi Kullanmalısınız?
Oyun içinde görsel olarak farklılıklar yaratmak, oyuncuların dikkatini çekebilir. Özellikle PvP sistemlerinin yoğun olduğu Metin2 özel sunucularında, harita detayları savaş esnasında fark yaratabilir. Renkli su efektleri, belirli bölgeleri vurgulayabilir veya atmosferi farklı hissettirebilir. Bu sayede hem oyuncu memnuniyeti artar hem de sunucunuz diğerlerinden ayrışır. Bu eklenti, aynı zamanda sunucu geliştirme sürecinde estetik bir değerdir ve Metin2 development uzmanlarının favori sistemlerindendir.


What is a Water Change Plugin for Client?
In Metin2 private servers, one of the systems that significantly impacts visual appeal and gameplay experience is the water change plugin. With this plugin, players can customize the appearance of the in-game water surface or create more aesthetic environments with different water effects. Especially on servers where PvP systems are intense, visually striking details can increase player engagement. Therefore, a water change plugin for client is a popular feature among Metin2 private servers.

Water Systems in Metin2 Client Source Code
The appearance of water in Metin2 clients is generally determined by a shader file processed by the 3D engine. By modifying or reconfiguring this file, aspects like the color, brightness, and wave effect of the water surface can be customized. These modifications made on the client src affect the water appearance seen by all players. The most important thing to consider during such source edits is not disrupting the existing structure. These types of systems are typically based on C++ and directly connected to the rendering engine.

Controlling Water Settings In-Game via Python GUI
On advanced servers, developers might want to allow changing water settings from within the game. In such cases, a UI can be created using Py GUI. For example, parameters like water color, depth effect, or reflection quality could be adjusted by the player through a menu. This requires developing a UI file (.py) via py root and integrating it with the client src. This results in a user-friendly structure.

Installing a Water Change Plugin for Client
The installation process usually consists of 3 main steps:
- Replacing or modifying the shader files
- Creating an in-game control panel via Py GUI if needed
- Integrating with DB-Core if server-side reflections are required
During these processes, sample codes taken from systems like martysama may help. However, always ensure customizations are tailored to your own systems. Additionally, for such systems to function properly, the client compile process must be completed without errors.

Why Should You Use a Water Change Plugin?
Creating visual differences in-game can capture player attention. Especially on Metin2 private servers where PvP systems are active, colorful water effects can make a difference during battles. They can highlight certain areas or create a unique atmosphere. This increases player satisfaction and helps your server stand out from others. This plugin also serves as an aesthetic value during the Metin2 development process and is among the favorite systems of Metin2 development experts.
 

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

Benzer konular

Geri
Üst Alt