Ninja Bear Studio Plugins Help

Your First Ten Minutes

This guide walks through the essential steps you’ll tackle in your first few minutes with Ninja Bot, resulting in a functional roaming and chasing AI.

It is intended to give you a basic overview of Ninja Bot and its common workflows. By the end of this guide, you will have a simple AI agent with three states: idle, roam, and chase. The main trigger between these states is whether the player is sensed or not.

Before starting, make sure the following pre-requisites are completed:

  1. Install and configure Ninja Bot, including the Asset Manager setup.

  2. Use a template, such as the Combat Third Person Template, and verify that a Navigation Mesh is present in the map.

  3. Some guides may suggest using Gameplay Abilities. Having a base character already configured for GAS can be helpful.

It is also recommended that your Gameplay Debugger is configured, so you can inspect the Bot’s perception data and evaluate its active AI states during gameplay.

Create the Perception Configuration

  1. In your Perception Data folder, create a new Perception Sense Profile using the Content Browser contextual menu: Ninja Bear Studio → Ninja Bot → Sense Profile.

  2. Add the Sight sense to the list of senses. Configure Sight Radius to 1200 and Lose Sight Radius to 1400.

  3. Mark Enemies, Neutrals, and Friendlies in Detection by Affiliation.

  4. Set Sight as the Dominant Sense.

Perception Sense Profile

Create the Roaming Environment Query

  1. Create an Environment Query that retrieves random locations from the Navigation Mesh.

  2. Add a Pathing Grid Generator with Grid Half Size set to 1000 and Space Between set to 100.

    EQS, Roam Generator
  3. Add a Distance Test with Float Value Min set to 300 and Float Value Max set to 1200.

    EQS, Distance Test

Create the Blackboard

  1. In your AI folder, create a new Blackboard that will be used to store contextual data available to the AI agent.

  2. Create an entry for SensedActor, setting the Key Type to Object and the Base Class to Actor. Create a new Entry Category named Perception.

    Blackboard, Sensed Actor
  3. Create three new float Key Types: CandidateScore, NormalizedCandidateScore, and AccumulatedAwareness. Add them to the Perception category.

  4. Create an entry for AwarenessLevel, setting the Key Type to Enum. Set the Enum Name to EBotPerceptionAwarenessLevel. Add this entry to the Perception category.

    Blackboard, Awareness Level
  5. Create three new Vector Key Types: FirstPerceivedLocation, CurrentTargetLocation, and LastKnownLocation. Add them to the Perception category.

  6. Create one additional Vector Key Type, RoamLocation. Add it to a new category named Roam.

Create the Behavior Tree

  1. Create a Behavior Tree and assign the Blackboard to it.

  2. From the Root node, create a Selector composite node and add the Update Perception Service to it. Match each property to the correct blackboard key.

    Behavior Tree, Update Perception Service
  3. From the top Selector node, create a Sequence composite node for Combat. Add a Blackboard Decorator to check whether the SensedActor key is set. This Decorator should be configured to abort both itself and lower priority nodes.

    Behavior Tree, Combat Branch 1
  4. Add a Move To Task, using the SensedActor key as the Target Location and an Acceptable Radius of 50. Add an Is At Location decorator using the same parameters, followed by a Force Success decorator. Lastly, add a Wait task set to 1 second with a Random Deviation of 0.2.

    Behavior Tree, Combat Branch 2
  5. From the top Selector node, create another Sequence composite node for Roam. Add a Run EQS Query task using the Environment Query created earlier, and configure it to write its result to the RoamLocation key. Add another Move To task using the RoamLocation key as the Target Location.

    Behavior Tree, Roam Branch
  6. Complete the Behavior Tree with another Sequence composite node for Idle. Add a Wait task set to 5 seconds.

    Behavior Tree, Idle Branch

Create the State Tree

  1. Create a State Tree using the State Tree AI Component Schema.

  2. Add the Update Perception evaluator.

    State Tree, Update Perception Evaluator
  3. From the Root node, add a Child State named Combat. Add an Object Is Valid Enter Condition, checking UpdatePerception.SensedActor.

    State Tree, Combat State 1
  4. From the Combat state, add a Child State named Move to Target. Add a Distance Compare Enter Condition comparing the Bot and Target locations, a Move To task targeting UpdatePerception.SensedActor, and a State Completed transition to the Next State.

    State Tree, Combat State 2
  5. Add another state named Wait. Add a Delay task with a Duration of 1.0 and a Random Deviation of 0.2.

    State Tree, Combat State 3
  6. From the Combat state, add a Sibling State named Roam. Create a Vector Parameter named Roam Location.

    State Tree, Roam State 1
  7. From the Roam state, add a Child State named Find Location. Add a Run EQS Query task, bind the Result to the Roam Location parameter, bind the Query Owner to the Context Actor, and set the Query Template. Add an On State Completed transition to Next State.

    State Tree, Roam State 2
  8. Add another state named Move to Location, and from the Roam state add another sibling named Idle. For Move to Location, add a Move To task and bind the AI Controller from the Context, and the Destination to Parameters.RoamLocation. Add an On State Completed transition to Idle.

    State Tree, Roam State 3
  9. From the Idle state, add a Child State named Wait. Add a Delay task with a Duration of 5.0.

    State Tree, Idle

Create the Bot Setup

  1. In your Bot Setup Data folder, create a new Bot Setup using the Content Browser contextual menu: Ninja Bear Studio → Ninja Bot → Bot Setup.

  2. Set the Brain Type to Behavior Tree and assign your Behavior Tree asset.

    Bot Setup with Behavior Tree

Create the Bot Setup

  1. In your Bot Setup Data folder, create a new Bot Setup, using the Content Browser contextual menu: Ninja Bear Studio → Ninja Bot → Bot Setup.

  2. Set the Brain Type to State Tree and add your State Tree asset.

    Bot Setup with State Tree

Create the Bot Character

  1. Create a new Character and add the Bot Setup Provider Interface.

    Adding the Bot Setup Provider Interface
  2. Double-click GetBotSetupData from the list of Interface Functions. Drag from the Return Value and Promote it to a Variable. Set the Bot Setup as its default value.

    Configuring the Bot Setup data
  3. In the Character Defaults, locate the AI Controller Class and set it to NinjaBotAIController.

    Configuring the Bot Controller

At this point, you should have a Bot that roams around the environment until it detects the player. Once the player is sensed, the Bot transitions into a chase behavior and actively pursues the target.

Last modified: 11 January 2026