warvulture
This commit is contained in:
parent
4559e0b9e1
commit
e9d6e78ec8
15 changed files with 1041 additions and 489 deletions
|
|
@ -1074,6 +1074,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)");
|
||||
|
||||
|
|
@ -1081,7 +1089,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
|
||||
{
|
||||
|
|
@ -1112,21 +1133,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>();
|
||||
|
|
@ -1142,6 +1186,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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue