FPS ability backend

Connects the combat.abilities kit to the offline first-person match, so abilities deal damage, heal, check line of sight, pay their costs and play synchronized cues through the match rules.

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

Also read offline — CLI: grip-forge docs fps-abilitiesMCP tool: gripforge_docs { "topic": "fps-abilities" }

FPS ability backend (fps.abilities) #

What it is for #

Connects the combat.abilities kit to the offline first-person match, so abilities deal damage, heal, check line of sight, pay their costs and play synchronized cues through the match rules.

It needs game.engine, fps.match, combat.abilities; 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: "fps.abilities" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "fps.abilities",
                              config: { "maxVolumes": 16, "healCap": 100 } }

First example #

<!-- test: kits/fps_abilities/tests/fps_abilities.rs::it_connects_itself_as_the_port_of_combat_abilities --> This is the body of the passing test it_connects_itself_as_the_port_of_combat_abilities; the helper functions it calls are defined at the top of the same test file.

#[test]
fn it_connects_itself_as_the_port_of_combat_abilities() {
    let mut s = plain();
    assert_eq!(ok(&mut s, KIT, "available", json!([])), json!(true));
    assert_eq!(volumes(&mut s).len(), 0);
    assert!(call(&mut s, KIT, "dance", json!([]))
        .unwrap_err()
        .contains("fps.abilities.dance"));
    // Without a combat.abilities to connect to, it says so.
    let lonely = world_with(
        &[("fps.tactical", tactical()), (KIT, json!({}))],
        json!({"tactical_maps": [map()]}),
    );
    assert!(
        lonely
            .host
            .logs
            .iter()
            .any(|(level, m)| level == "error" && m.contains("fps.abilities")),
        "{:?}",
        lonely.host.logs
    );
}

Settings and defaults #

Descriptions come from the kit manifest and stay in English.

SettingTypeDefaultRange or valuesMeaning
maxVolumesinteger161–64Smoke and wall volumes alive at once.
healCapnumber1001–100000Health an ability heal never goes above (never revives).

Services, events, variables #

  • Service fps.abilities:
  • Events emitted:
    • ability.cue (source, ability, cast, phase, target, presentation) — The cues of combat.abilities for the FPS actors (windup, active, hit, recovery, ended, cancelled).

Hooks and modding #

  • Hooks (a game or a mod can intercept them):
    • fps.ability.heal (fields a tap may change: amount, cap; cancellable) — A heal effect is about to land on a live FPS actor: amount of health, cap the health it never goes above (config healCap).
    • fps.ability.deploy (cancellable) — A spatial effect (smoke, wall or teleport) placed and checked is about to be deployed in the match, after the windup.
  • Moddable settings: maxVolumes, healCap

Engines #

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

Versions #

Kit version 1.3.0.