Commit graph

522 commits

Author SHA1 Message Date
8b7e88e077 fix(fenrir): faint night glow at 0.675, as tuned in game 2026-10-23 22:08:05 +02:00
418d2462bd fix(fenrir): a softer ready glow
1.2 read too strong in game; 0.9 by default. The faint glow stays at 0.6.
2026-10-23 20:12:30 +02:00
c2bc73b3a0 feat(fenrir): eyes turn the Cultist's yellow when it is back from cooldown
The ready flag becomes an int: none, a form, or the Cultist. The Cultist
wins only while its rules give it a cooldown (Yagluth and Queen), since
that is the one return worth announcing. Its body shares the Fenring's
material and its breath is white flame tinted by texture, so the colour
comes from its death effect: FlameRoundYellowParticle's emission,
(2.691, 1.797, 0.455), bundle c4210710.
2026-10-23 20:06:49 +02:00
2becb81b6f fix(fenrir): the faint night glow is bright enough to see
At 0.35 the red channel stayed under 1, so bloom never picked it up and
a Fenrir with no form ready looked like it had no glow at all. 0.6 puts
it just over.
2026-10-23 19:58:35 +02:00
d1f328a496 feat(fenrir): eyes glow at night, bright when a form is ready
A community suggestion: an indicator on the character instead of the
"<form> is Ready!" text. FenrirVisuals borrows the Skeleton's eye_l and
eye_r the way AswidVisuals does, with the Aswid's playtested placement,
and tints them with the Fenring's own emission colour (2.0, 0.372, 0),
read from bundle c4210710.

Dark by day and in a beast form. At night they glow faintly, and
brightly while one of the three keys would transform. That uses the
same gates as TryTransformWithRules: tier, night, sun sickness,
cooldown. The owner writes it to the ZDO only on a change, so remote
players see the same.

New local section "Fenrir - Appearance": Ready Message (on by
default), Eye Glow, and the night and ready strengths.
2026-10-23 19:33:00 +02:00
f1f8ed245c Merge branch 'fix-stamina-bar-return': the stamina bar comes back after leaving the Aswid or the Draugh 2026-10-23 19:23:43 +02:00
1b1dae5f0b Merge branch 'fix-full-food-slots': race foods replace a worn-down meal when the stomach is full 2026-10-23 19:23:43 +02:00
f1597dd646 fix(hud): the stamina bar comes back after leaving the Aswid or the Draugh
Both races hide the stamina bar root from a Hud.UpdateStamina prefix.
Vanilla activates that root once, when the HUD is built, so after a
race change the bar stayed hidden until relog. The prefix now switches
it back on for every other race.
2026-10-23 19:22:31 +02:00
eba537fa07 fix(food): race foods replace a worn-down meal when the stomach is full
Trenta seeds, Draugh raw flesh and Aswid meals each go through an
EatFood prefix that, with three slots full and none holding the same
food, answered false. Vanilla would replace the most depleted meal past
half its time. The UseItem callers also never showed why: EatFood says
nothing on a refusal, so the click did nothing at all. That is the
Reddit report of a Trenta who could not eat any seeds.

The prefixes now hand that case to native EatFood, the Aswid's
CanConsumeItem postfix keeps vanilla's answer instead of forcing false,
and the Trenta and Draugh callers ask CanEat(item, true) for vanilla's
own message when a meal is refused.
2026-10-23 19:18:53 +02:00
557664c41f Merge branch 'fix-furling-remote-scale': other players see a Furling at Furling size 2026-10-23 19:07:14 +02:00
e125c6bc67 Merge branch 'fix-trol-legacy-weapon-reach': a resized player's weapon hits as far as it is drawn 2026-10-23 19:07:14 +02:00
95c8a7b1b6 fix(furling): other players see a Furling at Furling size
The 0.81 scale was applied from a Player.Update postfix that returned for
anyone but the local player and read the race from the local m_customData.
Scale is not replicated, so a Furling was small only on their own screen.
The postfix now sizes every player, with the race read off the ZDO the way
the Dvergar and the Trol already do it.
2026-10-23 19:03:58 +02:00
691ccc211b fix(visuals): a resized player's weapon hits as far as it is drawn
Attack.DoMeleeAttack and DoAreaAttack measure range and ray width from
the unscaled root, so a Legacy True Form Trol at 2.5 still hit at a
human's 2 m while the drawn mace reached five. Both now grow by the
Visual's world scale (never below 1), the factor HeldItemScaleFix sizes
the weapon by. Height stays at the feet so a flat swing does not pass
over small enemies. F8 toggles an in-game readout of the stretched
numbers and what a cast straight ahead passes through.
2026-10-20 03:17:08 +02:00
9dd6600287 chore(release): v1.5.13 - no faction AI freeze, Dvergar build discount
With factions on, destroying a piece a mob was targeting froze every AI in
the area on servers. Dvergar pieces now build at the discounted metal cost
the menu shows, and refund what was paid.

README: New in block and changelog entry. Compendium: the Dvergar smithing
discount also covers building, in English, Italian and Russian.
2026-10-19 14:30:35 +02:00
64fbd66987 Merge branch 'fix-static-target-null': no AI freeze when a targeted piece is destroyed 2026-10-19 14:24:31 +02:00
faea08901c Merge branch 'fix-dvergr-build-discount': build pieces accept the Dvergar smithing discount 2026-10-19 14:20:40 +02:00
32c49a8af0 fix(dvergar): build pieces accept the smithing discount
The build menu showed the discounted metal cost, but Player.HaveRequirements(Piece)
read m_amount directly, so placing a piece still needed the full vanilla amount.
It now goes through GetAmount like the rest of the cost path.

Piece.DropResources also read m_amount, which would have refunded 10 tin for a
cauldron that cost 6. A piece placed by a Dvergar now stores the discount paid,
and dismantling it drops that amount.
2026-10-19 14:20:28 +02:00
6d9f07217e fix(factions): no AI freeze when a targeted piece is destroyed
FactionStaticTargetPatch read m_targetStatic as a boxed object, so the
null check missed Unity's destroyed-object state. A piece destroyed
while a mob targeted it passed the check, and reading its gameObject
threw. The throw escaped into MonoUpdaters.FixedUpdate and stopped
every AI after that mob, every frame, until the field changed.

Cast to Component and use Unity's null check; clear a dead target.
2026-10-18 13:33:21 +02:00
9d459fbc99 chore(release): v1.5.12 - hair back after a form with Valkyr
With the Valkyr body replacer, leaving any monster form brought the body back
without its hair. Fixed in PlayerVisualHider.

README: New in block and changelog entry.
2026-10-18 00:18:36 +02:00
b028a309d2 Merge branch 'fix-valkyr-hair': hair comes back after a form with Valkyr 2026-10-18 00:17:16 +02:00
5dff5e1b84 fix(forms): hair comes back after a form with Valkyr
Valkyr sets its hair's forceRenderingOff on every visual update. The hider
read that flag as "not hidden yet", recorded the hair a second time with
enabled already false, and the revert left it off. Track hidden renderers
in a set instead of trusting the flag.
2026-10-18 00:09:14 +02:00
f1d00f6eff chore(release): v1.5.11 - True Form troll, race stations, Ravager attacks
Trol True Form wears the vanilla forest troll, with a per-player Legacy
switch for model mods. Race stations show and require their race and go on
floors and in caves. Fenrir forms sneak and stand still to attack; the Ulv
sleeps when the player sits. The Ravager attacks on the Brute's own clips.
Fixes: ResetRace, troll cave collapse, [msg_] texts, build-mode attacks,
War Vulture startup error.

README: New in block, changelog entry, Trol/Fenrir/Sverm feature lines and
the stations section.
2026-10-17 20:30:37 +02:00
7e6d3d0936 Merge branch 'fix-ravager-attacks': Ravager attacks follow the Brute's clips, ram lunges, slam digs per claw; War Vulture startup error gone 2026-10-17 20:28:54 +02:00
63e252d9e9 feat(sverm): the Ravager's ram lunges with the clip's root motion
Vanilla only takes root motion during a native attack, which this form never
starts, so a relay on the costume's Animator collects it and a prefix on
Character.ApplyRootMotion applies it to the player the same way (x55).
2026-10-17 20:24:43 +02:00
d05cea7f08 fix(warvulture): strip dependents first, no more Can't remove Humanoid at startup
The startup error came from WarVultureVisual.BuildTemplate, not from the
Ravager costume: its passes tried Humanoid before CharacterDrop. Components
another one still requires now wait for a later pass.
2026-10-17 20:24:43 +02:00
61a74320c5 fix(sverm): Ravager attacks follow the Brute's clips; the slam hits once per claw
Hits land on the clip's own Hit events and the hold-still lasts until the
animator leaves the attack state, instead of fixed delays. The slam has two
Hit events, one per claw: each one hits and digs under the claw that came down.
2026-10-17 20:05:36 +02:00
1c2da77603 fix(sverm): the Ravager stands still to attack and its slam digs
The hidden player kept walking under the costume, so every swing slid
toward whatever WASD held. A SetControls prefix holds it still while an
attack runs, as Fenrir and the True Form troll do. The middle-click slam
now digs a crater on bare terrain (digg_v3), never inside a ward without
access, behind a new Ground Slam Crater option.
2026-10-17 19:51:33 +02:00
5cf1ae7fb0 fix(sverm): the Ravager costume no longer keeps a live Humanoid
The BepInEx log showed "Can't remove Humanoid (Script) because
CharacterDrop (Script) depends on it" right after the Ravager template
was built from SeekerBrute. The strip was one pass in component order,
and Unity refuses to destroy a component another still requires, so
the Brute's Humanoid survived on the costume and on every copy a
player wore: the leftover that once broke the hammer for every piece.

ModelBorrow.StripBehaviours destroys only what nothing remaining
requires through [RequireComponent], round after round, and logs any
survivor by name. Used by the Ravager template, by ModelBorrow.Attach
and by the Skeleton's rise costume, which had the same single pass.
2026-10-17 19:42:14 +02:00
ee154ccab4 Merge branch 'fix-form-build-gate-chair' 2026-10-17 19:39:13 +02:00
ba7f56550d fix(forms): no form attacks in build mode; chair pose 1 m out, turned
RaceInput.AttackDown and AttackHeld now return false while the player
is in place mode (hammer, hoe, cultivator). Right click removes a piece
there and middle click picks a snap point, and every form read both as
its own attacks. Allowed only covered the piece selection panel. Every
form reads the mouse through RaceInput, so all of them are covered.

On a chair the form now settles 1 m in front of the seat and turns a
quarter counter-clockwise, at the player's request after the first try.
2026-10-17 19:34:51 +02:00
9662ec6b38 Merge branch 'feat-form-sleep-sneak': Ulv sleeps when the player sits 2026-10-17 19:33:39 +02:00
5c0f092c89 fix(fenrir): a form on a chair settles in front of the seat
On a chair the player sits on the seat, and the form stood inside the
chair at seat height. The form's root now goes 0.5 m in front of the
seat, on whatever is under that point, skipping the seat's own
colliders. The seat is found by a short raycast under the player, so
it works for onlookers too, who have no attach point. Back to zero on
standing up; the sit key is untouched.
2026-10-17 19:28:42 +02:00
e83c3c5d74 fix(fenrir): enter the Ulv's sleep by its real state path
scripts/dump_controller.py reads an AnimatorController's states and
transitions offline from Valheim's bundles with UnityPy. On
ulv_animator it shows the entry state "check sleeping" picks Sleep only
at start-up and Movement has no way back into it, so the bool alone
could never work. The cross-fade now targets "Base Layer.Sleep".
2026-10-17 19:22:34 +02:00
fb354c2387 fix(fenrir): enter the Ulv's Sleep state by hand when the player sits
A vanilla Ulv is born asleep: its controller only knows the way out
of Sleep, so setting the bool from Idle did nothing. The state is now
cross-faded into when the player sits; standing drops the bool and the
controller's own 'Sleep to Idle' plays. The log names the state found.
2026-10-17 19:13:47 +02:00
9cf3f5386c fix(fenrir): the Ulv sleeps when the player sits
Sitting now zeroes the form's speed. The seated player's Animator keeps
a forward_speed above zero, which kept the Ulv in its Walk clip on the
spot and out of reach of its Sleep state, which leaves from idle. The
debug log showed it: sitting, sleeping=true, clip 'Walk'.
2026-10-17 19:09:50 +02:00
4cb6da801b Revert "debug: log the Ulv's sleep state while the player sits (temporary)"
This reverts commit 2df8264c42.
2026-10-17 19:09:38 +02:00
727338c400 Merge branch 'main' into feat-form-sleep-sneak 2026-10-17 19:07:01 +02:00
1592282a46 Merge branch 'feat-form-sleep-sneak': sneak at a walk, stand still to attack 2026-10-17 19:07:00 +02:00
2df8264c42 debug: log the Ulv's sleep state while the player sits (temporary) 2026-10-17 19:06:08 +02:00
96dc8e4158 fix(fenrir): Ulv sleeps on the sit key; forms stand still to attack
Humanoid.IsSitting asks about the "sitting" animator tag, which belongs
to chairs. The sit key is an emote that Player.StartEmote writes on the
ZDO as "sit", so the Ulv never saw the player sit down. FormLocomotion
now reads the ZDO emote too, which every client sees. Of the four
forms only ulv_animator has a sleeping state.

The hidden player kept walking under the form through an attack, so a
bite slid toward whatever WASD held. Each form's isAttacking now also
sets FenrirForms.LocalAttacking, and a SetControls prefix holds the
player still while it is set, as the True Form troll does. The leaps
move the body directly and are untouched. Cleared on every revert.
2026-10-17 19:01:03 +02:00
580ef6d468 feat(fenrir): forms sneak at a walk and sleep when the player sits
FormLocomotion zeroed the speed whenever the player crouched, so a
sneaking form slid across the ground in its idle pose. Only airborne
reads as still now: crouched, the player moves at sneaking speed and
the creature's controller picks its walk.

Sitting sets the "sleeping" bool the creature's own MonsterAI uses,
when its controller has one; the log says once per controller which do.
IsSitting reads the replicated animator state, so onlookers' copies
sleep too. Covers every Fenrir form, local and remote, and the True
Form troll, which share FormLocomotion. Mirror now takes the Player.

Requested by a player on Discord.
2026-10-17 18:51:14 +02:00
8843e773b1 Merge branch 'fix-race-requirement-first' 2026-10-17 17:15:54 +02:00
7647b66aa0 fix(stations): the race requirement comes first in the build panel
The race took the first free row after the materials and the crafting
station. Each of those rows now moves one to the right and the race
takes row 0: it decides whether the rest matters at all.
2026-10-17 16:39:56 +02:00
ce21036373 Merge branch 'feat-race-station-requirement' 2026-10-17 16:24:09 +02:00
5b2e5f4f86 feat(stations): the race is a build requirement, shown in the panel
Every race station is listed in RaceStationLock with the race (or
races) that may build it. The build panel shows it in the requirement
row after the materials and the crafting station, with the race's icon
from the race menu and its translated name, blinking red when the
player is not of that race, the way vanilla flags a missing station.
Player.HaveRequirements answers false for CanBuild, so the piece is
greyed and a click gets vanilla's "Missing requirements". IsKnown and
CanAlmostBuild stay vanilla, so every station is still listed.

Seven stations had no race lock at all and are now locked too: Cursed
Body Pile, Pack Trough, Bone Pile, Bound Sentry, Blood Refinery,
Composter and Heartwood Grove. The stations' own placement gates stay
for their boss-tier checks and for no-cost debug building.
2026-10-17 16:24:09 +02:00
cf5c9ef3ce Merge branch 'fix-totem-ghost' 2026-10-17 16:22:29 +02:00
0cc10b437e Revert "debug: F8 dumps the build ghost and the placement ray (temporary)"
This reverts commit edc7fd33b7.
2026-10-17 16:21:50 +02:00
e1bd3b66e1 fix(trol): War Totem ghost invisible everywhere
The totem borrowed its look from the GoblinTotem item, whose root holds
a ParticleSystem while the mesh sits in its attach child.
Player.SetupPlacementGhost switches off every GameObject with a
ParticleSystem, so it took the root and the mesh with it: the F8 dump
showed TotemModel/model/attach/model active=False on the ghost. The
Yagluth head (TrophyGoblinKing) is built the same way.

Both now borrow the item's attach child, which is the mesh itself.
ModelBorrow switches the copy on, since an item's attach is stored
inactive in its prefab.
2026-10-17 16:19:03 +02:00
edc7fd33b7 debug: F8 dumps the build ghost and the placement ray (temporary) 2026-10-17 16:11:16 +02:00
ea1efef56e Merge branch 'fix-placement-ghost' 2026-10-17 15:59:08 +02:00