Commit graph

539 commits

Author SHA1 Message Date
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
916ba5bd6f fix(pieces): placement ghost vanished off terrain for most stations
Eleven pieces set m_groundPiece. Player.UpdatePlacementGhost switches
the ghost off outright and returns whenever the aim is not on a
Heightmap, which vanilla means for hoe and cultivator pieces. Floors,
rocks and a troll cave's mesh floor are not a Heightmap, so players
saw no ghost at all there, and with either flag Valheim never shows
the blue placement marker. Reported for the Trol War Totem.

m_groundPiece is off everywhere now. The stations (War Totem, Cursed
Body Pile, Dvergar Bank, Rune Barrel, Pack Trough, Skadi Golem, Bone
Servants) drop m_groundOnly too and go on floors, foundations and in
caves, like the Bone Pile since 1.5.8. The living pieces (Furling
bushes, Sverm nest and Hive Market, Trenta Elder Root) keep
m_groundOnly: terrain only, and the ghost shows red elsewhere.
2026-10-17 15:59:08 +02:00
b8661b78f3 Merge branch 'fix-missing-msg-texts' 2026-10-17 15:51:54 +02:00
e86e1e3da5 Merge branch 'fix-faction-pieces' 2026-10-17 15:51:54 +02:00
87d0f2642c fix(texts): four messages showed as [msg_...]
Four tokens the mod printed exist in no vanilla table (checked on
Valheim 1.0.20) and were never registered by the mod, so players saw
the raw name in brackets.

- $msg_eatanother (Trol, a food still being digested): vanilla's
  $msg_nomore, "You can't eat more $1", called as Player.CanEat calls it.
- $msg_canteatanymore (Trol, every stomach full): vanilla's $msg_isfull.
- $msg_ate (Aswid, Vae Victis): vanilla's $msg_consumed.
- $msg_notenoughmoney (Dvergar bank, Trol totem): a new mod text,
  rov_msg_not_enough_coins, in English, Italian and Russian.
2026-10-17 15:51:53 +02:00
b566adbfb9 fix(factions): allied mobs spare a race's buildings with nobody home
FactionStaticTargetPatch only vetoed a mob's piece target while an
allied player stood within 100 m. Inside a troll cave that was the
collapse bug: the Trol walks out, the resident Troll (its prefab has
m_attackPlayerObjects) finds nobody to stop it, and the cooking station
built there is in pieces when the Trol comes back.

Every piece now carries the race of its builder on its ZDO, stamped in
Piece.SetCreator at placement, and in Piece.Awake for older pieces the
first time their builder loads them, so no timer and no scan. An
allied mob of that race can't pick the piece as a target and its blows
do it no damage, which also covers a swing at a foreign wall that
would have hit the Trol's workbench next to it. A mob holding a grudge
against the builder gets no such truce.
2026-10-17 15:50:41 +02:00
d16524beec Merge branch 'feat-trol-true-form-model' 2026-10-17 15:32:06 +02:00
b2346c1437 feat(trol): Legacy True Form switch, chosen per player
The Troll Model option becomes Legacy True Form, off by default. On,
True Form is the old one: the player's own Trol grown bigger, weapons
in hand, body untouched, which player model mods such as VRM need.

It is a local preference, not a synced one, so a server cannot force
the troll costume on a VRM user. The owner publishes the choice on the
ZDO and every other client reads it from there, so onlookers see each
Trol the way that Trol's owner picked.
2026-10-17 15:32:06 +02:00
a9e66aeeb7 fix(trol): True Form log visible, slam reaches the ground, skin tint
The log in the troll's fist was there but switched off: an item's
attach child is stored inactive in its prefab and VisEquipment turns
it on after the Instantiate. It is now switched on, hung with the
item's equipoffset, and sized to the costume, since AttachItem keeps
an attach at its world size and the costume is not at scale 1.

The slam never ran its slam code. troll_groundslam is a Vertical
attack in vanilla, not Area, so asking the attack type sent every slam
down the punch's sweep: damage, but no AoE, no dust and no crater. The
slam now goes by the key that was pressed.

The tint multiplied _Color, which the creature shader does not read.
It now shifts _Hue, _Saturation and _Value, as LevelEffects does for
starred creatures, by the distance from the vanilla troll's colour to
the player's skin colour.
2026-10-14 17:17:20 +02:00
db29f868ea fix(trol): True Form troll size, log, reach, root during attacks, slam
The troll pulsed several times a second and stayed small because
PlayerVisualHider.Hide put the hidden Visual back to scale 1 every
frame while Trol_PlayerUpdate_Patch grew it back, and the troll follows
that scale. Hide and Show take keepScale now, and the Trol calls pass
it. The camera height, which reads the same scale, stops jumping too.

The log in the troll's hand is the troll's own log model, hung the way
VisEquipment does it, instead of the Trol's, which was built for a
person's hand and came out huge and sideways.

Punch and slam reach further and hit wider, with a new Troll Attack
Reach option (1.3). The player is held still through every attack
clip, throw included.

The ground slam spawns the troll's own troll_groundslam_aoe with the
player's damage, kept off friends, plus its trigger and terrain
effects. It carries chop and pickaxe at least equal to its blunt, so
it breaks trees and rocks, and with Ground Slam Crater on it digs into
the terrain where it lands, never inside a ward without access.
2026-10-14 17:08:20 +02:00
c64cb393c7 feat(trol): True Form wears Valheim's own troll
True Form now hides the Trol's body and puts the vanilla forest troll's
model in its place, on the owner's client and on every other player's.
The costume stands as tall as the old True Form did: it follows the
Visual scale Trol_PlayerUpdate_Patch already grows and publishes, so
the grow-in, the shrink back and the size others see come for free.
It takes the Trol skin colour from Trol - Appearance.

Weapons are out while it is up. Left click is the troll's punch, right
click its ground slam, and with a log in hand they become its two log
swings, which wear the log down per hit as a club swing did. Throw
Rock plays the troll's throw. The attacks, their triggers and reach are
read off the troll's own weapons at runtime, and each hit lands on the
troll's OnAttackTrigger event rather than a fixed delay.

Damage is a share of the troll's own (Troll Attack Damage, 0.5), scaled
by the Clubs skill like a club and hit as Clubs, so the True Form and
tier melee bonuses still add on top.

Other players see the troll from the existing True Form ZDO flag, with
attacks replayed from a new trigger key. New options in Trol - True
Form: Troll Model (on/off), Troll Model Size, Troll Attack Damage.
2026-10-14 16:56:34 +02:00
927bda1bbc Merge branch 'fix-resetrace-cleanup' 2026-10-14 16:41:52 +02:00
d5c2d58636 fix(resetrace): drop every form and every mod status effect on reset
ResetRace now undoes each race's form on the spot before it touches
status effects: Aswid bat and mist, Fenrir, Skadi drake, Trol True
Form, Trenta Muspell and Sverm Ravager. Each race gets a
HardResetForReset that stops the form's coroutine, so a transform
caught mid-gesture can't finish after the reset and a revert can't
hand out its cooldown after the sweep.

The hand-written status effect list is gone. The reset now removes
everything the mod registers through Jotunn (ModRegistry), which
covers the True Form and its cooldowns, Bat and Mist Form, the
Skeleton resurrect cooldown and Skadi's ability cooldowns.

It also puts the player and the Visual back to scale 1, clears the
Sverm's static Ravager cooldown and the Trol's wasTrueFormActive flag,
and prints what it removed to the console and the BepInEx log.
2026-10-14 16:40:27 +02:00
65b488b5dc feat(trol): skin and hair colour pickers in Trol - Appearance
Two Color entries, Skin Color and Hair Color (hair and beard), defaulting
to the old peacock blue and golden blonde so no Trol changes on update.
Each Trol publishes its choice on its own ZDO and every client paints
that player with it; a Trol on an older build publishes nothing and shows
the defaults. The menu preview, with no ZDO, reads the local config.
The section is kept local by ConfigSync.

README: New in block, Trol features line and a 1.5.10 changelog entry.
2026-10-14 14:14:06 +02:00
bb1ca57924 chore(release): v1.5.10 - Skeleton body switch for player model mods
New client-side option Skeleton - Visuals -> Body Model Enabled. Off,
a Skeleton takes the human branch of the VisEquipment postfix: vanilla
body on, no bone meshes, eye glow, jaw correction or skull flame, and
the helmet is left alone. Requested by players using EnhancedValheimVRM,
where the bones floated around the replacement model.

README: New in block for v1.5.10, changelog entry (also the Russian
fixes since 1.5.9), and a line under the Skeleton features.
2026-10-13 20:00:03 +02:00
aca3eabb2f Merge branch 'localisation' 2026-10-08 18:22:13 +02:00
fb32a49576 Merge remote-tracking branch 'origin/localisation-russian' into localisation 2026-10-08 18:22:05 +02:00
f1fbebb8c7 Обновить JotunnModStub/Translations/Russian/items.json 2026-10-08 08:14:18 +02:00
d86609acef Обновить JotunnModStub/Translations/Russian/hover.json 2026-10-08 08:13:43 +02:00
a1261af0f1 Обновить JotunnModStub/Translations/Russian/compendium.json 2026-10-08 08:12:25 +02:00
a75655d3e5 Обновить JotunnModStub/Translations/Russian/messages.json 2026-10-08 08:05:10 +02:00
875024e649 Обновить JotunnModStub/Translations/Russian/messages.json 2026-10-08 07:58:42 +02:00
3c86d48aad Обновить JotunnModStub/Translations/Russian/merchants.json 2026-10-08 07:57:46 +02:00
9f11cab70d Обновить JotunnModStub/Translations/Russian/hover.json 2026-10-08 07:57:09 +02:00
c45ca80d99 Обновить JotunnModStub/Translations/Russian/compendium.json 2026-10-08 07:52:10 +02:00
8bad4092be Обновить JotunnModStub/Translations/Russian/races.json
по канону Valheim 
Драуг - Драугр
2026-10-08 07:45:13 +02:00
Ferdinando
0159f1e8c4 bugfix 07/10/26 + evil laugh 2026-10-07 17:31:29 +02:00
b63f810a8f Merge branch 'localisation' into localisation-russian 2026-10-07 04:11:26 +02:00
3815f2bf53 Merge remote-tracking branch 'origin/main' into localisation 2026-10-07 04:11:24 +02:00
eaa87f892a Merge branch 'fix-skeleton-revive-bonepile' 2026-10-07 04:11:08 +02:00
68cdbd6de6 chore(release): v1.5.8 - Skeleton rise, truce for bound troops
README: the New in block is v1.5.8 only, a changelog entry for the three
fixes, and the Skeleton stations line says the pile and the Sentry go on
floors too.
2026-10-07 04:11:08 +02:00
1848725f2a fix(skeleton): rise on resurrect, truce for bound troops, pile and sentry on floors
The Yagluth auto-resurrect now plays the crypt rise. The player rig has no
rise state, so the body is hidden and the skeleton model is worn for the
length of the clip with "wakeup" set; the start time goes on the ZDO so
other clients play it too. The player takes no damage and does not move
until it is out.

Wild faction mobs left the player alone but attacked the player's thralls,
which are tamed and so in the Players faction. IsEnemy now gives a thrall
the same truce through its m_commandingRace, broken by a grudge against
any player. Covers every race with thralls.

The Bound Bone Pile and the Bound Sentry seed drop m_groundPiece and
m_groundOnly, so both can be built on floors and foundations.
2026-10-07 04:11:08 +02:00
19e6a3ce50 Merge branch 'main' into localisation-russian 2026-10-06 14:20:25 +02:00
41020a0fab Merge branch 'main' into localisation 2026-10-06 14:20:23 +02:00