diff --git a/JotunnModStub/WarVulture/WarVultureConfig.cs b/JotunnModStub/WarVulture/WarVultureConfig.cs
index 1903f4a..8ef89f0 100644
--- a/JotunnModStub/WarVulture/WarVultureConfig.cs
+++ b/JotunnModStub/WarVulture/WarVultureConfig.cs
@@ -89,6 +89,36 @@ namespace RacesOfValheim
"cloned from vanilla's mount stamina bar."));
}
+ ///
+ /// The race of a player, read m_customData first and the ZDO second.
+ ///
+ /// That order is the one the summon has always used, and it is kept rather than swapped for
+ /// the ZDO-first order the visuals use, for a reason: this only ever asks about the LOCAL
+ /// player, whose m_customData is authoritative and is written before the ZDO on a race
+ /// change. The ZDO is the fallback for the one frame after a load where m_customData has not
+ /// been filled in yet - without it the crafting list would flicker the recipe away.
+ ///
+ public static string RaceOf(Player player)
+ {
+ if (player == null) return null;
+
+ if (player.m_customData != null &&
+ player.m_customData.TryGetValue("Race", out string custom) &&
+ !string.IsNullOrEmpty(custom))
+ {
+ return custom;
+ }
+
+ ZNetView nview = player.GetComponent();
+ if (nview != null && nview.IsValid())
+ {
+ string race = nview.GetZDO().GetString("RacesOfValheim_Race", "");
+ if (!string.IsNullOrEmpty(race)) return race;
+ }
+
+ return null;
+ }
+
///
/// Whether a race id may call the bird. An empty list means everyone, which is the honest
/// reading of "no restriction" and is also what makes this testable on any character.
diff --git a/JotunnModStub/WarVulture/WarVultureItem.cs b/JotunnModStub/WarVulture/WarVultureItem.cs
index 8ba29ad..e3443d9 100644
--- a/JotunnModStub/WarVulture/WarVultureItem.cs
+++ b/JotunnModStub/WarVulture/WarVultureItem.cs
@@ -1,4 +1,6 @@
+using System.Collections.Generic;
using HarmonyLib;
+using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
using UnityEngine;
@@ -36,6 +38,12 @@ namespace RacesOfValheim
private const string TrophyPrefab = "TrophyVolture";
private const string Label = "WarVulture";
+ /// The three materials. Ids, not display names: the ingot is BlackMetal (the SCRAP
+ /// is the ore), and the raw lox meat is LoxMeat, with CookedLoxMeat being the other one.
+ private const string GreydwarfEye = "GreydwarfEye";
+ private const string BlackMetalIngot = "BlackMetal";
+ private const string RawLoxMeat = "LoxMeat";
+
public static void Register()
{
GameObject prefab = PrefabManager.Instance.CreateClonedPrefab(PrefabName, SourcePrefab);
@@ -73,9 +81,24 @@ namespace RacesOfValheim
// is not. Getting that wrong once put a live Ashlands predator in the player's world.
WarVultureVisual.BuildTemplate();
- // No recipe, on purpose and for now: the item is spawned from the console
- // ("spawn WarVulture") while the flight is being proven. A recipe costs nothing to add
- // later and would only be materials invented before anyone knows what this is worth.
+ // The forge, and not the workbench, for the same reason Trol's Hammer sits on a
+ // workbench: the station is picked by the material that is hardest to have. Eyes and
+ // meat are picked up off the ground; a black metal ingot means a blast furnace already
+ // exists, and the forge is where that metal is worked.
+ ItemManager.Instance.AddRecipe(new CustomRecipe(new RecipeConfig
+ {
+ Item = PrefabName,
+ Amount = 1,
+ CraftingStation = CraftingStations.Forge,
+ MinStationLevel = 1,
+ Requirements = new[]
+ {
+ new RequirementConfig(GreydwarfEye, 10, 0, true),
+ new RequirementConfig(BlackMetalIngot, 2, 0, true),
+ new RequirementConfig(RawLoxMeat, 2, 0, true),
+ },
+ }));
+
Jotunn.Logger.LogInfo($"[{Label}] {DisplayName} registered: no eitr, no health, no stamina, no skeleton.");
}
@@ -251,6 +274,35 @@ namespace RacesOfValheim
}
}
+ ///
+ /// Who gets to see the recipe: the same list the bird itself answers to
+ /// (WarVultureConfig.AllowedRaces, "Furling,Dvergar" out of the box), read through the same
+ /// helper, so the crafting menu and the summon can never disagree. A race that could craft the
+ /// item but not call the bird would just be selling someone ten greydwarf eyes' worth of stick.
+ ///
+ /// Player.GetAvailableRecipes is the single funnel the crafting list is built from, and it is
+ /// public and takes the list by ref - so a Postfix that removes one entry is the whole gate.
+ /// The recipe is still REGISTERED for everybody, which is deliberate: it stays in ObjectDB, so
+ /// a character who changes race sees it appear or vanish with no world edit and no re-register.
+ ///
+ /// Filtering here rather than at the craft click also means the refusal never has to be
+ /// explained - an item that was never in the list cannot be clicked.
+ ///
+ [HarmonyPatch(typeof(Player), nameof(Player.GetAvailableRecipes))]
+ public static class WarVultureRecipeRacePatch
+ {
+ private static void Postfix(Player __instance, ref List available)
+ {
+ if (__instance == null || available == null) return;
+ if (WarVultureConfig.RaceAllowed(WarVultureConfig.RaceOf(__instance))) return;
+
+ available.RemoveAll(recipe =>
+ recipe != null &&
+ recipe.m_item != null &&
+ Utils.GetPrefabName(recipe.m_item.gameObject) == WarVultureItem.PrefabName);
+ }
+ }
+
///
/// The click. Attack.OnAttackTrigger is used rather than Attack.Start because it takes NO
/// parameters - its signature cannot drift - and it fires when the animation reaches its
diff --git a/JotunnModStub/WarVulture/WarVultureMount.cs b/JotunnModStub/WarVulture/WarVultureMount.cs
index 027a540..1d8646a 100644
--- a/JotunnModStub/WarVulture/WarVultureMount.cs
+++ b/JotunnModStub/WarVulture/WarVultureMount.cs
@@ -107,8 +107,9 @@ namespace RacesOfValheim
private static void Summon(Player rider)
{
- string race = null;
- if (rider.m_customData != null) rider.m_customData.TryGetValue("Race", out race);
+ // Through WarVultureConfig.RaceOf rather than reading m_customData here, so this gate
+ // and the one hiding the recipe (WarVultureRecipeRacePatch) are literally the same read.
+ string race = WarVultureConfig.RaceOf(rider);
if (!WarVultureConfig.RaceAllowed(race))
{
diff --git a/README.md b/README.md
index 3eb8a29..dd323fc 100644
--- a/README.md
+++ b/README.md
@@ -327,11 +327,11 @@ Meat goes in and a standing pack fills up, in three ranks. It is a herd you keep
A vulture's head kept on a stick. Raise it and the bird comes back under you.
- **Who can call it:** Furling and Dvergar by default. The list is a config entry (`War Vulture - Access`) — add races to it, or leave it empty to let everyone ride. In anyone else's hands the item is an inert trophy.
+- **Crafting:** 10 greydwarf eyes, 2 black metal ingots and 2 raw lox meat, at a forge. The recipe is only in the crafting list for the races allowed above — change that config and it appears or disappears for your character with no new world and no restart.
- **Summon and dismount:** Left click the item to call the bird. Left click again and the vulture starts a controlled descent, ignoring your input until the ground arrives; a third click lets go on the spot.
- **Flying:** Same feel as the Aswid's bat form — you steer where you look. Cruise speed is unlimited, because a vulture stays up for hours.
- **Sprint:** Hold the vanilla run key for full speed. The bird only has so much wind in it (10s by default) before it settles back to a glide, and it refills in the air as soon as you let go — landing is not required. The reserve is drawn as a bar under your own stamina.
- **Seen by others:** Everyone else sees you sitting on a real vulture; the bird and the riding pose are network-synced.
-- **Not craftable yet.** There is deliberately no recipe while the flight is being proven — the item is spawned from the console (`spawn WarVulture`). A recipe will land once it is clear what the ride is worth in materials.
Speeds, sprint duration, recharge, mount size and seat position are all in Configuration Manager under `War Vulture`.
@@ -394,7 +394,7 @@ Bug reports, feedback, ideas: [https://discord.gg/gbBEK2VTE](https://discord.gg/
### v1.4.2
- **NEW - Sverm Race:** the tenth race. Wears carapace instead of armour (never removable, always worth the next biome's full set, weightless), fights with permanent claws, is immune to poison but takes 40% more from blunt and fire, and is ignored by every invertebrate in the game from tier zero. After the Elder it stops being one body and becomes a colony.
- **NEW - The Colony (Sverm):** Brood Mound, digestion bank, brood eggs on a timer, an insect troop roster, a Hive Market, blister ticks that regrow free, and vanilla beehives taken over by the nest — twice the speed, three times the honey, royal jelly after Yagluth.
-- **NEW - War Vulture (Flying Mount):** a vulture trophy on a stick that puts you on a real, network-visible flying bird. Unlimited cruise, a limited sprint reserve on the run key that refills in mid-air, and its own bar under your stamina. Furling and Dvergar by default, configurable. No recipe yet while the flight is being proven — spawn it from the console.
+- **NEW - War Vulture (Flying Mount):** a vulture trophy on a stick that puts you on a real, network-visible flying bird. Unlimited cruise, a limited sprint reserve on the run key that refills in mid-air, and its own bar under your stamina. Furling and Dvergar by default, configurable. Crafted at a forge from 10 greydwarf eyes, 2 black metal ingots and 2 raw lox meat, and the recipe is hidden from every race that cannot ride.
- **NEW - Trol's Hammer:** a second builder's hammer (1 Core Wood, 2 Fine Wood, Workbench) that builds everything the ordinary one builds — same menu, same cost, same drop — 20% larger. The preview is already at full size, the size is saved with the piece and shared with other players, and both hammers keep working side by side in the same house.
- **NEW - Claws for the Aswid and the Fenrir:** both races now grow a permanent pair, on the same terms the Sverm has always had. All three are measured against **one** yardstick rather than against the models they wear, so the same tier is worth the same damage whichever race you are, and no pair counts while you are wearing another body.
- **NEW - Dvergar Contract Bank:** the hire bench is now a proper contract bank — five crew slots, 400 to 2000 coin, paid at your own trader discount, with the Queen's drop opening the Runic Crew and the Ash Guard. Hired crews keep their employer's truce with the mountain's dvergr, seekers at heel included, so a band walking into an outpost no longer means a dead shopkeeper. They carry no loot, heal themselves, and a dead crew is money spent. Race locked, one per square kilometre, and the only chain that needs no reagent — the Dvergar pay for everything, so 100 coin goes in the recipe instead.