最先进的用于AI驱动的D&D体验的MCP服务器套件! 特点包括3D空间战斗、ASCII战场可视化以及完整的角色管理。
📍 **战场地图** (X→, Y↓):
0│· · · · · · · · · · · · · · ·
1│· · · · · · · · · · · · · · ·
2│· · · · · · · · █ · · · · · ·
3│· · · · · · · · █ · · · · · ·
4│· · · · · ≡ ≡ · █ · · · · · ·
5│· · · · · ≡ L · █ · · · · · ·
6│· · · K · · · · · · · · · · ·
7│· · · · · · · · · · · · · · ·
8│· · · · · · · · · · · · S · ·
9│· · · · · · · · · · · · · · ·
└0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
**图例**:█=墙,■=柱子,≡=楼梯,字母=生物
🎯 **利拉·斯威夫特箭** 站在坐标(6,5,5)处的楼梯上。
⚔️ **可见敌人**:
凯尔·铁盾(近距离25英尺)- 清晰射击,
石像鬼(中距离38英尺)- 清晰射击
🏃 **移动选项**:柱子(32英尺远),墙(12英尺远)
2d20kh1(优势)和2d20kl1(劣势)需要安装Roo代码:
code --install-extension RooVeterinaryInc.roo-cline# 游戏状态服务器
cd game-state-server
npm install && npm run build
# 战斗引擎服务器
cd ../combat-engine-server
npm install && npm run build
在每个服务器目录中创建.env文件:
game-state-server/.env:
DATABASE_PATH=./data/my_rpg.db
PORT=3001
combat-engine-server/.env:
PORT=3002
# 终端1
cd game-state-server && npm start
# 终端2
cd combat-engine-server && npm start
添加到你的mcp_settings.json(通常位于%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\mcp_settings.json):
{
"mcpServers": {
"rpg-game-state": {
"name": "rpg-game-state-server",
"command": "node",
"args": ["dist/index.js"],
"cwd": "PATH_TO_YOUR_PROJECT/rpg-mcp-servers/game-state-server",
"enabled": true,
"alwaysAllow": [
"create_character", "get_character", "get_character_by_name", "list_characters", "update_character",
"add_item", "get_inventory", "remove_item", "update_item",
"save_world_state", "get_world_state", "update_world_state",
"create_npc", "create_npc_group", "get_npc", "list_npcs", "update_npc", "remove_npc",
"create_encounter", "add_to_encounter", "get_encounter_state", "get_active_encounter",
"start_turn", "end_turn", "next_turn", "consume_action", "end_encounter", "apply_damage",
"save_story_progress", "add_quest", "get_active_quests", "update_quest_state", "assign_quest_to_character"
]
},
"r-战斗引擎": {
"name": "rpg-combat-engine-server",
"command": "node",
"args": ["dist/index.js"],
"cwd": "PATH_TO_YOUR_PROJECT/rpg-mcp-servers/combat-engine-server",
"enabled": true,
"alwaysAllow": [
"roll_dice", "roll_check", "attack_roll", "initiative_roll", "damage_roll", "saving_throw",
"use_reaction", "use_legendary_action", "trigger_lair_action", "execute_multiattack",
"initialize_battlefield", "place_creature", "move_creature", "check_line_of_sight",
"get_area_effect_targets", "get_tactical_summary", "check_flanking", "check_height_advantage",
"describe_battlefield", "describe_detailed_tactical_situation", "generate_battlefield_map",
"get_combat_log", "clear_combat_log"
]
}
}
}
📝 注意:用实际路径替换PATH_TO_YOUR_PROJECT(例如,C:/projects/rpg-mcp-servers)。
// 创建一个新的D&D角色,带有完整属性
create_character({
name: "利拉·斯威夫特箭",
class: "游侠",
stats: { strength: 14, dexterity: 18, constitution: 16, intelligence: 12, wisdom: 15, charisma: 10 }
})
// 初始化战场,带有地形
initialize_battlefield({
width: 15, height: 12,
terrain: [
{ type: "墙", position: {x: 8, y: 2, z: 0}, dimensions: {width: 1, height: 4, depth: 5} },
{ type: "楼梯", position: {x: 5, y: 4, z: 0}, dimensions: {width: 2, height: 2, depth: 5} }
]
})
// 在3D空间放置生物
place_creature({
creature_id: "游侠利拉", name: "利拉·斯威夫特箭",
x: 6, y: 5, z: 5, size: "中型", speed: 30, reach: 5
})
// 获取战术情况
describe_detailed_tactical_situation({ creature_id: "游侠利拉" })
// 创建ASCII战场可视化
generate_battlefield_map()
// 使用优势掷骰
roll_dice({ notation: "2d20kh1+5", reason: "优势攻击" })
// 检查视线和遮挡
check_line_of_sight({ from_creature: "游侠利拉", to_creature: "哥布林1" })
// 验证移动和反击
move_creature({ creature_id: "战士凯尔", target_x: 10, target_y: 8, speed: 25 })
1d20+5,3d6,1d8+32d20kh1+5,2d20kl1+5完美适用于与AI地牢实验的集成:
准备好创建终极的AI驱动D&D体验了吗?克隆此仓库并按照上述设置说明操作。几分钟内,你将拥有一个完整的RPG系统,带有视觉战斗地图和高级战术智能!
🎲 开启AI驱动的D&D冒险吧! 🐉