AI Configuration Guide
Configure extensible, layered AI in a PoBDS project with an elite enemy recipe, acceptance checks and a copyable agent prompt.
Extend an existing configuration
Find the entry and available capabilities
Inspect
RootGraphon the Actor’sPoBDSComponent. Open the root flow in PoBDS Studio, follow its entry wire to the first BDS, and inventory existing nodes, variables and callable Actor members.Give each layer one decision
Let the top layer choose an objective such as engage or patrol. Let the next layer choose a tactic such as attack or defend. A skill or defense layer makes local choices. Leaf flows handle movement, firing and cleanup.
Compose existing Actions first
Use Action nodes for movement, animation, Actor calls and variable writes. Pass arguments through typed pins. Advance persistent work in Update, signal Finish at a defined endpoint, and wire FINISHED to continue after all Actions complete.
Add missing framework capabilities
Expose readable properties with
[PoBDSProp]and callable methods with[PoBDSMethod]. Mark evaluation-safe queriesPure = true. Put side effects in Actions. After adding members, run PoBDS → Generate.
Example elite enemy configuration
The diagram shows the existing Prism Rogue demo. The following rules are a separate example for a reusable tactical layer. Compare scores among candidates within the same layer.
| Candidate | Gate | Base score | Switching and execution |
|---|---|---|---|
| Emergency dodge | An incoming projectile threatens a hit and an escape direction is available | 100 | Preempt → dodge flow |
| Low-health defense | Health is below 40% | 70 | Choose preemption per game rules → child BDS picks cover, healing or retreat |
| Maintain fire | A hostile target is within range and visible | 40 | Wait → firing flow |
| Reposition | A hostile target exists | 10 | Wait → movement flow |
Turn switching rules into acceptance checks
Keep the winning Ability active
Make one Ability win several evaluations in a row. Confirm that its Action keeps updating and enters again only after the previous behavior completes and is selected again.
Check waiting and preemption
Make an ordinary candidate lead while a behavior is running. Then trigger an emergency and verify that the relevant ancestor can preempt the old branch and that child cleanup runs first.
Check parallel work and cleanup
Run movement and firing in parallel with separate completion conditions. Connect Graph Exit to cleanup Actions for stopping fire, releasing reservations or clearing variables. Cleanup runs Enter and Exit.
Reproduce edge cases with a fixed step
Compare the score leader with the actual executor in decision history. Use integer milliseconds, millimeters and simulation RNG to reproduce edge cases. Read cached sensing results from the Actor.
Copy this prompt for an AI assistant
Goal: configure an AI for [character and combat objective] in this Unity project.
1. Locate the root flow on PoBDSComponent and inspect the available BDS assets, variables, Actor members and registered Actions. List reusable assets with verified paths.
2. Draft the decision hierarchy. For each Ability, record its gate, base score, bonuses, preemption policy, Execution and completion condition.
3. Configure first. Use the editor or PoBDSDataSerializer to write binary configs while preserving existing references and stable IDs.
4. Extend the Actor when a required primitive is missing. Separate pure queries from state changes, expose typed parameters and categories, and run PoBDS > Generate.
5. On the same Actor, verify waiting, preemption, continued execution of the same Ability, parallel completion and Graph Exit cleanup. Report the observed decision paths, changed assets and test results.Related manual and API pages
Prism Rogue layers and assets · Nodes and pin contracts · Actor extension API · Binary configuration API · Parallel child flows · Graph Exit and cleanup · Live debugging and decision history