Docs: 07-18 melee-anim pass session log + SwordCombat pack marked IN USE

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-18 12:03:26 -07:00
parent 7571091394
commit 4b18a368bd
2 changed files with 42 additions and 2 deletions
@@ -0,0 +1,40 @@
# 2026-07-18 — SwordCombat attack animations (melee-anim pass)
**Goal:** utilize the new `AnimationSwordCombat` pack (imported 07-16) for the player's attacks — the operator-flagged roadmap hook in [[Synty_Asset_Inventory]] ("Melee combat animation pass").
## What shipped
**Controller wiring** (`PlayerRigTools.WireSwordCombatAttackClips`, menu `ProjectM/Animation/Player - Wire Sword Combat Attacks (LANTERN)`, idempotent):
| State | Clip (was) | Clip (now) | speed |
|---|---|---|---|
| Swing1 | A_Swing_R2L (Blender placeholder) | `A_Attack_LightCombo01A_Sword` (0.80s) | 2.0 |
| Swing2 | A_Swing_L2R | `A_Attack_LightCombo01B_Sword` (0.67s) | 1.2 |
| Swing3 | A_Swing_Finisher | `A_Attack_LightCombo01C_Sword` (0.73s) | 2.2 |
| SpecialSlam | A_Special_Slam | `A_Attack_HeavyCombo01A_Sword` (2.03s, overhead chop) | 5.0 |
| Death | A_Death_FallBack | `A_Death_B_01_Sword` (1.70s backward collapse) | 1.0 |
| CombatIdle (NEW) | — | `A_Idle_Menacing01_Sword` (looped) | 1.0 |
- **Speed math:** the swing anim window is `k_AttackAnimTicks = CastFacingTicks = 13` ticks (~0.217s @60Hz) + 0.12s exit blend. Each pack FBX ships **WindUp / Hit / FollowThrough sub-takes** alongside the full take — the WindUp take length = the hit-start second, and each state's `speed` places that hit inside the window (e.g. LightCombo01A hit @0.333s → 0.17s at speed 2.0). Re-tune by editing the `swaps` table in the tool.
- **Menacing01 combat idle:** new `InCombat` bool param + `CombatIdle` state. `Idle → CombatIdle [InCombat]` is appended **after** the existing `Idle → Locomotion [Speed>0.1]` so movement keeps transition priority; `CombatIdle → Idle [!InCombat]` (0.4 blend) + `CombatIdle → Locomotion [Speed>0.1]`. The pack take ships `loopTime=false` — the tool flips it on the pack FBX importer once (the only `Assets/Synty/**` change: that `.fbx.meta`).
- **Drive:** `PlayerAnimationDriveSystem` writes `InCombat = TickWindowMath.SwingActive(melee, serverTick, combatIdleTicks)` — the same wrap-safe predicate as the swing pulse with a wider window, on **both** local + remote paths (`MeleeCombo` replicates → teammates menace too). Window = `FeelConfig.CombatIdleHoldSec` (default 4s, live-tunable static) × 60. No new `[GhostField]`s, no netcode surface — client presentation only.
## Validation
- L1: console error-free (only known-benign tick-batching/leak-notice warnings during the MCP-driven Play).
- L2: EditMode suite green (411 at the time). Play smoke: both netcode worlds boot; the re-baked Rukhanka rig carries all 12 params incl. `InCombat`.
- L3: forced-pose screenshots (drive system disabled, params written via the parameter buffer, `EditorApplication.update` guardian for the mid-swing frames): Swing1 wind-up + follow-through frames and the crouched Menacing01 stance all read clearly on the Bathynaut.
## Notes / gotchas (session-scoped)
- Synty SwordCombat attack FBX = **multi-take** (full + WindUp/Hit/FollowThrough) — load pack clips by **exact clip name**, never "the AnimationClip in the FBX" (the first/last sub-asset is a random section; this bit the first clip-length probe).
- The pack's HeavyFlourish sub-takes drop the "01" (`A_Attack_HeavyFlourish_WindUp_Sword`) — name-match per clip, don't pattern-derive.
- `AnimatorControllerParameterComponent` has no `name` field at runtime — match by `FastAnimatorParameter(name).hash`.
## Open follow-ups (from the same pack, not in this pass)
- Hit-react variety (Hit/React/Stagger/KnockDown/Stun sets) — needs a damage-edge window param; presentation-only.
- Idle-fidget rotation from `AnimationIdles` (Bored/Look/WeightShift/Stretch) — the natural next idle pass.
- Dodge/Block/Parry clips — gameplay verbs first (design fork, operator's call).
**Next-session intent:** operator eyes/ears-on feel pass over the new swings (speeds are the `swaps` table + `FeelConfig.CombatIdleHoldSec`).