RacesOfValheim/JotunnModStub/Factions
kanym fac6e3986c fix(factions): stop same-faction mobs from smashing player structures
The truce only ever patched BaseAI.IsEnemy, but MonsterAI.UpdateTarget
picks a structure to attack (m_targetStatic) through a completely
separate gate - m_attackPlayerObjects, a flag baked into the prefab
(true for Troll among others) - and never calls IsEnemy at all. A Trol
player, exempt from a cave's resident Troll in combat, could still
watch it flatten a workbench built moments earlier in its own cave.

FactionStaticTargetPatch postfixes UpdateTarget and vetoes the pick if
a same-faction player is within 20 m (matching FindRandomStaticTarget's
own 10 m search radius with room to spare), rather than trying to
intercept the two private target-selection methods themselves.

Confirmed fixed by build+playtest.
2026-08-09 16:46:23 +02:00
..
FactionHostilityPatch.cs fix(factions): stop same-faction mobs from smashing player structures 2026-08-09 16:46:23 +02:00
FactionMerchant.cs factionsmerchants 2026-08-06 10:13:57 +02:00
FactionMerchantCatalog.cs feat(races): Skadi hollow chain, plus the pending Dvergar and Fenrir ones 2026-08-08 14:58:43 +02:00
FactionMerchantJokes.cs factionsmerchants 2026-08-06 10:13:57 +02:00
FactionMerchantPatches.cs factionsmerchants 2026-08-06 10:13:57 +02:00
FactionMerchantRuntime.cs factionsmerchants 2026-08-06 10:13:57 +02:00
FactionMerchantSellPanel.cs factionsmerchants 2026-08-06 10:13:57 +02:00
FactionMerchantSetup.cs factionsmerchants 2026-08-06 10:13:57 +02:00