agentsclimarketplace

Combat system

Skill Firzus/agent-skills/skills/game/combat-system

Agent Skills for AI coding assistants

Install
npx -y skills add Firzus/agent-skills --skill combat-system

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Architecture blueprint for melee, ranged, RPG, and turn-based combat systems: attack graphs, hit detection, damage pipelines, stagger/poise, defensive kits, gunplay, aim assist, lag compensation, status effects, formulas, balance, and combat feel. Use when designing combat, combos, hitboxes, gunplay, dodge/parry, stagger, status effects, TTK/DPS/EHP balance, or when combat feels mushy, shots miss, or damage numbers run away.

SKILL.md

9.1 KB, as published. Nobody here has run it

Combat System

Build the combat core of an action game — melee and ranged — over one unified pipeline, with the RPG/balance math underneath. Primary reference: Granblue Fantasy: Relink (combo chains in the Monster Hunter lineage), with CS/Overwatch (gunplay) and XCOM/Pokémon/WoW (RPG math) as calibration poles. This skill is the engine-agnostic blueprint: the attack graph, hit detection, the damage pipeline, the stagger economy, the defensive kit, ranged/gunplay, turn-based/RPG architecture, feel numbers, and failure modes. Excluded (separate skills): enemy AI (enemy-ai-framework), combat camera (camera-system), stats/equipment progression (progression-economy).

Pick your philosophy first

Every number in a combat system depends on one upstream choice — where you sit on the commitment ↔ freeform dial:

DialCommitment (MH / souls)Freeform (DMC / Bayonetta)Relink
CancelsAlmost noneEverything → dodge/jumpMiddle: dodge keeps string position
DodgeLong, big i-frames, costly recoveryShort, spammable, perfect-fishingSpammable + perfect reward
Hit-stopAttacker-only, heavyBoth, shortLight, both
Defense rewardSurvivalStyle/Witch Time offenseStun gauge → Link economy
Input bufferShort/strictGenerousGenerous

Pick one column as the spine; borrow from the other deliberately, never by default. Mixing (e.g. freeform cancels + commitment damage) produces mush.

The core model: a data-driven attack graph

The combo system is a graph authored as data (this is literally how MH ships its weapon movesets, as FSM files with priority-ordered transition lists):

  • Node = attack: {anim, windows (hitbox/cancel/branch), motion value, damage cap, costs/gains, hyperarmor frames}
  • Edge = transition: {input, time window, state predicate (on-hit, resource, mode, charge-held)} — edges ordered by priority (composed inputs evaluated before simple ones they contain).
  • Branch types: on-input (light/heavy/directional), on-hit vs on-whiff, charge (hold), finishers (string payoff, often feeding a resource — Relink's finishers level up skill power).
  • Cancel semantics are explicit per edge: Relink ships both — dodge cancel preserves string position (Bayonetta's Dodge Offset), guard cancel resets it. Preserve / reset / offset is a per-edge data field.

Designers add chains without touching code. The graph plugs into the movement HSM (character-controller skill) as the combat state's content.

Reference map

FileCovers
attack-graph.mdThe melee core: the data-driven attack graph (nodes/edges, cancel semantics), animation-driven hit detection (the unified HitEvent, sweep traces, the hit registry), the damage pipeline (motion values, caps), stagger/poise/break, the defensive kit (dodge/guard/parry), the skills/link layer, the feedback layer (hit-stop, screenshake, knockback)
ranged-gunplay.mdThe ranged half: gun feel (cumulative micro-feedback), recoil patterns and spread/bloom/ADS, hitscan vs projectile architecture (pooling, sub-stepping), aiming and aim assist, ranged hit-registration and lag-compensation netcode, headshot/falloff/TTK-breakpoint damage, mixing melee + ranged
rpg-combat.mdThe RPG/turn-based/balance layer: turn and initiative models (ATB/CTB/tactical grid, the action economy, the Gambit model), the damage-formula design space (additive vs multiplicative, mitigation curves, Effective HP), stats and scaling, status effects and CC diminishing returns, balance via DPS/TTK/EHP, the action-RPG bridge (build-up meters, MH hitzones, MMO GCD, Genshin reactions)
pitfalls.md14 failure modes (symptom → cause → prevention) with debugging order and playtest checklist

Build order (4 shippable tiers)

Tier 1 — Hitting things
- [ ] Attack graph data format (nodes/edges) + a 3-hit string
- [ ] Animation-driven hitbox windows (tags on the timeline, never timers)
- [ ] Hit registry (one hit per target per swing) + HitEvent pipeline
- [ ] Damage = base x motion value; hit-stop on contact (attacker + victim)
Tier 2 — Responsiveness
- [ ] Input buffer (intent + timestamp, ~150-300 ms, depth 1, newest wins)
- [ ] Cancel windows per type (dodge/guard/skill) with explicit semantics
- [ ] Dodge with authored i-frames; guard with chip + guard-break gauge
- [ ] On-hit vs on-whiff branching; sweep traces for fast swings
Tier 3 — The reward economy
- [ ] Stagger: poise/flinch per attack + accumulated stun gauge -> 
      vulnerability window (Link Time model)
- [ ] Boss state cycle (Normal -> Overdrive -> Break) modulating damage
      taken/dealt and AI gating
- [ ] Perfect dodge / perfect guard (tight window, asymmetric rewards)
- [ ] Skills layer: cooldown slots + ultimate gauge, decoupled from the
      graph (skill = near-universal cancel target)
Tier 4 — Depth & scale
- [ ] Charge attacks, breakable parts (separate HP pools, MH model)
- [ ] Damage caps per node (Relink model) if long-tail gear progression
- [ ] Party/link layer: shared gauges + synchronized vulnerability windows
- [ ] Per-character graph variants over the shared data model

Feel numbers (starting points — tune by playtest)

ParameterStarting pointAnchor
Hit-stop light / medium / heavy / finisher2-4f / 4-8f / 8-15f / 15-30f (@60)Smash formula ⌊dmg×0.65+6⌋ cap 30f; SF6 10-20f
Hit-stop scopeattacker + victim; world-freeze for finishers onlyMH freezes attacker only (weapon "bite") — a deliberate exception
Dodge total / i-frames25-40f total; i-frames first 40-60%Elden Ring 13f@30 i-frames; MH base 250 ms + skill investment
Perfect guard / parry window5-8f (83-133 ms)Sekiro 12f@60 shrinking on spam; Relink ~5f (community)
Perfect dodge window10-15f — ~2x more lenient than parry, lower rewardRelink consensus; Bayonetta ~20f
Slow-mo reward2-4 s at 0.1-0.3x enemy speedWitch Time 0.5-3 s
Attack input buffer10-18f (167-300 ms), depth 1FG 4-8f; action games run longer
On-hit cancel opensat hit + hit-stop end (~20-30% earlier than whiff)SF6 on-hit-only specials
Combo next-input grace0.3-0.5 s after recovery-cancel pointMH delay-tolerant strings
Motion values light / heavy / charged20-50 / 50-80 / 100-180 (% of base)MH GS charge lv3 = 100-120
Critx1.25, build-up to x1.5MH affinity model
Stun gauge threshold~8-15 light hits; +50-100% per proc (anti-stunlock)MH KO escalation
Break/KO window8-15 s; damage taken x1.2-1.5Relink Break, MH KO
Screen shake0.15-0.25 s, trauma² amplitude, Perlin not randomGDC Juicing Your Cameras

Full sourced tables in attack-graph.md; ranged TTK/ falloff in ranged-gunplay.md; damage-formula and balance math in rpg-combat.md.

Engine mapping

Generic blockUnity 6UE5 (5.4+)
Attack graph dataScriptableObject attack assets referencing next-node assetsGameplayAbilities + montage sections (single combo ability) or ability-per-attack chained by tags; GameplayTags as cancel rules
Hitbox windowsAnimation events (prefer Animancer/Playables delegates over string events) toggling Physics.OverlapCapsuleNonAlloc per frame — not trigger collidersAnimNotifyState (HitWindow/ComboWindow/InterruptWindow) doing per-tick socket sweep traces
Fast-swing safetyCapsuleCast from last-frame to current socket positionpath-trace previous→current socket per tick
Damage pipelineIDamageable + DamageInfo struct + C# events for feedbackGameplayEffect + ExecutionCalculation + meta attribute; GameplayCues for feedback
Hit-stopper-Animator.speed on attacker+victim (NOT global Time.timeScale)CustomTimeDilation per actor (NOT global dilation); cosmetic-only in netplay
Attack lunge/trackingclamp steering in OnAnimatorMoveMotion Warping with translation/rotation limits
GAS-like layercommunity GAS ports (no first-party); attributes+tags+effects+cues patternGAS is the standard backbone

Failure modes

The 14 classic combat bugs (hitbox desync, multi-hit duplicates, point-blank whiffs, eaten inputs, animation pops on cancel, hit-stop bleeding into UI/co-op, stagger-lock, duplicate damage, cancel exploits, knockback through walls, tracking overshoot, graph/state desync, ranged hit-reg "I shot them but no hit", and runaway or stagnant damage numbers) are cataloged in pitfalls.md with symptom → root cause → prevention.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.