Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

249 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 UHLBehaviorTree 🌳

UHLBehaviorTree - pack of helpfull AI nodes for behavior tree. Most needed AI nodes toolset for developing at least 3d-action AI - GameplayFocus, Random choices using RandomChance and RandomSelector, PlayAnimMontage to play attacks animations, InRange and InAngle to check distance to enemy and required angle

Support: UE5.4 (at least) - UE5.6

AiModule

✨ Features

  • AI nodes
    • GameplayFocus - set focus on actor
    • RandomChance - randomize actions
    • InRange - check distance to enemy
    • InAngle - check angle to enemy
    • PlayAnimMontage - play attack animation
    • SetBBValue - set blackboard value
    • DebugPrintBBValue - print blackboard value
    • DebugPrintString - print string on screen
    • InvokeGameplayAbility - activate/deactivate GAS Gameplay Ability by tag, with optional "wait for finishing"
    • TurnTo - turn enemy using turn animations

🚀 Install & ⬆️ Update

From source (recommended)

// install as git submodule to your plugins folder
git submodule add https://github.com/Ciberusps/UHLAI.git ./Plugins/UHLAI
git submodule add https://github.com/Ciberusps/UHLBehaviorTree.git ./Plugins/UHLBehaviorTree

// to update plugin
git submodule update --remote`

📄 Documentation

UHLAIPerceptionComponent

⚒️ InProgress

BTC_RandomSelector

Select random child node using weights

image

With cool validations

Warns if summary of weights > 1

image

Warns if chances array have more items then child nodes

image

Shows error if child nodes count > than chances count

image

CheckGASGameplayTagsOnActor

BTD_CheckGASGameplayTagsOnActor - checks that actor has GAS gameplay tags specified.

Warning

Don't mess with UBTDecorator_CheckGameplayTagsOnActor - its only checks GameplayTags on actor itself not on AbilitySystem.

Requirements:

  • actor should implement IAbilitySystemInterface to get AbilitySystemComponent

image

InAngle

BTD_InAngle - decorator to check is enemy in one of specified angle ranges. Useful in developing big enemies, for example we developing dragon we want to know is player under the right wing or leg, is player in front of dragon or behind and so on.

image

InRange

BTD_InRange - decorator to check distance between actors. Compliant with "MoveTo" node have same settings bIncludeSelfCapsuleRadius and bIncludeTargetCapsuleRadius to check distance excluding capsules radiuses

image InRange

LoopRandomCount

BTD_LoopRandomCount - randomized version of decorator Loop

image

TimeLimitRandom

BTD_TimeLimitRandom - randomized version of decorator TimeLimit

image

RandomChance

BTD_RandomChance - commonly used decorator to randomize actions. Fine for single child node, extra bad for multiple nodes due to chance regression, for randomization between multiple child nodes better to use RandomSelector

image

SetGameplayFocus

BTS_SetGameplayFocus - alternative for "Set default focus". SetGameplayFocus made right way - prevents rotation jittering while enemy rotation. One of most common problems that anybody stucks when starting developing AI - "focus dont work"/"focus works wrong".

image GameplayFocus

Requirements:

  • turn on UseControllerDesiredRotation
  • turn off
    • bOrientRotationToMovement
    • UseControllerRotationYaw
    • UseControllerRotationPitch
    • UseControllerRotationRoll

Troubleshooting:

  • check that nothing "ClearFocus"
  • check that MoveTo uses "AllowStafe"

SetBBValue

BTT_SetBBValue - helps settings values in blackboard, supports all blackboard types and for some values event provides opportunity to make calculations like int

image

DebugPrintBBValue

BTT_DebugPrintBBValue - prints BB value of any type

image

DebugPrintString

BTT_DebugPrintString - simple task for printing debug info on screen

image

InvokeGameplayAbility

BTT_InvokeGameplayAbility - activate/deactivate GAS Gameplay Ability by tag, with optional "wait for finishing"

image

PlayAnimMontage

BTT_PlayAnimMontage - play anim montage with option to customize PlayRate, Starting Position, Start Section Name and stopping montage on task abort

image

TurnTo

BTT_TurnTo - turn to enemy using turn animations Drop in replacement for "RotateToFaceBBEntry" but with option to "RotateTo" with animations To get settings from actor requires IUHLActorSettings to be implemented on character

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages