Gameplay Ability System - UE4

https://www.jianshu.com/p/d736c417a9c2

Intro简介

So, what's a GameplayAbility?

Basically, they're like the abilities you have in Dota or equivalent games. You can cast a fireball, and this fireball hits a player, explodes (doing a set amount of damage), and sets everyone in the radius of the explosion on fire (doing damage over time). Meanwhile, the player who cast the fireball loses some mana and is put on cooldown.

You could use Epic's GameplayAbility plugin to do all of those things. The module is hard to wrap your head around, but once you learn how powerful they can be and how to properly make use of them, they can make your life much, much easier.

But why use this over rolling your own system?

GameplayAbilities can come in handy if your game is in need of a powerful skill, buff and attribute system that is both easy to extend and crazy-efficient to replicate. This can do wonders for people working on a multiplayer RPG with a lot of skills/classes or perhaps even a MOBA, but you can use this system for pretty much any game you want. The main problem is that it isn't the easiest to comprehend, quite big and may get a little in your way the further you stray too far away from this multiplayer RPG ideal, so not every game will get the same mileage out of it.

Well, that sounds like a dream, but where do I get it?

Well, first of all, GameplayAbilities is a code module that used to be integrated into UE4's source, but since this current version (4.15, that is, people from the future) has been moved into a separate plugin that is delivered alongside the Unreal Engine, so that it may not take away space in your games if they do not make use of the system. This system does not actually originate as a built-in engine feature, but has, in fact, been kindly left in there from the developers of Paragon and Fortnite for third parties to enjoy. Unfortunately, due to these unique circumstances, the module as a whole is quite messy, poorly (read: barely at all, your best bet are code comments and even those are only there like half the time) documented, and rarely updated and cleaned up.

It is also not 100% exposed to blueprints, partially, but not entirely, due to a lot of the system abusing a lot of engine trickery and magic to work as well as they do, so if you never worked with C++ in the context of UE4, you may want to turn back and maybe do a little tutorial on that now, because this tutorial will make for a poor first learning experience.

In other words, it is a total flippin' pain in the buttocks to wrap your head around, but that's where this guide comes in to help ya. Epic Developer Dave Ratti has an example GitHub project which goes through some basic examples to get you started, but ignores the fine lines and goes for broad strokes. The project itself has been pretty hidden, however, and (at the time) doesn't really show up on Google or any real search about the GameplayAbilities plugin, so it hasn't been as helpful as a full-fledged guide. Moreover, now that GameplayTags are properly integrated into the editor by default (a system GameplayAbilities itself uses at every corner of the way, acting as GameplayAbilities' backbone), setup has never been any easier!

With all that said, let's get started, finally.

注:GitHub工程好像已经不能用了,请参考Epic官方的ActionRPG工程,可以在虚幻商城中免费下载。

简介直接粘贴Epic Wiki中GAS的Intro部分,懒得翻译了,英文苦手的朋友,谷歌翻译一下大意即可,总结一下,就是这个系统很NB,被用于《堡垒之夜》、《Paragon》。但这个系统很复杂(据说核心部分就超过2万行代码,加上相关部分会到10万行代码)、上手较难,但学会了以后事半功倍!

启用GAS

Editor

在插件管理中启用GameplayAbilities插件,请忽略([UNSUPPORTED])。

C++

在使用该插件的module的build.cs文件中增加对模块GameplayAbilities,GameplayTags,GameplayTasks的引用。可以看出共有三个模块。其实Gameplay Tag和Gameplay Task也可以应用于Gameplay Ability System之外的系统。

相关知识点:

Basic

  • Gameplay Ability System Component(GAS组件)
  • Gameplay Attribute(属性)
  • Gameplay Tag(标签)
  • Gameplay Effect(效果)
  • Gameplay Ability(能力)
  • Gameplay Task & Ability Task
  • Gameplay Cue

Advanced

  • Gameplay Effect Execution Calculation
  • Gameplay Event
  • Targeting(目标选择)

在我的文集中,我将逐个解析这些知识点。由于GAS系统相当复杂,我只涉及到了基本部分,更深入的了解还需要读者自己努力。(看源代码、查资料等)。但要注意的是,GAS是开发《Fortnight》和《Paragon》过程中的产物,UE官方还没有特地为通用性来大力重构这个系统(近期也不会,因为不在UE4的Roadmap上,他们认为现在这个系统还行,重构它的优先级不高,但开发团队会持续更新ActionRPG项目,我们可以跟踪这个项目进行学习),所以这个系统中会遗留一些与上述两个游戏关联很紧密的部分。

高级部分停更,等我吃透整个ActionRPG(UE4.22发布后,该项目会更新一个版本)对GAS有更深的理解后有机会再更吧!

在ActionRPG的分析中,会再次涉及GAS,并探讨其Advanced部分:
解析ActionRPG(施工中)

参考工程

这个系列文章的代码几乎都来自这个工程。

Action RPG

文档链接:https://docs.unrealengine.com/en-us/Resources/SampleGames/ARPG

游戏内截图

其他参考资料

有好心人在github上做了关于Gameplay Ability System相关资料的整理!
https://github.com/Pantong51/GASContent

由于ActionRPG项目中除了GAS外,还有背包系统,UI系统,资源管理等内容,所以我先看其他更简单的项目代码。

  • Woppin's Code
  • aa1000

作者:珏_Gray
链接:https://www.jianshu.com/p/d736c417a9c2
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

Gameplay Ability System - UE4相关推荐

  1. 虚幻四Gameplay Ability System入门学习合集

    本篇负责记录我认为比较好的GAS系统学习文档和视频,一开始就自夸一下,放一下个人写的入门教程. 虚幻四Gameplay Ability System入门(1)-初始设置 虚幻四Gameplay Abi ...

  2. 游戏技能系统(Gameplay Ability System,简称GAS)配合GASDocumentation阅读学习笔记

    本篇文章是针对游戏技能系统(Gameplay Ability System,简称GAS)的学习计划目录,主要记录到目前位置自身在该系统上的学习笔记. GAS是虚幻引擎官方推出的一套针对"技能 ...

  3. 虚幻四Gameplay Ability System入门(9)-神罗天征!TargetActor

    痛みを世界に与えて! 哈哈,不开玩笑了.这一期我们实现一个类似Shinra Tensei的技能.技能可以将角色周围的敌人击飞,让他们感受痛苦! 首先大致描述一下技能的实现过程: 启动技能,PlayMo ...

  4. 谈谈Gameplay,以及UE4的Gameplay框架

    文章目录 前言 什么是Gameplay Character Camera Control 游戏脚本 介绍脚本语言 脚本系统 UE4 Gameplay框架 介绍重要框架类 Actor类 Componen ...

  5. Unity从零开始构建能力体系 Unity Ability System

    从零开始构建能力体系 你会学到什么 如何实施能力体系 如何使用用户界面工具包创建用户界面 如何使用Unity的GraphView API 如何实现保存系统 MP4 |视频:h264,1280×720 ...

  6. Unity实现动作游戏的技能系统(Ability System)设计原型

    前言 尝试写一个技能系统,希望其尽量完善.目前能想到的元素包括控制.模型.动画.音效.特效.碰撞检测.事件响应.伤害判断.Buff控制.集所有元素为一个编辑器,方便策划和美术进行操作. 输入控制 使用 ...

  7. UE Gameplay Learning Record

    UE Gameplay Learning Type: #Learn Tags: #UnrealEngine #Gameplay Status: #Doing Time: 2022-12-10 11:2 ...

  8. 【UE4】关于UE和游戏,应该知道的一些英语知识

    本文记录一些做游戏,以及用 UE 引擎,需要知道的一些基础英语知识,以及一些自己的理解,可能会更多从程序的角度讲述. 如有不对,欢迎指点.讨论. 一.缩写 / 简称 1.1 一些单词的简称 简称 全称 ...

  9. 虚幻四如何实现第一人称_虚幻周报20200930 | 双节快乐么么哒!

    官方知乎号:虚幻引擎 搜集日期:20200921-20200927 整理编辑: 大钊,小辉辉 声明:文档搜集来自网上,难免遗漏,请联系我们投稿和添加关注.该文档版权归整理编辑者共同所有,单项内容版权归 ...

最新文章

  1. Advantages of genome sequencing by long-read sequencer using SMRT technology in medical area
  2. iOS经常使用加密方式(MD5,AES,BASE64)与网络数据安全
  3. 【机器学习基础】8个知识点,图解K-Means算法
  4. python创建sqlite3数据库_Python之Sqlite3数据库基本操作
  5. 用二维数组实现矩阵转置
  6. 最佳实践:HTAP数据库TBase助力某省级单位核心系统IT架构升级
  7. 一文弄懂什么是Istio
  8. 18.7 修改IP地址
  9. pythopn tuple(元组)
  10. python if else_菜鸟笔记015 Python If ... Else
  11. android 获取机顶盒ip,在电视机顶盒端查看IP地址 - 零成本让你的电视盒子变身无线路由器...
  12. 网络安全笔记-业务安全
  13. Excel表格中带公式的数值如何复制?
  14. Excel数据分析(八)图表
  15. LS1043A 查看 MAC、BMI、QMI寄存器, 查看网口发包丢包情况
  16. 软考中级哪一门比较好过?
  17. Object类型转换为Integer:
  18. 以太坊环境以及Solidity学习笔记
  19. Java实验之接口与实现、内部类与异常类
  20. 三星s10更新Android10,经历了三星s10的最近一次升级,我对安卓对三星有了新的认知...

热门文章

  1. 2021-09-16收集一些可以发外链的网站
  2. python3 输出不换行
  3. weex请求方法stream 的封装
  4. 伪装成mysql的备_如何伪装成一个服务端开发(六) -- 数据库操作
  5. Vue 中英文 组件 样式 写法
  6. 变频器制动电阻的选择(如G120变频器报警F7901失速报警)
  7. 基于单片机的贪吃蛇游戏
  8. Kettle 常用的转换组件都在这里
  9. [E::hts_idx_push] NO_COOR reads not in a single block at the end 10 -1
  10. [Leetcode][分治法]相关题目汇总/分析/总结