Addon ID

  • salmanshh_dhtn_agent

Info

Statistics

  • Download count8 total downloads
  • Latest download count 2 downloads of latest version
  • Average download count1 downloads per day average

Owners

A list of all Actions, Conditions and Expressions supported in this addon.

Coordination

  • Actions

    Add slot {2} at ({3}, {4}) to builder for squad {0}, type {1}

    Adds one slot to the current builder. Call Initialize Slot Builder first.

    Assign agent UID {0} to squad {1}

    Adds an agent to a squad and syncs squad world-state keys.

    Auto assign nearest free {2} slot in squad {1} to agent UID {0} from ({3}, {4}) within {5} with ttl {6} sec

    Finds nearest free slot and reserves it for the agent.

    Clear squad {0} state key {1}

    Clears one shared squad state key.

    Initialize slot builder for squad {0}, type {1}

    Starts a new slot collection. Use with Add Slot To Builder then commit with Load Slot Set.

    Invalidate plans for squad {0}

    Marks squad plans stale so they are replanned on coordination pass.

    Load slot positions for type {1} in squad {0} from JSON {2}

    Imports slot coordinates from a JSON array string.

    Load slot positions for type {1} in squad {0} from world key {3} using scope {2} and UID {4}

    Loads JSON slot positions from a world-state key and imports them.

    Load slot set to coordination for squad {0}, type {1}

    Commits all slots added via Add Slot To Builder to coordination.

    Release slot {2} of type {1} in squad {0}

    Releases a slot reservation if present.

    Remove agent UID {0} from squad

    Removes an agent from its current squad and releases owned slots.

    Request plans for squad {0}

    Requests immediate plan updates for all squad members.

    Reserve slot {2} of type {1} in squad {0} for agent UID {3} with ttl {4} sec

    Reserves a squad slot for an agent if free or expired.

    Set auto release on deregister to {0}

    Controls whether owned slots are auto-released when agents are deregistered.

    Set coordination enabled to {0}

    Enables or disables squad coordination processing globally.

    Set max squads per coordination update to {0}

    Caps number of squads processed per coordination pass. 0 means all.

    Set slot default ttl to {0} sec

    Sets default reservation TTL in seconds for slot operations.

    Set coordination time slice to {0} sec

    Sets optional time slice cap per coordination pass. 0 disables slice.

    Set coordination update interval to {0} sec

    Sets global coordination update interval in seconds.

    Set slot {2} of type {1} in squad {0} to ({3}, {4})

    Stores world position for a squad slot.

    Set slot reservation mode {0} for squad {1}, type {2}, slot {3}, agent UID {4}, ttl {5} sec

    Combined slot reservation control for reserve or release modes.

    Set squad {0} leader to agent UID {1}

    Sets one leader UID for the squad.

    Set squad {0} state key {1} to {2}

    Writes one shared squad state key and mirrors it to squad members.

    Squad plan control mode {0} for squad {1}

    Combined squad plan control for invalidate, request, or both.

  • Conditions

    Is agent UID {0} in squad {1}

    True if the agent is currently assigned to the given squad.

    Is slot {2} of type {1} in squad {0} free

    True if the slot is not currently reserved by a live owner.

    Is agent UID {0} squad leader

    True if the agent is the current leader of its squad.

    On slot released

    Triggered when a slot reservation is released or expires.

    On slot reserved

    Triggered when a slot reservation succeeds.

    On squad membership changed

    Triggered when an agent joins or leaves a squad.

    On squad state changed

    Triggered when a squad shared state key is updated or cleared.

  • Expressions

    AgentSquad

    Returns the squad id for an agent UID.

    AssignedSlotId

    Returns slot id assigned to an agent for the slot type.

    CoordinationEnabled

    Returns 1 if coordination processing is enabled, else 0.

    CoordinationIntervalSec

    Returns coordination update interval in seconds.

    CoordinationPassesThisTick

    Returns number of coordination squads processed in last pass.

    CoordinationTimeSliceSec

    Returns coordination time slice cap in seconds.

    CountSquadAgents

    Returns member count for a squad.

    CountSquads

    Returns number of active squads.

    ExpiredSlotsReleased

    Returns total number of expired slot releases.

    GetSquadAgentUIDByIndex

    Returns squad member UID at a zero-based index.

    SlotOwner

    Returns current owner UID for a slot, or 0 if free.

    SquadLeader

    Returns leader UID for a squad.

    SquadStateValue

    Returns one squad state value by key.

Setup

  • Actions

    Add task {0} to network builder {1} (desc: {2}, type: {3})

    Adds one task to the network being built. Specify task ID, description, and type for manager reference.

    Initialize task network builder for network {0}

    Starts a new task network definition. Use with Add Task to Builder then commit with Load Task Network.

    Load task network {0} from builder, export to key {1}

    Commits all accumulated tasks to a JSON representation and stores in world state for export or manager registration.

    Set agent type to {0}

    Switches this object to another AI profile and replans. Use case: turn a civilian into a guard during an alarm.

    Set enabled to {0}

    Turns this agent processing on or off. Use case: disable distant enemies to save CPU.

    Set planning interval to {0} seconds

    Sets periodic planning time in seconds. Use case: increase to 2 seconds for background NPCs to reduce CPU.

    Set planning mode to {0}

    Changes when this agent replans. Use case: use reactive mode for bosses that must react instantly.

    Set processing interval to {0} seconds

    Sets how often periodic planning runs in seconds. Use case: raise to 2 seconds for low-priority NPCs.

    Set task timeout to {0} seconds

    Sets auto-fail timeout in seconds for stuck tasks. Use case: recover agents stuck behind obstacles.

Signals

  • Actions

    Signal damaged by {0} from ({1}, {2})

    Reports damage and updates related world-state values. Use case: trigger retreat behavior when health drops.

    Signal sound at ({0}, {1}) with intensity {2}

    Reports a sound event for hearing reactions. Use case: alert nearby guards when player makes noise.

    Signal target lost

    Marks target as no longer visible. Use case: call when line-of-sight breaks.

    Signal target seen UID {0} at ({1}, {2}) with confidence {3}

    Reports visual contact and updates target data. Use case: call when enemy raycast detects player.

Task Control

  • Actions

    Clear temporary task

    Stops temporary override and returns to normal planning. Use case: end cutscene idle behavior early.

    Mark task complete

    Marks current task as done so plan can continue. Use case: call after reaching a patrol waypoint.

    Mark task failed

    Marks current task as failed to force replanning. Use case: call when pathfinding cannot reach target.

    Pause agent

    Pauses AI updates for this object. Use case: freeze enemies during pause menu or dialogue.

    Push temporary task {0} for {1} seconds

    Runs a one-off task before returning to normal plan. Use case: force "idle" during a short cutscene.

    Request replan

    Requests an immediate replan now. Use case: call right after a major world-state change.

    Resume agent

    Resumes AI updates and replans immediately. Use case: wake enemies when player enters the area.

World State

  • Actions

    Clear target

    Removes current target data for this agent. Use case: clear chase data after the player escapes.

    Clear world state key {0}

    Deletes one world-state key on this agent. Use case: clear a temporary flag like "heardNoise".

    Set patrol point {0} to ({1}, {2})

    Stores a patrol waypoint in world state. Use case: set patrol routes at layout start from events.

    Set target UID {0} at ({1}, {2})

    Sets target UID and position in one step. Use case: lock onto player when entering attack range.

    Set world state key {0} to {1}

    Writes any custom world-state key for this agent. Use case: set "hasCover" after finding cover.

Events

  • Conditions

    On alert changed

    Runs when alert tier changes. Use case: switch sprite animation from patrol to combat.

    On plan failed

    Runs when no valid plan is found. Use case: force a safe fallback task like idle.

    On stimulus received

    Runs when a signal is received. Use case: play an exclamation sound when enemy hears noise.

    On task completed

    Runs after task completion is marked. Use case: start movement for the next task.

    On task failed

    Runs after task failure is marked. Use case: play a failed path reaction before retry.

    On task started

    Runs when a new primitive task starts. Use case: branch event logic by CurrentTask.

    On temporary task ended

    Runs when temporary override ends. Use case: resume normal patrol animation.

    On temporary task started

    Runs when temporary override starts. Use case: force a guard to hold position briefly.

State Checks

  • Conditions

    Has active plan

    True when this agent still has work to do. Use case: skip idle logic while a plan is active.

    Has target

    True when a visible target is set. Use case: only run chase movement when target exists.

    Has world state key {0}

    True if a world-state key exists. Use case: check if patrol data was set before using it.

    Is alerted

    True for alerted or combat tiers. Use case: enable weapon behavior only at high alert.

    Is alert tier {0}

    True when alert tier matches selected value. Use case: run separate logic for suspicious vs combat.

    Is enabled

    True when this behavior is processing. Use case: skip AI movement events when disabled.

    Is executing task {0}

    True when current task matches the id. Use case: run patrol code only during task "patrol".

    Is in combat

    True only at combat tier. Use case: start firing logic only when fully engaged.

    Is in temporary task

    True while temporary task override is active. Use case: block normal task completion events during cutscenes.

    Is paused

    True when Pause was applied. Use case: avoid sending duplicate pause commands.

Query

  • Expressions

    AgentType

    Returns this agent type id. Use case: show current AI profile in a debug panel.

    AlertLevel

    Returns alert level from 0 to 1. Use case: drive UI color intensity for enemy awareness.

    AlertTier

    Returns alert tier index. Use case: switch behavior branches with a numeric tier check.

    AlertTierName

    Returns alert tier name text. Use case: print "suspicious" or "combat" to debug text.

    CompletedTask

    Returns last completed task id. Use case: log finished tasks for tuning AI flow.

    CurrentTask

    Returns current task id. Use case: route event-sheet logic by active task name.

    Enabled

    Returns 1 if enabled, else 0. Use case: show current AI processing state in a debug text object.

    FailedTask

    Returns last failed task id. Use case: track tasks that frequently fail and need redesign.

    LastKnownX

    Returns last known target X. Use case: move to investigate where the player was seen.

    LastKnownY

    Returns last known target Y. Use case: move to investigate where the player was seen.

    PlanLength

    Returns remaining task count. Use case: detect empty plans and request fallback behavior.

    PlanTaskAtIndex

    Returns task id at a plan index. Use case: preview next task for debugging.

    PreviousTask

    Returns previous task id. Use case: detect transitions like patrol to chase.

    PreviousTier

    Returns previous alert tier index. Use case: trigger one-time effects on tier changes.

    RestoredTask

    Returns task restored after temporary override. Use case: continue a paused patrol task cleanly.

    StimulusIntensity

    Returns latest stimulus intensity. Use case: scale reaction strength from weak to strong.

    StimulusType

    Returns latest stimulus type text. Use case: handle sound and damage with different responses.

    StimulusX

    Returns latest stimulus X position. Use case: face toward the source of a sound.

    StimulusY

    Returns latest stimulus Y position. Use case: move to inspect where damage came from.

    TargetUID

    Returns current target UID. Use case: fetch target instance for aim or movement logic.

    WorldState

    Reads a world-state value by key. Use case: check custom flags like "isCoverAvailable" in events.