Setup
You need Unreal Engine 5.8 and an editor on a Mac with Apple Silicon or on Windows (64-bit). The plugin was built and tested with UE 5.8.4 in C++ projects.
1. Install
Copy the NpcAct folder into your project's Plugins folder. Make the Plugins folder next to your .uproject file if it isn't there yet.
2. Enable
Open the project. In Edit → Plugins, search for NpcAct, tick Enabled and restart the editor. Or add it to your .uproject file by hand:
"Plugins": [
{ "Name": "NpcAct", "Enabled": true }
]
If the editor says modules are missing or were built with a different engine version, let it rebuild them.
3. A first NPC on Mock (no model file)
The Mock backend answers from replies the real model recorded, so you can build and test an NPC before you download anything. It knows the lines the example NPCs were recorded with.
- In the Content Browser, open Settings and tick Show Plugin Content. The example personas are in NpcAct Content → Examples → Personas. This page uses PA_DoorKeeper, a door keeper with one tool,
open_door. - Create a Blueprint class based on Actor and name it
BP_Talker. Open it. - Add a variable named
PersonaAsset(the editor shows it as Persona Asset). Set its type to NPC Persona (Object Reference), compile, and set its default value to PA_DoorKeeper. - The new Blueprint's Event Graph already has Event BeginPlay. From it add Load NPC Model:
- Model Path: leave it empty. On Mock, an empty path means the plugin's recorded replies.
- Backend: Mock.
- From Load NPC Model's On Done add Run NPC Turn:
- Persona: drag
PersonaAssetinto the graph as a getter, drag from it and choose Get Persona, and connect that to Persona. - Player Line:
Please open the back room.
- Persona: drag
- From Run NPC Turn's On Tool Call add Print String. Right-click Run NPC Turn's Call pin and choose Split Struct Pin, then connect Call Tool Name to Print String's In String. The node's data pins (Text, Call, Stats, Failure) belong to all four exec pins; each exec pin says which one is filled.
- From On Failed add another Print String. Split the Failure pin the same way and connect Failure Message.
- Compile and save. Drag
BP_Talkerinto your level and press Play.
The screen prints open_door (the Output Log shows it as [BP_Talker_C_0] open_door). That is the door keeper asking the game to open a door. The plugin only reports it: nothing opens unless your game opens it (see Writing NPCs and tools). The call's arguments are on the Call pin: here Get Arg String with Name door returns back_room.
A line the Mock has no recording for gets a stock reply, "Hm. Come back later, traveller.", and no tool call.
4. The real model
- Open Project Settings → Plugins → NpcAct and press Download in the Model section. The file is about 2.6 GB. It goes to your project's
Saved/NpcAct/npc_model_1.bin, never into the plugin, and the page shows Ready when it is checked. If the editor closes before the download ends, the page shows Paused next time, and Resume continues from there. Plan for about 1.7 GB more on the same disk: the first load writes compiled caches (free space). - In
BP_Talker, set Load NPC Model's Backend to GPU. Add Get Model Path and connect it to Model Path. The real backends need the path; only Mock reads an empty one. - Press Play.
The first load compiles the model for this machine, so it takes longer than later loads (warm-up). Then the screen prints open_door again, this time from the model. If the GPU can't run it, Load NPC Model loads the CPU backend instead and still succeeds; its Active Backend pin says which one runs.
Next
- Writing NPCs and tools: your own personas and tools, and the checks your game must make.
- Project settings: before you package for iOS or Android.
- Getting the model onto the device: a packaged game doesn't carry the model.
- The
NpcActDemoexample project: three NPCs (a trader, a door keeper and an innkeeper) with game-side checks and fallback lines, on Mock out of the box.