Skip to content

AMIPBasePlayerState

File: Public/GameFramework/MIPBasePlayerState.h Base: APlayerStateIAbilitySystemInterface, IMIPCommonPlayerStateComponentsInterface

The PlayerState holds replicated player identity and progression data. It owns the Ability System Component and attribute sets, making it the authoritative source for GAS on the player side. It is initialized before any save data is loaded.


Owned Components

Component Type Purpose
AbilitySystemComponent UMIPAbilitySystemComponent Player ASC — abilities, GEs, attributes
WithDerivedAttributeSet UMIPWithDerivedAttributeSet Primary + derived attribute set (strength, max health, etc.)
PlayerLevelComponent UMIPPlayerLevelComponent XP-based player level
AbilityPointsLevelComponent UMIPAbilityPointsLevelComponent Ability point spending and unlock
PlayerInfoComponent UMIPPlayerInfoComponent Family ID, character name, display info
PlayerClassComponent UMIPPlayerClassComponent Selected class tag and pawn class
CharacterGameplayEffectsManager UMIPCharacterGameplayEffectsManager Character-scoped buff/debuff tracking
FamilyGameplayEffectsManager UMIPFamilyGameplayEffectManager Account-scoped buff/debuff tracking
GameplayEffectsReceiverComponent UMIPGameplayEffectsReceiverComponent Receives and processes incoming GEs

Initialization

GameMode::Login()
InitPlayerInfoAfterValidatingJwtToken(InPlayerInfo)
    Sets family/char/class info from JWT claims
TryBroadcastReady()
    Sets bPlayerStateReady = true (replicated)
OnRep_PlayerStateReady()
    Fires OnPlayerStateReadyDelegate
    All systems waiting on PlayerState can now proceed
Method Description
CallOrRegister_OnPlayerStateReady() Register a callback — fires immediately if already ready
CheckPlayerStateReady() Returns bPlayerStateReady

Party

Method Description
GetPartyId() Returns the player's current party ID (empty if solo)
SetPartyId(InPartyId) Sets the party ID (server-authoritative)
OnRep_PartyId() Client replication callback for party changes

The party ID is replicated and used by the reward distribution system to pool damage buckets.


Mob Kill Events

Two separate delegate paths for kill credit:

Method Fires when Delegate
OnKilledMob(InMob) Player (or party) dealt enough damage and is in range OnKilledMobDelegate
OnLastHitMob(InMob) This specific player landed the killing blow OnLastHitMobDelegate

Both are BlueprintAssignable and used by the quest system, achievements, and any Blueprint logic.


GAS Integration

The PlayerState owns the ASC so that it persists across pawn respawns:

Property Type Description
AbilitySystemComponent UMIPAbilitySystemComponent The player's ASC
WithDerivedAttributeSet UMIPWithDerivedAttributeSet Primary (STR, AGI, etc.) and derived (MaxHP, MaxResource) attributes

GetAbilitySystemComponent() returns the ASC. The PlayerController also implements IAbilitySystemInterface and delegates to the pawn/state.


See Also