Skip to content

AMIPBaseGameState

File: Public/GameFramework/MIPBaseGameState.h Base: AGameStateBaseIMIPCommonGameStateComponentsInterface

The GameState holds world-level data shared across all players on a server instance: map metadata, world level scaling, NPC registry, and respawn rules.


Owned Components

Component Type Purpose
WorldInfoComponent UMIPWorldInfoComponent World level, mob scaling, reward calculation class resolution
NPCsManager UMIPNPCsManager Registry of all NPCs in the level for quest and interaction lookup
PlayerStateAndInfoResolver UMIPPlayerStateAndInfoResolver Resolves player state/info from various identifiers

Map Data

InitializeMapData() is called on BeginPlay to load the FMIPMapData struct for the current map. This struct contains:

  • Map type (EMIPMapType — Area, Dungeon, Town)
  • Map name and display name
  • Respawn fee configuration
  • Ability usage rules (e.g. no abilities in town)
Method Return Description
GetMapData() const FMIPMapData& Current map's metadata
GetMapType() EMIPMapType Shortcut for map type
CheckCanUseAbilityInTown() bool Whether abilities are allowed on this map

Respawn Rules

Method Description
GetRespawnFee() Returns the FMIPCurrencyFeeStruct cost to respawn
GetDefaultRespawnableCount() BlueprintNativeEvent — default number of respawns allowed
GetRespawnableCount() Current respawn count
CheckAllowRespawnHere(InPlayerRespawnedCount) Whether the player can still respawn given their count

World Level

World level drives mob scaling across the map. When set, all mobs use UMIPWorldLevelScaledMobInfoComponent to scale their combat info.

Method Description
SetWorldLevel() Server — initializes world level from map data
SetWorldLevel(InWorldLevel) Client — called from OnRep_WorldLevel

Delegates

Delegate When
OnGameStateReadyDelegate After BeginPlay and initialization complete
CallOrRegister_OnGameStateReady() Register a callback — fires immediately if already ready, or queues

Agones Integration

Callback Purpose
OnReadyForPlayerConnection() Signals the fleet is ready
OnGetGameServer(Response) Receives Agones game server info
OnGetConnectedPlayers(Response) Receives connected player list
OnGetConnectedPlayersError(Error) Handles Agones query failure

See Also