虚幻引擎战斗系统

一个集成了混合战斗系统和AI辅助开发的虚幻引擎5.7项目,适用于游戏开发和战斗模拟场景。

  • by AnshunAnson
  • C++
  • 本地部署
  • 更新于
在 GitHub 查看 AnshunAnson/MCP_AI

使用说明

MCP_AI

一个全面的虚幻引擎5.7项目,其混合作战系统的灵感来自 纳拉卡:布拉德普 和 三角洲部队,与MCP(模型上下文协议)集成,用于人工智能辅助开发。

一个全面的虚幻引擎 5.7 项目,融合了《永劫无间》和《三角洲行动》风格的混合战斗系统,并集成了 MCP(模型上下文协议)用于 AI 辅助开发。

Features | 功能特性

Combat System | 战斗系统

  • 三角计数器系统:攻击→ 帕里→ 充电→ 攻击

    三角克制系统:攻击 → 格挡 → 蓄力 → 攻击(形成克制循环)

  • 近战:轻型攻击、重型攻击、超装甲冲锋攻击

    近战系统:轻攻击、重攻击、带霸体的蓄力攻击

  • 帕里系统:基于时机的偏转,有反击机会

    格挡系统:基于时机的弹反机制,可触发反击机会

  • 道奇和埃维德:基于I帧的躲避机制

    闪避系统:基于无敌帧的闪避机制

  • 连续特技动作系统:使用动画蒙太奇进行链式攻击

    连招系统:通过动画蒙太奇实现的连击攻击

FPS Extraction Mode | FPS 撤离模式

  • 搜索、战斗、提取 游戏循环

    搜索、战斗、撤离的游戏循环

  • 战利品价值体系:物品稀有性和价值跟踪

    战利品价值系统:物品稀有度和价值追踪

  • 保险箱保护:贵重物品的安全存储

    保险箱保护:贵重物品的安全存储

  • 死刑:风险回报机制

    死亡惩罚:风险与回报机制

  • 三人小组合作

    三人小队合作

MCP Integration | MCP 集成

  • UMG MCP插件:AI驱动的UI小部件创建

    UMG MCP 插件:AI 驱动的 UI 控件创建

  • McpAutomation Bridge:基于WebSocket的自动化

    McpAutomation Bridge:基于 WebSocket 的自动化桥接

  • 增强型输入MCP:自动创建输入映射

    增强输入 MCP:自动化的输入映射创建

UI System | UI 系统

  • CommonUI集成:一致的UI样式

    CommonUI 集成:统一的 UI 样式

  • 小部件基类:具有蓝图样式的C++库

    控件基类:C++ 基类配合蓝图样式

  • 游戏HUD:健康、耐力、弹药展示

    游戏 HUD:生命值、耐力、弹药显示

  • 库存系统:基于网格的库存管理

    背包系统:基于网格的背包管理

Requirements | 环境要求

Requirement Version 说明
Unreal Engine 5.7 虚幻引擎版本
Visual Studio 2022 开发环境
Windows 10/11 操作系统
Python (optional) 3.10+ Python(可选)

Installation | 安装步骤

  1. Clone the repository | 克隆仓库:

    git clone <repository-url>
    
  2. Generate project files | 生成项目文件:

    # Windows
    Right-click MCP_AI.uproject → Generate Visual Studio project files
    # 右键 MCP_AI.uproject → 生成 Visual Studio 项目文件
    
  3. 打开 MCP_AI.sln Visual Studio 2022

    在 Visual Studio 2022 中打开 MCP_AI.sln

  4. 构建项目(DebugGame编辑器或开发编辑器)

    编译项目(选择 DebugGame Editor 或 Development Editor 配置)

  5. 打开 MCP_AI.uproject 在虚幻编辑器中

    在虚幻编辑器中打开 MCP_AI.uproject

Project Structure | 项目结构

MCP_AI/
├── Config/                 # Configuration files | 配置文件
│   ├── DefaultEditor.ini   # Editor settings | 编辑器设置
│   ├── DefaultEngine.ini   # Engine settings | 引擎设置
│   ├── DefaultGame.ini     # Game settings | 游戏设置
│   └── DefaultInput.ini    # Input settings | 输入设置
├── Content/                # Game assets | 游戏资产
│   ├── Characters/         # Character models & animations | 角色模型和动画
│   ├── Combat/             # Combat system blueprints | 战斗系统蓝图
│   ├── Input/              # Enhanced Input assets | 增强输入资产
│   ├── Maps/               # Level files | 关卡文件
│   ├── UI/                 # Widget blueprints | 控件蓝图
│   └── Weapons/            # Weapon models & materials | 武器模型和材质
├── Source/                 # C++ source code | C++ 源代码
│   ├── MCP_AI/             # Main game module (UI system) | 主游戏模块(UI系统)
│   └── CombatSystem/       # Combat mechanics module | 战斗机制模块
├── Plugins/                # Project plugins | 项目插件
│   ├── McpAutomationBridge/    # MCP automation bridge | MCP 自动化桥接
│   └── UnrealMotionGraphicsMCP/ # UMG MCP plugin | UMG MCP 插件
├── Docs/                   # Documentation | 文档
├── PythonScripts/          # Python automation scripts | Python 自动化脚本
└── .trae/                  # Trae AI configuration | Trae AI 配置
    ├── rules/              # Development rules | 开发规则
    ├── skills/             # AI skills | AI 技能
    └── documents/          # Generated documents | 生成的文档

Modules | 模块说明

MCP_AI Module | MCP_AI 模块

主游戏模块包含UI系统和游戏初始化。

主游戏模块,包含 UI 系统和游戏初始化。

Class Purpose 说明
UGameWidgetBase Base class for all game widgets 所有游戏控件的基类
UHUDWidgetBase Heads-up display 抬头显示界面
UDeathScreenWidgetBase Death screen overlay 死亡画面覆盖层
UInventoryWidgetBase Inventory management UI 背包管理界面
UComplexLoginScreenBase Login screen with validation 带验证的登录界面
UPauseMenuWidgetBase Pause menu 暂停菜单
USettingsWidgetBase Settings panel 设置面板

CombatSystem Module | CombatSystem 模块

具有GAS集成的全面作战机制。

集成 GAS 的完整战斗机制。

Class Purpose 说明
UCombatComponent Main combat state machine 主战斗状态机
ABaseWeapon Abstract weapon base class 抽象武器基类
AMeleeWeapon Melee weapon implementation 近战武器实现
ARangedWeapon Ranged weapon implementation 远程武器实现
UCombatAttributeSet GAS attributes (Health, Stamina, AttackPower) GAS 属性集(生命值、耐力、攻击力)
UGA_Attack_* Attack abilities (Light/Heavy/Charged) 攻击能力(轻击/重击/蓄力)
UGA_Dodge Dodge ability 闪避能力
UGA_Parry Parry ability 格挡能力

Plugin Dependencies | 插件依赖

Plugin Purpose 说明
游戏能力 GAS能力框架 GAS能力框架
ModularGameplay Modular gameplay architecture 模块化游戏架构
GameFeatures Game feature plugins support 游戏功能插件支持
CommonUI Consistent UI styling 统一 UI 样式
UmgMcp MCP-driven UMG creation MCP 驱动的 UMG 创建
EditorScriptingUtilities Editor automation 编辑器自动化

Documentation | 文档

Development Rules | 开发规则

该项目遵循位于 .trae/rules/:

本项目遵循位于 .trae/rules/ 的结构化开发规则:

Rule File Purpose 说明
UE_CPP_Core.md C++ coding standards C++ 编码标准
UE_CPP_Naming.md Naming conventions 命名规范
UE_CPP_Memory.md Memory management 内存管理
UE_UMG_MCP_Rules.md UMG MCP usage UMG MCP 使用规则
UE_GAS_Rules.md GAS implementation GAS 实现规则
UE_Blueprint_Rules.md Blueprint best practices 蓝图最佳实践

Skills | AI 技能

AI辅助开发技能位于 .trae/skills/:

位于 .trae/skills/ 的 AI 辅助开发技能:

Skill Purpose 说明
unreal-engine-cpp-pro UE5 C++ development UE5 C++ 开发
unreal-umg-mcp UMG widget creation via MCP 通过 MCP 创建 UMG 控件
unreal-gas-dev Gameplay Ability System 游戏能力系统
UE_Debug Debugging and build support 调试和构建支持
UE_Blueprint Blueprint development 蓝图开发
project-organizer Project structure management 项目结构管理

Quick Start | 快速开始

Running the Combat Test | 运行战斗测试

  1. Open the project in Unreal Editor | 在虚幻编辑器中打开项目
  2. 导航到 Content/Maps/ | 导航到 Content/Maps/
  3. 打开 Lvl_CombatTest | 打开 Lvl_CombatTest
  4. Click Play (PIE) | 点击播放 (PIE)

Testing MCP Integration | 测试 MCP 集成

  1. Ensure MCP server is running | 确保 MCP 服务器正在运行
  2. 打开 Content/UI/WBP_ComplexLogin | 打开 Content/UI/WBP_ComplexLogin
  3. Use MCP tools to modify widget properties | 使用 MCP 工具修改控件属性

Contributing | 贡献指南

  1. 遵循中的编码标准 .trae/rules/ | 遵循 .trae/rules/ 中的编码标准
  2. Use appropriate skill for the task | 为任务使用适当的技能
  3. Update documentation for significant changes | 对重大更改更新文档
  4. Test in PIE before committing | 提交前在 PIE 中测试

License | 许可证

该项目旨在教育和发展。

本项目用于教育和开发目的。


引擎版本:虚幻引擎5.7| 引擎版本:虚幻引擎 5.7
最后更新: 2026-02-13 | 最后更新:2026-02-13