Skip to content

NPC AI dialogue function calls

Frequin edited this page Jul 17, 2026 · 3 revisions

The blue sector AI NPC have a few features so far beyond just chatting, these mostly handled by ragdoll function calls

Sometimes when the AI sees fit to call several functions at once, only one name is returned and only that one will be called successfully

Right now blue-sector is set up for an agent that should probably be changed for a different one

This is the configurations to add to an eventual permanent agent: Dialogue tree script (see attached document) Currently the agent and app handles a few function calls:

Function calls

Teleport:

name: Teleport

Fields: Coords (string)

Call instructions: "Call this when the user asks to be taken or teleported somewhere

These are the ONLY available locations:

Laboratory

ReceptionOutdoor"

Explanations: "teleports the user to the requested scene"

Example output: {"name":"Teleport", "arguments": {"coords":"Laboratory"}}

SetLevel:

name: SetLevel

Fields: DIfficulty(string)

Call instructions: "Call this when the player asks to change the difficulty level

The available difficulty levels are:

Basic

Advanced"

Explanation: "Changes the difficulty level of the FishFeeding scenario"

Example Output: {"name":"SetLevel", "arguments":{"Difficulty":"Basic"}}

PropmtOptionSelect:

Name: PromptOptionSelect

Fields: Option(int)

Call instructions: "Call this function when the user answers a question asked by the assistant if no answers match, choose the closest one You must call this when a question from the script is asked, even if the answers don't match perfect Return the appropriate answer index from the document

Explanation: "Handles voice answers in the lab"

Example output: {"name":PromptOptionSelect, "arguments":{"option":0}}

Implementing

Implementing the Function calls is simple: First add the appropriate property to the CallParameters partial class from the RAGDollSerializer (in an external script to prevent dependencies) Add the function to the CallableFunctions dictionary of the ActionManager, the key and the function name does not need to be the same, though the key must match the function name from the ragdoll interface.

Blue-sectorLabScript.txt

Blue Sector Wiki

Components

Accessibility

Reception Scene

The reception scene is the first scene the player will find themselves in after the application has started. It serves as a central hub between the different work place scenarios.

Fish Laboratory

The fish laboratory is a subsystem of blue-sector, which runs a simulation of tasks related to analysing the health of the salmon population in a fish farm.

Components

Fish Factory

The fish factory is a subsystem of blue-sector, which runs a simulation of several tasks at a farmed Atlantic salmon processing facility.

Components

Other

Fish Feeding

Fish feeding is a subsystem of blue-sector, which runs a simulation of feeding salmon in a fish farming facility.

NPC AI

This section is related to the improvements to the NPC AI functionality and the connecting system that it now works with.

Clone this wiki locally