Byrgenwerthnotes of Paleblood, rebuilding Bloodborne one verified function at a time

Last updated: November 18, 2026

How Enemy AI Works

Players can watch an enemy move, react, attack, or return to an earlier behavior. That sequence does not reveal the code that selected it; this page explains what is known and how a behavior claim gets supported.

At a glance

What is verified
ai_hk_frame_update_0222bc10 steps the shared Havok AI world at 1/30 second.
What is unmapped
The world update at 0x021cdad0, its group/object structure, and each enemy's decisions.
Not proven
Attack selection, cooldowns or navigation. Perception (sight, smell, alert levels) is mostly replaced and partly verified.
Enemy pages
The Clinic Beast applies the perception code to one recorded encounter.

The verified boundary

The verified function ai_hk_frame_update_0222bc10:

  1. steps the shared Havok AI world at 1/30 second;
  2. conditionally copies matrices;
  3. conditionally runs debug drawing.

The world update it calls, at 0x021cdad0, its group/object structure, and each enemy's decisions remain unmapped. So the verified wrapper does not prove target acquisition, attack selection, cooldowns, navigation, or randomness. Read the AI system page for its structures and open questions.

How behavior claims will be supported

Internal AI claims need an identified entity and a traceable path through the game's update logic. Keep a reproducible observation separate from an implementation result. A source claim names:

Part of the claim What to give
Where The function and address
Input The inputs or state it reads
Output The transition it produces
Provenance The merged revision

Tests may support equivalence on their cases without proving untested gameplay situations; label that scope accurately. Timing and probability claims need measurements or directly verified logic, not a single encounter.

The questions every enemy page answers

This page will become the shared explanation of the machinery all enemies use; each enemy page then covers what is particular to that enemy. The first question now has a partial answer; the others are not traced yet. Each one lists the evidence that would answer it.

Question Status Evidence that would answer it
How does an enemy notice the player? partly: sight and smell Hearing, and the routine that raises an entry's alert level
How does it decide what to do next? unknown The update that changes the enemy's state, with each transition's condition
How does it pick an attack? unknown The selection code, and the source of any random number it uses
When can an attack hit, and when does it stop turning? unknown The timing data an attack reads, frame by frame at the game's update rate
When does it give up and return? unknown The distance or time test that ends a chase
What do enemies share, and what is particular to each? unknown The common update every enemy runs, and where an enemy's own code branches off

The shared AI world described above is stepped once a frame by 1/30 s, so frame counts on enemy pages are given at 30 frames per second.

How an enemy page is built

An enemy gets its own page only once its AI code is decompiled and verified in merged Paleblood source. Each page reads like a wiki article, in the same order so pages can be compared: a box of plain facts with a picture drawn by Paleblood's renderer, then Overview, Where you find it, How it notices you, How it keeps track of you, How it fights, Tips, Did you know? and What we don't know yet. Each section opens with a sentence or two anyone can follow, then gives the exact rules and the functions behind them. Every rule carries a label in plain words (confirmed in the game's code, tested on examples only, seen in our test runs, our reading of the code, or read from the game's script), and a closing section, For the curious, lists the functions, checks, pull requests and runs.

Pictures are shown at full resolution; Evidence & Media Review has the rules. The Enemy Directory shows every page as a picture gallery. Related systems include Character, Events, and Physics.

What this page can and cannot claim

Every claim in this section is labelled by the kind of evidence behind it.

Label Meaning
observed Seen during play or in a recording, with its context: starting state, player position and actions, the visible change, and whether it repeats.
inferred A conclusion drawn from code or tests, stated with the scope that evidence covers.
unknown Not yet traced. It stays an open question, with the evidence needed next.
  • Observation is not implementation. An animation, health-bar change, phase transition, hit reaction, movement, or line of dialogue can be observed. On its own it does not identify an entity ID, function, data field, condition, timer, probability, script, or internal state.
  • No guessing. Nothing is filled in from genre convention, a gameplay impression, animation timing, or a displayed bar. Visually similar actions are not assumed to share code. No guessed names, IDs, catalogs, or numerical tables are published.
  • What a source claim needs. The entity, the function and address, the data or state it reads, the result it produces, public Paleblood source at the exact merged revision, tests, and independent review.
  • Evidence kinds differ. Recorded original-game behavior, static analysis, synthetic Paleblood tests, and verified replacements are different kinds of evidence. A link to one does not prove the others.
  • Tests have a scope. Passing tests support equivalence on the cases they cover, not untested gameplay situations. Timing and probability claims need measurements or directly verified logic, not a single encounter.
  • Shared systems are not specific actors. Code that every enemy runs does not, on its own, say what one enemy does. An enemy page ties shared code to one actor only through a recorded run of that encounter, and says so.
  • Absence is not a claim about the game. A missing profile describes the project's research, not what the game contains.

See Evidence & Media Review for how this wiki labels evidence.