agentleFS
blushneybusiness-glitchblushneybusiness-glitch/roblox-omniskills/skills/rbx-combat-abilities/SKILL.md

rbx-combat-abilities

Skill0 starsChanged 3 months agoMITView on GitHub

Ability kits with MOBA-grade discipline — server-authoritative casting, cooldowns and resource costs the client can only display, loadout slots wired to input. Use when the user says "ability system", "add skills/spells/ultimates", "mana/stamina system", "loadout/kit selection", or when abilities can be spammed, cast while stunned, or fired with hacked cooldowns. Do not use for the spell visuals — load rbx-vfx-abilities — or for stun/DoT/buff bookkeeping — load rbx-combat-status instead.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    One gate function: Every ability passes through the same canCast(player, id) — cooldown ready, resource affordable, state machine permits …

    line 21
  2. Very specific:

    Read: module-library.md (CooldownManager and the cast gate redeploy unchanged across games), the game's projects.md block (existing kit …

    line 93
  3. Very specific:

    Write: the approved AbilityConfig numbers (cooldowns, costs, cast times) into the game's projects.md block.

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

rbx-combat-abilities

Laws

  1. Cast requests, never cast commands. The client remote sends an ability id plus an optional aim (unit direction or target position); the server checks cooldown, resource, state, and range, then executes. Damage, spawn positions, and effect strength never arrive from the client.
  2. One gate function. Every ability passes through the same canCast(player, id) — cooldown ready, resource affordable, state machine permits (not Stunned/Dead/Casting), ability actually in the player's server-side loadout. Four checks, one place; per-ability copies of the gate drift and one of them will forget the stun check.
  3. Cooldowns are server timestamps. expiry[player][abilityId] = os.clock() + cooldown, checked on cast, cleaned on PlayerRemoving. The client receives a CooldownStarted(id, duration) event and renders the sweep locally — it owns pixels, never permission.
  4. Cast time is interruptible server time. A 0.8s cast is a server timer that damage taken, stuns, or movement (if the ability roots) cancels; the client's cast bar is a projection. Instant abilities skip the timer, not the gate.
  5. Data-driven kit. One AbilityConfig ModuleScript: id, cooldown, cost, castTime, range, damage. Adding ability #7 means adding a table entry and an execute function — never a new remote.

Recipes

Cooldown tiers (tune against TTK per rbx-pvp-balance): basic attack-augment 2–4s, mobility dash 6–10s, hard CC 12–18s, ultimate 60–90s. Global cooldown 0.5s between any two casts stops macro burst-weaving.

Resources: mana pool 100, regen 5/s out of combat and 2/s in combat (combat = damage dealt/taken within the last 5s); stamina 100 with dash costing 25 and regen 15/s after a 1s delay. Deduct on the server at cast-accept, refund in full if the cast is interrupted before the execute tick.

Loadouts: server stores loadout[player] = {Q = "Fireball", E = "Dash", R = "Meteor"}; the client sends slot presses via rbx-input-bindings, the server resolves slot → id itself. Loadout changes lock during combat (5s rule above) and persist through rbx-data-profilestore.

Cast flow: accept → deduct cost → replicate CastStarted(caster, id, castTime) to all clients for the telegraph → server timer → execute (hitbox/projectile via rbx-combat-melee/rbx-physics-projectiles machinery) → CastResolved with results. Telegraphs are counterplay: any ability with castTime ≥ 0.5s gets a visible wind-up per rbx-vfx-abilities.

Projection events: exactly three server→client remotes serve every ability — CooldownStarted, CastStarted, CastResolved. Per-ability remotes are a smell.

Interrupt rules: stuns cancel casts and lock the gate for the stun duration (rbx-combat-status owns the flag; the gate reads it). Interrupted ultimates refund 50% cooldown, not 100 — full refunds make interrupt trades free.

Performance budget

One Heartbeat loop drives all cast timers and regen ticks (resource regen ticks at 10Hz, not per-frame). Cooldown storage is two nested tables, no Instances. AbilityConfig required once and cached; the cast handler allocates nothing per cast except the result payload. Sweep the cooldown/resource tables on PlayerRemoving or a 40-player server leaks them forever.

Load with

rbx-vfx-abilities — don't ask, include it per the rbx-combat router; every cast has a visual. rbx-audio-sfx for cast/impact stingers, rbx-combat-status for the effects abilities apply, rbx-input-bindings for slot binds, rbx-ui-hud for the ability bar, rbx-data-profilestore for loadout persistence. Hit validation on aimed abilities: rbx-combat-hitreg.

AI-tells

  • ☐ Cast remote accepts damage, radius, or cooldown values from the client
  • ☐ Cooldown checked only in the LocalScript before firing
  • ☐ Per-ability RemoteEvents instead of one cast remote + ability id
  • ☐ Stunned players can still cast (gate missing the state read)
  • ☐ Resource deducted client-side or not refunded on interrupt
  • ☐ No telegraph on a ≥0.5s cast
  • ☐ Cooldown tables never cleaned on PlayerRemoving
  • ☐ Loadout slot→ability resolved from a client-sent ability name

Memory

Read: module-library.md (CooldownManager and the cast gate redeploy unchanged across games), the game's projects.md block (existing kit list, resource type, TTK targets). Write: the approved AbilityConfig numbers (cooldowns, costs, cast times) into the game's projects.md block; the gate/cooldown/resource modules into module-library.md; kit balance preferences the user states ("no hard CC in my game") into preferences.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.