# The Monster-Hunter Cell

This is V5's systems engine. Where the Urban-Crime cell lives or dies on the
texture of a city, the monster-hunter cell — V5's Witcher surface — lives or
dies on a single loop the design treats as sacred: **read a contract, track the
beast, name it, brew against it, then fight a thing you have already half-beaten
at the alchemy table.** Battle-prep is _half_ of every monster contract here. A
drowner in a flooded crypt and a wyvern on a wind-scoured plateau are not just
different health bars; they want different oils on your silver sword, different
bombs in your pouch, different signs held to a full stamina bar, and a different
page of the bestiary filled in before the damage multiplier even turns on. It is
the most mechanically dense of the five ruleset cells — four shared mechanic
cores stacked under one campaign — and it is the cell that proves V5's _second_
thesis: that the same engine wearing a crime sandbox elsewhere can also wear a
patient, knowledge-gated action-RPG where preparation is the content.

The cell ships as a Witcher-3-style campaign composition module
(**`V5HunterWitchersPath`**) plus three procedural satellite surfaces — a
contract board (**`V5HunterContractBoard`**), a gwent-style card minigame
(**`V5HunterCardGame`**), and a permadeath roguelike
(**`V5RoguelikeHunterRun`**) — all composed over four shared C++ mechanic cores:
**`V5Alchemy`**, **`V5Signs`**, **`V5MonsterHunt`**, and **`V5Hunting`**. The
promise is **a preparation loop where every system feeds the next**: the
bestiary tells you the monster is weak to a specter oil, the oil comes out of an
alchemy recipe, the recipe wants three foraged ingredients on a respawn timer,
and casting a sign mid-fight spends from the very same stamina pool that your
dodge regenerates. This page inventories what that stack does on the player's
side of the screen and points at the exact Unreal C++ behind each verb. For the
full mode taxonomy, roster, and the scope this slots into, start at the hub:
[../V5_features.md](../V5_features.md).

## What ships, honestly

**The cell's mechanics are real, compiled, and tested.** Every module named
above exists under `V5/ue/Source/` with a `Public/`/`Private/` split, a
`*.Build.cs`, and a `Private/Tests/` automation spec, and the linker has been
through them on this box: `libUnrealEditor-V5Alchemy.so`, `-V5Signs.so`,
`-V5MonsterHunt.so`, `-V5Hunting.so`, `-V5HunterWitchersPath.so`,
`-V5HunterContractBoard.so`, `-V5HunterCardGame.so`, and
`-V5RoguelikeHunterRun.so` all sit in `V5/ue/Binaries/Linux/` next to their
sources (the campaign module is the heaviest at ~891 KB), built by the `ueagent`
user. The signature math is real domain-specific code — a 70 %-toxicity
self-damage threshold, a `1.2×` knowledge-gated damage bonus, a three-condition
perfect-pelt classifier, a deterministic seeded roguelike score — and each is
pinned by UE `IMPLEMENT_SIMPLE_AUTOMATION_TEST` assertions that check _values_,
not truthiness
(`TestEqual("Completed bestiary grants 20 percent damage bonus", …, 1.2f)`).

**The data is C++/JSON catalogs; the art is not in-tree.** Consistent with the
rest of V5's 0-binary-`.uasset` accounting — a `find` over `V5/ue/Content`
returns **zero** cooked `.uasset` files — the catalogs that drive these systems
ship as version-controlled JSON and are validated hard:
`Content/V5Alchemy/Data/alchemy_catalog.json` (84 KB),
`Content/V5MonsterHunt/Data/monster_hunt_catalog.json` (44 KB), and
`Content/V5Hunting/Data/hunting_catalog.json` (43 KB). So the _logic and
balance_ of every signature system is real, while the meditation-pose brewing
montages, monster meshes, sign Niagara systems (referenced by `FSoftObjectPath`
at `/Game/V5Signs/Niagara/NS_*`), and era-correct biome meshes those catalogs
name are _described_, not baked. Where a claim depends on that art, this page
says so.

**"Cell" means a mechanic stack composed by thin variant modules.** As in the
Urban-Crime cell, the frame-critical verbs live in the four shared cores, and
the playable surfaces are composition modules whose `Build.cs` wires the
mechanics they need: `V5HunterWitchersPath.Build.cs` pulls in `V5Alchemy`,
`V5Signs`, `V5MonsterHunt`, `V5Melee`, and `V5Squad`;
`V5HunterContractBoard.Build.cs` pulls in `V5HunterWitchersPath`,
`V5Investigation`, and `V5MonsterHunt`. The honest consequence is that the
variant modules are heavier on **catalog assembly and shape-gating over large
authored datasets** than on novel per-frame algorithms — those live one layer
down. And one boundary matters throughout: the core systems ship as
`UBlueprintFunctionLibrary` verbs that _compute_ outcomes (toxicity, pelt grade,
sign cost, trail weights); the in-world campaign actors **apply** those outcomes
to health, inventory, and the world. The libraries are the honest seam between
math and play, and the sections below keep that distinct.

## The monster-hunter experience — what the cell plays like

Strip the satellites away and the spine is one long campaign that fuses the
whole stack. `V5HunterWitchersPath` is the Witcher-3 surface, and its catalog —
validated in
`V5/ue/Source/V5HunterWitchersPath/Private/V5HunterWitchersPathSystems.cpp` — is
a content spine with teeth. The builder authors **130 missions** (a
`MainQuestCount = 70` plus a `ContractQuestCount = 60`) across **four regions**
(`EV5HWPRegion`: Coastal Duchy, Northern Wildlands, Eastern Marsh, Mountain
Freehold) whose areas the spec sums and demands total **exactly 155.0 km²**
(`FMath::IsNearlyEqual(…, 155.0f, 0.01f)`), with **5 endings**, **16 hunter
companions**, and **120 alchemy loadouts** surfaced — every count pinned in
`V5HunterWitchersPathTests.cpp`
(`TestEqual("Campaign has 130 missions", …, 130)`). The protagonist is a
mutated, poison-resistant monster hunter; the IP-clean final name lives in the
§82 substitution manifest, and this page uses "Witcher's Path" only as
inspiration shorthand, the same posture the product takes with "Witcher Sense"
and "Wanted Stars."

The campaign is where the stack's interlock becomes visible. Bestiary knowledge
_gates_ contracts: a contract-availability escalator demands rising bestiary
completion as the campaign deepens — **25 %** for early contracts, **40 %** past
index 20, **70 %** past index 45 — so you cannot brute-force a late drowner
contract you have never studied. The long-tail narrative is real too: a dialogue
ripple system schedules choices to pay off in a **10-to-20-hour** downstream
window (`Ripple.EarliestPayoffHour >= 10`, `LatestPayoffHour <= 20`), each
ripple touching **≥ 3** later missions. A Year-1 expansion authors a
school-trial arc — **4 ritual missions**, **15 new bestiary monsters**, a
Manticore school variant with a **≥ 10 %** toxicity-resistance bonus, and a
`TrialMaxSafeToxicity` gate of **85 %** that ties the marquee endgame back to
the alchemy ceiling below. All of this is authored-catalog depth with id-drift
guards; the playable geometry and montages behind it are described, not cooked.

## The hunting, alchemy & crafting systems

This is the cell's beating heart, and the four cores are genuinely
domain-specific code rather than renamed CRUD. The diagram below is the
interlock; the subsections walk each core in turn.

```mermaid
flowchart TB
    subgraph HUNT["Monster-hunter mechanic cores (compute verbs)"]
        Alch["V5Alchemy<br/><sub>120 recipes · resist≤90% · tox≥70% → self-dmg · 4-day respawn</sub>"]
        Signs["V5Signs<br/><sub>5 signs × Base/Charged · 25-node tree · cost−3%/tier</sub>"]
        Mon["V5MonsterHunt<br/><sub>80 bestiary / 12 cat · sense 0.45 sat · trail 1/d · 100% → 1.2× dmg</sub>"]
        Hunt["V5Hunting<br/><sub>65 species · perfect = caliber + clean + ≤15min</sub>"]
    end
    GAS["V5Gameplay · GAS<br/><sub>UV5_AttributeSet_Combat stamina</sub>"]
    Signs -->|reads GetStamina| GAS
    Mon -->|WeakVsOil / WeakVsSign / WeakVsBomb| Alch
    Mon -->|WeakVsSign| Signs
    Mon -->|100% completion| DMG["bestiary damage gate"]
    Alch -->|oils / potions / bombs| DMG
    WP["V5HunterWitchersPath<br/><sub>130 missions · 155 km² · composition</sub>"] --> Alch & Signs & Mon
    WP --> Melee["V5Melee · V5Squad"]
    Hunt -->|perfect pelts + $| Trapper["TrapperProgression<br/><sub>outfit crafting</sub>"]
```

### Alchemy — a real consumable economy with a toxicity ceiling

`V5Alchemy` models the full brew loop, not a crafting menu. The catalog is **120
recipes** (30 each of `Potion`/`Oil`/`Bomb`/`Decoction`, the
`EV5AlchemyRecipeType` enum) drawing on **180 ingredients** (60 herbs, 60
mushrooms, 60 monster parts), each recipe consuming _exactly three_ — and the
JSON loader (`V5AlchemyRecipe.cpp`) enforces all of it: `schemaVersion == 1`, no
duplicate ids, exactly three ingredients per recipe, every ingredient reference
resolvable, a brew duration in the **5-to-60-minute** band, at least one effect,
and `ValidateCounts` refusing anything but the 120/30/30/30/30 and 180/60/60/60
shape.

The load-bearing runtime is
`UV5_Alchemy_ToxicitySystem::ApplyConsumableToxicity`
(`V5/ue/Source/V5Alchemy/Private/V5AlchemySystems.cpp`). It scales a recipe's
`ToxicityPercent` by a resistance scalar (`1.0f - Clamp(resistance, 0, 90)/100`,
so resistance can never exceed 90 %), accumulates it toward
`MaxToxicityPercent`, and once the bar crosses the
`ToxicityDamageThresholdPercent = 70.0f` constant it _starts hurting you_:
`SelfDamage = (Current − 70) × 0.5`, accumulated across doses into
`AccumulatedSelfDamage`. That single threshold is the Witcher "don't chug five
decoctions" rule expressed as interpolation math, and the spec proves it against
values, not flags: a first decoction stays under the line
(`TestFalse("First decoction can remain under self-damage threshold", …)`), a
second stacks past 70 and trips self-damage
(`TestTrue("Stacking past 70 percent triggers self-damage", …)`), and the damage
accumulates. Around it sit `UV5_Alchemy_Inventory::GetSlotCapacity` (typed slot
caps — **5 potions, 2 oils, 2 bombs, 1 decoction** — so high-toxicity decoctions
are deliberately scarce), `AV5_Alchemy_BrewingStation::BrewRecipe` (real
ingredient-count validation and consumption against a `BrewRequest`, returning a
typed `FailureReason` on a missing ingredient), and
`UV5_Alchemy_RespawnSchedule`, which gates foraged nodes behind a
`RespawnCadenceDays = 4.0f` cooldown so over-harvesting a biome actually
depletes it (`TestEqual("Respawn cadence is four days", …, 4.0f)`).

### Signs — five GAS verbs gated on a shared stamina pool

`V5Signs` carries the five elemental casts (`EV5SignType`:
`FireCone`/`ForceWave`/`Shield`/`TrapGlyph`/`MindSuggest` — the renamed
Igni/Aard/Quen/Yrden/Axii), each with a `Base` and `Charged` variant and a
five-tier upgrade tree. The catalog (`V5SignCatalog.cpp`) builds them
procedurally: **5 sign families → 10 variants → 25 upgrade nodes → 10 Niagara
paths**, each node deriving `DamageMultiplier = 1 + 0.12 × Tier` and
`CostReductionPercent = 3 × Tier`. The interesting code is
`UV5_Sign_StaminaGate::EvaluateSignCastFromCombatAttributes`, which is
explicitly wired to the shared combat attribute set: it reads `GetStamina()` /
`GetMaxStamina()` off `UV5_AttributeSet_Combat` rather than carrying its own
pool, so signs draw from the _same_ stamina that dodge and parry regenerate. The
gate applies the upgrade node's cost reduction (clamped to 80 %), scales
`EffectMagnitude` by the node's multiplier, and enforces that a
`bRequiresFullStamina` charged cast needs **≥ 95 %** of max
(`FullStaminaThreshold = MaxStamina × 0.95`) — failing loud with a typed
`FailureReason` rather than silently succeeding. `V5Signs.Build.cs` links
`GameplayAbilities` directly, so each sign is a real `UV5_Ability_Sign_*` over
the GAS spine, and the spec confirms each ability derives from
`UV5_Ability_Sign_Base` and reports `MatchesCell(EV5Cell::Hunter)`.

### Bestiary & Witcher-Sense — the investigate-then-fight loop

`V5MonsterHunt` is where the cell's hunting fantasy lives. The bestiary is **80
entries across 12 categories** (`EV5MonsterCategory`:
Specter/Vampire/Drowner/Necrophage/Hybrid/Ogre/Dragon/Golem/Undead/CursedOne/Doppler/Elemental),
each carrying `WeakVsOil` / `WeakVsSign` / `WeakVsBomb` tags that close the loop
back to alchemy and signs. `UV5_MonsterHunt_WitcherSense::SetSenseEnabled` drops
camera saturation to `0.45` and lights up six clue colours (amber scent, crimson
blood, ochre track, green foliage, blue sound, violet magic);
`BuildHighlightedClues` filters to clues within range and **sorts them by
proximity**, and `UV5_MonsterHunt_TrailFollowing::BuildTrailFromClues` turns the
sorted clues into nav markers weighted `1 / max(1, distance)` so the trail
naturally pulls toward the nearest sign
(`TestTrue("Trail nav weights prefer closer clues", …)`). Bestiary completion is
a real monotonic state machine: `ApplyUnlock` advances a monster from `Tome` (25
%) → `Encounter` (40 %) → `CombatStudy` (70 %) → `Defeat` (100 %), taking the
running max so a scholar tome bought early can pre-fill knowledge, and at 100 %
`UV5_MonsterHunt_DamageBonus::GetDamageMultiplier` returns a `1.2×` bonus —
knowledge literally becomes damage, and the spec pins both the 1.0 below 100 %
and the 1.2 at completion. The contract scheduler
(`UV5_MonsterHunt_ContractPostingScheduler`) posts on a **36-hour** cadence and
expires entries after `ContractExpirationHours = 168.0f` (seven in-game days),
verified by a spec that posts at hour 72 and asserts expiry at 240; scholar
tomes cost **80** in-game currency.

### Hunting — perfect-pelt scoring and trapper crafting

`V5Hunting` is the frontier/hunter foraging economy that the cell shares with
the Frontier cell (**65 species, 60 trapper outfit recipes**, all three pelt
grades authored). `UV5_Hunting_PerfectPeltScoring::ScorePelt` encodes the
RDR2-style cleanliness rule precisely: a `Perfect` pelt requires the _correct
caliber for the species_ **and** a clean kill (`ShotCount == 1` to head or
vital) **and** field-dressing within `PerfectFieldDressMinutes = 15.0f` — miss
any one and you drop to `Good` or `Poor` with a typed reason, each downgrade
path value-checked (wrong caliber → Poor, late dressing → Good, body shot →
Good). `UV5_Hunting_AnimalAI::EvaluateAnimalStimulus` resolves prey behaviour by
strict priority — a nearby predator forces `Fleeing` at **1.2×** flee speed,
then line-of-sight inside `SightRangeMeters` flees, then sound inside
`HearingRangeMeters` only `Alert`s (so a snapped twig does not always spook the
deer) — and `UV5_Hunting_TrackingMode` is the frontier "Eagle Eye" cousin of
Witcher-Sense (saturation `0.52`, amber accent, proximity-sorted signs). The
**crafting** payoff is `UV5_Hunting_TrapperProgression::EvaluateRecipeUnlock`,
which counts how many of a recipe's required species you have delivered as
_matching_ perfect pelts and unlocks an outfit only when both the perfect-pelt
count and the dollar cost are met — over-harvesting the wrong animal does not
help. `CarcassTransport` enforces the one-rear-slot horse constraint and refuses
`CatchOnly` species, the same physical honesty the rest of the cell applies to
its economies.

## The contract economy and the procedural surfaces

Around the campaign sit three satellite modules that reuse the cores. Each is a
composition module — heavier on validated catalogs than on new per-frame math —
but each carries at least one real runtime algorithm, and all three are compiled
and value-tested.

### Contract boards — the quest delivery surface

`V5HunterContractBoard` is the town-board layer over the `V5MonsterHunt`
scheduler. Its catalog authors **24 contract boards** (validated as exactly **6
per region** across the four regions), **60 contract templates**, and an
**8-stage contract flow** (ReadBoard → Alderman → Investigate → Identify →
Prepare → Fight → Proof → Reward) — the full Witcher contract ritual encoded as
a state sequence. Posted contracts inherit the core's 36/168-hour cadence
(`TestEqual("Posted contracts expire after seven days", …, 204.0f)` — a contract
posted at hour 36 expiring at 36 + 168), expired rows dim their opacity below
1.0, and because the module depends on `V5Investigation`, each contract's
investigation phase pushes into the shared evidence/Mind-Palace surface the
period cell shares.

### The card minigame — a self-contained collectible game

`V5HunterCardGame` is the gwent-equivalent, and notably its `Build.cs` depends
on _only_ `V5CardGame` — it is a pure content-and-rules composition over the
shared card engine. Its `ValidateModeCatalog` pins **320 cards** across **5
factions at 64 each** (GroveWardens, AshenCourt, Tidebound, IronVow,
StarfallCircle), **4 in-fiction tournaments** (each seeding the player plus
three opponents), **5 merchant side missions**, a **25-card** starter deck, and
a **2-player** PvP mode that runs on an `bUsesAuthoritativeActionHash` flag —
the same anti-cheat posture the online surfaces use. The tournament resolver
runs a real best-of bracket to a single champion, and a side-mission progress
evaluator tracks wins-remaining and gates rare-card rewards behind merchant-lead
purchases.

### Roguelike Hunter Run — permadeath over the procgen core

`V5RoguelikeHunterRun` composes `V5Procgen` and `V5OnlineServices` into a
permadeath run, and it carries the cell's most algorithmic satellite. The
catalog authors **24 procedural map templates** and **20 Year-1 run modifiers**
(alchemy-limited, signs-disabled, toxicity-surge, armor-shattered…), each with
its own loot/toxicity/enemy multipliers and a leaderboard score bonus. Run
generation is **deterministic and seeded** — two runs from the same seed produce
an identical `StableFingerprint` — and lays out **5 branching steps** with a
boss as the final step. Death is final: the lifecycle machine resolves to
`FailedPermadeath`, ends the run, and increments `DeathCount`. The score is a
genuine formula —
`BaseScore = CompletedSteps × 1000 + RewardCrowns / 5 − ElapsedSeconds / 2`,
then scaled by `(1 + ModifierScoreBonusPercent / 100)` and floored at zero — and
a run is only leaderboard-eligible when it completed cleanly and passed
anti-cheat, with the per-run leaderboard scoped to the seed so runs are only
compared against the same generated dungeon.

## Where this connects

The monster-hunter cell is one face of a single game, and it hands off at
well-defined seams:

- **The shared foraging economy.** `V5Hunting` — perfect pelts, prey AI, trapper
  outfits — is the same core the cowboy cell hunts with; the Frontier cell
  spends it on Dead Eye and bounty rather than monster contracts. See
  [./frontier-cell.md](./frontier-cell.md).
- **The other systems-first cell.** The Sci-Fi squad cell is the cell most like
  this one in spirit — a deep, loadout-driven preparation loop — but spends it
  on squad command and hard-vacuum tactics rather than alchemy. See
  [./scifi-galactic-squad.md](./scifi-galactic-squad.md).
- **The cross-cell spine.** The wanted curve (era-scaled to village watch and
  lord's guard for this cell), the honor bridge (the hunter's `WitcherHumanity`
  feeding the cross-cell moral compass), and the Bureau-XP ledger every cell
  sits on are shared with the crime cell — see
  [./urban-crime-cell.md](./urban-crime-cell.md).
- **Architecture companion.** The alchemy/toxicity, sign-stamina, bestiary, and
  hunting verbs — in prose with line citations, alongside the period-drama and
  Bureau systems — live in
  [../architecture/hunter-period-systems-and-bureau-spine.md](../architecture/hunter-period-systems-and-bureau-spine.md).
- The feature hub: [../V5_features.md](../V5_features.md).
