Professional Documents
Culture Documents
Documentation
Overview
1.1 What is ACF?
Ascent Combat Framework (ACF from now) is a multi-modules C++ Plugin for Unreal Engine 4
that provides an extendable and easy to use framework to build your Action RPG games in a
very short amount of time. It is composed by a set of different tools and is natively networked
BUY NOW!
https://youtu.be/2odhgY5ChxI
Because is like an RPG Maker, but for AAA games. It is not designed to be a ready to go
system, but a “Systems builder” with a great focus on extendability. This is NOT a blueprint
base combat system with pre-made logics, even if a pre-made sample project is provided for
learning purpose. This one is a c++ generic framework with a basic combat implementation
(melee and ranged) that does not take any assumption on the game you are building, and that
you can expand as much as you can. So this a base framework you’ll have to Extend, instead
something you’ll have to modify, making your codebase SOLID
(https://en.wikipedia.org/wiki/SOLID)
This is done to avoid to give to your game that "asset flipper" feel that most of the garbage
indie game have when made with pre-made assets, while giving the ability of the ACF user to
create something polished and unique as the game you can see in the trailer.
DISCORD:
https://discord.gg/ahqhXnJ
EMAIL:
pasqualemangano@gmail.com
SUPPORT THREAD:
https://forums.unrealengine.com/unreal-engine/marketplace/1757558-a
scent-combat-framework-c-high-end-action-rpg-creator
VIDEO-TUTORIALS:
https://www.youtube.com/playlist?list=PL8jTN9dmYyyperIAtZEl1er__Jp
57qpI7
For More Tutorials please send PROOF OF PURCHASE TO
pasqualemangano@gmail.com!
SAMPLE PROJECTS:
To receive the FREE Sample Project 1.2.0 send proof of purchase to
pasqualemangano@gmail.com!
- Generic & Optimized Collisions Manager (ACM)*: generic way of handling combat
collisions
- Optimized & Customizable Multi Point Targeting System (ATS)*: create one or
multiple targeting point per character
- Camera Manager (CCM)* an easy way to implement a multi-state Camera controller
- Combined Animation System (CAS)* Module to handle combined animations between
characters, NOT REPLICATED at the moment
- Mount System System to mount and dismount, possess any character NOT
REPLICATED at the moment
- Ability System : Grant and use Passive and Active Abilities
1.5 Should I need to know C++ to use ACF?
Absolutely not. Everything is exposed to blueprint so you can use and expand it in blueprint.
However ACF is highly engineered, so programmers can go deeper with it.
Is waaay easier than build all this stuff by yourself, but of course it will require a little of time
to understand how it works. ACF is heavily documented and I will work on expand tutorialS
and documentation over time. A set of “ready to go” projectS are provided as sample, but I
think that the real strength of ACF is that can be used to create very different systems giving
to your game the “uniqueness” it deserves.
ACF is used internally to develop our projects so it will be definitely updated regularly, even
because we are forced to do so. In addition more modules are coming like:
- Quest System
- Dialogue Syste
- FSM System
- Building System
- … more
Bug fixes and refactors will always be free updates, additional modules may be charged
separately.
1.8 May I used this together with other assets from the marketplace?
Absolutely yes. ACF is 100% modular, I used it with third party dialogue systems, quest
systems, UI plugin, animations, graphical assets and whatever!
- Attributes: like Strength, Endurance, Constitution etc. those are used to automatically
generate your Statistics and Parameters
- Parameters: like Attack Damage, Defense, Crit Chance etc. those are characterized by a
Value that is use for your actual calculation
- Statistics: like Health, Stamina, Mana etc. those are characterized by a Max Value, a
Current Value and a Regeneration Value
The first to do is to create and setup your own
AttributeSet. This can be done through a DataTable
(Right Click on Content -> Miscellaneous ->
DataTable).
The type of struct used for the DataTable should be
GamePlayTagTableRow (the one highlighted in the
image below).
RPG.Statistic.Health
(Edit -> Project Settings -> GameplayTags) and ad the tags created by adding the DataTable in
the GameplayTagTableList.
Now your GameplayTags are effective and we can switch to the actual Stat configuration.
This step can only be done if you have successfully set your GameplayTags. In your
ProjectSettings tab, go to ARS Settings. Here you have to tell to the Plugin the actual Tag
Roots of your AttributeSet. For Example:
ARS allows the Designer to control all the character AttributeSet by just settings their
Attributes and a set of Generation Rule that are used to automatically generate all the
Statistics and Attributes. Generation Rules are set through the use of UCurveFloat objects. You
can create your own curves in any folder (Right Click in Content Browser ->Miscellaneous ->
Curve). In the image below how the RPG.Attribute.Strength Attribute have been setup to
modify the R
PG.Parameters.MeleeDamage Parameters.
In the above sample RPG.Attribute.Endurance have been set to generate both Max Stamina
and Stamina Regeneration (RPG.Statistic.Stamina).
To actually implement ARS functionality you must add the ARS Statistics Component to your
agent and configure it. ARS supports different ways to handle your AttributeSet. To properly
use the Plugin is important to understand how they work.
.
StatisticConsumptionMultiplier: Multiplier applied every time you modify CurrentValue of the
target Statistics. Could be useful to implement logics like: if your inventory is full, Stamina
consumption is multiplied by 1.5 for every action.
DefaultAttributeSet: Attribute set used if you select No Generation or Generate From Default
Values. In the first case it is used “as is”, in the second one, your Attribute will be used to
generate your Statistics and Parameters following your previously configured ARS Settings.
CanRegenerateStatistics: This defines if the Statistics of this Character can regenerate. Turn off
regeneration for performance optimization.
RegenerationTimeInterval: ARS Component does not tick for performance reasons. This value
defines the time interval for regeneration. Set high values for optimization.
To actually start to work with ARS, remember to call the InizializeAttributeSet in your
beginplay (or when you want to start to work with it) - (NOTE: this is not needed in ACF since
it’s done automatically)
actual values of the Character AttributeSet. Percentage modifiers apply a modification based
on the current values of the AttributeSet (20 means that the actual value of that stat will be
raised by 20%).
This particular
modifiers increments
MaxStamina by 20,
Stamina regeneration
by 5 and Ranged
Damage by 75.
Modifiers can be added
and removed at
runtime by simply
calling the relative
methods:
Modifiers are always handled Server side. You can also use Timed modifers, who actually are
automatically removed after a certain amount of time. All those functions are exposed to
Blueprints.
Please notice that Modifiers have no effects for Statistics Current Values, since they are
instantly normalized to the new MaxValue. If you actually want to modify CurrentValue of a
Statistic you must use:
ARS includes a leveling system. To make it work properly you also have to setup your
ExpForNextLevelCurve. T
hen you can the BP exposed function:
That will add the experience and eventually level up your character.
CharacterLevel: C
haracter Level used for generation if leveling system is active
ExpForNextLevelCurve: For Each level the amount of Exp necessary to Lvl Up set as
UCurveFloat. X
axes is Character’s current level, and Y axis is the amount of exp to level up.
If you select the PerkBased LevelingSystem at every level up your character will receive
PerksObtainedOnLevelUp amount of perk and you have to manually call the
AssignPerkToAttribute function to consume a numPerk number of perks, modify an attribute
and regenerate the AttributeSet of the character.the curve based leveling system you
With the curve based leveling system you have to setup a set of curves that will be used to
automatically regenerate your character's stat at each level up.
AttributesByLevelCurves: Implement Rules to generate your ATTRIBUTES starting from your
Level. For each Curve on X you have the Level, on Y the actual value of the Attribute for that
Level. This is only used if the StatsLoadMethod have been set on Load By Level From Curves.
In that case your Attributes will be read from your UCurveFloat in which in the X Value is the
Character Value and the Y value is your actual Attributevalue. Statistics and parameters will be
generated consequently following your previously configured ARS Settings.
Inside ARS you’ll find a DocuActor which includes an overview of all the BP functions of the
plugin.
2.8 Delay
In latest ARS version a regeneration delay can be setted for each statics. This is used to
replicate most of the stamina based mechanics in which, after you perform an action that
consumes your Statistic, you regeneration does not start immediately but after a tunable
amount of time.
A brief tutorial on how to create a Progress bar based on the plugin’s Statistics system:
3. Collisions Manager
Combat Collisions Manager is the Plugin that manages collisions during combat. It is pretty
generic and in ACF is used multiple time for both character, weapons and projectiles. The only
thing to do is to configure and activate it when needed. First of all you need to add the
ACMCollisionMasterComponent to your GameMode. This will be the responsible of all the
collisions check.
To start using ACM you need to add the Collision Manager Component to the actor you want
to deal damage and configure it:
Here an example of a Blueprint that configure the component to call DoStuff when a collision
is detected, while ignoring itself and using as a collision mesh the SkeletalMeshComponent
called Mesh.
To properly handle damage we now have to setup damage zones on your mesh and configure
the component:
If you want to see your damage volume at runtime
you should turn on the Debug Info. Please note that
in ACF every tick is by default disabled, so you will
not probably see the volume, if not during the
swing (when the trace are active). You can try the
component on other meshes / actor to check the
volume.
To activate and stop damages you have to call the
StartSingleTrace, StartAllTraces and StopSingleTrace, StopAllTrace methods, or
StartSingleTraceTimed, StartAllTraceTimed that automaticly turns off collisions after a certain
amount of time. For more info please check the DocuActor.
ACM Damage system is based upon Unreal Damage System. if AutoApplyDamage i s enabled,
every time the component hits something, it calls Unreal TakeDamage on the hit Actor.
The FDamageEvent is automatically constructed by the Component with the HitResult and the
info provided in configuration.
4. Targeting System
ATS is the module used for target detection and camera locking. It is based on a highly
configurable component that should be added to your PlayerController. Then to make an actor
targetable it should be Implement the UATSTargetableInterface. To implement an interface, go
to your Blueprint -> Class Settings -> Implements Interface -> Add and select
ATSTargetableInterface. Now you need to configure the component.
To trigger the targeting system you have to call the TriggerTargeting function from your
component, to swap targets you have to call Up/RightSearchTargetWithInput.
Target detection is collision based, so you need to default which channels should be checked.
For optimizations reasons all other channels are ignored. The Max target distance is the radius
of the collision detection and the Max Angular Distance Degree indicates the radius of the
actual targeting cone.
Magnetic Lock Camera; magnetically move your Controller view on target, you can slightly
move it, but the position will be progressively automatically moved again on your targeting.
Magneting Strength can be tuned.
To avoid awkward camera positioning you can also set an up/bottom pitch limit.
Target filters are used to dynamically modify your “targetable” rules. A Target Filter is a class
with just a virtual method IsActorTargetable that will allow you to add targetables rule to your
game, even at runtime using AddFilter / Remove filter methods.
4.6 AI TargetComponent
normally around the waist. Using AITargetComponent's SetTarget, the viewpoint location will
be changed to the actual TargetPointComponent, allowing you to move the TargetComponent
at any point you want.
5. Camera Manager
5.1 Overview
CCM is a small plugin that implements a state-based camera system that will allow you to
easily blend between camera movements with just one blueprint node. It supports different
kinds of camera movements.
5.2 Setup
In the two datatables you can add your Camera Movements and Rotations and configure them.
Camera Offset: relative position of the camera to the end of the movement.
You can also add a CameraShake class and configure it’s intensity and if it’s looping. In ACF
this is used for Sprinting, for instance. Please notice that Camera Movements can be nested
and you can have multiple movements playing simultaneously.
LockOnTarget: an useful function that allows you to lock your camera to point to a specific
actor. Useful for instance for a dialogue system.
For more information please check the DocuActor inside the plugin.
Please notice that CCM automatically takes the references of the camera of the currently
possessed Pawn and updates automatically once the pawn changes.
To prepare a camera sequence you'll have to add a CCMCameraSplineComponent and define
the spline your camera must follow. Then you can setup the movement of the camera by
configuring the component and giving it a name.
You can then add a CCMLookAtPointComponent, give it a name and set it as LookAtPoint in
CCMCameraSplineComponent, this will make the camera to orient and track that point in
space. If you want to changed the configuration of the sequence during the play, you can use a
CCMSequenceNotifyState on any animation. The config of the notify will override the one of
the current camera sequence (there can only be 1 camera sequence playing per client at a
time) until the end of the state, then it will return back to default config.
Before starting to create your game characters you need to setup the Plugin to handle your
game specific types. ACF works on generic data by extensively using gameplay tags, so
basically you have to define your game-specific types by modifying ACF bases data tables like
described in chapter 2
.2 for Statistics, Parameters etc or creating new ones.
Together with the plugin you’ll find a sample tag configuration, I strongly suggest to start with
that one and than modifying them while you proceed with your game. In the
AscentCombatFramework/Configuration folder you’ll find a set of Datatables that implements
the GameplayTags that you can modify at your will to meet your Game’s Design.
ActionsTag: those gameplayTags are used to identify Characters Actions like Attacks, Dodge,
Hit, etc.
ItemTags: Tags that define the different type of objects (weapons, armor, consumable, swords,
etc.) defined hierarchically.
ItemSlots Tag: The list of slots in which every item can be assigned when it is equipped.
MovesetTags: For any character you can define multiple movesets that are switched when they
equip different weapons. For every weapon you can define the relative moveset.
CommandTags: T
ag to identify Commands to give to your AIs and Companions.
In Project settings you have to tell the system what are the Root Tag used to identify your
game specific types and what are the Default Tags:
Basically with this we are telling to ACF which is the default Character State when no trigger
is received (Actions.Idle), which is the default state to be triggered when a character gets hit
(Actions.Hit) or when his R
PG.Statistics.Health reaches 0 (Actions.Death).
For every ACFEntity (actors that implements IACFEntityInterface) you have to select his
CombatTeam: Enemies or heroes, defining the “side” for which this AI is fighting for.
CombatTeam are normally assigned by Controllers, both ACFPlayerController and
ACFAIControllers gives the developer the possibility to choose the team for which the
controlled AI is fighting for. Neutral AI are not involved in battles, useful for example for NPCs.
In ACFGamesState you can set the BattleType. The default value is HeroesAgainstEnemies
and this means 8as easily understable) that in this case Heroes are recognising Enemies AIs as
enemies and vice versa. EveryoneOneAgainstEveryone should be selected for Deathmatch like
game modes in which there are no team and everyone can be hit by everyone.
If you want to create a character you must create a Blueprint that inherits from
ACFPlayerCharacterBP or ACFAICharacterBP depending if you want to create a player
controlled character or an AI Controlled one. If you want to create a character that can be both
controlled by a player or an AI Controller I suggest to create an ACFPlayerCharacter since the
additional logic it has is minimal and all the extra component (Targeting and interaction) will
be automatically disabled once the player is AIControlled, so there will be no additional
overhead on performance. In the blueprint you can actually set your Mesh and your
ACFAnimInstance (mandatory!) that will be largely explained in the next chapter. in your
Character you must configure:
Character Locomotion is handled inside the Locomotion Component. It should be configured to
properly handle how your character and creatures move.
LocomotionStates: Indicates max speed
for each locomtionstate
RotationRate : Indicates the actual rotation speed of the character. This influences tracking
during attacks
SprintDirectionCone:
Indicates the max angular
distance from the cone
that allows your character
to sprint
When Collision Manage detects an hit, the TakeDamage is called on the hit Receiver.
To actually handle the damage calculation a specific DamageCalculator Class exists that has a
virtual method:
This is done to let you write your own calculation logics and provide to ACF the actual final
damage Event with the actual FinalDamage field properly filled. A sample damage calculation
class is provided with ACF but actually is highly reccomended to create your own
DamageCalculator class and implement the CalculateFinalDamage method.
To actually implement your damage calculation you have to create as child class of
DamageCalculator and Implement the CalculateFinalDamage event. the inDamageEvent
contains the actual damage info calculate by ACF. You can override those data with your own,
in particular you must override the FinalDamage field, which is the one that will be subtracted
to the hit receiver health.
EffectManagerComponent is the one that is used to trigger particle and sounds on particular
events like footsteps and hit event.
7.4.1 Footsteps
If you want to just use a single fx for every footstep you can customize the Default Footestep
Fx field, otherwies check the C
heckForSurface box to setup different FX for each material
surface. The component will dinamically trace and check the actual surface material everytime
a footstep is triggered. Footstep will be automatically gathered from the FeetBoneNames m
ap.
DefaultUnarmedSwingFX: identifies the effect that will be triggered when the character
attacks without a weapon during the damage phase, in that case the weapon effect defined in
the weapon will override this.
DamageEffectsByHitReaction: I s a map of map. The upper level has the Action Response as as
key and a map of DamageType/Effects as a value.
ActionResponse are a subgroup of actions, largely discussed in the Animation System that are
automatically triggered once an hit is received: es hit, parry, block, dodge etc. For each of that
you can define a set of effects that depends on the damage types. In ACF a base set of
DamageTypes are defined as subclasses of Unreal’s UDamageType. In particular they are:
CutDamage, ImpactDamage, ProjectileDamage and SpellDamage.
ACFInteractionComponent is the one responsible of interactable with the world. It extends
SphereCollision Component to trace for interactables. The channels to trace can be configured
throught the component itself. To let an object to be interactable it should implement the
interface ACFInteractableInterface and provide an implementation for at least the
CanBeImplemented method, which returns false by default. To actually define the interaction
you'll need to implement the OnInteractedByPawn method.
This component implements all the logic related to the character’s state machine and ACF
Actions. Those actions will be extensively explained in the next chapter.
8. Animation System
8.1 Overview
The first thing is choosing if you want to use the actual ACFAnimInstanceBP or
ACFAnimInstance. The first one contains complete ready to use logic for both actions and
locomotion, the second one has only base structures but you have to implement your own
animgraph and state machines. When you create
ACF Action System is the Core of ACF combat. All the actions are handled inside the
ActionsManagerComponent, which acts like a kind of State Machine for the ACFCharacter. An
Action, as the name itself suggest, is an animation (an AnimationMontage) played on your
character that is bound somehow with some logic. Is an highly generic concept but for this
reason could be actually used to do whatever you want while keeping an high level of
abstraction, being extremely extendable and avoiding having tons of logic on your character.
Actions are also modular so that you can use an Action logic for multiple characters avoiding
code duplication and using composition and avoiding inheritance.
8.3 Setup
The first thing to do to is to Setup the gameplay tag referred to your actions. This can be done
in Project Settings exactly as seen in the Chapter with ARS. once you have your Actions. In
your Project Settings you’ll find a new tab dedicated to ACF. You have to tell to the system the
base tag for basic actions that are automatically triggered by ACF like Idle (your default state),
Hit (the state in which the character is send when an hit is received) and Death (the state in
which the character is send when your Health (the Statistic identified with Health Tag) is <=0.
8.4 Actions
Character Actions are triggered from the ActionsManager Component with the T
riggerAction
function which takes as an Input both the Action Tag and the trigger priority.
Actions are basically a set of character animations and logic. For each actions you can define an
Animation Montage, an ActionClass with a set of implementable virtual methods and a set of
configurable properties.
To create a new action you need to create a new class that inherits from ACFBaseAction.
From ActionsConfig and belows there the properties that are common for all the actions.
In that case we are setting that the Action.Attack has an ActionCost of 25 Stamina points
(RPG.Statistics.Stamina). If the carachter has not enough stamina, the action will not be
triggered. Requirements are used to check if the Stat of the character are actually higher than
the ones provided (useful for example for special attacks that may require a certain amount of
Strength).
Modifiers have been largely discussed in chapter 2, they can also be used for actions, for
example for heavy attacks, that needs to be performed with a bonus in Strength or in
MeleeDamage.
PerformableiInAir: identifies if this action can be triggered while the character owner is not
touching the ground.
CanBeStored: if set to true, if this action is triggered when the character is busy doing an
higher priority action, this action will be triggered once the character is not busy anymore.
Please notice that stored actions are not stacked, just the last one is played.
CoolDown: when performed, this action si actually locked and cannot be performed until the
cooldown is time is passed.
PlayRandomMontageSection: if this montage has multiple section and this is set to true, a
random section will be played.
BindActionToAnimation: By default set to true, once the animation is finished, the action is
automatialcally exited and character returns in Idle action as set in the DeveloperSettings. If
this is is set to false you have to manually trigger ExitAction from the
ActionsManagerComponent.
MontageReproductionTypes w
ill be addressed in the next section.
if you set your propriety as public you can edit them in the editor. Like in the picture above,
AttackAction h
as a set of custom properties, in particular:
SnapConfiguration: To actually snap to the CurrentTarget as stated in the
ATSBaseTargetingComponent from the controller.
RotationRateMultipliers to actually modify character's rotation rate during various attack
phases, in particular during PreWinding (before damage activation), Winding (during damage
activation), and PostWinding (after damage activation). Useful to create timed "vulnerability
window" for your characters or enemies.
DamageToActivate identifies which CollisionComponent should be activated and which trace
channel (by default a NAME_None string will activate all damage traces)
In ACF there are 4 different montage reproduction types. They are triggerable from the
LocomotionComponent with the S
etMontageReproductionType Method.
The Default method is RootMotion, which means that ActionMontages will be reproduced
normally using RootMotion.
Please note that only RootMotion currently supports replication. ACF curve-based systems are
currently NOT replicated.
In the snap configuration you can set the maximum SnapMultiplier allowed and the base
distance (the one for witch the SnapMultiplier will be 1).
Movesets are group of locomotion animations and actions. In The ACFAnimInstance you can
setup multiple Movesets. You can switch between Movesets by calling the
SwitchMovementType from the ACFCharacters.
In ACF multiple movesets per character are used, for example, when changing weapon. You
can set in the weapon his relative moveset and once the weapon is equipped the character will
automatically switch to the related Moveset.
This is used to implement complex animation systems in which every weapon has is own
moveset avoiding enormous graphs replication in the Animationblueprint. In addition every
moveset can have their own specific Actions that can be used only when that moveset is
active. This is useful to handle special moves that can ony be triggered with a specific weapon.
Actions that can be triggered independently from the Moveset are set in the CommonActions
array.
The MovesetSwitchTime is the amount of time necessary to blend between Movesets.
Overlays a
re instead animation that are added on the top of the current moveset and blended
with a tunable alpha. Sometime instead of using a new set of animation for a weapon, you
would just add an overlay to an existing moveset. This is the case of overlays. Like Movesets,
overlay are automatically added and removed once the character equips/unequips the weapon.
The base class to refer for Items is ACFItem, every Item has a set of native properties that can
be used for UI:. Items are categorized by ItemType (Weapons, Armors, Consumable, Materials)
and by the slot in which they can be equipped. The ItemSlot GameplayTag is used by a
character to equip it in the appropriate slot. For every character you can create as many
equipment slot as you want by just adding the relative gameplayTags in the Datatable Set in
Configuration as already explained in chapter 2. To make a slot available for a character you
have also to add it to the A
vailableItemsSlot. For the blueprint functions look at the
ACFDocuItem.
An ACFWorldItem has an array of items (Items) that are the ones that will be picked up by the
character that will interact with it. The first item of Items is the one that will be used for the
world mesh and the interaction info.
A Player can interact with thiose Actors. An item can be looted, or it is created when an
InventoryItem is dropped. Events are exposed in the blueprint to personalise the behaviour of
the item when a player interacts with it. You can change the default WorldItem class to be
used in drop functions in ProjectSettings -> AscentCombatFramework.
9.2 EquipmentComponent
Manages the character’s inventory. and equipment. You can see the blueprint functions inside
the A
CFDocuCharacter. In the blueprint settings you can define the Available Item Slots, which
are the GameplayTag of the equippable ItemsSlot. Each Item has an ItemSlot, that is the slot it
is automatically inserted if you want to equip it and it is defined in its ItemInfo.
Drop items on death defines if this Character should drop all his Equipped Items when dead.
Max Inventory Slot is the inventory maximum number of items. Instead the Max Inventory
Weight is the maximum weight that the character can carry. When you try to add an item to
the inventory, that Item won’t be equipped if one of the two parameters is surpassed.
Starting Items are the items that are added to the character when it is spawned. They can be
edited directly in this blueprint. You can choose the class, the number, if it is automatically
equipped on spawn. You can choose a probability whether that item will be dropped when the
To actually use an item is necessary that it is in the character Equipment. Equipped items are
stored in an array inside the property Equipment in the ACFEquipmentComponent,
EquippedItems. Each item is assigned to his Slot, which his a GameplayTag.This means that
you can have as many slots as you want.
Once you Use or Equip an item from the Inventory (with UseInventoryItem or
EquipInventoryItem) it is automatically assigned to the appropriate Slot (the one provided in
the ItemInfo inside the Item) in the equipment if it is Marked as an available Slot for that
character. For each Character you have to define the actual available slots in the
EquipmentComponent by filling the AvailableItemsSlot Array. This is useful to create
Characters that cannot use a particular type of items (each characters that can only use melee
weapons and not ranged, etc.)
Once an item is in the equipment it can be used by calling UseItemBySlot. If it's a weapon, it
will be moved from the O
nBodySocket to the E
quippedSocket.
Both of them have a set AttributeSetModifiers that are applied to the owning character once
they are equipped in their relative slot. Every armor needs a skeletal mesh that is rigged to the
same skeleton of the owning character, once it is equipped
Once a weapon is the equipped, it will be spawned in the world and attached to his back
socket. At this point his modifiers are NOT applied. If you sheath your weapon it will be moved
from the OnBodySocket to the EquipSocket (the on Hand one) and only then his modifiers are
applied.
Armors instead needs to have the same skeleton of the CharacterOwner. So once they are
spawned they are automatically set to follow the base mesh of the ACFCharacter a
s
MasterPose.
ACF features a powerfull yet simple to use crafting system that allows to create new Items
and upgrade current items. All the functions needed to enable it are in the ACF Crafting
Component, that can be applied to wathever actor you want: an NPC, a bench, etc..
To make it work you need to add to your player controller the ACFCurrencyComponent, which
handles are the currency related stuff. Then under the category ACF you'll find all the required
functions to create and upgrade items from the Equipment Component of the currentrly
controlled character.
10. AI Framework
10.1 AIController
Inside the pawn’s (or Character’s) blueprint you can set the actual class of it’s default controller
to be spawned. To use ACF’s AI System you have to set it as a Subclass of ACFAIController.
In the selected controller you then have to set the Behavioral Three, responsible of the
realtime decisions of the controlled AI. In ACF there are two differents BehavoralThree for
combat characters and NPCs. For every AI you’ll also have to set the CombatTeam as
described in chapter 6.2.
AIController also exposes the TeleportHome and GoBackHome functions which basically are
triggered once the controlled pawn goes over the set distance from Home.
Home is defined only for AI groups. For companions (AI that have a lead, usually one of the
Players) home location is actually the position of the Lead Actor (the Owning Player). For Ai
groups spawned by an AIGroupSpawner, the location of the group will be the actual home
location.
BoundToHome functionality will make your AI come back to the home position once it's
distance from that location is over MaxDistancefromHome. Similarly Teleport Home will
teleport your AI in a random place in a TeleportHomeNearRadius from Home Location once it's
distance overcomes TeleportHomeTriggerDistance.
10.1.1 AI States
- Patrol: If you add a USplineComponent in the AI Pawn or on the AIGroupSpawner, once
the AI will be in Pathrol state, it will use that spline to actual define is Pathrol path. If
the spline is an open loop, once reached the end of the spline the Ai will start following
the path backward.
- Combat: The AI is fighting against is actual target
- GoHome: The AI is actually trying to reach his Home Location
For each state you can set the desired locomotion state that the character should maintain
while staying in this state.
10.1.1 AI Aggressivity
If IsAggressive is set to true the possessed AI will attack everytime an enemy entity is
detected. If only ShouldReactOnHit is selected, the AI will only "return to fire" once he, or a
member of his group, gots hit.
AI can fight Unarmed or with a weapon, if your AI needs one or more weapon to fight, you
have to check the NeedsWeaponTag and you have to provide to the component the actions to
trigger to actually equip the desired weapon. Please notice that those action needs to be
implemented in AnimBP as described in Chapter of Anims. During combat AIs can switch
between multiple states, in particular:
- Melee Attacks: AI will perform a Set of attacks actions for a total number of triggers that is
between MinMeleeComboAttacks and MaxMeleeComboAttacks, then will try to go to post
attack. This is supposed to be triggered once the AI is in Melee Range (below a certain
distance)
- Melee PostAttacks: AI will perform a set of configurable actions, a different set from Melee
Attacks, useful
- Study Target: AI will move around target inside a circle of the distance define in
CombatState Config.
-F
lee: state in which the AI tries to increase the distance from his target.
CombatStateConfig is actually the map that describes the CombatStates this AI can go
throught, the ideal distance in which each state is triggered and chance express in a 0-100
range.
Threat Manager component is used to setup the threat management of the Possessed AI. For
every class you can define the default threat generated on perception (on sight, on heard) and
the multiplier applied to the damage to calculate the threat generated by all the actors of that
subclass.
To work with AI groups you have to refer with ACFGroupComponent. In the component you
can setup the array of AIs that will be spawnedtand their relative position from the Group. To
actually spawn those AI you'll need to call SpawnGroup that can be called multiple times
untlil MaxSimultaneousAgents is reached.
ACFCompanionsComponent is a specification of ACFGroupComponent to handle AIs that are
in the same group of the player. Player will be considered their lead and player position will be
considered their home. All AI agents can receive and execute commands.
10.5 AI Commands
Ai Commands are a basic command pattern implementation to let AI implement custom
actions. In depth tutorial: h
ttps://www.youtube.com/watch?v=xEr1nRDLB8c
11.1 Setup
To use ACF Mount System you have to add the ACFMountComponent to your mountable
character and ACFRiderComponent to your actual rider character. In the Mount you should
actually add also an ACFAnimationManagerComponent together with at least an
ACFAnimationPoint that will be used as a Dismount Point Target.
and the name of the Dismount Point (an ACFAnimationPoint inside the same actor) that will be
used to detach the rider. If the mount is possessed once mounted (this can be set inside
ACFRiderComponent), you can set a list of actions to be retriggered from the mount the rider
(check chapter 8 for Actions), usefull to setup a mounted combat.
If the mount is set as a Companion it will follow the player once it is not mounted.
To Actually start mounting you have to call StartMount in the ACFRiderComponent with the
reference of the character to be mounted.
Please notice that Mount System can also be used for vehicles and any kind of mounts
(dragons, horses, beasts etc.).
*NOT Replicated*
Combined Animations System is an ACF module that allows 2 characters (a master and a
Slave) to perform a simultaneous action and play a sinchronized animation. One of the 2 will
be considered the "Master", the one who starts the animation (usually the player character),
the other one should be considered "the slave", the one that responds to the animation Master.
12.2 SnapperComponent
Snapper component must be used on Animation mastr and has the responsability to magnetic
move the animMaster to the slave once the animation starts. Can also be used to snap your
player to specific point at your needs calling the provided Snap Functions.
Animation Master is the character driving the combined animations, it must have a snapper
component and one between CASAnimMasterComponen. Master Anim Configs is the actual
DB of the Combined Animations this actor can perform. They can be triggered calling
TryPlayCombinedAnimation:
In the provided sample, the combined anim called "Longs1" can only be triggered once the
Master is "behind" the slave and he (the Master) is equipping a Weapon of the type
Item.Weapon.Melee.Longsword
Every character that can be involved must have a CASAnimSlaveComponent properly
configured with a datatable of FCombinedAnimsSlave. This DT only needs to be configured
with the Montage that must be triggered and the name of the relative Master's entry in
Master's DT. In addition you can define a set of custom condition that needs to be satisfied to
involve this character in any Combined Animation.
13. LevelStreaming
13.1 Setup
the level appearence from the distance. You just have to setup your ACFLevelStreamerActor
with the name of the Level to Load/Unload, the load sitance from the player and the time
interval to check so.
To make this work you have to setup your level to be inside a Persistent Level and tohi
Streaming Method must be set to Blueprint. More info on level streaming:
https://docs.unrealengine.com/en-US/Engine/Levels/LevelsWindow/index.html
14. CHANGELOG:
NEW FEATURE:
Added Magic & spell System with healing, projectile & summon
REFACTORS:
IMPROVEMENTS:
Optimize FX replication
BUGFIX:
SAMPLE PROJECT: