Metin2 DebugInfo Nasıl Aktive Ederim ?

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Bazı fileslerde gördüğünüz minimapın yanındaki koordinat fps vs. göstergelerini nasıl aktive edeceğinizi göstereceğim.

Kod:
Game.py içerisinde class GameWindow(ui.ScriptWindow) // Arat self.playerGauge = None // Altına debugInfo.SetDebugMode(True) //Ekle         exchange.InitTrading() // Arat         if debugInfo.IsDebugMode():             self.ToggleDebugInfo()              // Eğer yoksa altına ekle

Metin2 DebugInfo Nasıl Aktive Ederim ?


Metin2 özel sunucularında geliştirme yaparken hata ayıklama süreci oldukça kritiktir. Özellikle C++ tabanlı game core veya Python tabanlı py root üzerinde çalışırken, hataları hızlıca tespit edebilmek için DebugInfo özelliğini aktif etmek büyük kolaylık sağlar. Bu yazıda, Metin2Lobby olarak Metin2 özel sunucu geliştirme dünyasında aktif olan geliştiricilere, DebugInfo nasıl aktive edilir detaylı anlatacağız.

DebugInfo Nedir ?

DebugInfo, Metin2 oyununda belirli işlemler sırasında oluşan hata mesajlarını veya logları daha detaylı bir şekilde gösteren bir özelliktir. Özellikle server src üzerinde değişiklik yaparken, hataların nereden kaynaklandığını anlamak için bu özellik oldukça faydalıdır. Game veya Auth sunucusunda oluşabilecek çökmelerde, DebugInfo sayesinde hangi satırda ne tür bir hata meydana geldiğini görebilirsiniz.

DebugInfo Nasıl Aktive Edilir ?

Metin2 özel sunucularında DebugInfo aktif etmenin birkaç yolu vardır. En yaygın ve doğrudan yöntem, game core üzerinde yapılandırma ayarlarını değiştirmektir. Bunun için aşağıdaki adımları takip edebilirsiniz:

1. Game Sunucusu Kaynak Kodlarına Erişim Gerekir:
Eğer metin2 server src üzerinde çalışıyorsanız, game/src/char/char.cpp gibi dosyalarda hata ayıklama modunu açmak için gerekli tanımlamaları yapmalısınız. Genellikle #define komutları ile aktif edilebilir.

2. Debug Tanımlamalarını Açın:
game/src/common/length.h veya benzeri başlık dosyalarında _DEBUG_MODE gibi tanımlamaları aktif hale getirin. Bu sayede DebugInfo konsol üzerinden veya log dosyası üzerinden görülebilir.

3. Client Tarafında Ayar Yapın:
Client src tarafında da belirli uiscript[/COORD] dosyalarında hata ayıklama bilgilerini aktif etmek mümkündür. root dizininde bulunan system.py dosyasında debug moduna geçiş sağlayan satırlar eklenebilir.

Python ve C++ Ortamında DebugInfo Kullanımı

Metin2 özel sunucularında hem C++ hem de Python dilleri kullanılır. Py Root üzerinde DebugInfo aktif edilirken, Py GUI arayüzü üzerinden log çıktısı alınabilir. Örneğin bir Python script dosyasında hata ayıklama modu şu şekilde aktif edilebilir:

import sys
sys.stdout = open('debug.log', 'w')

Bu şekilde tüm çıktılar bir log dosyasına yazılır ve daha sonra incelenebilir.

Martysama ve Diğer Geliştirici Araçları

Metin2 geliştiricileri arasında popüler olan Martysama gibi araçlar da DebugInfo çıktısını daha okunaklı hale getirebilir. Bu tür gelişmiş pack sistemleri, log analizi ve hata tespiti konusunda büyük kolaylık sağlar.

Sonuç

DebugInfo, Metin2 özel sunucu geliştirme sürecinde büyük kolaylık sağlayan bir özelliktir. Hem game hem de auth sunucusunda hata ayıklamayı kolaylaştırır. Metin2 development yaparken bu özelliği aktif etmek, zaman kazandıran en önemli tekniklerden biridir. Metin2Lobby olarak, siz geliştiricilere destek olmaya devam ediyoruz.


How Do I Activate Metin2 DebugInfo?


Metin2 private server development involves a crucial debugging process. Especially when working on C++-based game core or Python-based py root, activating DebugInfo allows you to detect errors quickly. In this article, we will explain how to activate DebugInfo in detail for developers active in the Metin2 private server world, as Metin2Lobby.

What is DebugInfo?

DebugInfo is a feature that provides more detailed error messages or logs during certain operations in the Metin2 game. It's especially useful when making changes to server src files, helping you understand where errors originate. During crashes in the game or auth server, DebugInfo allows you to see which line caused what type of error.

How to Activate DebugInfo?

There are several ways to activate DebugInfo in Metin2 private servers. The most common and direct method involves modifying configuration settings within the game core. Follow these steps:

1. Access Game Server Source Code:
If you're working with metin2 server src, you must make necessary configurations in files such as game/src/char/char.cpp to enable debug mode. Usually, this can be done via #define commands.

2. Enable Debug Definitions:[/COORD]In header files like game/src/common/length.h, activate definitions such as _DEBUG_MODE. This enables DebugInfo to be visible through console or log files.

3. Configure Client-Side Settings:
It’s also possible to activate debugging information on the Client src side. You can add lines in the system.py file located in the root directory to enable debug mode.

Using DebugInfo in Python and C++ Environments

Metin2 private servers utilize both C++ and Python languages. When activating DebugInfo in the Py Root, you can capture log outputs via the Py GUI interface. For instance, debug mode in a Python script file can be activated like so:

import sys
sys.stdout = open('debug.log', 'w')

This way, all outputs are written to a log file and can be reviewed later.

Martysama and Other Developer Tools

Metin2 developers often use popular tools like Martysama, which can make DebugInfo output more readable. Such advanced pack systems provide great convenience in log analysis and error detection.

Conclusion

DebugInfo is a feature that greatly simplifies the Metin2 private server development process. It facilitates debugging on both game and auth servers. Activating this feature while doing Metin2 development is one of the most time-saving technical practices. As Metin2Lobby, we continue to support developers.
 

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

Geri
Üst Alt