Merge branch 'feat-faction-group-grudge'

# Conflicts:
#	README.md
This commit is contained in:
kanym 2026-11-05 13:05:45 +01:00
commit 064708d844
3 changed files with 47 additions and 1 deletions

View file

@ -21,6 +21,8 @@ namespace RacesOfValheim
public static ConfigEntry<bool> HostilityEnabled;
public static ConfigEntry<bool> MerchantsEnabled;
public static ConfigEntry<float> GrudgeDuration;
public static ConfigEntry<bool> GrudgeSpreadEnabled;
public static ConfigEntry<float> GrudgeSpreadRadius;
// Null-safe, defaulting to ON, for the same reason WarVultureConfig guards its own reads:
// a patch that somehow runs before Bind() should behave like the shipped default rather
@ -28,6 +30,8 @@ namespace RacesOfValheim
public static bool Hostility => HostilityEnabled?.Value ?? true;
public static bool Merchants => MerchantsEnabled?.Value ?? true;
public static float GrudgeSeconds => GrudgeDuration?.Value ?? 60f;
public static bool GrudgeSpreads => GrudgeSpreadEnabled?.Value ?? false;
public static float GrudgeSpreadMeters => GrudgeSpreadRadius?.Value ?? 20f;
public static void Bind(ConfigFile config)
{
@ -60,6 +64,18 @@ namespace RacesOfValheim
"old absolute truce.",
new AcceptableValueRange<float>(0f, 600f)));
// Joacwoo's request: the truce made the swamp and the crypts a walk for a Skeleton,
// since only the one creature you hit ever fought back.
GrudgeSpreadEnabled = config.Bind(factions, "Grudge spreads to kin", false,
new ConfigDescription("Off: only the creature you hit fights back. On: hit a creature of your " +
"own faction and every creature of that faction near it turns on you too, " +
"for the same Faction grudge time, the way vanilla's Dvergr treat a human. " +
"Peace still holds until you strike first."));
GrudgeSpreadRadius = config.Bind(factions, "Grudge spread radius", 20f,
new ConfigDescription("Meters around the creature you hit within which its kin join the fight, " +
"with Grudge spreads to kin on.",
new AcceptableValueRange<float>(5f, 60f)));
MerchantsEnabled = config.Bind(factions, "Faction merchants", true,
new ConfigDescription("Certain mobs of your own faction can be traded with - 'E - Talk' opens a shop " +
"where you sell them what their kind wants. Turn this off and they are ordinary " +