Interaction feedback

Makes interactions visible without deciding any of them: the designated object lights up, nearby interactive objects get a discreet hint, and an attached prompt shows the action and the key of the active device.

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

Also read offline — CLI: grip-forge docs interaction-feedbackMCP tool: gripforge_docs { "topic": "interaction-feedback" }

Interaction feedback (interaction.feedback) #

What it is for #

Makes interactions visible without deciding any of them: the designated object lights up, nearby interactive objects get a discreet hint, and an attached prompt shows the action and the key of the active device.

It needs 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: "interaction.feedback" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "interaction.feedback",
                              config: { "style": "default", "highlight": true } }

First example #

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

#[test]
fn the_attached_prompts_are_off_by_default() {
    // 1.4.0: no key on screen by default — the prompt on the object and at the wheel only when the game turns them on.
    let mut s = session(json!({}));
    assert_eq!(
        call(&mut s, "interaction.feedback", "drawsPrompt", json!([])),
        json!(false)
    );
    let view = call(&mut s, "interaction.feedback", "view", json!(["en"]));
    assert_eq!(view["elements"]["worldPrompt"], json!(false));
    assert_eq!(view["elements"]["vehicleExit"], json!(false));
    assert_eq!(view["elements"]["highlight"], json!(true));
}

Settings and defaults #

Descriptions come from the kit manifest and stay in English.

SettingTypeDefaultRange or valuesMeaning
stylestring"default"Id of a feedback_styles document: default, subtle, bold, retro, or the game's own.
highlightbooleantrueLight up the designated interactive.
nearbyHintbooleanfalseA discreet hint over the interactives near the player.
worldPromptbooleanfalseThe prompt attached to the designated interactive, with its key (ui.prompts then leaves its context row to it).
cursorbooleanfalseThe cursor of the kind under the pointer (click games).
holdGaugebooleantrueA gauge while the action is held.
confirmbooleantrueA pulse when a use happens.
failbooleantrueA pulse and the reason when a use is refused (too far, locked).
soundbooleantrueThe sounds of the kinds (audio.core).
moveMarkerbooleanfalseA marker on the ground for a move order (when ui.cursor does not mark it).
orderMarkerbooleanfalseA marker on the target of an order.
vehicleExitbooleanfalseOff by default (1.4.0, it shows a key).
vehicleSchemestring"vehicle"1.1.0: the input.scheme scheme of a player at the wheel.
hintRadiusnumber61–30Metres around the player where interactives get a hint.
maxHintsinteger60–16At most this many hints, nearest first.
intensitynumber10–1Strength of every effect (the player may lower it further).
confirmSecondsnumber0.450.1–3
failSecondsnumber1.40.2–5
markerSecondsnumber0.60.15–3

Services, events, variables #

  • Service interaction.feedback: view(lang) — what every renderer draws (focus with its role, nearby, cursor, pulses, markers, style, elements); drawsPrompt(); attached(); kinds(); styles(); kindOf(entity); pulse(entity, type, reason).
  • Service interaction.feedback.settings: The player's settings (keys, get, set): intensity 0..1 and each element 1 on / 0 off; saved.
  • Events emitted:
    • interaction.feedback.pulse (entity, type, reason) — A use (confirm) or a refusal (fail, with its reason) was shown on an entity.
    • fx.ground_marker (position, color, seconds, size, style) — moveMarker: a move order marked on the ground (the renderers draw it).
  • Events listened to: interaction.completed, interaction.requested, interaction.refused, access.blocked, vehicle.entered, vehicle.exited, pointer.command, input.intent.issued, engine.data.changed, engine.config.changed
  • Variables:
    • interaction.feedback.focus (string) — Interaction feedback target
    • interaction.feedback.cursor (string) — Interaction cursor

Hooks and modding #

  • Moddable settings: style, highlight, nearbyHint, worldPrompt, cursor, holdGauge, confirm, fail, sound, moveMarker, orderMarker, vehicleExit, hintRadius, maxHints, intensity, confirmSeconds, failSeconds, markerSeconds, vehicleScheme
  • Moddable collections: interaction_kinds, feedback_styles
  • Components: interaction_feedback

Engines #

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

Versions #

Kit version 1.4.0.