Merge branch 'localisation' into localisation-turkish
This commit is contained in:
commit
4d98a0fb5d
21 changed files with 433 additions and 53 deletions
|
|
@ -118,6 +118,27 @@ namespace RacesOfValheim
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Notes when the local player last lost health, for the bat's combat lock. ApplyDamage is the
|
||||
/// one final stage for direct hits, burning, poison and bleeding, so comparing health around it
|
||||
/// catches them all, and a hit fully blocked or absorbed (Alfar shield, Heimkall) is no hurt.
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(Character), "ApplyDamage",
|
||||
new[] { typeof(HitData), typeof(bool), typeof(bool), typeof(HitData.DamageModifier) })]
|
||||
public static class Aswid_BatCombatLock_Patch
|
||||
{
|
||||
public static void Prefix(Character __instance, ref float __state)
|
||||
{
|
||||
__state = __instance == Player.m_localPlayer ? __instance.GetHealth() : -1f;
|
||||
}
|
||||
|
||||
public static void Postfix(Character __instance, float __state)
|
||||
{
|
||||
if (__state < 0f) return;
|
||||
if (__instance.GetHealth() < __state) AswidRace.LastHurtTime = Time.time;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sleepers. UpdateSleep picks the closest player itself, possibly a remote bat, so the counter
|
||||
/// goes up for the whole call and the bat test happens in the IsDebugFlying postfix, which only
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ namespace RacesOfValheim
|
|||
public static ConfigEntry<float> BatMaxDuration;
|
||||
public static ConfigEntry<float> BatDurationPerState;
|
||||
public static ConfigEntry<float> BatCooldown;
|
||||
public static ConfigEntry<float> BatCombatLock;
|
||||
|
||||
// ─── Vampiric Aura (passive, always active) ──────────────────────────────
|
||||
public static ConfigEntry<float> AuraTickInterval;
|
||||
|
|
@ -292,6 +293,8 @@ namespace RacesOfValheim
|
|||
new ConfigDescription("Seconds added to the max duration per progression state. Does nothing while the max duration is 0.", new AcceptableValueRange<float>(0f, 600f)));
|
||||
BatCooldown = config.Bind(batform, "Cooldown", 0f,
|
||||
new ConfigDescription("Seconds after leaving bat form before you can take it again. 0 means none.", new AcceptableValueRange<float>(0f, 3600f)));
|
||||
BatCombatLock = config.Bind(batform, "Combat Lock", 2.5f,
|
||||
new ConfigDescription("Seconds after you last lost health (a hit, or a tick of fire, poison or bleeding) before you can take bat form. Turning back from bat form is never blocked. 0 means none.", new AcceptableValueRange<float>(0f, 30f)));
|
||||
|
||||
const string aura = "Aswid - Vampiric Aura";
|
||||
AuraTickInterval = config.Bind(aura, "Tick Interval", 0.25f,
|
||||
|
|
|
|||
|
|
@ -615,6 +615,14 @@ namespace RacesOfValheim
|
|||
return;
|
||||
}
|
||||
|
||||
// No escaping a fight by taking wing mid-blow: the form waits until the hits stop.
|
||||
float hurtLeft = AswidConfig.BatCombatLock.Value - (Time.time - LastHurtTime);
|
||||
if (hurtLeft > 0f)
|
||||
{
|
||||
Player.m_localPlayer.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_aswid_bat_combat_lock", Mathf.CeilToInt(hurtLeft)));
|
||||
return;
|
||||
}
|
||||
|
||||
float cooldownLeft = AswidConfig.BatCooldown.Value - (Time.time - lastBatEndTime);
|
||||
if (cooldownLeft > 0f)
|
||||
{
|
||||
|
|
@ -629,6 +637,10 @@ namespace RacesOfValheim
|
|||
// fresh session never begins on cooldown.
|
||||
private float lastBatEndTime = -100000f;
|
||||
|
||||
// When the local player last lost health, for the bat's combat lock. Written by
|
||||
// Aswid_BatCombatLock_Patch for every race; only the Aswid reads it.
|
||||
public static float LastHurtTime = -100000f;
|
||||
|
||||
// The one bat or mist routine in flight, if any. Kept so ResetRace can stop it: a
|
||||
// TransformIntoBatRoutine left running through a reset finishes its 1.1s gesture and
|
||||
// turns a freshly reset Human into a bat.
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ namespace RacesOfValheim
|
|||
"Aswid - Eyes",
|
||||
"Fenrir - Appearance",
|
||||
"Skeleton - Visuals",
|
||||
// Food and stamina for a Skeleton who wants them: each only gives up an advantage.
|
||||
"Skeleton - Mortal Habits",
|
||||
"Sverm - Dorsal Spines",
|
||||
"Sverm - Emberform",
|
||||
"Trol - Appearance",
|
||||
|
|
|
|||
275
JotunnModStub/Dvergar/DvergarCheapBuilding.cs
Normal file
275
JotunnModStub/Dvergar/DvergarCheapBuilding.cs
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
using System.Collections.Generic;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace RacesOfValheim
|
||||
{
|
||||
/// <summary>
|
||||
/// A Dvergar builds the black marble and Yggdrasil wood building pieces with stone and fine
|
||||
/// wood (Wargles' suggestion). Only structural pieces: stations, furniture, containers and
|
||||
/// fires keep their cost, so nothing with a progression role gets cheaper.
|
||||
///
|
||||
/// The swap is done on the piece prefabs of the Dvergar's own client. The build menu, the
|
||||
/// "known piece" check and ConsumeResources all read the prefab's m_resources, so the menu
|
||||
/// lists the pieces once stone or fine wood is known, and the player pays the swapped cost.
|
||||
///
|
||||
/// The refund is the catch. Piece.DropResources gives back whatever m_resources says on the
|
||||
/// machine that destroys the piece; vanilla never records what was paid. Without help a human
|
||||
/// deconstructing a Dvergar's stone wall would get black marble, and a Dvergar deconstructing a
|
||||
/// vanilla wall would get stone. So a cheap piece is tagged on its ZDO when placed, with the
|
||||
/// ratios it was paid at, and DropResources is given the matching cost on every client.
|
||||
/// </summary>
|
||||
public static class DvergarCheapBuilding
|
||||
{
|
||||
// The ratios a cheap piece was paid at. Absent (0) on every piece placed at full cost.
|
||||
public const string StoneRatioZdoKey = "RacesOfValheim_DvergarCheapStone";
|
||||
public const string WoodRatioZdoKey = "RacesOfValheim_DvergarCheapWood";
|
||||
|
||||
private const string BlackMarble = "BlackMarble";
|
||||
private const string YggdrasilWood = "YggdrasilWood";
|
||||
private const string Stone = "Stone";
|
||||
private const string FineWood = "FineWood";
|
||||
|
||||
private const string LabelName = "rov_dvergar_cheap";
|
||||
|
||||
private const Piece.UsageTagFlags StructuralTags =
|
||||
Piece.UsageTagFlags.Building | Piece.UsageTagFlags.Floor | Piece.UsageTagFlags.Wall |
|
||||
Piece.UsageTagFlags.Roof | Piece.UsageTagFlags.Architecture | Piece.UsageTagFlags.Stairs |
|
||||
Piece.UsageTagFlags.Doors;
|
||||
|
||||
// Piece prefab name -> its vanilla cost. Collected once and kept: the prefabs live for the
|
||||
// whole session, and the originals must survive every swap.
|
||||
private static Dictionary<string, Piece.Requirement[]> originals;
|
||||
private static Dictionary<string, Piece> prefabs;
|
||||
private static ItemDrop stoneItem, fineWoodItem;
|
||||
|
||||
// "" while the prefabs carry their vanilla cost, otherwise the ratios they were swapped at.
|
||||
private static string appliedKey = "";
|
||||
|
||||
private static bool Collect()
|
||||
{
|
||||
if (originals != null) return true;
|
||||
if (ObjectDB.instance == null) return false;
|
||||
|
||||
GameObject hammer = ObjectDB.instance.GetItemPrefab("Hammer");
|
||||
PieceTable table = hammer != null ? hammer.GetComponent<ItemDrop>()?.m_itemData?.m_shared?.m_buildPieces : null;
|
||||
stoneItem = ObjectDB.instance.GetItemPrefab(Stone)?.GetComponent<ItemDrop>();
|
||||
fineWoodItem = ObjectDB.instance.GetItemPrefab(FineWood)?.GetComponent<ItemDrop>();
|
||||
if (table == null || stoneItem == null || fineWoodItem == null) return false;
|
||||
|
||||
originals = new Dictionary<string, Piece.Requirement[]>();
|
||||
prefabs = new Dictionary<string, Piece>();
|
||||
foreach (GameObject go in table.m_pieces)
|
||||
{
|
||||
Piece piece = go != null ? go.GetComponent<Piece>() : null;
|
||||
if (piece == null || piece.m_resources == null || !UsesSwappedMaterial(piece) || !IsBuildingPiece(piece)) continue;
|
||||
|
||||
originals[go.name] = piece.m_resources;
|
||||
prefabs[go.name] = piece;
|
||||
// The list to read once in game: every piece that changes cost, and where it is built.
|
||||
Jotunn.Logger.LogInfo($"[Dvergar] Cheap building: {go.name} at {(piece.m_craftingStation != null ? piece.m_craftingStation.name : "no station")}, {Describe(piece.m_resources)} -> {Describe(BuildCheap(piece.m_resources, 3, 2))} (at 3/2)");
|
||||
}
|
||||
Jotunn.Logger.LogInfo($"[Dvergar] Cheap building: {originals.Count} pieces.");
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool UsesSwappedMaterial(Piece piece)
|
||||
{
|
||||
foreach (Piece.Requirement req in piece.m_resources)
|
||||
{
|
||||
if (req.m_resItem == null) continue;
|
||||
string name = req.m_resItem.name;
|
||||
if (name == BlackMarble || name == YggdrasilWood) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool IsBuildingPiece(Piece piece)
|
||||
{
|
||||
bool structural = piece.m_category == Piece.PieceCategory.BuildingWorkbench
|
||||
|| piece.m_category == Piece.PieceCategory.BuildingStonecutter
|
||||
|| (piece.m_usage & StructuralTags) != 0;
|
||||
if (!structural) return false;
|
||||
if ((piece.m_usage & Piece.UsageTagFlags.Crafting) != 0) return false;
|
||||
|
||||
// Anything that does a job keeps its cost, whatever its tags say.
|
||||
return piece.GetComponentInChildren<CraftingStation>() == null
|
||||
&& piece.GetComponentInChildren<StationExtension>() == null
|
||||
&& piece.GetComponentInChildren<Container>() == null
|
||||
&& piece.GetComponentInChildren<Fireplace>() == null
|
||||
&& piece.GetComponentInChildren<Smelter>() == null
|
||||
&& piece.m_comfort <= 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The cost with black marble and Yggdrasil wood swapped out. New Requirement objects
|
||||
/// throughout: the originals are shared with the prefab and must stay untouched. A
|
||||
/// material the piece already had (some marble pieces also ask for stone) is merged.
|
||||
/// </summary>
|
||||
private static Piece.Requirement[] BuildCheap(Piece.Requirement[] original, int stoneRatio, int woodRatio)
|
||||
{
|
||||
var result = new List<Piece.Requirement>();
|
||||
foreach (Piece.Requirement req in original)
|
||||
{
|
||||
ItemDrop item = req.m_resItem;
|
||||
int amount = req.m_amount;
|
||||
if (item != null && item.name == BlackMarble) { item = stoneItem; amount *= stoneRatio; }
|
||||
else if (item != null && item.name == YggdrasilWood) { item = fineWoodItem; amount *= woodRatio; }
|
||||
|
||||
Piece.Requirement same = item != null ? result.Find(r => r.m_resItem == item) : null;
|
||||
if (same != null)
|
||||
{
|
||||
same.m_amount += amount;
|
||||
continue;
|
||||
}
|
||||
result.Add(new Piece.Requirement
|
||||
{
|
||||
m_resItem = item,
|
||||
m_amount = amount,
|
||||
m_extraAmountOnlyOneIngredient = req.m_extraAmountOnlyOneIngredient,
|
||||
m_amountPerLevel = req.m_amountPerLevel,
|
||||
m_upgraderResource = req.m_upgraderResource,
|
||||
m_recover = req.m_recover,
|
||||
});
|
||||
}
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
private static string Describe(Piece.Requirement[] reqs)
|
||||
{
|
||||
var parts = new List<string>();
|
||||
foreach (Piece.Requirement req in reqs)
|
||||
{
|
||||
if (req.m_resItem != null) parts.Add($"{req.m_amount} {req.m_resItem.name}");
|
||||
}
|
||||
return string.Join(", ", parts);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Puts the cost the local player should see on the prefabs. Returns whether anything
|
||||
/// changed, so the caller knows to refresh the build menu.
|
||||
/// </summary>
|
||||
private static bool Apply(bool cheap)
|
||||
{
|
||||
int stone = DvergarConfigManagement.CheapStonePerBlackMarble.Value;
|
||||
int wood = DvergarConfigManagement.CheapFineWoodPerYggdrasil.Value;
|
||||
string key = cheap ? stone + "/" + wood : "";
|
||||
if (key == appliedKey) return false;
|
||||
|
||||
foreach (var pair in originals)
|
||||
{
|
||||
if (!prefabs.TryGetValue(pair.Key, out Piece prefab) || prefab == null) continue;
|
||||
prefab.m_resources = cheap ? BuildCheap(pair.Value, stone, wood) : pair.Value;
|
||||
}
|
||||
appliedKey = key;
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool IsSwapped(Piece piece)
|
||||
{
|
||||
return appliedKey != "" && piece != null && originals != null
|
||||
&& originals.ContainsKey(Utils.GetPrefabName(piece.gameObject.name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Keeps the prefabs in step with the local player: a Dvergar with the option on sees the
|
||||
/// cheap cost, anyone else the vanilla one. Checked every frame because the race can change
|
||||
/// mid-session (resetrace) and the ratios with the server's config; the check is a string
|
||||
/// compare unless something changed.
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(Player), "Update")]
|
||||
public static class Dvergar_CheapBuildingSync_Patch
|
||||
{
|
||||
public static void Postfix(Player __instance)
|
||||
{
|
||||
if (__instance != Player.m_localPlayer || !Collect()) return;
|
||||
|
||||
bool cheap = DvergarConfigManagement.CheapBuildingEnabled.Value && DvergarRace.IsDvergar();
|
||||
if (Apply(cheap)) Traverse.Create(__instance).Method("UpdateAvailablePiecesList").GetValue();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tags a piece placed at the cheap cost. SetCreator is called once, by PlacePiece, on the
|
||||
/// placing client, right after the piece was paid for from the same prefab cost.
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(Piece), nameof(Piece.SetCreator))]
|
||||
public static class Dvergar_CheapBuildingTag_Patch
|
||||
{
|
||||
public static void Postfix(Piece __instance)
|
||||
{
|
||||
if (!IsSwapped(__instance)) return;
|
||||
|
||||
ZNetView nview = __instance.GetComponent<ZNetView>();
|
||||
if (nview == null || !nview.IsValid() || !nview.IsOwner()) return;
|
||||
|
||||
nview.GetZDO().Set(StoneRatioZdoKey, DvergarConfigManagement.CheapStonePerBlackMarble.Value);
|
||||
nview.GetZDO().Set(WoodRatioZdoKey, DvergarConfigManagement.CheapFineWoodPerYggdrasil.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gives back what the piece cost: the cheap materials at the ratios it was paid at for a
|
||||
/// tagged piece, the vanilla cost for every other one, whoever destroys it and whatever
|
||||
/// cost this client's prefab carries right now.
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(Piece), nameof(Piece.DropResources))]
|
||||
public static class Dvergar_CheapBuildingRefund_Patch
|
||||
{
|
||||
public static void Prefix(Piece __instance)
|
||||
{
|
||||
if (!Collect()) return;
|
||||
if (!originals.TryGetValue(Utils.GetPrefabName(__instance.gameObject.name), out Piece.Requirement[] original)) return;
|
||||
|
||||
ZNetView nview = __instance.GetComponent<ZNetView>();
|
||||
ZDO zdo = nview != null && nview.IsValid() ? nview.GetZDO() : null;
|
||||
int stone = zdo != null ? zdo.GetInt(StoneRatioZdoKey, 0) : 0;
|
||||
int wood = zdo != null ? zdo.GetInt(WoodRatioZdoKey, 0) : 0;
|
||||
|
||||
__instance.m_resources = stone > 0 && wood > 0 ? BuildCheap(original, stone, wood) : original;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Dvergar icon on every swapped piece in the hammer menu. Valheim 1.0
|
||||
/// draws that menu with BuildUi, one pooled BuildUiPieceButton per piece, and Setup is
|
||||
/// where a button takes its piece. The old Hud.UpdatePieceList grid still runs but is
|
||||
/// hidden, so a label there is never seen.
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(BuildUiPieceButton), nameof(BuildUiPieceButton.Setup))]
|
||||
public static class Dvergar_CheapBuildingLabel_Patch
|
||||
{
|
||||
public static void Postfix(BuildUiPieceButton __instance, Piece pieceInfo)
|
||||
{
|
||||
bool cheap = IsSwapped(pieceInfo);
|
||||
Transform label = __instance.transform.Find(LabelName);
|
||||
if (label == null)
|
||||
{
|
||||
if (!cheap) return;
|
||||
label = CreateLabel(__instance.transform);
|
||||
}
|
||||
if (label.gameObject.activeSelf != cheap) label.gameObject.SetActive(cheap);
|
||||
}
|
||||
|
||||
private static Transform CreateLabel(Transform button)
|
||||
{
|
||||
var obj = new GameObject(LabelName, typeof(RectTransform));
|
||||
obj.transform.SetParent(button, false);
|
||||
|
||||
// The race's own icon in the bottom-right corner, as the race menu and the build
|
||||
// panel's race requirement show it: no text, so it fits in every language.
|
||||
var rect = (RectTransform)obj.transform;
|
||||
rect.anchorMin = rect.anchorMax = rect.pivot = new Vector2(1f, 0f);
|
||||
rect.anchoredPosition = new Vector2(-2f, 2f);
|
||||
rect.sizeDelta = new Vector2(22f, 22f);
|
||||
|
||||
var image = obj.AddComponent<Image>();
|
||||
image.sprite = RacesOfValheim.RaceIcon(DvergarConfig.RaceId);
|
||||
image.preserveAspect = true;
|
||||
image.raycastTarget = false;
|
||||
return obj.transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -57,6 +57,11 @@ namespace RacesOfValheim
|
|||
public static ConfigEntry<float> RunicOverchargeWindow;
|
||||
public static ConfigEntry<float> RunicOverchargeCooldown;
|
||||
|
||||
// ─── Cheap Building ───────────────────────────────────────────────────────
|
||||
public static ConfigEntry<bool> CheapBuildingEnabled;
|
||||
public static ConfigEntry<int> CheapStonePerBlackMarble;
|
||||
public static ConfigEntry<int> CheapFineWoodPerYggdrasil;
|
||||
|
||||
public static void Bind(ConfigFile config)
|
||||
{
|
||||
const string keybinds = "Dvergar - Keybinds";
|
||||
|
|
@ -106,6 +111,14 @@ namespace RacesOfValheim
|
|||
new ConfigDescription("Seconds a loaded charge is held before it lapses unused.", new AcceptableValueRange<float>(1f, 60f)));
|
||||
RunicOverchargeCooldown = config.Bind(overcharge, "Cooldown", 60f,
|
||||
new ConfigDescription("Seconds between casts.", new AcceptableValueRange<float>(0f, 300f)));
|
||||
|
||||
const string building = "Dvergar - Cheap Building";
|
||||
CheapBuildingEnabled = config.Bind(building, "Enabled", true,
|
||||
new ConfigDescription("A Dvergar builds the black marble and Yggdrasil wood building pieces (walls, floors, beams, roofs, arches, stairs) with stone and fine wood instead. Stations and furniture keep their cost. A deconstructed piece gives back what was paid for it."));
|
||||
CheapStonePerBlackMarble = config.Bind(building, "Stone per Black Marble", 3,
|
||||
new ConfigDescription("Stone a Dvergar pays for each black marble in a piece's cost.", new AcceptableValueRange<int>(1, 10)));
|
||||
CheapFineWoodPerYggdrasil = config.Bind(building, "Fine Wood per Yggdrasil Wood", 2,
|
||||
new ConfigDescription("Fine wood a Dvergar pays for each Yggdrasil wood in a piece's cost.", new AcceptableValueRange<int>(1, 10)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "RacesOfValheim",
|
||||
"description": "A Valheim mod that adds eleven custom playable races (Alfar, Aswid, Draugh, Dvergar, Fenrir, Furling, Skadi, Skeleton, Sverm, Trenta, Trol) each with unique abilities, traits, race stations and a deep boss-driven progression system.",
|
||||
"version_number": "1.6.7",
|
||||
"version_number": "1.6.8",
|
||||
"website_url": "",
|
||||
"dependencies": [
|
||||
"denikson-BepInExPack_Valheim-5.4.2333",
|
||||
|
|
|
|||
|
|
@ -725,7 +725,18 @@ namespace RacesOfValheim
|
|||
sb.AppendLine((state <= BossProgressionManager.MinState ? ModText.Get("rov_compendium_skeleton_stand_at_first_eight_standings") : ModText.Get("rov_compendium_skeleton_stand_at_eight_standings_earned", state, BossProgressionManager.GetBossTokenForState(state))));
|
||||
|
||||
sb.AppendLine(ModText.Get("rov_compendium_skeleton_undead_diet"));
|
||||
bool eats = SkeletonConfig.EatsMortalFood.Value, tires = SkeletonConfig.FeelsFatigue.Value;
|
||||
if (!eats && !tires)
|
||||
{
|
||||
sb.AppendLine(ModText.Get("rov_compendium_skeleton_no_hunger_moves_no_meal", (health).ToString("0")));
|
||||
}
|
||||
else
|
||||
{
|
||||
// A player who picked one of the "Mortal Habits" reads what they actually have.
|
||||
string diet = eats ? ModText.Get("rov_compendium_skeleton_diet_mortal") : ModText.Get("rov_compendium_skeleton_diet_bones", (health).ToString("0"));
|
||||
string effort = tires ? ModText.Get("rov_compendium_skeleton_effort_mortal") : ModText.Get("rov_compendium_skeleton_effort_none");
|
||||
sb.AppendLine(diet + " " + effort + "\n");
|
||||
}
|
||||
|
||||
sb.AppendLine(ModText.Get("rov_compendium_skeleton_bones_blades"));
|
||||
sb.AppendLine(ModText.Get("rov_compendium_skeleton_blades_points_find_little_cut"));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
public const string PluginGUID = "com.nandor.racesofvalheim";
|
||||
public const string PluginName = "Races Of Valheim";
|
||||
public const string PluginVersion = "1.6.7";
|
||||
public const string PluginVersion = "1.6.8";
|
||||
|
||||
private readonly Harmony harmony = new Harmony(PluginGUID);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ namespace RacesOfValheim
|
|||
public static ConfigEntry<bool> RaiseDeadIcon;
|
||||
public static ConfigEntry<bool> ShowHelmet;
|
||||
|
||||
// ─── Mortal Habits (per player) ────────────────────────────────────────
|
||||
public static ConfigEntry<bool> EatsMortalFood;
|
||||
public static ConfigEntry<bool> FeelsFatigue;
|
||||
|
||||
public static void Bind(ConfigFile config)
|
||||
{
|
||||
const string combat = "Skeleton - Passive Combat";
|
||||
|
|
@ -88,6 +92,16 @@ namespace RacesOfValheim
|
|||
RaiseDeadIcon = config.Bind(visuals, "Raise the Dead Icon", true,
|
||||
new ConfigDescription("Shows the Raise the Dead status icon while your Summon on Kill is on."));
|
||||
ShowHelmet = config.Bind(visuals, "Show Helmet", false,
|
||||
new ConfigDescription("Off: your helmet stays hidden over the skull. On: the helmet you wear shows. Helmets and hoods are moved and enlarged to fit the skull. Your own choice: other players see you the way you picked. A viking body (Body Model Enabled off) always shows its helmet.")); }
|
||||
new ConfigDescription("Off: your helmet stays hidden over the skull. On: the helmet you wear shows. Helmets and hoods are moved and enlarged to fit the skull. Your own choice: other players see you the way you picked. A viking body (Body Model Enabled off) always shows its helmet."));
|
||||
|
||||
// For groups who want the Skeleton but miss Valheim's food or stamina. Both only take
|
||||
// away an advantage (permanent best-tier food, infinite stamina), so each player picks
|
||||
// for themselves and the server does not sync them.
|
||||
const string habits = "Skeleton - Mortal Habits";
|
||||
EatsMortalFood = config.Bind(habits, "Eats Mortal Food", false,
|
||||
new ConfigDescription("Off: you never eat, and your Maximum Health comes from your standing (the bosses you have defeated). On: you eat like the living, your health and stamina come from your meals, and the standing's health bonus is gone. Your other Skeleton powers stay. Your own choice, not synced by the server."));
|
||||
FeelsFatigue = config.Bind(habits, "Feels Fatigue", false,
|
||||
new ConfigDescription("Off: you have no stamina and never tire. On: you spend stamina like the living. Without Eats Mortal Food your stamina grows with your standing, from the same meals your health is measured by. Your own choice, not synced by the server."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,16 +44,26 @@ namespace RacesOfValheim
|
|||
/// GetTotalFoodValue has exactly one caller, Player.UpdateFood, which passes the result
|
||||
/// straight to SetMaxHealth - so this is the single point where the number is decided, and
|
||||
/// it now comes from the progression table rather than from three scaled sausages.
|
||||
///
|
||||
/// A Skeleton with "Eats Mortal Food" is left to vanilla: its real meals decide both
|
||||
/// numbers, and the tier's health, which stands in for those meals, does not stack on top.
|
||||
/// One with "Feels Fatigue" who does not eat gets the stand-in meals' stamina, which the
|
||||
/// fake foods themselves never deliver.
|
||||
/// </summary>
|
||||
[HarmonyPatch(typeof(Player), "GetTotalFoodValue")]
|
||||
public static class Player_GetTotalFoodValue_SkeletonHealth_Patch
|
||||
{
|
||||
public static void Postfix(Player __instance, ref float hp)
|
||||
public static void Postfix(Player __instance, ref float hp, ref float stamina)
|
||||
{
|
||||
if (__instance != Player.m_localPlayer || !SkeletonRace.IsSkeleton()) return;
|
||||
if (SkeletonConfig.EatsMortalFood.Value) return;
|
||||
|
||||
int state = BossProgressionManager.GetCurrentProgressionState();
|
||||
hp = __instance.m_baseHP + SkeletonProgression.GetMaxHealthBonus(state);
|
||||
if (SkeletonConfig.FeelsFatigue.Value)
|
||||
{
|
||||
stamina = __instance.m_baseStamina + SkeletonRace.GetStandInStamina(state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +73,7 @@ namespace RacesOfValheim
|
|||
public static bool Prefix(Player __instance)
|
||||
{
|
||||
// The Aswid used to be on this list. It spends stamina now, see Aswid_UseStamina_Patch.
|
||||
if ((SkeletonRace.IsSkeleton() || DraughRace.IsDraugh()) && __instance == Player.m_localPlayer)
|
||||
if (((SkeletonRace.IsSkeleton() && !SkeletonConfig.FeelsFatigue.Value) || DraughRace.IsDraugh()) && __instance == Player.m_localPlayer)
|
||||
{
|
||||
// Infinite stamina: skip the original UseStamina method
|
||||
return false;
|
||||
|
|
@ -79,7 +89,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
if (__instance == Player.m_localPlayer)
|
||||
{
|
||||
if (SkeletonRace.IsSkeleton() && item.m_shared.m_itemType == ItemDrop.ItemData.ItemType.Consumable && (item.m_shared.m_food > 0 || item.m_shared.m_foodStamina > 0 || item.m_shared.m_foodEitr > 0))
|
||||
if (SkeletonRace.IsSkeleton() && !SkeletonConfig.EatsMortalFood.Value && item.m_shared.m_itemType == ItemDrop.ItemData.ItemType.Consumable && (item.m_shared.m_food > 0 || item.m_shared.m_foodStamina > 0 || item.m_shared.m_foodEitr > 0))
|
||||
{
|
||||
__instance.Message(MessageHud.MessageType.Center, ModText.Get("rov_msg_skeleton_skeletons_do_not_need_eat"));
|
||||
__result = false;
|
||||
|
|
@ -194,7 +204,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
try
|
||||
{
|
||||
if (player == Player.m_localPlayer && SkeletonRace.IsSkeleton())
|
||||
if (player == Player.m_localPlayer && SkeletonRace.IsSkeleton() && !SkeletonConfig.EatsMortalFood.Value)
|
||||
{
|
||||
if (__instance.m_foodBarRoot != null && __instance.m_foodBarRoot.gameObject.activeSelf)
|
||||
{
|
||||
|
|
@ -233,7 +243,7 @@ namespace RacesOfValheim
|
|||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
if (player == Player.m_localPlayer && SkeletonRace.IsSkeleton()) return false;
|
||||
if (player == Player.m_localPlayer && SkeletonRace.IsSkeleton() && !SkeletonConfig.EatsMortalFood.Value) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,6 +125,22 @@ namespace RacesOfValheim
|
|||
Player.m_localPlayer.m_customData["Race"] == "Skeleton";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stamina from the tier's stand-in meals, for a Skeleton who feels fatigue but does not
|
||||
/// eat. The fake foods cannot supply it: they are kept at m_time 0, so UpdateFood scales
|
||||
/// their stamina to nothing on every tick.
|
||||
/// </summary>
|
||||
public static float GetStandInStamina(int state)
|
||||
{
|
||||
var foods = GetBestRealFoods(state);
|
||||
float stamina = 0f;
|
||||
if (foods != null)
|
||||
{
|
||||
foreach (var f in foods) stamina += f.m_shared.m_foodStamina;
|
||||
}
|
||||
return stamina;
|
||||
}
|
||||
|
||||
private static readonly int StatsEffectHash = "SE_SkeletonStats".GetStableHashCode();
|
||||
|
||||
private float lastAuraTime = 0f;
|
||||
|
|
@ -137,7 +153,7 @@ namespace RacesOfValheim
|
|||
|
||||
private static List<ItemDrop.ItemData>[] cachedRealFoods = new List<ItemDrop.ItemData>[9];
|
||||
|
||||
private List<ItemDrop.ItemData> GetBestRealFoods(int state)
|
||||
private static List<ItemDrop.ItemData> GetBestRealFoods(int state)
|
||||
{
|
||||
if (state < 1) state = 1;
|
||||
if (state > 8) state = 8;
|
||||
|
|
@ -454,7 +470,14 @@ namespace RacesOfValheim
|
|||
var foods = Player.m_localPlayer.GetFoods();
|
||||
bool needsFood = false;
|
||||
|
||||
if (foods.Count != 3)
|
||||
if (SkeletonConfig.EatsMortalFood.Value)
|
||||
{
|
||||
// Real meals instead. The stand-in foods are the ones held at m_time 0 or below;
|
||||
// dropped here at once rather than left for UpdateFood, which would announce each
|
||||
// one as "food done".
|
||||
foods.RemoveAll(f => f.m_time <= 0f);
|
||||
}
|
||||
else if (foods.Count != 3)
|
||||
{
|
||||
needsFood = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,5 +240,9 @@
|
|||
"rov_compendium_warvulture_goes_where_look_goes_as": "It goes where you look, and it goes as long as you care to stay up: $1 meters a second costs it nothing at all. Hold your run key and it gives you $2 for $3 seconds and not a moment longer - there is only so much haste in a bird. Let go and the wind comes back into it in $4 seconds, in the air. You never have to land for it.\n",
|
||||
"rov_compendium_warvulture_vulture_s_head_kept_stick": "A vulture's head kept on a stick, and the bird answers to it. Raise it and the vulture comes back under you. Raise it again and it carries you down, deaf to you until the ground arrives - and a third time lets go of it where you are.\n",
|
||||
"rov_compendium_warvulture_war_vulture": "\n-- THE WAR VULTURE --\n",
|
||||
"rov_compendium_warvulture_what_bird_has_left_bar": "What the bird has left is the bar under your own.\n"
|
||||
"rov_compendium_warvulture_what_bird_has_left_bar": "What the bird has left is the bar under your own.\n",
|
||||
"rov_compendium_skeleton_diet_bones": "No hunger moves you and no meal can help you - mortal food is nothing to dry bones. In its place the dead grow strong as their betters fall: you carry +$1 Maximum Health at your present standing.",
|
||||
"rov_compendium_skeleton_diet_mortal": "You kept the habits of the flesh: you eat as the living do, and your health comes from your meals, not from your standing.",
|
||||
"rov_compendium_skeleton_effort_none": "Nor does effort tire you; you have no stamina to spend at all.",
|
||||
"rov_compendium_skeleton_effort_mortal": "Effort tires you as it tires the living, and you spend stamina like anyone else."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
"rov_msg_aswid_vae_victis": "Vae Victis",
|
||||
"rov_msg_aswid_what_horrible_night_have_curse": "what a horrible night to have a curse",
|
||||
"rov_msg_aswid_bat_cooldown": "Your blood is not ready to take wing again ($1s)",
|
||||
"rov_msg_aswid_bat_combat_lock": "Your blood runs too hot from the fight to take wing ($1s)",
|
||||
"rov_msg_aswid_bat_form_fades": "The bat form fades",
|
||||
"rov_msg_aswid_bat_too_heavy_to_beat": "Too heavy to beat your wings. You can only glide",
|
||||
"rov_msg_aswid_too_heavy_for_bat": "You carry too much to take bat form",
|
||||
|
|
|
|||
|
|
@ -240,5 +240,9 @@
|
|||
"rov_compendium_warvulture_goes_where_look_goes_as": "Va dove guardi, e va finché vuoi restare in aria: $1 metri al secondo non gli costano niente. Tieni premuto il tasto di corsa e ti dà $2 per $3 secondi, non un momento di più: in un uccello c'è solo tanta fretta. Lascia andare e il vento gli torna dentro in $4 secondi, in aria. Non devi mai atterrare per questo.\n",
|
||||
"rov_compendium_warvulture_vulture_s_head_kept_stick": "La testa di un avvoltoio infilata su un bastone, e l'uccello le risponde. Sollevala e l'avvoltoio torna sotto di te. Sollevala di nuovo e ti porta giù, sordo a te finché non arriva il terreno; una terza volta ti lascia andare dove sei.\n",
|
||||
"rov_compendium_warvulture_war_vulture": "\n-- L'AVVOLTOIO DA GUERRA --\n",
|
||||
"rov_compendium_warvulture_what_bird_has_left_bar": "Ciò che resta all'uccello è la barra sotto la tua.\n"
|
||||
"rov_compendium_warvulture_what_bird_has_left_bar": "Ciò che resta all'uccello è la barra sotto la tua.\n",
|
||||
"rov_compendium_skeleton_diet_bones": "Nessuna fame ti muove e nessun pasto può aiutarti: il cibo dei mortali non è niente per ossa secche. Al suo posto i morti si rafforzano man mano che i loro superiori cadono: al tuo grado attuale hai +$1 di salute massima.",
|
||||
"rov_compendium_skeleton_diet_mortal": "Hai conservato le abitudini della carne: mangi come i vivi, e la tua salute viene dai pasti, non dal tuo grado.",
|
||||
"rov_compendium_skeleton_effort_none": "Nemmeno la fatica ti stanca: non hai stamina da spendere.",
|
||||
"rov_compendium_skeleton_effort_mortal": "La fatica ti stanca come stanca i vivi, e spendi stamina come chiunque altro."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
"rov_msg_aswid_vae_victis": "Vae Victis",
|
||||
"rov_msg_aswid_what_horrible_night_have_curse": "what a horrible night to have a curse",
|
||||
"rov_msg_aswid_bat_cooldown": "Il tuo sangue non è pronto a spiccare il volo di nuovo ($1s)",
|
||||
"rov_msg_aswid_bat_combat_lock": "Il sangue ti ribolle per lo scontro, non puoi spiccare il volo ($1s)",
|
||||
"rov_msg_aswid_bat_form_fades": "La forma di pipistrello svanisce",
|
||||
"rov_msg_aswid_bat_too_heavy_to_beat": "Troppo pesante per battere le ali. Puoi solo planare",
|
||||
"rov_msg_aswid_too_heavy_for_bat": "Porti troppo peso per prendere la forma di pipistrello",
|
||||
|
|
|
|||
|
|
@ -240,5 +240,9 @@
|
|||
"rov_compendium_warvulture_goes_where_look_goes_as": "Она летит туда, куда обращен ваш взор, и летит так долго, как вы того пожелаете: полет со скоростью $1 м/с не стоит птице никаких сил. Зажмите клавишу бега — и она выдаст рывок со скоростью $2 м/с на $3 с, не дольше: птичьи силы не безграничны. Отпустите бег, и дыхание вернется к ней через $4 с прямо в воздухе. Садиться на землю не придется.\n",
|
||||
"rov_compendium_warvulture_vulture_s_head_kept_stick": "Голова стервятника на шесте, и хищная птица повинуется ей. Поднимите ее — и птица опустится вам под ноги. Поднимите снова — и она понесет вас к земле, не слушая команд до самого приземления, а поднятая в третий раз — отпустит вас на лету.\n",
|
||||
"rov_compendium_warvulture_war_vulture": "\n-- БОЕВОЙ СТЕРВЯТНИК --\n",
|
||||
"rov_compendium_warvulture_what_bird_has_left_bar": "Остаток выносливости птицы отображается шкалой под вашей собственной.\n"
|
||||
"rov_compendium_warvulture_what_bird_has_left_bar": "Остаток выносливости птицы отображается шкалой под вашей собственной.\n",
|
||||
"rov_compendium_skeleton_diet_bones": "Голод не движет вами, и никакая еда вам не поможет: смертная пища ничто для сухих костей. Взамен мёртвые крепнут по мере падения своих владык: на вашей нынешней ступени у вас +$1 к максимальному здоровью.",
|
||||
"rov_compendium_skeleton_diet_mortal": "Вы сохранили привычки плоти: вы едите, как живые, и ваше здоровье даёт пища, а не ступень.",
|
||||
"rov_compendium_skeleton_effort_none": "И усилия вас не утомляют: выносливости у вас нет вовсе.",
|
||||
"rov_compendium_skeleton_effort_mortal": "Усилия утомляют вас, как живых, и вы тратите выносливость, как все."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
"rov_msg_aswid_vae_victis": "Vae Victis",
|
||||
"rov_msg_aswid_what_horrible_night_have_curse": "Какая ужасная ночь для носителя проклятия...",
|
||||
"rov_msg_aswid_bat_cooldown": "Ваша кровь еще не готова снова подняться в небо ($1 с)",
|
||||
"rov_msg_aswid_bat_combat_lock": "Кровь слишком горяча после схватки, чтобы подняться в небо ($1 с)",
|
||||
"rov_msg_aswid_bat_form_fades": "Облик летучей мыши рассеивается",
|
||||
"rov_msg_aswid_bat_too_heavy_to_beat": "Слишком тяжело, чтобы махать крыльями. Вы можете только планировать",
|
||||
"rov_msg_aswid_too_heavy_for_bat": "Вы несете слишком много, чтобы принять облик летучей мыши",
|
||||
|
|
|
|||
48
README.md
48
README.md
|
|
@ -15,11 +15,9 @@ Support the mod: [Patreon — NandorTheModder](https://www.patreon.com/c/NandorT
|
|||
|
||||
---
|
||||
|
||||
## New in v1.6.7
|
||||
## New in v1.6.8
|
||||
|
||||
**Heads-up: a few settings reset.** Some Skadi and Fenrir config keys have new names, so any value you changed in them is back to its default; the [changelog](#v167) lists which.
|
||||
|
||||
**Every dragon and every wolf has a job.** The Skadi's Drake is the quick scout and the Moder the slow freighter, and each form has its own duration and cooldown settings. The Fenrir's Ulv is the travel form, the Fenring holds the line, the Cultist burns and breaks easily. Alfar drones carry wood to the kiln again. Full details in the [changelog](#v167).
|
||||
**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).
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -31,6 +29,7 @@ Support the mod: [Patreon — NandorTheModder](https://www.patreon.com/c/NandorT
|
|||

|
||||
- **Stamina-less Combat:** Skeletons use no stamina and do not have a stamina bar.
|
||||
- **Undead Diet:** Cannot eat normal food. Max health increases automatically as you defeat bosses to make up for lack of food buffs.
|
||||
- **Mortal Habits (optional):** each player can turn on *Eats Mortal Food* (eat like the living; health comes from meals, and the boss health bonus is dropped) and *Feels Fatigue* (spend stamina like the living) in the config section `Skeleton - Mortal Habits`. Both are off by default and not synced by the server.
|
||||
- **Lit Sockets:** Your skull carries the eye lights of the creature your tier is built from, in that creature's own colour — so they change as the body does.
|
||||
- **Body Model switch:** with a player model mod (EnhancedValheimVRM and the like), set `Skeleton - Visuals` → `Body Model Enabled` to off and Skeletons keep the vanilla body. Abilities stay the same.
|
||||
- **Show Helmet:** turn on `Skeleton - Visuals` → `Show Helmet` and your helmet sits on the skull. Off by default; other players see it the way you picked.
|
||||
|
|
@ -59,7 +58,7 @@ Support the mod: [Patreon — NandorTheModder](https://www.patreon.com/c/NandorT
|
|||
### 4. Aswid
|
||||

|
||||
- **The Vampire:** Life-draining abilities.
|
||||
- **Bat Form:** Press G to become a bat. It flies where you look, with the Skadi drake's controls: W beats forward, Shift sprints, S beats backwards, and letting go hovers a moment before you glide down. Flying and sprinting cost stamina; out of stamina you can only glide. Carrying too much makes it cost 15% more, or, if you set `While Encumbered` to Blocked, keeps you on the ground. Monsters see, chase and hurt the bat like anyone else.
|
||||
- **Bat Form:** Press G to become a bat. It flies where you look, with the Skadi drake's controls: W beats forward, Shift sprints, S beats backwards, and letting go hovers a moment before you glide down. Flying and sprinting cost stamina; out of stamina you can only glide. Carrying too much makes it cost 15% more, or, if you set `While Encumbered` to Blocked, keeps you on the ground. Monsters see, chase and hurt the bat like anyone else. You can't take bat form until 2.5 seconds after you last lost health (`Combat Lock`).
|
||||
- **Free Bat Flight:** Prefer the old bat? Turn on `Aswid - Bat Form` → `Free Bat Flight`: up to 50 m/s, no stamina and no weight limit, Jump rises and Left Ctrl sinks. Monsters still see and hurt you. The server's `Bat Flight Rule` can force one flight on everyone.
|
||||
- **Vampiric Aura:** A passive life-draining aura around you, no key to hold: half damage as human, double as mist. As a bat it stays silent until The Queen falls (configurable under `Aswid - Vampiric Aura`). Press **[I]** to toggle it (and Devour) off, e.g. before trading with Haldor or Hildir, since it does not recognize traders from monsters.
|
||||
- **Blood Magic Mastery:** Cast Blood Magic items with infinite Eitr (health cost only).
|
||||
|
|
@ -95,6 +94,7 @@ Support the mod: [Patreon — NandorTheModder](https://www.patreon.com/c/NandorT
|
|||
- **Kin of the Traders:** Haldor/Hildir give you better prices.
|
||||
- **Coin Instead of Blood:** The Contract Bank hires professional dvergr crews and the Rune Barrel gives them drink — see [Race Stations](#race-stations--companions).
|
||||
- **Runes:** Late game, spend Eitr for powerful effects.
|
||||
- **Deep-Folk Builders:** Black marble building pieces cost 3 stone per marble, and Yggdrasil wood pieces 2 fine wood per Yggdrasil wood. Stations and furniture keep their cost. The pieces carry the Dvergar icon in the build menu, and taking one down gives back what you paid. Ratios and an off switch under `Dvergar - Cheap Building`.
|
||||
|
||||
### 9. Trenta
|
||||

|
||||
|
|
@ -492,6 +492,11 @@ Both halves have an off switch under `Factions` in Configuration Manager: **Fact
|
|||
|
||||
## Changelog
|
||||
|
||||
### v1.6.8
|
||||
- **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.
|
||||
|
||||
### 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.
|
||||
- **Change - Skadi's Drake and Moder fly differently:** the Drake is the scout: it turns faster, sprints at 26 m/s and flies for free, but it will not take off while you are encumbered. The Moder is the freighter: it turns slowly and pays 3 stamina a second to beat its wings, but it carries a heavy pack at 25% extra cost and glides for 8 seconds. `Skadi - Dragon Forms` holds every flight number per form plus, as on the Aswid's bat, Flight Stamina, While Encumbered, Encumbered Extra Stamina Cost, Max Duration, Duration Per State and Cooldown for the Drake, the Moder and the Fader. Duration and cooldown default to -1, which keeps the boss-tier timings. Each form also has its own cooldown now, with its own icon, so a cooldown on one form never blocks another. Thanks to Dissolution for the suggestion. Not tested in game yet.
|
||||
|
|
@ -671,37 +676,6 @@ Thanks to frogneel, Aquious, Dagaz and Dissolution for the Aswid reports and ide
|
|||
- **Fix - Fenrir sounds were only half heard, and a 1.4.24 note was wrong:** 1.4.24 said these sounds had been writing into the world save. They had not - the game deletes them when they finish - and the change made for it left other players unable to hear them and could play a sound twice. Sounds are spawned the game's own way again.
|
||||
- **Fix - The Cold Spell key's description said tier 1+:** the spell unlocks at Eikthyr, tier 2, and the description now says so.
|
||||
|
||||
### v1.4.24
|
||||
- **Fix - Purple smoke around the Skeleton's burning skull with some magic mods installed:** the fire aura the Skeleton wears from Moder on looked for its particles under two names that are not in Valheim at all. A name the game does not use is a free slot for whichever mod ships one, and with Magic Supremacy installed the aura picked up that mod's weapon trail on an emissive shader and sprayed it through a five-metre sphere. The aura had never actually been visible in a plain install, so it now draws nothing on purpose; its damage, radius and tick are untouched. Thanks to the players who reported it and named the mods they were running.
|
||||
- **Fix - Effects and sounds that were quietly missing across five races:** an audit of every prefab the mod asks for by name found nine that do not exist in the game, each one failing in silence. The puff that covers a transformation never played for the Fenrir, the Skadi or the Trenta's Muspell; the Aswid's Mist Form appeared and vanished with no effect at all, and so did dominating a creature with a thrall; the Aswid's two status effects and its Bat Form entry in the radial had no icon. All of them now use names the game really has.
|
||||
- **Fix - A Draugh's successful parry threw an error and cancelled its own frost nova:** the poison splash asked for an effect that does not exist and passed it straight to the game without checking, so every parry inside the window failed at that line - taking the North Wind nova that runs immediately after it down as well. Both work now.
|
||||
- **New - Human Meat is a real item at last:** the Bonemass tier has promised it since 1.4 and nothing ever created it, so the drop never happened and the "fatal to the living" warning never fired. A player who dies inside your death aura now leaves a piece behind, yourself included, and only a Draugh can stomach it. It is built from Blood Pudding's own nourishment, with its stamina folded into health since a Draugh has no use for stamina, and is tunable under `Draugh - Undead Fortitude`.
|
||||
- **Fix - Fenrir forms fought in a borrowed voice, or in silence:** every form's sounds were looked up by name and most of those names are not in the game. The chains hid it - a Fenring swung with a wolf's voice through a fallback - and the Cultist's double claw asked for three dead names in a row and had never made a sound at all. Each form now uses the creature's own sounds, and the jump attack's impact lands with the jump instead of firing while the form is still standing.
|
||||
- **New - The Cultist says why its fire will not come:** holding Right Mouse with no eitr did nothing whatsoever - no flames, no sound, no reason given. The form arrives at Yagluth and eitr is a Mistlands thing, so a Cultist meets that silence before it ever meets the fire. It now tells you the flames want eitr.
|
||||
- **New - Howl on demand in every Fenrir form:** the howl key was only ever read by the Fenring and the Cultist. As a wolf or an Ulv it did nothing. All four howl now, and the wolf and the Ulv use the creature's real howl animation - the sound is carried inside that animation, so it lands at the moment the animation means it to.
|
||||
- **Fix - Fenrir form sounds no longer write into your world save:** some of the game's sound prefabs carry a networked component, and spawning one the ordinary way leaves a persistent record behind - one per claw swing. They are now spawned the way the game itself does it, and leave nothing.
|
||||
|
||||
### v1.4.23
|
||||
- **Fix - Trol clients could not chop trees or mine rocks with their fists:** the fist bonus (chop and pickaxe damage, and the tool tier that grows with the bosses) was applied on whichever machine owned the tree or rock - usually the host - where the hit did not belong to the local player, so it only ever worked for the host. It is now applied on the attacking player's own machine before the hit is sent. Thanks to the players who reported it.
|
||||
- **New - Configuration is synced from the server:** every gameplay setting now follows the server's value in multiplayer, and is locked in Configuration Manager for players who are not admins. Keybinds and the purely cosmetic settings (eye and claw colours, glow, model rotation and offsets, the Head Fire VFX and stamina-bar toggles, debug logging) stay local, so each player keeps their own.
|
||||
|
||||
### v1.4.22
|
||||
- **Fix - Other players saw Fenrir forms standing silent:** every form's attacks - the Fenring's claws, the Cultist's claws and flames, the Wolf's and the Ulv's bites - were only ever triggered on the transformed player's own Animator, so onlookers saw the form run but never swing. The attacks now reach every other client, along with the opening sound of each swing and the howls. The Cultist's flame breath, its roar and the fire itself are shown to onlookers too. The sounds of the impact itself and the Fenring's jump are still heard only by the player who makes them.
|
||||
- **Fix - Fenrir players turned back to human at every sunrise, even with a form the day allows:** after the Queen the Fenring form (and the Wolf after Bonemass, the Cultist after Fader) is meant to work day and night, but sunrise took it away regardless. Only forms granted for the night alone are taken back now, and "The beast is tired" no longer blocks the daytime forms either. Thanks to the tester who noticed it.
|
||||
- **Fix - The Aswid's Blood Refinery had the insertion sounds the wrong way round:** flesh and bone played each other's sound. They are swapped.
|
||||
|
||||
### v1.4.21
|
||||
- **Fix - Other players saw Moder, the Drake and Fader at full size no matter what:** the dragon forms' own size (Moder's shrink included) was only ever applied on the transformed player's own screen — every other client built the remote copy at the prefab's raw scale. Two Skadi players who both turned into Moder each saw themselves correctly and the other one full-sized. Thanks to the tester who caught it from a second Skadi.
|
||||
- **Fix - Drake and Moder's bite, claw and breath attacks played no animation for onlookers:** the attack trigger was only ever set on the transforming player's own Animator, so everyone else saw the form fly, walk and idle but never actually swing or breathe. The trigger now reaches every other client too.
|
||||
- **Fix - Sverm Ravager Strain was invisible to everyone but the player using it:** the whole form — the model, the hidden human body, the attacks — was built entirely around the local player and never told the ZDO it was active. Other players saw a Sverm standing still for the whole two minutes with no Brute in sight. It is now networked the same way the Skadi and Fenrir forms already are.
|
||||
- **Fix - The Sverm's dorsal spines were mounted up over the shoulders, onto the face:** the crest was based at its mount bone and grown upward from there, which reached past the head once the Full Crest size (Queen tier on) came in. It is now centred on the bone instead, with a live "Offset Y" knob under `[Sverm - Dorsal Spines]` in Configuration Manager for any further nudging. Thanks to the tester who sent the screenshot.
|
||||
- **Changed - The Sverm's dorsal spines are 30% smaller:** 0.45 m down to 0.315 m from Moder to the Queen, 0.8 m down to 0.56 m from the Queen on.
|
||||
|
||||
### v1.4.20
|
||||
- **Fix - A refused race building still took your materials:** building something your race is not allowed to build, or before its boss has fallen, showed the refusal and then charged the full cost anyway — a non-Sverm trying the Brood Mound got "Only the Sverm can raise a hive." and lost 40 wood and 20 resin. The refusal stopped the building, but Valheim takes the cost in a separate step that never heard about it. Now a refused building costs nothing, no stamina included. This covered every locked building in the mod: the Sverm hive and market (and the one-hive-per-area limit), the Skadi golem, the Dvergar contract bank and barrel, the Trenta Elder Root and the Trol totem. Thanks to the tester who noticed the wood going missing.
|
||||
- **Fix - On a gamepad the Skadi cast the Cold Spell every time she built:** the spell sits on the pad's secondary attack button, which Valheim also uses to remove pieces (Classic layout) or place them (Alt 2). Every piece built or removed also cast the spell and drained stamina, which made building nearly impossible. The spell no longer casts while you hold the hammer, hoe or cultivator — on the keyboard as well, where middle mouse is Remove.
|
||||
- **Changed - On a gamepad the Cold Spell now casts bare-handed only:** the pad has no separate key for the spell, so with a weapon, shield, torch or tool in hand the button goes back to that item's own secondary attack, as it does in vanilla. Previously both fired together. Bare-handed, the spell casts without the unarmed kick. Keyboard players are unaffected: the Cold Spell key works as before. Thanks to the tester who reported it from a controller.
|
||||
|
||||
Versions before v1.4.20 are no longer listed here — see the [wiki's release notes](https://wiki.aledanidev.ovh/release-notes) for the full history back to v1.0.0.
|
||||
Versions before v1.5.0 are no longer listed here — see the [wiki's release notes](https://wiki.aledanidev.ovh/release-notes) for the full history back to v1.0.0.
|
||||
|
||||

|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "RacesOfValheim",
|
||||
"description": "A Valheim mod that adds eleven custom playable races (Alfar, Aswid, Draugh, Dvergar, Fenrir, Furling, Skadi, Skeleton, Sverm, Trenta, Trol) each with unique abilities, traits, race stations and a deep boss-driven progression system.",
|
||||
"version_number": "1.6.7",
|
||||
"version_number": "1.6.8",
|
||||
"website_url": "",
|
||||
"dependencies": [
|
||||
"denikson-BepInExPack_Valheim-5.4.2333",
|
||||
|
|
|
|||
|
|
@ -47,6 +47,13 @@ $version = (Get-Content $Manifest -Raw | ConvertFrom-Json).version_number
|
|||
# them, because they work on the wiki and on the git host.
|
||||
$readmeText = [System.IO.File]::ReadAllText((Resolve-Path $Readme).Path)
|
||||
$readmeText = [regex]::Replace($readmeText, '\[([^\]]+)\]\(#[^)]*\)', '$1')
|
||||
|
||||
# Thunderstore refuses a README over 100000 characters (hit at v1.6.7). Stop here rather than
|
||||
# ship a zip the upload rejects: cut the oldest changelog versions in README.md and move the
|
||||
# "Versions before vX are no longer listed here" line up with them. The wiki keeps them all.
|
||||
if ($readmeText.Length -gt 100000) {
|
||||
throw "README.md is $($readmeText.Length) characters; Thunderstore allows 100000. Cut the oldest changelog versions in README.md."
|
||||
}
|
||||
$packagedReadme = Join-Path ([System.IO.Path]::GetTempPath()) ("RacesOfValheim_README_" + [guid]::NewGuid().ToString('N') + ".md")
|
||||
[System.IO.File]::WriteAllText($packagedReadme, $readmeText, (New-Object System.Text.UTF8Encoding($false)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue