DS Bootstrap Character Init Debug
Scope
- Repro flow:
- Standalone host in
House_Level
- Other clients join
- Host triggers travel to Edgegap DS
- DS bootstrap applies selection and server possesses pawn
- Client receives pawn but character init/abilities may be incorrect
What We Debugged
- Verified client travel completes to DS (
PreClientTravel, Welcomed by server, TravelCompleted).
- Verified DS bootstrap RPC returns valid selection payload.
- Changed bootstrap dispatch to server-side
ProcessCharacterSelection(CharacterDef) call.
- Added client-side init timing diagnostics to confirm whether native pawn replication path runs:
BeginPlay
OnRep_PlayerState
OnRep_Controller
HandleClientInit branch decisions
- Added ASC/ability diagnostics to confirm:
- server grants startup abilities
- startup activation attempts run
- client autonomous pawn has activatable abilities after
OnRep_PlayerState
Current Log Interpretation Pattern
- Good client replication/init sequence on DS join:
[SelectionInit] OnRep_PlayerState ...
[SelectionInit] HandleClientInitDeferLocal ... ClientBeforeBeginPlay
[SelectionInit] BeginPlay ... PendingRemoteInit=1
[SelectionInit] HandleClientInitFireLocal ...
- If abilities still do not fire, inspect
[AbilityInit] lines to see:
AddCharacterAbilities requested/granted counts on server
ServerActivateStartupAbilities handle count + activation results
- client-side
OnRep_PlayerState post-init ability count and next-tick count
AbilityInputTagPressed no matching ability warnings
Fast Log Queries
- Client:
Select-String -Path T:\Repo\_Build\Windows\Metal_terra\Saved\Logs\Metal_terra.log -Pattern '\[SelectionInit\]|\[AbilityInit\]|ProcessCharacterSelection|TravelCompleted|Welcomed by server' -CaseSensitive:$false
- If needed in local PIE host log:
Select-String -Path T:\Repo\Tank Game\Saved\Logs\Metal_terra.local.log -Pattern '\[SelectionInit\]|\[AbilityInit\]' -CaseSensitive:$false
Temporary Debug Markers Added (For Future Removal)
- Remove all log lines containing
"[SelectionInit]" and "[AbilityInit]".
- Marker inventory at time of writing:
Source/Metal_terra/Private/Character/TankPlayerCharacter.cpp
[SelectionInit] at lines:
- 94, 174, 191, 219, 230, 322, 335, 346, 354, 366, 382, 390, 399, 414, 423, 442, 452, 460, 468
[AbilityInit] at lines:
- 250, 287, 293, 309, 555, 568
Source/Metal_terra/Private/AbilitySystem/TankAbilitySystemComponent.cpp
[AbilityInit] at lines:
- 35, 48, 59, 81, 98, 125, 163
TankPlayerCharacter.cpp:
NetModeToString(...) helper (debug formatting)
- local
CountActivatableAbilities(...) helper
#include "TimerManager.h" added for next-tick debug snapshot
TankAbilitySystemComponent.cpp:
- local
CountActivatableAbilities(...) helper
Cleanup Checklist
- Delete all
UE_LOG entries tagged [SelectionInit] and [AbilityInit].
- Remove
CountActivatableAbilities(...) helper functions if no longer needed.
- Remove
NetModeToString(...) helper if no longer used.
- Remove
#include "TimerManager.h" from TankPlayerCharacter.cpp if no longer used.