Crusader_Decomp/docs/observer-npc-analysis.md
Maddo 1b70294ef7 Add feasibility assessments for Japanese No Remorse Windows modding and Observer NPC analysis
- Created a new document outlining the feasibility of modding the Japanese version of No Remorse on Windows, detailing executive assessments, established evidence, modding base suitability, and potential risks.
- Introduced a comprehensive analysis of the Observer NPC in No Remorse, including its identity, data structure, AI behavior, and comparisons with similar NPCs, along with open questions for further investigation.
2026-10-10 14:42:43 +02:00

14 KiB

No Remorse Observer NPC Investigation

Executive Read

No Remorse has a real NPC definition named Observer: DTABLE row 6 selects actor shape 0x033c (828). The strongest evidence does not support a unique Observer-specific AI script. Instead, row 6 configures the normal native NPC activity system with a pacing activity and two Attack5 defaults. The resulting behavior is a mobile actor that can transition into the shared attack process when its visibility/alert path fires.

The unusual part is the mismatch between that ordinary combat-capable runtime profile and the sparse presentation/content evidence: the Observer class has only one short event body, its current renderer preview deliberately avoids lower frames because they are blank or broken, and map records that resolve to Observer are often paired controller records rather than unambiguous actor spawns. "Unused" is therefore a plausible description of its encounter role, not a proven description of its executable/data status.

Identity And Data

No Remorse STATIC/DTABLE.FLX contains row 6:

Field Value Meaning / evidence
Name Observer DTABLE name object 2, row 6
NPC row 6 Index used by the DTABLE-backed NPC creation path
Shape 0x033c (828) Actor shape stored at NPCDat offset 0x3e
HP range 35-45 Minimum/maximum HP at row offsets 0x00/0x02
Weapon selectors 1 / 2 Words at offsets 0x18/0x1a; these are data selectors, not proof of two simultaneously equipped weapons
Default activities 3 / 5 / 5 Words at offsets 0x1e, 0x40, and 0x42

The 142-byte NPCDat row and parallel 32-byte name row are loaded from FLEX objects 0 and 2. The layout is corroborated by the NPCDat reader and the local NPC spawner investigation. Native NPC_SetDataFromDTable (10e8:0152) reads a 0x8e-byte row into a local buffer, equips a weapon using the row's +0x18 selector when nonzero, and writes the three activity fields into the actor's 0x06/0x08/0x0a activity slots.

Shape 0x033c is an NPC because it is the shape in DTABLE row 6 and is referenced as Observer's actor shape by the spawn data. The map renderer's catalog currently labels it Helper Geometry and notes that its display name was derived from NPC self-shape comparison in USECODE; that catalog label is not evidence that the actor is scenery.

Native AI

Configured Activities

The activity values are named in the live No Remorse CRUSADER.EXE Ghidra database:

DTABLE field Value Native activity Effect when selected
0x06 / default activity 0 3 Pace Creates PaceProcess (1100:0693, run at 1100:0708)
0x08 / default activity 1 5 Attack5 Creates the shared AttackProcess
0x0a / default activity 2 5 Attack5 Same activity family; used by other callers that select activity field 0x0a

NPC_StartNextNPCActivityBehaviorProcess (10e8:2cfa) resolves special activity selectors for fields 0x06, 0x08, and 0x0a, then applies common gates: the NPC must be alive, not the controlled actor, not suppressed by the relevant actor flag, and inside a fast area before an activity process is created. It records current/previous activity and avoids restarting an activity that is already current. NPC_ResetForEgg (10d8:04b1) is a confirmed creation path that loads/sets the three activity fields and starts the field-0x06 activity. Exact authored 0x04d0 spawner pairs can also supply activity values through their paired records, so the DTABLE row is the baseline profile, not a guarantee that every map instance uses all three unmodified.

Observer's Likely Runtime Loop

For an Observer whose initial field-0x06 activity remains DTABLE value 3, the expected loop is:

  1. Start PaceProcess, rather than GuardProcess or LoiterProcess.
  2. Before pacing, PaceProcess::Run calls NPC_StartBehaviorInField0x8IfCanSeeControlledNPC (1100:026e). That helper checks that the actor is entirely on screen, field 0x08 is nonzero, the current activity is not already the field-0x08 activity, and the controlled NPC is visible.
  3. If those checks pass, field 0x08 is selected. For Observer, that is Attack5, which creates the common attack process.
  4. Otherwise, when not busy, PaceProcess::Run tries a walk animation in the actor's current direction. A successful walk clears its local failed-step count and waits for the animation. After a failed walk, it performs a stand/turn-around response and waits 60 ticks; after more than one failed step it requests another activity.
  5. That blocked-movement fallback requests Attack5 for ordinary shapes. The explicit surrender exceptions in the native branch are shapes 0x2f5, 0x2f7, 0x2f6, 0x344, and 0x597; Observer shape 0x033c is not in that list.

This makes Observer a pacing/roaming combat actor, not an inert lookout. However, this code does not prove that every Observer placement immediately sees or attacks the player: visibility, fast-area activation, busy state, and map-specific activity overrides all gate the transition.

Attack5 is an activity/process selector, not a literal weapon or a complete behavior description. The resulting AttackProcess uses the actor's combat-tactic state and COMBAT.DAT machinery. The confirmed egg reset path initializes tactic number 0; the COMBAT.DAT analysis records the shipped tactic 0 name Dumb and an unresolved compatibility detail around how tactic 0 is interpreted. Do not infer a precise firing pattern for every Observer spawn from the activity value alone. At difficulty level 4, the native selector can randomly remap an Attack5 request to AttackA (10e8:2cfa); this is shared NPC behavior, not an Observer-specific rule.

No Bespoke Observer AI Script

The extracted OBSERVER class (0x033c) has no bodies for setActivity, hit, gotHit, schedule, enterFastArea, or the other common events. Its only non-empty common event is slot 0x0e, calledFromAnim:

set_info(0x021A, *(arg_06));
process_exclude();
return;

That is a short state/process callback, not a custom movement or combat routine. Compare the neighboring GUARD and SCIENTIS slot-0x0e bodies: both perform the same setup and additionally spawn NPCDEATH.slot_20. Observer's body does not. This is a real script difference, but it only proves that Observer omits that scripted callback; it does not prove that the engine has no native death handling.

The distinction between actor identity and controller identity matters here. Shape 0x04d0 uses the MONSTER class as a spawner/controller. Its enterFastArea body checks frame 0 and mapNum & 8, then launches MONSTER.equip; paired ITEM.slot_2D logic handles actor creation. Those MONSTER event bodies are not Observer's AI. See the paired-spawner investigation for the unresolved question of which member of some frame-0/frame-1 pairs supplies the final spawned NPC row.

Comparison With Similar NPCs

All values below are from the No Remorse DTABLE rows; activity names are the native enum values.

NPC row Shape HP Weapon selectors +0x18/+0x1a Activities 0x06/0x08/0x0a Main contrast
Observer 6 0x033c 35-45 1 / 2 Pace / Attack5 / Attack5 Baseline under investigation
GUARD 4 0x02fd 20-35 1 / 2 Pace / Attack5 / Attack5 Same activity profile and weapon selectors, lower HP; its animation callback adds NPCDEATH
Thermatron 10 0x0338 250-250 7 / 5 Pace / Attack5 / Attack5 Same activity profile, much higher HP and different weapon selectors
RoamingSusan 11 0x02cb 35-45 1 / 2 Loiter / Attack5 / Attack5 Same HP and weapon selectors; starts in Loiter, not Pace
Scientist 7 0x0344 5-12 0 / 0 Loiter / Attack5 / Attack5 Unarmed selectors and low HP; PaceProcess specifically treats this shape as a surrender exception after repeated blocked steps
Vetron 19 0x04e6 425-625 9 / 10 Pace / Attack5 / AttackA Same initial activity family, much higher HP and a distinct third default

The most useful comparison is not simply Observer versus the NPC named GUARD. Observer shares GUARD's and Thermatron's default activity tuple, but the activity value 3 starts PaceProcess; the named GuardProcess is selected by the separate activity value 8. Observer therefore does not inherit the named Guard's stationary guard/idle loop just because the DTABLE contains an armed humanoid row or the character is called Observer.

At the process level, GuardProcess::Run (1100:0a0e) attacks when the player is visible and otherwise sleeps or chooses random idle animations. LoiterProcess::Run (1100:0bfa) plays idle animations or pathfinds to randomized points near its anchor. Observer's activity 3 chooses the distinct PaceProcess, which attempts a directional walk and can transition to field 0x08's attack behavior. These process differences are stronger evidence than visual resemblance or class names.

Maps And Spawn Evidence

The current No Remorse map-export audit reports DTABLE row 6 on maps 6, 7, 9, 16, 23, 42, 47, 55, 56, 62, 69, 116, 170, 248. The No Remorse demo audit reports no Observer map occurrence. This establishes map-data presence in retail exports, not that every listed map is an intended encounter or that every preview resolves to a live Observer. The audit is maintained in the map-viewer NPC spawn audit.

Examples that show why the distinction matters:

  • Remorse map 69 has a frame-0 family-7 0x024f monster egg with npcNum = 6, which resolves directly to Observer in the current preview pipeline.
  • On map 1, a frame-0 0x04d0 record with npcNum = 6 is paired with a frame-1 record resolving to RoamingSusan, ChemSuitGuy, or GUARD. The MONSTER controller can be dormant or paired; those records are not equivalent proof of an Observer actor.
  • On map 248, some frame-1 0x04d0 records resolve to Observer while their paired frame-0 controller records contain npcNum values such as 100 or 134, which do not resolve in the current Remorse DTABLE preview. These are stronger Observer-spawn candidates, but the paired creation arguments still need a call-site-level close.

These examples and the broader pair scan are detailed in the map-1 spawner investigation. The evidence supports calling Observer a shipped, spawnable NPC definition with map placements. It does not establish that maps 6, 7, or 248 are all "unused," nor does the label Observer by itself establish a surveillance-specific combat role.

Sprite And Presentation State

The No Remorse reference data identifies shape 0x033c as an NPC-derived shape, but the current map renderer has only indexed Observer sprite entries at frames 7 (121 x 98) and 15 (48 x 35). Its preview code explicitly chooses frame 0x0f for Observer because lower-numbered preview frames are blank or broken. That is concrete evidence of incomplete usable preview art in the current pipeline and is consistent with the reported missing orientations.

The atlas is a curated set of scene/preview sprites, not a complete inventory of every frame in SHAPES.FLX. The code's frames.length > 15 test establishes that frame 15 exists in the loaded shape, but the two indexed atlas entries do not establish that the full shape contains only two frames. Exact missing facings and animation sets remain unverified; do not treat frame numbers 7 and 15 as a complete orientation table.

Open Questions And Next Checks

  1. Enumerate shape 0x033c directly from the full No Remorse SHAPES.FLX; classify blank frames, animation groups, and facing coverage instead of relying on the preview atlas.
  2. Trace every map-69 0x024f Observer egg through its trigger, difficulty gate, and field-0x06 activity startup in the retail executable.
  3. Close the 0x04d0 paired-spawner call argument ownership so frame-0/frame-1 pairs can be classified as actual Observer spawns or controller-only records.
  4. Recover the initial activity and combat-tactic values for actors created through the 0x04d0 path, including whether map/partner fields override DTABLE row 6.
  5. Test the Observer calledFromAnim path in a live No Remorse session and determine whether native death handling replaces the absent NPCDEATH.slot_20 callback.
  6. Compare retail CRUSADER.EXE handling of tactic 0 against shipped COMBAT.DAT entry Dumb to establish Observer's concrete weapon/fire loop on the egg-spawn path.
  7. Audit the listed map IDs against mission routing and editor-only/unreachable status before labeling any placement definitively unused.

Evidence Pointers

  • No Remorse DTABLE and NPC row layout: NPC spawner data, STATIC/DTABLE.FLX, and ScummVM's NPCDat loader.
  • Observer event body and class slots: USECODE/EUSECODE_extracted/pseudocode/OBSERVER/slot_0E_calledFromAnim.txt and USECODE/EUSECODE_extracted/class_event_index.tsv.
  • Native activity selection: NPC_SetDataFromDTable (10e8:0152), NPC_StartNextNPCActivityBehaviorProcess (10e8:2cfa), NPC_StartBehaviorInField0x8IfCanSeeControlledNPC (1100:026e), PaceProcess::Run (1100:0708), GuardProcess::Run (1100:0a0e), and LoiterProcess::Run (1100:0bfa) in live No Remorse CRUSADER.EXE.
  • Process family ownership: NPC action process layout.
  • 0x04d0 controller and map pair evidence: NPC spawners and targeted map investigation.
  • Combat tactic data and tactic-0 caveat: COMBAT.DAT.