Commit graph

25 commits

Author SHA1 Message Date
Ferdinando
6e87be3c77 minor bugfix and pad support 2026-09-12 10:42:01 +02:00
Ferdinando
7ac7f99287 feat(sverm): enforce the beehive cap, and put the aura and the nest limits in config
"Beehives per Aura" was bound into the config and then read by nobody.
SvermConfigManagement.Beehives had no callers and neither did the
constant behind it, so the entry described a limit that did not exist and
a player could raise thirty hives in one aura and get thirty workers.

SweepAura is two passes now, with the cap between them. The first applies
to hives already taken and counts them - that maintenance is not
skippable, it is what survives a zone reload - and only then are new
candidates considered. One pass would have let the order the physics
query happens to return decide whether a hive counted against the cap or
was measured by it. The minute keeps running on a hive that does not fit
today, so when a taken hive is destroyed the one that has waited longest
is claimed on the next sweep instead of starting over; lowering the cap
never hands a hive back.

Three limits are now the player's: Aura Radius, Nests per Radius and Nest
Spacing Radius. PieceDensityLimit.Register takes a snapshot of its
numbers, so the Hive Market and the Brood Mound both watch their entries
and re-register when one moves - Register replaces an entry rather than
stacking a second limit on the same piece.

All three are clamped, and the reason is not tidiness: Register REFUSES a
radius of zero or a maximum below one, and a refused limit is no limit at
all. A player typing 0 into "Nests per Radius" to mean "no nests" would
have been handed unlimited nests.

Every player-facing string that stated the old numbers now reads the live
ones - the two build refusals, the orphaned market's message and hover,
and the two Compendium lines. The nest's hover shows the cap next to the
count, so moving the knob has visible effect.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 08:45:28 +02:00
Ferdinando
34bdf35325 Merge branch 'war-vulture' into main
Sverm Ravager Strain (replacing the Stinger Morph), Trenta Elder Root, the
Trol food and Black Forest truce work, and the faction FindEnemy patch.

Conflicts resolved:

- FactionHostilityPatch.cs: both sides added a class at the same spot and
  they cover different holes, so both are kept - FactionStaticTargetPatch
  (main, stops same-faction mobs smashing structures) and
  FactionHuntPlayerPatch (war-vulture, closes the HuntPlayer fall-through).

- RaceCompendium.cs: both branches independently fixed the same off-by-one
  in the Trol's progression gates. Took main's wording, which matches the
  code - Axes are in the melee bonus (TrolDamagePatches sends them to
  m_slash), the 4th food slot has no gate at all, and Yagluth is +5 not +10
  (TrolConfig.YagluthMeleeBonus). Kept war-vulture's two new lines, the
  Kindling fire weakness and the Black Forest truce.

- Package/manifest.json: 1.4.8, which is what the root manifest and
  PluginVersion already said.

RacesOfValheim.cs referenced SvermConfig.StingerSE/StingerCdSE, which
war-vulture renamed to Ravager. Git merged those lines without a conflict
and the result did not compile; renamed.

Also in this commit:

- Factions on/off switches (FactionsConfig): "Faction truce" and "Faction
  merchants", both default on, both read live so they take effect without a
  restart. The truce gates its three postfixes; the merchants gate the
  Character.Awake setup plus every behavioural patch, so turning them off
  drops the prompt and the trade window on mobs already awake.

- SerpentMeat sells for 200 instead of 1 at the Fuling bench, moved to keep
  the list's ascending price order (the sell panel renders it as declared).

- DraughFoodPatches mapped "SerpentMeatRaw", which is not a prefab; the
  internal id is SerpentMeat, so serpent meat never cooked for a Draugh.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-25 18:52:10 +02:00
Ferdinando
ee5a2e2e7b warvulture 2026-08-24 19:17:47 +02:00
f130cf127d Merge branch 'fix-fenrir-compendium-text' into main 2026-08-24 13:50:37 +02:00
fbaa2e9502 Fix Fenrir compendium: remove bogus consume-on-kill line
Same copy-paste artifact as Trol's entry - Fenrir has no consume/devour
mechanic, only Aswid does (TryConsumeMob/Devour).
2026-08-24 13:49:03 +02:00
189177b643 Fix Trol compendium: remove bogus consume-on-kill line, correct off-by-one progression gates
- Trol has no consume/devour mechanic; that line was copy-pasted from
  Aswid's entry, which does.
- Every boss-gated line was checking state >= N-1 instead of N, so each
  unlock (Eikthyr XP bonus, Elder's rock throw/regen, Bonemass/Yagluth
  bonuses, Moder's True Form, Queen's Log Weapon, Fader's Ashlands smash)
  displayed a full tier early. Aligned all seven gates with
  BossProgressionManager's state mapping and the actual code gates in
  TrolSkillPatches, TrolRegenPatches, TrolRace, and TrolFarmingPatches.
- Yagluth melee bonus line said +10; TrolConfig.YagluthMeleeBonus
  defaults to 5, matching the Rock Throwing figure beside it.
- Bonemass/Yagluth melee bonus text omitted Axes, though the bonus
  (TrolDamagePatches) applies to Axes too.
2026-08-24 13:47:53 +02:00
Ferdinando
e9d6e78ec8 warvulture 2026-08-19 19:18:24 +02:00
c2212df322 Merge branch 'war-vulture' into main
Brings in v1.4.3-v1.4.5 work: Trol's Hammer, Bone Servants, War Vulture
craftability, and the Aswid/Fenrir timed-claws rework, on top of the
bugfixes merged into main since v1.4.2.

Resolved conflicts in 7 files where main's post-v1.4.2 fixes overlapped
war-vulture's claws rework:
- README.md, manifest.json: took war-vulture's v1.4.5 content (main
  hadn't touched either since the v1.4.2 release).
- RacesOfValheim.cs: plugin version -> 1.4.5.
- RaceClaws.cs: kept war-vulture's lazy EnsureRoster() fix for the
  Fenrir claw-registration bug over main's belt-and-suspenders
  Register(this), and dropped the now-stale comment referencing the
  removed static constructor. Main's SetupDragItem race-ownership fix
  carried through untouched.
- AswidConfig.cs/AswidRace.cs/AswidPatches.cs: adopted war-vulture's
  single-key design (I toggles both Vampiric Aura and Devour together)
  to match the documented v1.4.5 trader-safety fix, removing a duplicate
  AuraEnabled field the two branches had each declared independently.
  Kept main's IsDownIgnoringHeldKeys() input fix on top.
- RaceCompendium.cs: kept main's fact-checked Aswid/Fenrir entries
  (war-vulture's copies were pre-fix stubs, one referencing a
  nonexistent variable) and layered in war-vulture's timed-claws
  wording.

Build verified clean (0 errors) after resolution.
2026-08-18 17:36:42 +02:00
Ferdinando
4559e0b9e1 warvulture 2026-08-18 16:51:07 +02:00
Ferdinando
0aa1dc4dc8 warvulture 2026-08-16 07:44:44 +02:00
58f70f1a4c Merge branch 'war-vulture' into main
Brings in the Sverm race, the War Vulture flying mount, and Skadi's
Crystal Golem (replacing the Hidden Hollow). Resolved conflicts:
AswidVisuals.cs took war-vulture's skeleton-eye-light rewrite with
main's attach/attack/sleep timing guard re-applied on top, and
RaceCompendium.cs kept main's rewritten race entries while folding in
war-vulture's Sverm/War Vulture pages and the new Claws paragraphs for
Aswid and Fenrir.
2026-08-11 20:35:48 +02:00
Ferdinando
1c4b20bb06 warvulture 2026-08-11 19:29:58 +02:00
Ferdinando
1d66b00374 warvulture 2026-08-11 16:30:20 +02:00
66cea69d33 fix(compendium): rewrite every race entry against live game code
Most GenerateXText methods described mechanics that didn't match what
the code actually does, some invented stats that never existed. Went
race by race and rewrote each one off the real ConfigEntry/Progression
values, verifying tier gates, keybinds and numbers against the actual
patches rather than restating old prose.

- Aswid: rewritten from scratch. Invented Damage/Armor/Jump-per-state
  multipliers that don't exist in AswidConfig; Bat Form, Eclipse and
  Tame were missing entirely; the Vampiric Aura was described as a
  shield-block channel in bat/mist form when it's actually passive and
  always-on (toggled with 'I').
- Furling: was a placeholder ("will be revealed soon...") with only
  tiers 5-8 written and a mojibake dash in the base passive. Filled in
  Master of Shadows (tier 2), The Wickerman (tier 3) and Dance of the
  Dead (tier 4), all missing.
- Trenta: had no compendium entry at all - no title, no branch, no
  method. Written from scratch off TrentaConfig/TrentaConfigManagement.
  Also fixed a real gameplay bug found while cross-checking: Thorns had
  no tier gate and was live from tier 1 instead of Moder (tier 5), the
  way its own doc comment and config grouping said it should be.
- Skadi/Skeleton: audited line by line, already accurate, untouched.
- Dvergar: one stale line (claimed 33% height reduction; the live
  VisualScale is 22%).
- Draugh: substantial rewrite. Removed a "permanent Corpse Run" buff
  that doesn't exist anywhere in the codebase, corrected base-tier
  Poison (ordinary until Bonemass, not resistant from tier 1), fixed
  the Human Meat trigger (any nearby player death, not humanoid
  kills), fixed a false "no stamina to spend" claim, and added the
  missing skeleton/draugr/ghost/wraith hostility exemption, Frost
  immunity and stagger-crit unlocks.
2026-08-09 18:31:53 +02:00
3607d7323d feat(dvergar): make ability numbers and keybinds BepInEx-configurable
Adds DvergarConfigManagement.cs rather than reusing the DvergarConfig
name: that existing class is a different kind of thing - identity
constants that must never change (renaming RaceId would orphan saved
characters), hand-tuned cosmetic placement numbers (eye/hood position),
and per-tier tables (health malus, smithing/trader discounts) left alone
under the same boundary drawn for every other race's progression table.

Only the genuine ability knobs move: Runic Ping and Runic Overcharge
(cost, radius, duration, cooldown, marker light) each get a Configuration
Manager section, plus mining and weapon-affinity percentages under
Passive Combat, plus the two keybinds. DvergarConfig's fields for those
now forward to DvergarConfigManagement (same const-to-property trick used
for Skadi), so all 109 existing call sites across 11 files kept working
unchanged except the two keybind consumers (DvergarAbilities,
RaceCompendium's in-game ability text), which now read the live
configured key so a rebind stays reflected everywhere it's shown.

Weapon-affinity DamagePercent/StaminaPercent are overridden with the live
config value inside DvergarProgression.GetRules rather than baked into
the static WeaponAffinities array, since that array evaluates at
class-load time - before RacesOfValheim.Awake() calls Bind - and would
risk a null-reference on the ConfigEntry.

Config sections stay bound alphabetically by race (Aswid, Draugh,
Dvergar, Skadi) in RacesOfValheim.Awake().
2026-08-06 13:56:00 +02:00
f192f929f6 feat(skeleton): wear Skeleton_Hildir from Moder, not the charred twitcher
Swaps the model the race takes at Moder. Hildir'''s skeleton is built on the same
rig as the plain one, so the 0.85/1.20/0.85 squeeze goes with it - that existed
only to make the charred twitcher'''s broader, shorter proportions read as a
player, and the bone-by-name remapping the swap relies on now has an exact rig to
match against rather than an approximate one.

The compendium no longer claims the bones blacken, since they no longer do; the
fire aura it describes is unchanged.

An unresolved model id used to fail silently and invisibly - the human body is
switched off before the replacement is built, so a bad name leaves a player with
no mesh at all. It now warns once per name.
2026-08-05 17:04:10 +02:00
5ef7a102da fix(skeleton): make the progression real, and say so in the compendium
Four separate faults were behind one player report.

The tier table had drifted a long way from the published progression. Poison
immunity arrived at Bonemass instead of Eikthyr, auto-stun at The Queen instead
of The Elder, and lifesteal jumped 20/30/40 where the description promises a
climb in fives from 5% to 35%. Rewritten to match the description tier for tier,
which is the copy players actually read.

Poison immunity never worked even at the tier that granted it. SE_SkeletonStats
built its damage modifiers in Setup, which runs once when the effect is applied -
at spawn, before any boss has fallen - and nothing ever asked again, so the
modifiers stayed frozen at tier 1 for the whole session. Everything else the race
does re-reads the rules per hit, which is why only the modifiers looked broken.
They are now rebuilt when the tier actually changes.

Max health was whatever three scaled sausages happened to add up to. A Skeleton
cannot eat, so the race fakes three permanent foods to carry the tier bonus -
sound enough for regeneration, which Valheim drives off the food list, but the
number the game reads is Food.m_health, recomputed every second from the burn
curve, and anything that leaves those foods partly burnt or one short quietly
costs health. A Bonemass Skeleton had 95 where the table promises 165. The foods
stay for regeneration; the total is now overwritten at Player.GetTotalFoodValue,
which has exactly one caller and decides the number outright.

Skeleton Secrets was a one-line placeholder returning the same sentence at every
tier - never written rather than broken. It now unfolds tier by tier, and opens
by naming the standing the race believes it is on, so the next player who kills a
boss and sees nothing change can tell a tier that failed to advance from an
unlock that failed to fire.

The charred model moves from Fader to Moder, where the description asks for a
fire skeleton, and summons stay skeletons at both tiers rather than turning
charred at Fader. Both are one-line reverts if the old look is preferred.
2026-08-05 16:33:27 +02:00
5cfd8cfab8 feat(skadi): rework dragon flight - longer stasis, stamina sprint, reverse thrust, water take-off
The hover window that holds a form level after you stop powering goes from 2
seconds to 5, so gliding is a choice rather than something that happens to you
the moment you let go.

Shift while holding W spends 15 stamina a second for 22 m/s instead of 12. It is
the only part of flight that costs anything - base flight stays free, because the
drake arrives at The Elder, long before a player has the pool to pay for simply
staying airborne - and running dry drops you back to the free boost rather than
out of the sky.

S beats backwards along the aim, pitch included: look down and press it and you
rise away from what you are watching. Reverse thrust alone would have spun the
dragon round to fly nose-first away from the camera, putting its tail where its
breath comes out, so the form claims AlwaysRotateCamera for exactly those frames
and keeps facing what it is retreating from.

Water is no longer a trap. Character.UpdateMotion asks IsSwimming before it ever
looks at m_flying, so a dragon that touched the sea was handed to UpdateSwimming
every frame: the flight patch never ran and there was no way back up short of
finding land. The Aswid's bat escapes this only because debug-fly is checked at
the very top of UpdateMotion, before water is considered at all - which is
exactly why it can take off from the water and Moder could not. Those frames now
go back to UpdateFlying, and while in swim depth the form climbs regardless of
where the camera points, so the surface is something you break out of rather than
something you sit in. Nothing that merely asks IsSwimming - the Wet status, the
animator, stamina - is touched.

All five speeds now run through m_flySlowSpeed instead of the m_run/m_flyFastSpeed
pair, which only ever picked between two of them.
2026-08-05 10:16:52 +02:00
5febc588ea feat(dvergar): rename from Dvergur, and give it a lightning affinity
Rename covers the folder, all seven filenames and every identifier, status
effect name and display string. Valheim's own Dverger/dvergr prefab references
are untouched - the names never collided.

The race id is what sits in m_customData and the ZDO, so renaming it alone would
have handed every existing character the selection menu again. DvergarRace
migrates the old id on spawn, before anything else reads it.

Runic Spark is modelled on Skadi's Ice Affinity and deliberately shares its
shape: live from the base tier and growing a flat step per progression state, so
+2 at Base through +16 after Fader. Lightning rather than frost, and like
Skadi's it rides every blow rather than melee only. AddFlat gained the elemental
channels while it was there - lightning would otherwise have landed in generic
damage.

The Trol remote-sync trace fired on a two-second timer for as long as a remote
player existed, which in the main menu is forever: Player.m_localPlayer is null
there, so the character preview counts as remote and it never stopped. Keyed on
the state it reports instead, so it still catches a remote player being sized
wrongly without narrating an idle menu.
2026-08-04 00:22:58 +02:00
3ec51aeb45 feat(dvergur): add the Dvergur race scaffold
An eighth race built on the existing per-race pattern: a MonoBehaviour driver
registered from Awake, a progression table keyed on the boss state, an SE_Stats
carrier, and Harmony patches for the individual perks.

The helmet slot stays free. Whatever the player equips keeps every one of its
stats and only its mesh is swapped for the dvergr hood, which is the Skeleton's
helmet handling turned into a replacement rather than a plain hide.

Every percentage the spec left open lives in DvergurConfig as a named value and
is marked TODO there, so tuning the race never means touching the logic. The
knobs are static readonly rather than const so that switching a perk off with a
zero does not fold its guard into dead code.
2026-08-02 21:45:44 +02:00
f12999b7e4 Merge pull request 'draughfirstdraft' (#4) from draugh-race into main
Reviewed-on: #4
2026-08-02 08:41:45 +02:00
Ferdinando
be2f7a73cd draughfirstdraft 2026-08-02 08:30:53 +02:00
5d5a6eab42 Fill in the Skadi compendium entry
It was a placeholder reading "The secrets of winter will be revealed
soon...". It now unfolds tier by tier like the Aswid and Furling ones,
covering the passives, the form keybinds, the flight controls and which
attacks are free. The frost bonus and spell damage figures are computed
from the same formulas the code uses, so the text cannot drift when
those constants are tuned.
2026-08-01 18:02:24 +02:00
Ferdinando
c4a24c9fdf Initial commit 2026-07-30 19:00:13 +02:00