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>
This commit is contained in:
commit
34bdf35325
33 changed files with 1829 additions and 573 deletions
|
|
@ -15,7 +15,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
public const string PluginGUID = "com.nandor.racesofvalheim";
|
||||
public const string PluginName = "Races Of Valheim";
|
||||
public const string PluginVersion = "1.4.5";
|
||||
public const string PluginVersion = "1.4.8";
|
||||
|
||||
private readonly Harmony harmony = new Harmony(PluginGUID);
|
||||
|
||||
|
|
@ -49,6 +49,9 @@ namespace RacesOfValheim
|
|||
// Not a race either: the Claws skill Aswid and Fenrir share, so it binds here rather
|
||||
// than inside either race's run.
|
||||
RaceClawsConfig.Bind(Config);
|
||||
// Not a race either: the faction truce and the faction merchants, which cut across
|
||||
// every race at once, so they bind last rather than inside the alphabetical run above.
|
||||
FactionsConfig.Bind(Config);
|
||||
harmony.PatchAll();
|
||||
gameObject.AddComponent<FenrirRace>();
|
||||
gameObject.AddComponent<SkadiRace>();
|
||||
|
|
@ -124,8 +127,8 @@ namespace RacesOfValheim
|
|||
player.GetSEMan().RemoveStatusEffect(TrentaConfig.PurpleRainCdSE.GetStableHashCode());
|
||||
player.GetSEMan().RemoveStatusEffect(TrentaConfig.PortalCdSE.GetStableHashCode());
|
||||
player.GetSEMan().RemoveStatusEffect(SvermConfig.StatsSE.GetStableHashCode());
|
||||
player.GetSEMan().RemoveStatusEffect(SvermConfig.StingerSE.GetStableHashCode());
|
||||
player.GetSEMan().RemoveStatusEffect(SvermConfig.StingerCdSE.GetStableHashCode());
|
||||
player.GetSEMan().RemoveStatusEffect(SvermConfig.RavagerSE.GetStableHashCode());
|
||||
player.GetSEMan().RemoveStatusEffect(SvermConfig.RavagerCdSE.GetStableHashCode());
|
||||
|
||||
// COLD, which is not one of ours at all - and that is exactly why it has to go.
|
||||
//
|
||||
|
|
@ -155,6 +158,25 @@ namespace RacesOfValheim
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears the boss-progression override and falls back to the natural world state.
|
||||
/// Shared by the resetprogression console command and the Race Menu Ward.
|
||||
/// </summary>
|
||||
public static int ResetProgression()
|
||||
{
|
||||
BossProgressionManager.DebugState = -1;
|
||||
int state = BossProgressionManager.GetCurrentProgressionState();
|
||||
|
||||
Player player = Player.m_localPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
player.Message(MessageHud.MessageType.Center, $"Progression reset to: {state}");
|
||||
Traverse.Create(player).Method("SetupEquipment").GetValue();
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Strips whatever body-part weapon the outgoing race grew. The Aswid/Fenrir claws
|
||||
/// (RaceClawSet) and the Sverm's Chitin Claws (SvermClawSlot) are quest items a player can
|
||||
|
|
@ -332,7 +354,7 @@ namespace RacesOfValheim
|
|||
// Row 2 (y = -20)
|
||||
CreateRaceButtonWithConfirm("Aswid", new Vector2(-450, -20), GetAswidIcon(), "Fierce night stalker. Strong and resilient, transforms into a bat.", SelectAswid);
|
||||
CreateRaceButtonWithConfirm("Furling", new Vector2(-150, -20), GetFurlingIcon(), "Cunning goblin-like creatures. Agile and resourceful.", SelectFurling);
|
||||
CreateRaceButtonWithConfirm("Trol", new Vector2(150, -20), GetTrolIcon(), "Massive brute strength. Towering over others but slow to react.", SelectTrol);
|
||||
CreateRaceButtonWithConfirm("Trol", new Vector2(150, -20), GetTrolIcon(), $"Massive brute strength. Towering over others, at peace with the Black Forest - but fire burns a Trol {(TrolConfig.FireWeaknessMultiplier.Value - 1f) * 100f:0}% harder than anyone else.", SelectTrol);
|
||||
CreateRaceButtonWithConfirm("Draugh", new Vector2(450, -20), GetDraughIcon(), "A decaying undead warrior fueled by dark magic and extreme metal.", SelectDraugh);
|
||||
|
||||
// Row 3 (y = -140)
|
||||
|
|
@ -1112,6 +1134,14 @@ namespace RacesOfValheim
|
|||
{
|
||||
Jotunn.Logger.LogInfo($" param: {param.name} ({param.type})");
|
||||
}
|
||||
|
||||
// Every clip the controller can play. Parameters only say what CAN be driven,
|
||||
// not what actually exists to play - a wrong trigger name silently plays nothing,
|
||||
// so this is the list to check a guessed name against.
|
||||
foreach (AnimationClip clip in animator.runtimeAnimatorController.animationClips)
|
||||
{
|
||||
if (clip != null) Jotunn.Logger.LogInfo($" clip: {clip.name}");
|
||||
}
|
||||
}
|
||||
if (!anyAnimator) Jotunn.Logger.LogInfo(" (no Animator found anywhere in the hierarchy)");
|
||||
|
||||
|
|
@ -1119,7 +1149,20 @@ namespace RacesOfValheim
|
|||
Humanoid humanoid = prefab.GetComponent<Humanoid>();
|
||||
if (humanoid == null)
|
||||
{
|
||||
Jotunn.Logger.LogInfo(" (no Humanoid component on the prefab root)");
|
||||
// Not every prefab worth checking is a creature - a registered weapon clone
|
||||
// (e.g. `dumpelder SvermRavagerBite`) is an item on its own, and this is the only
|
||||
// way to see what a runtime mutation (Attack.Clone() plus field edits) actually
|
||||
// left on it, as opposed to what the SOURCE creature's own copy still says.
|
||||
ItemDrop directItem = prefab.GetComponent<ItemDrop>();
|
||||
if (directItem != null)
|
||||
{
|
||||
Jotunn.Logger.LogInfo(" (no Humanoid - dumping the prefab's own ItemDrop instead)");
|
||||
DumpWeaponAttacks(prefab);
|
||||
}
|
||||
else
|
||||
{
|
||||
Jotunn.Logger.LogInfo(" (no Humanoid component and no ItemDrop on the prefab root)");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1150,21 +1193,44 @@ namespace RacesOfValheim
|
|||
if (drop == null || drop.m_itemData == null || drop.m_itemData.m_shared == null) return;
|
||||
|
||||
ItemDrop.ItemData.SharedData shared = drop.m_itemData.m_shared;
|
||||
Jotunn.Logger.LogInfo($" weapon '{itemPrefab.name}' ({shared.m_name}): damages={DumpDamageTypes(shared.m_damages)}");
|
||||
Jotunn.Logger.LogInfo($" weapon '{itemPrefab.name}' ({shared.m_name}): damages={DumpDamageTypes(shared.m_damages)} " +
|
||||
$"skill={shared.m_skillType}");
|
||||
DumpAttack("primary", shared.m_attack);
|
||||
DumpAttack("secondary", shared.m_secondaryAttack);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Every field an "identical" replica would need: the hitbox shape (melee reach, angle,
|
||||
/// height, offset, ray width), how the damage lands (multiplier, multi-hit, through
|
||||
/// walls, force), the animation, and every VFX slot Attack.Start can fire - start, trail,
|
||||
/// hit, hit-on-terrain, trigger, burst, plus anything it spawns on top of the swing.
|
||||
/// </summary>
|
||||
private static void DumpAttack(string label, Attack attack)
|
||||
{
|
||||
if (attack == null) return;
|
||||
Jotunn.Logger.LogInfo(
|
||||
$" {label}: animation='{attack.m_attackAnimation}' randomAnimations={attack.m_attackRandomAnimations} " +
|
||||
$"chainLevels={attack.m_attackChainLevels} damageMultiplier={attack.m_damageMultiplier} " +
|
||||
$"type={attack.m_attackType} range={attack.m_attackRange} angle={attack.m_attackAngle} " +
|
||||
$"spawnOnTrigger='{(attack.m_spawnOnTrigger != null ? attack.m_spawnOnTrigger.name : "none")}' " +
|
||||
$"type={attack.m_attackType}");
|
||||
Jotunn.Logger.LogInfo(
|
||||
$" hitbox: range={attack.m_attackRange} angle={attack.m_attackAngle} " +
|
||||
$"height={attack.m_attackHeight} offset={attack.m_attackOffset} rayWidth={attack.m_attackRayWidth} " +
|
||||
$"originJoint='{attack.m_attackOriginJoint}' multiHit={attack.m_multiHit} " +
|
||||
$"hitThroughWalls={attack.m_hitThroughWalls} hitFriendly={attack.m_hitFriendly} " +
|
||||
$"hitTerrain={attack.m_hitTerrain} forceMultiplier={attack.m_forceMultiplier} " +
|
||||
$"recoilPushback={attack.m_recoilPushback}");
|
||||
Jotunn.Logger.LogInfo(
|
||||
$" spawnOnTrigger='{(attack.m_spawnOnTrigger != null ? attack.m_spawnOnTrigger.name : "none")}' " +
|
||||
$"spawnOnHit='{(attack.m_spawnOnHit != null ? attack.m_spawnOnHit.name : "none")}' " +
|
||||
$"projectile='{(attack.m_attackProjectile != null ? attack.m_attackProjectile.name : "none")}'");
|
||||
|
||||
DumpEffectList("startEffect", attack.m_startEffect);
|
||||
DumpEffectList("trailStartEffect", attack.m_trailStartEffect);
|
||||
DumpEffectList("hitEffect", attack.m_hitEffect);
|
||||
DumpEffectList("hitTerrainEffect", attack.m_hitTerrainEffect);
|
||||
DumpEffectList("triggerEffect", attack.m_triggerEffect);
|
||||
DumpEffectList("burstEffect", attack.m_burstEffect);
|
||||
|
||||
if (attack.m_attackProjectile != null)
|
||||
{
|
||||
Projectile proj = attack.m_attackProjectile.GetComponent<Projectile>();
|
||||
|
|
@ -1180,6 +1246,18 @@ namespace RacesOfValheim
|
|||
}
|
||||
}
|
||||
|
||||
private static void DumpEffectList(string label, EffectList effects)
|
||||
{
|
||||
if (effects == null || effects.m_effectPrefabs == null || effects.m_effectPrefabs.Length == 0) return;
|
||||
|
||||
foreach (EffectList.EffectData data in effects.m_effectPrefabs)
|
||||
{
|
||||
if (data == null || data.m_prefab == null) continue;
|
||||
Jotunn.Logger.LogInfo($" {label}: '{data.m_prefab.name}' attach={data.m_attach} " +
|
||||
$"follow={data.m_follow} childTransform='{data.m_childTransform}'");
|
||||
}
|
||||
}
|
||||
|
||||
private static string DumpDamageTypes(HitData.DamageTypes d)
|
||||
{
|
||||
if (d == null) return "none";
|
||||
|
|
@ -1220,14 +1298,8 @@ namespace RacesOfValheim
|
|||
|
||||
public override void Run(string[] args)
|
||||
{
|
||||
BossProgressionManager.DebugState = -1;
|
||||
int state = BossProgressionManager.GetCurrentProgressionState();
|
||||
int state = RacesOfValheim.ResetProgression();
|
||||
Console.instance.Print($"[DEBUG] Progression state reset to natural world state: {state}");
|
||||
if (Player.m_localPlayer != null)
|
||||
{
|
||||
Player.m_localPlayer.Message(MessageHud.MessageType.Center, $"Progression reset to: {state}");
|
||||
Traverse.Create(Player.m_localPlayer).Method("SetupEquipment").GetValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue