# 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): ```text 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 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. ```rust #[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. | Setting | Type | Default | Range or values | Meaning | |---|---|---|---|---| | `maxVolumes` | integer | `16` | 1–64 | Smoke and wall volumes alive at once. | | `healCap` | number | `100` | 1–100000 | Health 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.