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.
This commit is contained in:
commit
c2212df322
38 changed files with 3831 additions and 192 deletions
|
|
@ -6,7 +6,7 @@ using UnityEngine;
|
|||
namespace RacesOfValheim
|
||||
{
|
||||
/// <summary>
|
||||
/// The Maulclaws as a REAL equipped weapon, sitting in the inventory in plain sight and
|
||||
/// The Chitin Claws as a REAL equipped weapon, sitting in the inventory in plain sight and
|
||||
/// refusing to be moved.
|
||||
///
|
||||
/// WHY THIS REPLACED THE COSMETIC VERSION. Bolting a model to the hand bones worked, but the
|
||||
|
|
@ -36,8 +36,13 @@ namespace RacesOfValheim
|
|||
/// </summary>
|
||||
public static class SvermClawSlot
|
||||
{
|
||||
/// <summary>
|
||||
/// The prefab id, and it keeps the old spelling on purpose: it is what every save on disk
|
||||
/// names the item by, and renaming it would leave a Sverm holding an item ObjectDB can no
|
||||
/// longer resolve. The display name below is the only half a player ever reads.
|
||||
/// </summary>
|
||||
public const string ItemName = "SvermMaulclaws";
|
||||
public const string ItemDisplayName = "Vilebone Maulclaws";
|
||||
public const string ItemDisplayName = "Chitin Claws";
|
||||
|
||||
/// <summary>Row in the reserved column the claws sit on. The other three await the carapace.</summary>
|
||||
private const int ClawRow = 0;
|
||||
|
|
@ -84,6 +89,15 @@ namespace RacesOfValheim
|
|||
shared.m_weight = 0f;
|
||||
shared.m_maxQuality = 1;
|
||||
|
||||
// INDESTRUCTIBLE, and it has to be the flag rather than a big number. The claws are
|
||||
// never crafted, so no workbench will ever repair them: left on normal durability
|
||||
// they wear down to zero and Humanoid.EquipItem then refuses to put them back in
|
||||
// hand, which strands the Sverm bare-fisted for good. m_useDurability = false is the
|
||||
// single switch every path reads - the attack drain, the broken-item check, the
|
||||
// inventory bar and the tooltip line all skip the item entirely.
|
||||
shared.m_useDurability = false;
|
||||
shared.m_canBeReparied = false;
|
||||
|
||||
// No recipe and no station: this item is never crafted, only issued.
|
||||
}
|
||||
|
||||
|
|
@ -153,9 +167,14 @@ namespace RacesOfValheim
|
|||
claws.m_gridPos = corner;
|
||||
}
|
||||
|
||||
Jotunn.Logger.LogInfo("[Sverm] Issued the Maulclaws.");
|
||||
Jotunn.Logger.LogInfo("[Sverm] Issued the Chitin Claws.");
|
||||
}
|
||||
|
||||
// A pair issued before the claws stopped wearing out is still carrying whatever it had
|
||||
// ground down to. Nothing reads that number any more, but it is saved with the item, so
|
||||
// it is put back to full once rather than left as a stale figure in the save file.
|
||||
if (claws.m_durability < claws.GetMaxDurability()) claws.m_durability = claws.GetMaxDurability();
|
||||
|
||||
// Empty-handed means clawed. Anything else in the right hand wins until it is put
|
||||
// away, which is the whole compromise.
|
||||
ItemDrop.ItemData held = Traverse.Create((Humanoid)player).Field<ItemDrop.ItemData>("m_rightItem").Value;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using UnityEngine;
|
|||
namespace RacesOfValheim
|
||||
{
|
||||
/// <summary>
|
||||
/// The Vilebone Maulclaws: attached to the hands for good, and never equipped.
|
||||
/// The Chitin Claws: attached to the hands for good, and never equipped.
|
||||
///
|
||||
/// WHY NOT A REAL WEAPON. Valheim has one weapon slot. A claw that is genuinely equipped locks
|
||||
/// the Sverm out of every sword, bow and staff in the game for the whole run, which is not
|
||||
|
|
@ -52,7 +52,7 @@ namespace RacesOfValheim
|
|||
if (candidate != null)
|
||||
{
|
||||
resolved = candidate;
|
||||
Jotunn.Logger.LogInfo($"[Sverm] Maulclaws resolved to '{name}'.");
|
||||
Jotunn.Logger.LogInfo($"[Sverm] Chitin Claws resolved to '{name}'.");
|
||||
return resolved;
|
||||
}
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ namespace RacesOfValheim
|
|||
|
||||
/// <summary>
|
||||
/// The vanilla weapon's damage at quality 4, read once. This is the ceiling the tier
|
||||
/// percentages are a fraction of, and state 7 is 100% of it - the real Maulclaws.
|
||||
/// percentages are a fraction of, and state 7 is 100% of it - the real Chitin Claws.
|
||||
///
|
||||
/// Public because it is the shared yardstick: the Aswid's and the Fenrir's claws
|
||||
/// (RaceClawSet) are balanced against this same figure rather than against the models they
|
||||
|
|
@ -108,7 +108,7 @@ namespace RacesOfValheim
|
|||
};
|
||||
|
||||
referenceRead = true;
|
||||
Jotunn.Logger.LogInfo($"[Sverm] Maulclaws at quality {SvermConfig.ArmorReferenceQuality}: " +
|
||||
Jotunn.Logger.LogInfo($"[Sverm] Chitin Claws at quality {SvermConfig.ArmorReferenceQuality}: " +
|
||||
$"slash {referenceDamage.m_slash:0.#}, pierce {referenceDamage.m_pierce:0.#}, " +
|
||||
$"blunt {referenceDamage.m_blunt:0.#}.");
|
||||
return referenceDamage;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ namespace RacesOfValheim
|
|||
public const string CarapaceLegsVisual = "ArmorCarapaceLegs";
|
||||
public const string CarapaceHelmetVisual = "HelmetCarapace";
|
||||
|
||||
// ─── Vilebone Maulclaws ──────────────────────────────────────────────
|
||||
// ─── Chitin Claws ────────────────────────────────────────────────────
|
||||
// FOUR near-identical names exist in the manifest and only some carry a recipe, so the
|
||||
// prefab is resolved by trying them in order and logging which one answered. A wrong guess
|
||||
// here fails soft and silently - two empty hands - which is exactly the failure this
|
||||
|
|
@ -106,7 +106,7 @@ namespace RacesOfValheim
|
|||
|
||||
/// <summary>
|
||||
/// Fraction of the vanilla weapon's quality-4 damage the bare hands hit for, per state.
|
||||
/// State 7 is the ceiling - the real Maulclaws - and state 8 adds fire on top rather than
|
||||
/// State 7 is the ceiling - the real Chitin Claws - and state 8 adds fire on top rather than
|
||||
/// going past it. Index 0 unused, as above.
|
||||
/// </summary>
|
||||
public static readonly float[] ClawDamagePercentByState =
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace RacesOfValheim
|
|||
/// </summary>
|
||||
public float FireWeakness;
|
||||
|
||||
/// <summary>Fraction of the Maulclaws' quality-4 damage a bare-handed blow lands for.</summary>
|
||||
/// <summary>Fraction of the Chitin Claws' quality-4 damage a bare-handed blow lands for.</summary>
|
||||
public float ClawDamagePercent;
|
||||
|
||||
public bool MetabolicSurge; // cheaper running and jumping, higher jump
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ namespace RacesOfValheim
|
|||
//
|
||||
// The first version emptied the hands completely and the form could not attack: with
|
||||
// nothing equipped there is no weapon to swing, and Valheim's bare fist is not the
|
||||
// thing this form is supposed to be throwing. Leaving the Maulclaws equipped makes the
|
||||
// thing this form is supposed to be throwing. Leaving the Chitin Claws equipped makes the
|
||||
// sting an ordinary weapon attack - which works - and costs nothing visually, because
|
||||
// the whole body is hidden a line later. Fist weapons report Skills.SkillType.Unarmed,
|
||||
// so the damage patch still recognises the blow and swaps the deathsquito's figure in.
|
||||
|
|
@ -254,7 +254,7 @@ namespace RacesOfValheim
|
|||
}
|
||||
|
||||
Jotunn.Logger.LogWarning($"[Sverm] Could not read a weapon off '{SvermConfig.StingerCreature}'; " +
|
||||
"the sting falls back to the Maulclaws.");
|
||||
"the sting falls back to the Chitin Claws.");
|
||||
stingerDamageRead = true;
|
||||
return stingerDamage; // all zeroes: the damage patch then leaves the claw values alone
|
||||
}
|
||||
|
|
@ -316,7 +316,16 @@ namespace RacesOfValheim
|
|||
Character character = GetComponent<Character>();
|
||||
if (character == null || character.IsDead())
|
||||
{
|
||||
Destroy(gameObject);
|
||||
// ZNetScene.Destroy, NEVER Object.Destroy, and this line was the teleport crash.
|
||||
//
|
||||
// An escort is a real networked creature, and ZNetView.OnDestroy - read out of the
|
||||
// assembly, not assumed - only releases asset references: it does not take the
|
||||
// object out of ZNetScene.m_instances. A plain Object.Destroy therefore left the
|
||||
// scene holding a dead ZNetView, and the next time the world unloaded around the
|
||||
// player, which is exactly what a teleport is, ZNetScene.RemoveObjects walked that
|
||||
// entry and threw. See ZNetSceneOrphanPatch.cs for the whole chain.
|
||||
if (ZNetScene.instance != null) ZNetScene.instance.Destroy(gameObject);
|
||||
else Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace RacesOfValheim
|
|||
/// matures on screen as it advances.
|
||||
///
|
||||
/// What gets mounted, all of it borrowed from vanilla:
|
||||
/// the claws - the Vilebone Maulclaws, on both hands, always;
|
||||
/// the claws - the Chitin Claws, on both hands, always;
|
||||
/// the spines - UndeadBjornRibcage worn spine-up, a static crest, from tier 5;
|
||||
/// the eyes - two emissive spheres, the Aswid's geometry unchanged;
|
||||
/// the motes - a firefly swarm under the body, only while falling;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue