BlockChess
BlockChess 是一款 Minecraft 插件,将竞技国际象棋引入你的服务器。你可以与其他玩家对战、挑战人工智能,或加入匹配队列进行 ELO 等级分对局——所有操作均通过直观的基于库存界面的 GUI 完成。
强烈建议使用随插件提供的自定义资源包
我不是图形设计师,我已尽力创建了一个简单的 GUI 纹理以提升国际象棋对局的乐趣。如果你不喜欢当前的 GUI,你可以自由制作自己的!
功能
游戏模式
- 玩家 vs 玩家: 通过邀请直接挑战其他玩家。
- 匹配系统: 加入队列,根据 ELO 等级分自动配对实力相近的对手。
- 玩家 vs 机器人: 与 Fairy-Stockfish AI 对战,提供 12 个可调难度级别(200-3000+ ELO)。
ELO 等级分系统
- 动态评级: 根据比赛结果和对手强度获得或失去等级分。
- 玩家头衔: 随着实力提升解锁荣誉头衔:
- SGM (超级特级大师) - 2600+ ELO
- GM (特级大师) - 2500+ ELO
- IM (国际大师) - 2400+ ELO
- NM (国家大师) - 2200+ ELO
- EXPERT (专家) - 2000+ ELO
- 统计追踪: 查看详细统计数据,包括已玩场次、胜场、负场、平局和当前等级分。
玩法特性
- 直观 GUI: 基于点击的界面,库存中显示可视化的棋盘。
- 实时更新: 玩家间的走步即时同步。
- 完整国际象棋规则: 完整实现包括王车易位、吃过路兵和兵的升变。
- 和棋提议: 在对局期间请求并接受/拒绝和棋。
- 投降选项: 需要时放弃比赛。
- 自动保存库存: 玩家的库存会在比赛后保存并恢复。
匹配
- 智能配对: 自动将 ELO 等级分相似的玩家配对。
- 动态范围: 搜索范围随时间扩大以确保找到对局。
安装
- 下载: 从项目的发布页面获取 BlockChess 最新版本。
- 安装: 将下载的
.jar 文件放入服务器的 plugins 目录。
- Stockfish: 从 Fairy-Stockfish 发布页面 下载适合你服务器操作系统版本的 Fairy-Stockfish 可执行文件。
- 配置: 将 Stockfish 可执行文件放置在
plugins/BlockChess 目录中,并确保 config.yml 文件中的 engine.path 设置正确。
- 重启: 重启服务器以启用插件。
使用
命令
通用命令:
/chess - 打开主国际象棋菜单 GUI
/chess info <player> - 查看玩家的国际象棋统计数据和等级分
玩家 vs 玩家:
/chess invite <player> - 邀请玩家进行国际象棋对局
/chess accept <player> - 接受国际象棋对局邀请
/chess decline <player> - 拒绝国际象棋对局邀请
匹配:
/chess leavequeue - 退出匹配队列
玩家 vs 机器人:
/chess bot <1-12> - 开始与 AI 的对战(难度 1-12)
管理员命令:
/chess admin elo set <player> <amount> - 设置玩家的 ELO 等级分
/chess admin elo add <player> <amount> - 向玩家的等级分中添加 ELO
/chess admin elo remove <player> <amount> - 从玩家的等级分中移除 ELO
API 参考
BlockChess 目前未向其他插件公开 API。
配置
config.yml 文件允许你配置以下选项:
resourcepack.enabled - (默认值:true)启用或禁用国际象棋棋子的自定义资源包
engine.path - (默认值:plugins/BlockChess/stockfish.exe)Fairy-Stockfish 可执行文件的路径
bot_gamemode.enabled - (默认值:true)启用或禁用机器人游戏模式功能
权限
BlockChess 包含一个全面的权限系统:
玩家权限(默认:true):
blockchess.use - 打开主国际象棋 GUI
blockchess.info - 查看玩家统计数据
blockchess.invite - 邀请玩家参加对局
blockchess.accept - 接受对局邀请
blockchess.decline - 拒绝对局邀请
blockchess.bot - 与 AI 对战
blockchess.leavequeue - 退出匹配队列
管理员权限(默认:op):
blockchess.admin - 访问所有管理员命令
blockchess.admin.elo.set - 设置玩家 ELO 等级分
blockchess.admin.elo.add - 向玩家添加 ELO
blockchess.admin.elo.remove - 从玩家移除 ELO
blockchess.* - 所有 BlockChess 权限
引擎通信
BlockChess 使用通用国际象棋接口 (UCI) 协议与国际象棋引擎进行通信。这使得插件兼容任何符合 UCI 标准的国际象棋引擎,包括推荐的 Fairy-Stockfish。
引擎强度
机器人的强度可以设置为 1 到 12 级。强度的模拟是通过组合 UCI 参数实现的,包括 ELO 等级分和移动时间限制。
对于第 1 至第 4 级,引擎的思考时间被人为限制以模拟较弱的对手:
- 第 1 级: 每步 50 毫秒
- 第 2 级: 每步 100 毫秒
- 第 3 级: 每步 150 毫秒
- 第 4 级: 每步 200 毫秒
对于第 5 级及以上,引擎使用标准的游戏计时器(wtime 和 btime)来管理其思考时间,从而产生更强的棋力。
此外,对于第 1 至第 11 级,通过将 UCI_LimitStrength 选项设置为 true 并提供特定的 ELO 值来限制引擎的强度。对于第 12 级,UCI_LimitStrength 设置为 false,允许引擎发挥其最大潜力。
以下是各级别的 ELO 等级分解:
| 等级 |
ELO 评分 |
| 1 |
200 |
| 2 |
500 |
| 3 |
820 |
| 4 |
1060 |
| 5 |
1350 |
| 6 |
1600 |
| 7 |
1900 |
| 8 |
2200 |
| 9 |
2500 |
| 10 |
2800 |
| 11 |
3050 |
| 12 |
最大值 |
BlockChess
BlockChess is a Minecraft plugin that brings competitive chess to your server. Play against other players, challenge the AI, or join the matchmaking queue for ELO-rated matches—all within an intuitive inventory-based GUI.
It is highly recommended to use the custom resource pack that comes up with the plugin
I'm not a graphic, i've tried my best to create a simple GUI texture to make chess matches more enjoyable, if you don't like the current GUI's you are free to make your own!
- Link to the resource pack, drag and drop ready for Nexo.
Features
Game Modes
- Player vs. Player: Challenge players directly via invitations.
- Matchmaking System: Join the queue for automatic ELO-based pairing with balanced opponents
- Player vs. Bot: Face off against Fairy-Stockfish AI with 12 adjustable difficulty levels (200-3000+ ELO)
ELO Rating System
- Dynamic Rating: Earn or lose rating based on match results and opponent strength
- Player Titles: Unlock prestigious titles as you improve:
- SGM (Super Grandmaster) - 2600+ ELO
- GM (Grandmaster) - 2500+ ELO
- IM (International Master) - 2400+ ELO
- NM (National Master) - 2200+ ELO
- EXPERT - 2000+ ELO
- Statistics Tracking: View detailed stats including games played, wins, losses, draws, and current rating
Gameplay Features
- Intuitive GUI: Click-based interface with visual chessboard in inventory
- Real-Time Updates: Instant move synchronization between players
- Full Chess Rules: Complete implementation including castling, en passant, and pawn promotion
- Draw Offers: Request and accept/decline draws during matches
- Surrender Option: Resign from matches when needed
- Auto-Save Inventory: Player inventories are saved and restored after matches
Matchmaking
- Smart Pairing: Automatically matches players with similar ELO ratings
- Dynamic Range: Search range expands over time to ensure matches are found
Installation
- Download: Get the latest version of BlockChess from the project's releases page.
- Install: Place the downloaded
.jar file into your server's plugins directory.
- Stockfish: Download the appropriate Fairy-Stockfish executable for your server's operating system from the Fairy-Stockfish releases page.
- Configure: Place the Stockfish executable in the
plugins/BlockChess directory and ensure the engine.path in the config.yml file is set correctly.
- Restart: Restart your server to enable the plugin.
Usage
Commands
General Commands:
/chess - Open the main chess menu GUI
/chess info <player> - View a player's chess statistics and rating
Player vs Player:
/chess invite <player> - Invite a player to a chess match
/chess accept <player> - Accept a chess match invitation
/chess decline <player> - Decline a chess match invitation
Matchmaking:
/chess leavequeue - Leave the matchmaking queue
Player vs Bot:
/chess bot <1-12> - Start a match against the AI (difficulty 1-12)
Admin Commands:
/chess admin elo set <player> <amount> - Set a player's ELO rating
/chess admin elo add <player> <amount> - Add ELO to a player's rating
/chess admin elo remove <player> <amount> - Remove ELO from a player's rating
API Reference
BlockChess does not currently expose a public API for other plugins to use.
Configuration
The config.yml file allows you to configure the following options:
resourcepack.enabled - (Default: true) Enable or disable the custom resource pack for chess pieces
engine.path - (Default: plugins/BlockChess/stockfish.exe) Path to the Fairy-Stockfish executable
bot_gamemode.enabled - (Default: true) Enable or disable the bot gamemode feature
Permissions
BlockChess includes a comprehensive permission system:
Player Permissions (default: true):
blockchess.use - Open the main chess GUI
blockchess.info - View player statistics
blockchess.invite - Invite players to matches
blockchess.accept - Accept match invitations
blockchess.decline - Decline match invitations
blockchess.bot - Play against the AI
blockchess.leavequeue - Leave matchmaking queue
Admin Permissions (default: op):
blockchess.admin - Access to all admin commands
blockchess.admin.elo.set - Set player ELO ratings
blockchess.admin.elo.add - Add ELO to players
blockchess.admin.elo.remove - Remove ELO from players
blockchess.* - All BlockChess permissions
Engine Communication
BlockChess communicates with the chess engine using the Universal Chess Interface (UCI) protocol. This allows the plugin to be compatible with any UCI-compliant chess engine, including the recommended Fairy-Stockfish.
Engine Strength
The bot's strength can be set from level 1 to 12. The simulation of strength is achieved through a combination of UCI parameters, including ELO rating and move time limits.
For levels 1 through 4, the engine's thinking time is artificially limited to simulate a weaker opponent:
- Level 1: 50ms per move
- Level 2: 100ms per move
- Level 3: 150ms per move
- Level 4: 200ms per move
For levels 5 and above, the engine uses the standard game timers (wtime and btime) to manage its thinking time, resulting in stronger play.
Additionally, for levels 1 through 11, the engine's strength is limited by setting the UCI_LimitStrength option to true and providing a specific ELO value. For level 12, UCI_LimitStrength is set to false, allowing the engine to play at its maximum potential.
Here is a breakdown of the ELO rating for each level:
| Level |
ELO Rating |
| 1 |
200 |
| 2 |
500 |
| 3 |
820 |
| 4 |
1060 |
| 5 |
1350 |
| 6 |
1600 |
| 7 |
1900 |
| 8 |
2200 |
| 9 |
2500 |
| 10 |
2800 |
| 11 |
3050 |
| 12 |
Max |
评论 0
登录后参与评分
还没有评论,来抢沙发吧