iBeast Minimap altı saat ve tarih

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

Admin

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

Link:
VT:

iBeast Minimap Altı Saat ve Tarih Sistemi

Metin2 özel sunucularında gelişmiş minimap entegrasyonu[/BR][/BR]
Metin2 özel sunucularında kullanıcı deneyimini artırmak amacıyla geliştirilen iBeast Minimap sistemi, oyun içi navigasyonu kolaylaştırır. Bu sistem özellikle PvP odaklı sunucularda stratejik avantaj sağlar. Ancak bazı kullanıcılar tarafından istenen bir özellik, oyun içi saatin ve tarihin doğrudan minimap üzerinde görüntülenebilmesidir. Bu yazıda, iBeast Minimap üzerine saat ve tarih eklemek için nasıl bir yaklaşım izlenebileceğini ele alacağız.

Sistem Gereksinimleri

Bu sistemin doğru çalışması için öncelikle sunucunuzda C++ tabanlı game ve auth sunucularının kurulu olması gerekir. Ayrıca, client-side düzenlemeler için uiscript ve root klasörlerine erişim sağlamanız önemlidir. Eğer Martysama veya benzeri bir source edit yapısı kullanıyorsanız, bu değişiklikleri daha hızlı gerçekleştirebilirsiniz.

Minimap üzerine saat ekleme adımı

Öncelikle uiscript klasöründe bulunan minimap.py dosyasını açmalısınız. Bu dosya, minimap arayüzünü kontrol eder. Yeni bir text control tanımlamalı ve bunu mevcut arayüze entegre etmelisiniz. Örnek olarak:

Kod:
[COLOR=#9365b8]time_text = ui.TextLine()[BR][/BR]time_text.SetParent(self.minimap)[BR][/BR]time_text.SetPosition(10, 10)[BR][/BR]time_text.SetText('Saat:')[/COLOR]


Oyun içi zaman senkronizasyonu[/BR][/BR]
Sunucudan gelen oyun içi saati yakalamak için Python tarafında bir zamanlayıcı (timer) veya sunucuyla senkronize çalışan bir sistem oluşturmalısınız. Bu işlem için game server tarafında bir Lua fonksiyonu yazarak saat bilgisini client'a göndermeniz gerekebilir. Alternatif olarak, sistem saatini doğrudan client tarafında okuyarak da gösterebilirsiniz.

Tarih bilgisi nasıl eklenir?[/BR][/BR]
Tarih bilgisi eklemek için Python tarafında datetime modülünden yararlanabilirsiniz. Örneğin:

Kod:
[COLOR=#9365b8]import datetime[BR][/BR]current_date = datetime.datetime.now().strftime('%d/%m/%Y')[/COLOR]


Bu değeri periyodik olarak güncellenen bir TextLine nesnesine atayarak, tarih bilgisini de minimap üzerinde gösterebilirsiniz.

Sunucu taraflı entegrasyon[/BR][/BR]
Eğer sunucu tarafında özel bir zaman sistemi kullanıyorsanız (örneğin, gün/dönem geçişleri), bu bilgiyi game server üzerinden client'a göndermek için özel bir packet yapısı tanımlamalısınız. Bu yapıyı pack dosyalarınıza eklemek ve db core ile senkron tutmak önemlidir.

Sonuç[/BR][/BR]
iBeast Minimap üzerine saat ve tarih eklemek, kullanıcı dostu bir oyun deneyimi sunmak açısından oldukça faydalıdır. Bu tür geliştirmeler, Metin2 özel sunucularında PvP etkinliklerini planlamada ve zaman yönetimi konusunda oyunculara yardımcı olur. Geliştirme sürecinde C++ ve Python bilginizi kullanarak özgün sistemler oluşturabilirsiniz. Daha fazla Metin2 geliştirme kaynağı için Metin2Lobby sayfamızı ziyaret edin.


iBeast Minimap Time and Date System

Advanced minimap integration for Metin2 private servers

In order to enhance user experience on Metin2 private servers, the iBeast Minimap system simplifies in-game navigation. This system provides strategic advantages especially on PvP-oriented servers. However, some users request a feature that allows displaying in-game time and date directly on the minimap. In this article, we will discuss how to approach adding time and date to the iBeast Minimap.

System Requirements

For this system to work correctly, you must have C++-based game and auth servers installed. Additionally, access to uiscript and root folders for client-side modifications is essential. If you are using a source edit structure such as Martysama or similar, you can implement these changes more quickly.

Adding time to the minimap

First, open the minimap.py file located in the uiscript folder. This file controls the minimap interface. You need to define a new text control and integrate it into the existing interface. For example:

Kod:
[COLOR=#9365b8]time_text = ui.TextLine()[BR][/BR]time_text.SetParent(self.minimap)[BR][/BR]time_text.SetPosition(10, 10)[BR][/BR]time_text.SetText('Time:')[/COLOR]


In-game time synchronization

To retrieve the in-game time from the server, you need to create a timer or a system that synchronizes with the server in Python. For this process, you might send time information to the client by writing a Lua function on the game server. Alternatively, you can display the system time directly by reading it from the client side.

How to add date information?

You can use the datetime module in Python to add date information. For example:

Kod:
[COLOR=#9365b8]import datetime[BR][/BR]current_date = datetime.datetime.now().strftime('%d/%m/%Y')[/COLOR]


By assigning this value to a TextLine object updated periodically, you can also display the date on the minimap.

Server-side integration

If you are using a custom time system on the server side (e.g., day/period transitions), you must define a custom packet structure to send this information from the game server to the client. It's important to add this structure to your pack files and keep it synchronized with the db core.

Conclusion

Adding time and date to the iBeast Minimap is highly beneficial for providing a user-friendly gaming experience. Such improvements assist players in scheduling PvP events and managing time effectively in Metin2 private servers. By utilizing your knowledge of C++ and Python, you can develop unique systems during the development process. Visit our Metin2Lobby page for more Metin2 development resources.
 

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

Benzer konular

Geri
Üst Alt