← All namespaces

game_framework

AI & gameplay Experimental

GameMode, Pawn, GameState, controllers, respawn, scoring, teams, and rounds.

What it’s for

This namespace configures the rules of a match rather than the assets in it. It reaches into a GameMode Blueprint and sets the classes and gameplay parameters that decide how a session plays out: which Pawn players spawn as, which GameState, PlayerController, and PlayerState classes drive the match, where players start, and how respawn, scoring, teams, spectating, and rounds behave.

Reach for it when wiring up a game mode by hand would mean opening the GameMode Blueprint, hunting through its Class Defaults, and typing in values one field at a time. Instead you ask for the whole rule set in plain language and the assistant sets the pawn class, the win condition, the team layout, and the respawn timing in a few calls, then saves the Blueprint.

Most operations take a gameModeBlueprint path plus the values you want to change, and an optional save flag to persist the edit. To see what a mode currently uses before you change it, read the setup with game_framework.get_game_framework_info.

This area is experimental and still improving. The methods work, but parameter shapes and coverage may change between releases, so review what the assistant changed before you rely on it.

Examples

Set which pawn players spawn as

Point a GameMode at a new default Pawn class and save it in one step.

You: In BP_RaceGameMode, make players spawn as BP_DroneCharacter.

  call("game_framework.set_default_pawn_class", {gameModeBlueprint:"/Game/Modes/BP_RaceGameMode",
        pawnClass:"/Game/Drone/BP_DroneCharacter", save:true})
    → {ok:true}

Done. Default pawn set to BP_DroneCharacter and saved.

Set up two teams with auto-balance

Configure the team layout on a GameMode, including names and per-team limits.

You: Give BP_SumoGameMode two teams, Red and Blue, five players each, auto-balanced.

  call("game_framework.configure_team_system", {gameModeBlueprint:"/Game/Modes/BP_SumoGameMode",
        maxTeams:2, maxPlayersPerTeam:5, teamNames:["Red","Blue"], bAutoBalance:true, save:true})
    → {ok:true}

Done. Two teams configured with auto-balance and saved.

Set the win condition and respawn timing

Configure scoring and respawn rules together, then persist both edits.

You: In BP_SumoGameMode, first to 10 kills wins, and respawn after 3 seconds.

  call("game_framework.configure_scoring_system", {gameModeBlueprint:"/Game/Modes/BP_SumoGameMode",
        scoreToWin:10, killScore:1, bTeamScoring:true})
    → {ok:true}
  call("game_framework.set_respawn_rules", {gameModeBlueprint:"/Game/Modes/BP_SumoGameMode",
        respawnDelay:3, maxLives:-1, save:true})
    → {ok:true}

Done. Win at 10, unlimited lives, 3-second respawn, saved.

← Back to all namespaces