Metin2 Multiplayer Chess Minigame – 1v1 Yang & EP Betting System
0
19

admin

PATRON
Katılım
23 Eki 2022
Mesajlar
14,634
Çözümler
15
Tepkime puanı
19,180
Puanları
113
Yaş
29
Web sitesi
farming-simulator.r10dev.net

Metin2 Multiplayer Chess – 1v1 Betting Minigame System

Give your Metin2 private server a new competitive feature with a fully integrated multiplayer chess minigame.

This custom system allows players to challenge each other in 1v1 chess matches, create private betting rooms, and compete for in-game currency rewards. Players can participate using either Yang or EP as their entry fee, making chess a new interactive activity within the game.

Unlike simple client-side minigames, the chess logic and financial operations are handled by the server.

Project Highlights

  • Real-time 1v1 multiplayer chess
  • Global lobby accessible from all channels
  • Yang and EP betting options
  • Configurable entry fees
  • Automatic winner reward distribution
  • Server-authoritative chess mechanics
  • Custom chessboard and interface
  • Chess timer with increment
  • Draw and resignation mechanics
  • Database-backed escrow management
  • GM configuration and room management

Chess Gameplay & Rules

The system implements the essential rules of standard chess.

Supported mechanics:

  • Legal chess moves
  • Check, checkmate and stalemate
  • Castling
  • En passant
  • Pawn promotion
  • Threefold repetition
  • Fifty-move draw rule
  • Insufficient material detection
  • Timed matches with increment
  • Draw proposals
  • Resignation
All move validation takes place on the server, preventing the client from independently deciding the validity of a move.

Betting & Reward Distribution

Players can compete for rewards by creating or joining betting rooms.

Two currencies are supported:

Yang Betting

Players enter a match by paying a configurable Yang fee. The collected amount is held until the match is settled.

EP Betting

Players can also use EP through the account database's cash field. The system supports configurable EP entry fees.

Match Settlement

The system uses dedicated database tables to manage deposits and payouts.

  • Entry fees are collected from both players.
  • Deposited amounts are tracked in escrow.
  • The winner receives the combined prize.
  • Configurable commission can be applied.
  • Pending Yang rewards are stored for offline players.
  • Abandoned deposits can be refunded.
  • Currency operations are recorded in transaction logs.

Global Chess Lobby

All game channels share a centralized chess room list.

Players can browse available matches regardless of their current channel. The system uses P2P communication to forward requests between game cores.

A single designated game core acts as the lobby host to prevent multiple cores from independently managing the same rooms.

Customization & Administration

Server administrators can configure the system using event flags without restarting the server.

Available settings include:

  • Enable or disable the chess system
  • Configure five Yang entry fee levels
  • Configure five EP entry fee levels
  • Set the winner commission percentage
  • Limit the number of active rooms
GM commands also allow administrators to inspect settings, list active rooms, and close individual rooms with refunds.

Installation & Source Structure

The project includes separate components for server-side C++, client-side Python, database configuration, and interface resources.

FolderDescription
source/game/src/Chess engine and shared minigame source
source/ekler/Required existing source modifications
game/sql/SQL database structure
pack/root/Client Python modules
pack/root_ekler/Client integration instructions
pack/ymir work/Chessboard and interface graphics
pack/locale/tr/Turkish localization

Technical Requirements

  • C++11-compatible game source
  • MySQL-compatible database
  • InnoDB support for transactional EP updates
  • P2P-enabled game cores
  • Python-compatible Metin2 client
  • Existing source code and pack access

Client Compatibility

No client C++ binary modifications are required.

The interface is implemented using Python scripts and image resources. Existing client files such as game.py and interfacemodule.py need the documented integrations.
1795976379189.webp

Installation Steps

  1. Import satranc_tablolar.sql into your database.
  2. Copy the four new C++ files into your game source.
  3. Apply the required source modifications from the TXT files.
  4. Add the new C++ files to your Makefile or CMake configuration.
  5. Configure the designated lobby host core.
  6. Compile the game source and update the server binary.
  7. Install the Python files into your client root pack.
  8. Apply the required client integration changes.
  9. Add the interface graphics and localization strings.
  10. Restart the server and test multiplayer matches.

Important Notes

The system does not automatically create its database tables. The supplied SQL file must be imported manually.

The EP database column is configured as cash by default. If your server uses a different column name, update the corresponding source configuration.

For secure EP transactions, the account table must use InnoDB.

The included installation documentation explains the required modifications in detail.

Conclusion

This Metin2 Chess Minigame is designed for private server developers who want to expand their game with a competitive activity outside traditional PvP gameplay.

With cross-channel multiplayer rooms, Yang and EP betting, server-side chess validation, and automated reward management, it provides a foundation for integrating chess directly into a Metin2 server.
 
Üst
Icy Tower Game Reklam Ver