Merge remote-tracking branch 'origin/main' into localisation
This commit is contained in:
commit
b8ddcfd1d5
6 changed files with 70 additions and 2 deletions
|
|
@ -54,9 +54,17 @@ namespace RacesOfValheim
|
|||
//
|
||||
// Skeleton_Hildir stays out deliberately, on the same rule that keeps GoblinKing and the
|
||||
// Hildir brothers out of the Black Forest set: a quest boss is not somebody's kin.
|
||||
//
|
||||
// Valheim 1.0 added a skeleton per region (the green swamp ones and the blue mountain ones
|
||||
// players noticed first), each with a melee-only twin, and spawners place those instead
|
||||
// of the plain Skeleton. Left out, they fought a Skeleton player the plain ones ignored.
|
||||
private static readonly HashSet<string> PaludeMobs = new HashSet<string>
|
||||
{
|
||||
"Ghost", "Skeleton", "Skeleton_NoArcher", "Skeleton_Poison", // Skeleton, Rancid remains
|
||||
"Skeleton_Meadows", "Skeleton_Meadows_noarcher",
|
||||
"Skeleton_Swamps", "Skeleton_Swamps_noarcher",
|
||||
"Skeleton_Mountains", "Skeleton_Mountains_noarcher",
|
||||
"Skeleton_DeepNorth",
|
||||
"Draugr", "Draugr_Elite", "Draugr_Ranged",
|
||||
"Wraith", "Leech", "Abomination",
|
||||
"Blob", "BlobElite", "BlobTar", // Blob, Oozer, Growth
|
||||
|
|
|
|||
|
|
@ -337,7 +337,16 @@ namespace RacesOfValheim
|
|||
{ "Draugr_Elite", DraugrShop },
|
||||
|
||||
{ "Skeleton", SkeletonShop },
|
||||
{ "Skeleton_NoArcher", SkeletonShop },
|
||||
{ "Skeleton_Poison", SkeletonShop },
|
||||
// Valheim 1.0's regional skeletons, the ones its spawners actually place.
|
||||
{ "Skeleton_Meadows", SkeletonShop },
|
||||
{ "Skeleton_Meadows_noarcher", SkeletonShop },
|
||||
{ "Skeleton_Swamps", SkeletonShop },
|
||||
{ "Skeleton_Swamps_noarcher", SkeletonShop },
|
||||
{ "Skeleton_Mountains", SkeletonShop },
|
||||
{ "Skeleton_Mountains_noarcher", SkeletonShop },
|
||||
{ "Skeleton_DeepNorth", SkeletonShop },
|
||||
|
||||
{ "Ghost", GhostShop },
|
||||
{ "Wraith", WraithShop },
|
||||
|
|
|
|||
|
|
@ -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 " +
|
||||
|
|
|
|||
|
|
@ -121,6 +121,35 @@ namespace RacesOfValheim
|
|||
if (monster == null || monster.IsPlayer()) return;
|
||||
|
||||
Remember(monster, attacker);
|
||||
if (FactionsConfig.GrudgeSpreads && attacker is Player player) SpreadToKin(monster, player);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Vanilla's Dvergr camp, for every faction ("Grudge spreads to kin", off by default): hit
|
||||
/// a creature that is at peace with you and its kin around it take up the same grudge.
|
||||
///
|
||||
/// Only the creatures this machine runs the AI for are told, because a grudge is read where
|
||||
/// the AI runs (see WHERE IT RUNS above). The creatures around the one that was hit are
|
||||
/// nearly always simulated by the same client; one owned by another player's machine stays
|
||||
/// at peace until it is hit itself.
|
||||
/// </summary>
|
||||
private static void SpreadToKin(Character monster, Player player)
|
||||
{
|
||||
string race = FactionHostilityPatch.GetPlayerRace(player);
|
||||
if (!FactionHostilityPatch.IsAlliedMob(race, monster.gameObject.name)) return;
|
||||
|
||||
Vector3 center = monster.transform.position;
|
||||
float radius = FactionsConfig.GrudgeSpreadMeters;
|
||||
foreach (Character other in Character.GetAllCharacters())
|
||||
{
|
||||
if (other == null || other == monster || other.IsPlayer() || other.IsDead() || other.IsTamed()) continue;
|
||||
if (!other.IsOwner()) continue;
|
||||
if (Vector3.Distance(other.transform.position, center) > radius) continue;
|
||||
if (!FactionHostilityPatch.IsAlliedMob(race, other.gameObject.name)) continue;
|
||||
|
||||
Remember(other, player);
|
||||
other.GetBaseAI()?.Alert();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -872,6 +872,10 @@ namespace RacesOfValheim
|
|||
if (name == "skeleton" ||
|
||||
name == "skeleton_noarcher" ||
|
||||
name == "skeleton_poison" ||
|
||||
name == "skeleton_meadows" || name == "skeleton_meadows_noarcher" ||
|
||||
name == "skeleton_swamps" || name == "skeleton_swamps_noarcher" ||
|
||||
name == "skeleton_mountains" || name == "skeleton_mountains_noarcher" ||
|
||||
name == "skeleton_deepnorth" ||
|
||||
name == "skeleton_friendly" ||
|
||||
name.StartsWith("draugr") ||
|
||||
name == "ghost" ||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Support the mod: [Patreon — NandorTheModder](https://www.patreon.com/c/NandorT
|
|||
|
||||
## New in v1.6.8
|
||||
|
||||
**A Skeleton that eats, a bat that can't flee mid-fight, and a cheaper marble hall.** Each Skeleton player can choose to eat real food and to spend stamina. The Aswid can't take bat form until a few seconds after the last hit. The Dvergar build the black marble and Yggdrasil wood pieces with stone and fine wood. Full details in the [changelog](#v168).
|
||||
**A Skeleton that eats, a bat that can't flee mid-fight, and a cheaper marble hall.** Each Skeleton player can choose to eat real food and to spend stamina. The Aswid can't take bat form until a few seconds after the last hit. The Dvergar build the black marble and Yggdrasil wood pieces with stone and fine wood. A faction can now fight as a group if you hit one of its own, and Valheim 1.0's new skeletons keep the swamp truce. Full details in the [changelog](#v168).
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -484,7 +484,7 @@ Aswid, Draugh, Skeleton / at peace with Ghost, Skeleton, Draugr, Wraith, Leech,
|
|||
|
||||
The **Sverm** belongs to no faction. Its Hive Pheromones make every invertebrate in the game ignore it instead — leeches, ticks, deathsquitos, seekers and bees — with no boss gate and no trading.
|
||||
|
||||
A truce is not a shield: hit one of your own and it hits back, for **Faction grudge** seconds (60 by default), then forgets about it. Your always-on auras — the Aswid's drain, the Skadi's frost — leave your own kin alone, so they never start that fight for you.
|
||||
A truce is not a shield: hit one of your own and it hits back, for **Faction grudge** seconds (60 by default), then forgets about it. Want it harder? Turn on **Grudge spreads to kin** and every creature of that faction within 20 m (`Grudge spread radius`) joins the fight too, the way vanilla's Dvergr treat a human. Your always-on auras — the Aswid's drain, the Skadi's frost — leave your own kin alone, so they never start that fight for you.
|
||||
|
||||
Both halves have an off switch under `Factions` in Configuration Manager: **Faction truce** for whether your faction's mobs leave you alone, **Faction merchants** for whether they will trade. Both are on by default and both take effect without a restart. Be aware that turning the truce off also gives up every race's own peace — Fenrir's wolves, the Aswid's list, the Draugh's undead, the Trenta's Black Forest, the Sverm's invertebrates, the Furling's Plains roster and the Skeleton's undead — because they are all the same question asked of the same vanilla method.
|
||||
|
||||
|
|
@ -496,6 +496,8 @@ Both halves have an off switch under `Factions` in Configuration Manager: **Fact
|
|||
- **New - Skeleton Mortal Habits:** two options under `Skeleton - Mortal Habits`, both off by default, each player picking their own. *Eats Mortal Food*: the Skeleton eats like the living, and its health and stamina come from its meals. The boss-tier health bonus goes away, since it stood in for food. *Feels Fatigue*: the Skeleton spends stamina; if it doesn't eat, its stamina grows with its standing. Every other Skeleton power stays. Thanks to Celepito for the request. Not tested in game yet.
|
||||
- **New - Aswid bat form waits out a fight:** you can't take bat form until 2.5 seconds after you last lost health, from a hit or a tick of fire, poison or bleeding. Turning back is never blocked, and a hit still doesn't knock you out of bat form. `Aswid - Bat Form` → `Combat Lock` sets the time; 0 turns it off. Not tested in game yet.
|
||||
- **New - Dvergar build cheap marble and Yggdrasil pieces:** a Dvergar pays 3 stone for each black marble and 2 fine wood for each Yggdrasil wood on walls, floors, beams, roofs, arches, stairs, doors and stakes. Stations, furniture, containers and fires keep their cost. The marble pieces still need a Stonecutter and the Yggdrasil ones a Black Forge, and they show in the build menu with the Dvergar icon once you know stone or fine wood. Taking a piece down gives back what was paid for it, whoever does it, so a cheap wall never turns into black marble. `Dvergar - Cheap Building` holds the off switch and both ratios. Thanks to Wargles for the suggestion. Refunds not tested in game yet.
|
||||
- **New - a faction can fight as a group:** turn on `Factions` → `Grudge spreads to kin` and hitting a creature of your own faction makes every creature of that faction within 20 m turn on you too, for the usual grudge time, the way vanilla's Dvergr treat a human. Peace still holds until you strike first, and the radius is `Grudge spread radius`. Off by default. In multiplayer a creature run by another player's game stays calm until it is hit itself. Thanks to Joacwoo for the idea. Not tested in game yet.
|
||||
- **Fix - Valheim 1.0's new skeletons ignored the faction:** the regional skeletons Valheim 1.0 added (the green ones in the swamp, the blue ones in the mountains, and those of the Meadows and the Deep North, each with its melee-only twin) were missing from the swamp faction, so they attacked Skeleton, Aswid and Draugh players the old skeletons left alone. They keep the truce now and run the Skeleton's faction shop. Thanks to Joacwoo for the report. Not tested in game yet.
|
||||
|
||||
### v1.6.7
|
||||
- **Heads-up - config reset:** some settings were renamed, so any value you changed in them is back to its default. Skadi: everything in `Skadi - Directed Flight` now lives in `Skadi - Dragon Forms`, split into Drake and Moder keys. Fenrir: `Full Form Speed Bonus` is now `Fenring And Cultist Speed Bonus`, and `Wolf Form Speed Bonus` is split into `Wolf Speed Bonus` and `Ulv Speed Bonus`. If you had tuned any of these, set them again in Configuration Manager. The old entries stay in your .cfg but do nothing. Delete them by hand, or, if you never changed any setting, delete the whole .cfg and the game writes a fresh one on the next start. Don't delete the whole file if you customised anything else: everything goes back to default, keybinds included.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue