MOBA hero controls

Provides lane-game hero controls: click to walk or attack, attack-move, ability keys cast toward the cursor with mana and cooldowns, blink, heal, stop and a recall that damage interrupts.

Source: module-kits:kits/moba_hero/usage/en.mdView Markdown source

Also read offline — CLI: grip-forge docs moba-heroMCP tool: gripforge_docs { "topic": "moba-hero" }

MOBA hero controls (moba.hero) #

What it is for #

Provides lane-game hero controls: click to walk or attack, attack-move, ability keys cast toward the cursor with mana and cooldowns, blink, heal, stop and a recall that damage interrupts.

It needs combat.attacks, moba.match, character.motor, combat.abilities, input.actions, game.engine; installing it brings them in.

Turn it on #

Install the kit in a project, then change a setting (the values shown are its defaults):

gripforge_gamekit_install   { project_id: "gkp_…", id: "moba.hero" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "moba.hero",
                              config: { "showRanges": true, "showTowerThreat": true } }

First example #

The kit has no dedicated test yet; this installs it and sets two of its settings to their defaults.

gripforge_gamekit_install   { project_id: "gkp_…", id: "moba.hero" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "moba.hero",
                              config: { "showRanges": true, "showTowerThreat": true } }

Settings and defaults #

Descriptions come from the kit manifest and stay in English.

SettingTypeDefaultRange or valuesMeaning
showRangesbooleantrueAttack reach while targeting and ability shapes on HUD hover.
showTowerThreatbooleantrueNearby tower range and current target.
herostring""moba_heroes id the player plays (default: the first).
mananumber4000–5000
manaRegennumber60–200Mana per second.
blinkDistancenumber71–15D: blink toward the cursor, stopping before an impassable wall.
blinkCooldownnumber301–300
healCooldownnumber451–300
followSecondsnumber0.150.05–21.6.0: the move button held after a click on the ground: how often the order follows the cursor (0.3 m at least between two…

Services, events, variables #

  • Service moba.controls: Right-click move and attack, Q/W/E/R casting, mana, recall, bot casting.
  • Events emitted:
    • moba.cast (hero, key, ability, yaw) — A hero cast an ability (Q / W / E / R, accepted by combat.abilities), blinked (D) or healed (F).
    • moba.attack (source, target, ranged, kind, synchronized) — A hero started a basic attack.
    • pointer.command (point, kind, target) — The player hero took a move or attack order (a click, a tap, moba.controls.order): the click marker.
    • moba.ping (point, player) — A ping on the map (moba.controls.ping), at most one every 0.6 s; it lasts 3 s.
  • Events listened to: combat.killed, combat.damaged
  • Variables:
    • moba.hero (string) — Hero
    • moba.mana (number) — Mana
    • moba.mana.max (number) — Max mana
    • moba.recall (number) — Recall
    • moba.cd.d (number) — Blink cooldown
    • moba.cd.f (number) — Heal cooldown
    • moba.cd.q (number) — Q cooldown
    • moba.ability.q (string) — Q ability
    • moba.cd.w (number) — W cooldown
    • moba.ability.w (string) — W ability
    • moba.cd.e (number) — E cooldown
    • moba.ability.e (string) — E ability
    • moba.cd.r (number) — R cooldown
    • moba.ability.r (string) — R ability
  • Input actions: moba.move, moba.stop, moba.attack_move, moba.spell_d, moba.spell_f, moba.ability_q, moba.ability_w, moba.ability_e, moba.ability_r, moba.recall

Hooks and modding #

  • Hooks (a game or a mod can intercept them):
    • hero.cast (cancellable) — A hero (the player on a key press, a bot at its half-second casting turn with an enemy hero in reach) is about to cast the ability of key, before combat.abilities checks its cost and cooldown.
    • hero.attack (fields a tap may change: damage; cancellable) — A hero is about to start a basic attack on target (in range, off cooldown, the target may be hit); damage is the hit it will deal.
    • hero.blink (fields a tap may change: distance, cooldown; cancellable) — The player hero is about to blink toward the cursor (D pressed, the spell ready): distance is the farthest it may go in metres (shortened by the cursor and by walls), cooldown the seconds before the…
    • hero.heal (fields a tap may change: amount, cooldown; cancellable) — The player hero, wounded, is about to heal itself (F pressed, the spell ready): amount is the health given back (a quarter of max), cooldown the seconds before the next one.
    • hero.recall (fields a tap may change: seconds; cancellable) — The player hero is about to channel a recall to its fountain (B pressed): seconds is the channel, still interrupted by damage or a move.
    • hero.refill (fields a tap may change: mana; cancellable) — A roster hero died a moment ago and is about to get its mana pool back for its return (asked once per death): mana is the pool it will have.
  • Moddable settings: showRanges, showTowerThreat, hero, mana, manaRegen, blinkDistance, blinkCooldown, healCooldown
  • Moddable collections: moba_heroes

Engines #

Declared targets: web, rust. gripforge kit api moba.hero lists the exact settings and services of your version.

Versions #

Kit version 1.6.0.