fix(skeleton): stop the fire aura borrowing another mod's VFX by name
The tier-5 fire aura looked for "vfx_smoke", then "vfx_surtling_death". Neither name exists in Valheim, checked against the game's own asset manifests, so both lookups came back null and the aura has never been visible in a plain install. The dead branch was not harmless. PrefabManager.Cache resolves by asset name across everything in memory, other mods' asset bundles included, and its tie-break for a duplicate name ends in "newest wins". A name vanilla does not use has no vanilla candidate to beat, so it is a free slot. Magic_Supremacy fills it. The lookup resolved to 'EncounterCreatureRikoMountain_DO/vfx_smoke', a child node of one of its creatures carrying 'club_trail_riko_DO' on 'Dreanegade/ParticleAlphaEmission' - a weapon trail, on an emissive shader, sprayed through a 4.5m sphere on the player. That is the purple smoke around the burning skull users reported, on every client that could see the skeleton. The aura now draws nothing on purpose, which costs it nothing it had. Its damage, radius and tick are untouched. The two identical EnsureFireAuraVFX copies in SkeletonRace and ZdoVisualSync are replaced by one SkeletonVisuals.EnsureFireAura, shaped like DraughVisuals.EnsureAura; the call sites stay, so reinstating the visual needs no change in either file. The comment on it records the whole chain and the way to build it properly, through BorrowEffect, the way HeadFlame already does. Also keeps a resolution log on the model lookup: every magic mod in the report ships an object called "Skeleton", which is this race's own tier-0 model name. The vanilla creature won during the repro; root=False in that log is what says it stopped winning. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
f64fe83d9d
commit
00d4fd6e46
4 changed files with 102 additions and 144 deletions
|
|
@ -283,6 +283,14 @@ namespace RacesOfValheim
|
|||
if (skeletonBodyTransform == null)
|
||||
{
|
||||
GameObject skelPrefab = PrefabManager.Cache.GetPrefab<GameObject>(rules.ModelPrefab);
|
||||
|
||||
// The cache answers by name alone, and every magic mod named in the
|
||||
// purple-smoke report carries an object of its own called "Skeleton" -
|
||||
// which is this race's own tier-0 model name. So far the vanilla
|
||||
// creature has always won; the log is here to say so, or to say which
|
||||
// mod's object took its place. See SkeletonVisuals.EnsureFireAura.
|
||||
SkeletonVisuals.LogResolvedPrefabOnce("model " + rules.ModelPrefab, skelPrefab);
|
||||
|
||||
if (skelPrefab == null)
|
||||
{
|
||||
// The human body was switched off two lines up, so an unresolved
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue