feat(factions): no raids made only of allies, and allies spare the whole base

A raid whose every spawn is at peace with the player's race is struck from
the list the client sends as possibleEvents, and from the server's valid
event points when raids are world-based.

The structure veto covered only 20 m from the creature, but
FindClosestStaticPriorityTarget searches the whole view range. It now holds
while any allied player is within 100 m, and reads the per-race lists too.
This commit is contained in:
kanym 2026-09-28 21:41:29 +02:00
commit df9c768f92
5 changed files with 291 additions and 107 deletions

View file

@ -427,6 +427,10 @@ Both halves have an off switch under `Factions` in Configuration Manager: **Fact
## Changelog
### Unreleased
- **New - Raids made only of your allies no longer come for you:** an Aswid got raided by the swamp - skeletons and draugr that ignored the player, as the truce says, and then spent the whole event running around the base smashing it, with no way to stop them short of console commands. A raid whose every creature is at peace with your race is now left out of the raids you can receive, so an Aswid no longer gets the skeleton, blob or Bonemass raids. This counts your faction and your race's own list, the Aswid's boss-by-boss one included. Mixed raids still come. With player-based raids (the world modifier) it works on any server; with world-based raids a dedicated server needs the mod installed as well. Thanks to the player who reported it.
- **Fix - Allied creatures smashed buildings when you were not standing right next to them:** the truce only kept them off your structures while you were within 20 m of the creature, and some creatures pick a building from further away than that. Now, while any player they are at peace with is within 100 m, they leave every structure in the area alone, whoever built it. Hit one and its grudge lifts that protection for you, as it does for the truce.
### v1.5.0
- **New - The mod can be translated, and speaks Italian:** every text it shows now comes from JSON files in a `Translations` folder instead of the code - the race menu, status effects, items and pieces, messages, hover prompts, the faction merchants and their jokes, and the compendium. English and Italian ship with it; see [Translations](#translations) to add a language. Race names are separate from the internal race id, so a translated name never breaks a saved character, and merchant and boss names use the game's own translations. Thanks to the player who asked for it, and to Nando for the Italian merchant jokes.
- **Fix - Valheim 1.0 put the Crystal Golem and the Bound Sentry under Decorations:** the new build menu sorts pieces by tags the mod never set, so those two inherited the tags of the stone they are cloned from. Every station of the mod now sits under Crafting.