### Initialize Component at Game Start Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacterParameterComponent.md Initializes the component when the game starts. This function is callable from Blueprints. ```cpp UFUNCTION(BlueprintCallable) void BeginPlay(); ``` -------------------------------- ### Custom Game Mode Subclass Example Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Example of subclassing APalGameMode to implement custom initialization logic. Overrides InitGame and BeginPlay for custom setup. ```cpp UCLASS() class AMyCustomGameMode : public APalGameMode { GENERATED_BODY() public: virtual void InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage) override { Super::InitGame(MapName, Options, ErrorMessage); // Custom initialization UE_LOG(LogGame, Warning, TEXT("Custom game mode initialized")); } virtual void BeginPlay() override { Super::BeginPlay(); // Initialize dedicated server InitDedicatedServer(); } }; ``` -------------------------------- ### Handling Server Events Example Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Example of how to get and potentially interact with the APalGameMode from another class. This snippet shows casting to APalGameMode and a placeholder for event listening. ```cpp void AMyGameManager::SetupGameMode() { APalGameMode* GameMode = Cast(GetWorld()->GetAuthGameMode()); if (!GameMode) return; // Listen for session creation completion // (typically handled through event bindings in subclasses) } ``` -------------------------------- ### BeginPlay Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacterParameterComponent.md Initializes the component at the start of the game. This is a standard lifecycle method. ```APIDOC ## BeginPlay ### Description Initializes component at game start. ### Method BlueprintCallable ``` -------------------------------- ### FindPlayerStartWithTag Method Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Finds a player start point with the specified tag. Returns the player start actor or nullptr if not found. ```cpp UFUNCTION(BlueprintCallable, BlueprintProtected) APlayerStart* FindPlayerStartWithTag(const FName& Tag); ``` -------------------------------- ### Usage Example: Accessing World State from Client Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Provides a client-side example of accessing the APalGameState to retrieve match elapsed time and the current player count. ```APIDOC ## Usage Example: Accessing World State from Client ```cpp void AMyPlayerCharacter::UpdateFromGameState() { if (APalGameState* GameState = GetWorld()->GetGameState()) { // Get elapsed match time uint32 MatchTime = GameState->ElapsedTime; // Convert to minutes:seconds uint32 Minutes = MatchTime / 60; uint32 Seconds = MatchTime % 60; UE_LOG(LogGame, Warning, TEXT("Match time: %02d:%02d"), Minutes, Seconds); // Check player count int32 PlayerCount = GameState->PlayerArray.Num(); UE_LOG(LogGame, Warning, TEXT("Players: %d"), PlayerCount); } } ``` ``` -------------------------------- ### Custom Game State Example Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Shows how to create a custom game state by subclassing APalGameState and adding custom replicated properties. ```APIDOC ## Custom Game State Example Create a custom game state by subclassing: ```cpp UCLASS() class MYGAME_API AMyGameState : public APalGameState { GENERATED_BODY() public: AMyGameState(const FObjectInitializer& ObjectInitializer); UPROPERTY(Replicated, BlueprintReadOnly) float GlobalTemperature; UPROPERTY(Replicated, BlueprintReadOnly) int32 TotalPalsSpawned; virtual void GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const override; }; ``` ``` -------------------------------- ### BeginPlay Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalStatusComponent.md Initializes the status component at the start of the game. This method sets up the internal status map and performs necessary caching. ```APIDOC ## BeginPlay ### Description Initializes component at game start. Sets up status map and caches. ### Method BlueprintCallable ``` -------------------------------- ### Play Action on PalCharacter Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacter.md Initiate an action on a PalCharacter, such as a general attack. This example shows how to set up parameters and bind to the action's completion delegate. ```cpp // Play action by type FActionDynamicParameter Param; Param.ActionTarget = TargetActor; Param.StartTransform = MyPal->GetActorTransform(); UPalActionBase* Action = MyPal->ActionComponent->PlayActionByTypeParameter( Param, EPalActionType::GeneralAttack ); if (Action) { // Bind to action end Action->OnActionEndDelegate.AddDynamic(this, &AMyClass::OnActionCompleted); } ``` -------------------------------- ### PalActionComponent Usage Example Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionComponent.md Demonstrates how to set up action mappings, play actions with parameters, listen for action completion, cancel all actions, and check if the action queue is empty. Network replication is handled automatically for PlayAction methods. ```cpp // Setup action mappings ActionComponent->ActionMap.Add(EPalActionType::GeneralAttack, AAttackAction::StaticClass()); ActionComponent->ActionMap.Add(EPalActionType::Sleep, ASleepAction::StaticClass()); // Play attack action FActionDynamicParameter AttackParam; AttackParam.ActionTarget = EnemyCharacter; AttackParam.ActionVelocity = CharacterVelocity; AttackParam.StartTransform = GetActorTransform(); UPalActionBase* Attack = ActionComponent->PlayActionByTypeParameter( AttackParam, EPalActionType::GeneralAttack ); // Listen for action completion if (Attack) { Attack->OnActionEndDelegate.AddDynamic(this, &ACharacter::OnAttackFinished); } // Cancel all actions ActionComponent->CancelAllAction(); // Check current state if (ActionComponent->ActionIsEmpty()) { // Ready for next command } ``` -------------------------------- ### Listen for Parameter and Status Changes Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacterParameterComponent.md Shows how to bind to delegate events for general parameter changes and specific status effect changes. Includes example callback functions for handling these events. ```cpp UPalCharacterParameterComponent* Params = MyCharacter->CharacterParameterComponent; // Bind to parameter changes Params->OnParameterChangeDelegate.AddDynamic(this, &AMyClass::OnParameterChanged); // Bind to status changes Params->OnStatusChangeDelegate.AddDynamic(this, &AMyClass::OnStatusChanged); void AMyClass::OnParameterChanged(UPalCharacterParameterComponent* Component) { // Parameter updated float NewHP = Component->GetHP(); } void AMyClass::OnStatusChanged(bool bAdded, EPalStatusID StatusID) { if (bAdded) { // Status applied } } ``` -------------------------------- ### Action Lifecycle: OnQueueAction Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionBase.md Called when an action is queued but has not yet started executing. This is useful for pre-execution setup. ```cpp UFUNCTION(BlueprintCallable, BlueprintNativeEvent) void OnQueueAction(); ``` -------------------------------- ### Handle Component Not Initialized Before BeginPlay in C++ Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/errors.md Explains the issue of accessing components before they are fully initialized, typically in the constructor. Initialize components in BeginPlay or use component setup overrides for safety. ```cpp APalCharacter::APalCharacter() { // Components may not be fully initialized yet ActionComponent->ActionMap.Add(...); // Potentially unsafe } ``` ```cpp virtual void BeginPlay() override { Super::BeginPlay(); if (ActionComponent) { ActionComponent->ActionMap.Add(...); // Safe } } ``` -------------------------------- ### Usage Example: Iterating Players Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Demonstrates how to iterate through the `PlayerArray` in APalGameState to access individual player states and their scores. ```APIDOC ## Usage Example: Iterating Players ```cpp void AMyGameManager::CheckAllPlayers() { if (APalGameState* GameState = GetWorld()->GetGameState()) { for (APlayerState* PlayerState : GameState->PlayerArray) { if (PlayerState) { FString PlayerName = PlayerState->GetPlayerName(); int32 Score = PlayerState->Score; UE_LOG(LogGame, Warning, TEXT("Player: %s, Score: %d"), *PlayerName, Score); } } } } ``` ``` -------------------------------- ### FindPlayerStartWithTag Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Finds a player start point actor that has a specific tag. This is useful for custom player spawn logic. It returns the found PlayerStart actor or nullptr if none is found. ```APIDOC ## FindPlayerStartWithTag ### Description Finds a player start point with the specified tag. ### Method BlueprintCallable, BlueprintProtected ### Endpoint N/A (Server-side C++ method) ### Parameters - **Tag** (FName) - Player start tag name ### Response #### Success Response - **Return Value** (APlayerStart*) - Player start actor or nullptr if not found ``` -------------------------------- ### Action Lifecycle: OnBeginAction Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionBase.md Called when an action starts executing. Override this function in subclasses to implement initialization logic for the action. ```cpp UFUNCTION(BlueprintCallable, BlueprintNativeEvent) void OnBeginAction(); ``` -------------------------------- ### Get Equipped Moves Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalIndividualCharacterParameter.md Retrieves the list of moves currently equipped by the Pal. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) TArray GetEquippedWaza() const; ``` -------------------------------- ### APalGameMode Constructor Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Initializes the game mode with server-specific setup. This is the primary constructor for the APalGameMode class. ```cpp APalGameMode(const FObjectInitializer& ObjectInitializer) ``` -------------------------------- ### PlayActionByTypeParameter - Play Action by Type with Parameters Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionComponent.md Initiates an action by its enum type and provides full parameter setup. This method is suitable for actions where the type is known and specific parameters are needed. ```cpp UFUNCTION(BlueprintCallable) UPalActionBase* PlayActionByTypeParameter(FActionDynamicParameter Param, EPalActionType Type); ``` -------------------------------- ### Control AI Behavior Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacterParameterComponent.md Provides examples for overriding AI target behavior, temporarily disabling AI, enabling debug invulnerability, and configuring friendly fire settings. ```cpp UPalCharacterParameterComponent* Params = MyPal->CharacterParameterComponent; // Override target for AI Params->IsOverrideTarget = true; Params->OverrideTargetLocation = EnemyLocation; // Disable AI temporarily Params->bIsDebugScarecrow = true; // Make invulnerable (debug) Params->bIsDebugMuteki = true; // Make ally ignore friendly fire Params->IsFriendBulletIgnore = true; ``` -------------------------------- ### GetActionVelocity Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionBase.md Retrieves the velocity of the character at the start of the action. ```APIDOC ## GetActionVelocity ### Description Gets the velocity parameter at action start. ### Method BlueprintPure ### Endpoint N/A (Blueprint Function) ### Returns FVector - Velocity vector ``` -------------------------------- ### Creating Buff Effects Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalStatusComponent.md Provides examples for creating custom buff effects like 'Shield' and 'Haste' by applying status effects with specific parameters for duration and intensity. These methods can be used to implement temporary enhancements for characters. ```cpp void AMyAbilitySystem::ApplyShield(APalCharacter* Target, float ShieldAmount) { if (!Target || !Target->StatusComponent) return; FStatusDynamicParameter ShieldParams; ShieldParams.Duration = 30.0f; ShieldParams.Intensity = ShieldAmount; Target->StatusComponent->AddStatusParameter(EPalStatusID::Shield, ShieldParams); } void AMyAbilitySystem::ApplyHaste(APalCharacter* Target) { if (!Target || !Target->StatusComponent) return; FStatusDynamicParameter HasteParams; HasteParams.Duration = 15.0f; HasteParams.Intensity = 1.5f; // 50% speed increase Target->StatusComponent->AddStatusParameter(EPalStatusID::Haste, HasteParams); } ``` -------------------------------- ### Accessing World State from Client Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Example of how a client character can access and log elapsed match time and player count from the APalGameState. Converts raw elapsed time into a human-readable minutes:seconds format. ```cpp void AMyPlayerCharacter::UpdateFromGameState() { if (APalGameState* GameState = GetWorld()->GetGameState()) { // Get elapsed match time uint32 MatchTime = GameState->ElapsedTime; // Convert to minutes:seconds uint32 Minutes = MatchTime / 60; uint32 Seconds = MatchTime % 60; UE_LOG(LogGame, Warning, TEXT("Match time: %02d:%02d"), Minutes, Seconds); // Check player count int32 PlayerCount = GameState->PlayerArray.Num(); UE_LOG(LogGame, Warning, TEXT("Players: %d"), PlayerCount); } } ``` -------------------------------- ### Get Pal Gender Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalIndividualCharacterParameter.md Retrieves the gender of the Pal. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) EPalCharacterSex GetSex() const; ``` -------------------------------- ### Get Pal Experience Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalIndividualCharacterParameter.md Retrieves the total experience points accumulated by the Pal. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) FFixedPoint64 GetExp() const; ``` -------------------------------- ### PalGameMode Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/INDEX.md Documentation for APalGameMode, the server-side game rules manager, covering game restarts, server setup, and session management. ```APIDOC ## APalGameMode ### Description Manages server-side game rules, including initialization, session management, authentication, and player spawning. ### Methods - **RestartGame()**: Restarts the game on the server. - **InitDedicatedServer()**: Initializes the dedicated server environment. - **OnCompleteAuth()**: Callback function upon successful authentication. - **OnCompleteCreateSession()**: Callback function after a session is created. - **OnUpdateSession()**: Callback function when session information is updated. - **OnServerLobbyUpdate()**: Notification for lobby updates. - **OnEOSLoginDedicatedServerComplete()**: Callback for EOS login completion on dedicated servers. - **FindPlayerStartWithTag(tag)**: Finds a player start location with a specific tag. - **CreateSession()**: Initiates the creation of a game session. ### Server Integration - Handles authentication processes. - Manages game session lifecycle. - Integrates with EOS (Epic Online Services). - Manages lobby functionalities. ``` -------------------------------- ### Accessing APalGameState from Subsystem Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Demonstrates how to obtain the APalGameState pointer within a subsystem. Ensures a valid world pointer is available before attempting to get the game state. ```cpp void AMySubsystem::GetGameState() { if (UWorld* World = GetWorld()) { APalGameState* GameState = World->GetGameState(); if (GameState) { // Use game state } } } ``` -------------------------------- ### Get Pal Level Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalIndividualCharacterParameter.md Retrieves the current level of a Pal. The level ranges from 1 to 100. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) int32 GetLevel() const; ``` -------------------------------- ### Accessing APalGameState from Player Controller Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Shows how to get the APalGameState from a player controller to check game status, such as whether the match is in progress. ```cpp void AMyPlayerController::CheckGameState() { APalGameState* GameState = GetWorld()->GetGameState(); if (GameState && GameState->IsMatchInProgress()) { // Match is active } } ``` -------------------------------- ### Get Pal Happiness Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalIndividualCharacterParameter.md Retrieves the current happiness value of the Pal. This value ranges from 0.0 to 100.0. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) FFixedPoint64 GetHappiness() const; ``` -------------------------------- ### Controlling AI Behavior Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacterParameterComponent.md Provides examples of how to override AI target, disable AI, make characters invulnerable, or ignore friendly fire using debug flags. ```APIDOC ## Controlling AI Behavior ### Description Override AI target, disable AI temporarily, make characters invulnerable, or ignore friendly fire using debug flags. ### Method ```cpp UPalCharacterParameterComponent* Params = MyPal->CharacterParameterComponent; // Override target for AI Params->IsOverrideTarget = true; Params->OverrideTargetLocation = EnemyLocation; // Disable AI temporarily Params->bIsDebugScarecrow = true; // Make invulnerable (debug) Params->bIsDebugMuteki = true; // Make ally ignore friendly fire Params->IsFriendBulletIgnore = true; ``` ``` -------------------------------- ### Get Pal Work Suitability Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalIndividualCharacterParameter.md Retrieves the Pal's suitability level for a specific work type. Suitability can be Unsuitable, Normal, or Excellent. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) EPalWorkSuitability GetWorkSuitability(EPalWorkType WorkType) const; ``` -------------------------------- ### Custom Game State Class Definition Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Defines a custom game state class by subclassing APalGameState. Includes example replicated properties for global temperature and total pals spawned. ```cpp UCLASS() class MYGAME_API AMyGameState : public APalGameState { GENERATED_BODY() public: AMyGameState(const FObjectInitializer& ObjectInitializer); UPROPERTY(Replicated, BlueprintReadOnly) float GlobalTemperature; UPROPERTY(Replicated, BlueprintReadOnly) int32 TotalPalsSpawned; virtual void GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const override; }; ``` -------------------------------- ### Pal.uproject Configuration Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/configuration.md The main project file for Palworld, defining engine association and modules with their dependencies. Ensure 'EngineAssociation' matches your installed Unreal Engine version. ```json { "FileVersion": 3, "EngineAssociation": "5.1", "Modules": [ { "Name": "Pal", "Type": "Runtime", "LoadingPhase": "Default", "AdditionalDependencies": [ "Foliage", "Engine", "CoreUObject", "UMG", "NiagaraAnimNotifies", "CommonUI", "CommonGame", "Flow" ] }, { "Name": "PalModLoader", "Type": "Runtime", "LoadingPhase": "PostConfigInit" } ] } ``` -------------------------------- ### InitDedicatedServer Method Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Initializes dedicated server configuration. This method must be called before the server can accept players. ```cpp UFUNCTION(BlueprintCallable) void InitDedicatedServer(); ``` -------------------------------- ### InitDedicatedServer Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Initializes dedicated server configuration. This method must be called before the server can accept players. It is exposed as a BlueprintCallable function. ```APIDOC ## InitDedicatedServer ### Description Initializes dedicated server configuration. Must be called before accepting players. ### Method BlueprintCallable ### Endpoint N/A (Server-side C++ method) ### Parameters None ### Response None ``` -------------------------------- ### Shipping Build Configurations Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/README.md Lists the executable names for shipping builds across different platforms. These are the final executables used for release versions of the game. ```bash Pal-Windows-Shipping Pal-Linux-Shipping Pal-XSX-Shipping Pal-XB1-Shipping ``` -------------------------------- ### Configuration Reference Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/README.md Details on project and plugin configuration settings. ```APIDOC ## Configuration Reference ### Key Sections - **Modules:** Pal (Runtime), PalModLoader (PostConfigInit) - **Engine Version:** Unreal Engine 5.1 - **Online:** Steam, Epic Online Services (EOS) - **Graphics:** DLSS, FSR2, NIS upscaling - **Audio:** Wwise advanced audio engine - **Plugins:** 40+ enabled plugins for gameplay, graphics, audio - **Target Platforms:** Windows, Linux, Xbox One, Xbox Series X|S ``` -------------------------------- ### Development Build Configurations Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/README.md Lists the executable names for development builds on Windows and Linux. These are used when running the editor or debugging the game during development. ```bash UE4Editor-Win64-Debug UE4Editor-Linux-Debug ``` -------------------------------- ### Listening to Status Changes Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalStatusComponent.md Demonstrates how to bind dynamic delegates to `OnAddStatus` and `OnRemoveStatus` events to react to status effect changes. Ensure the delegate functions (`OnStatusAdded`, `OnStatusRemoved`) are correctly implemented in your class. ```cpp UPalStatusComponent* StatusComp = MyCharacter->StatusComponent; // Bind to status added StatusComp->OnAddStatus.AddDynamic(this, &AMyClass::OnStatusAdded); // Bind to status removed StatusComp->OnRemoveStatus.AddDynamic(this, &AMyClass::OnStatusRemoved); void AMyClass::OnStatusAdded(const UPalStatusComponent* Component, EPalStatusID StatusID, UPalStatusBase* Status) { FString StatusName = StaticEnum()->GetNameStringByValue((int64)StatusID); UE_LOG(LogGame, Warning, TEXT("Status applied: %s"), *StatusName); if (StatusID == EPalStatusID::Poison) { // Handle poison specially ApplyPoisonVisuals(); } } void AMyClass::OnStatusRemoved(const UPalStatusComponent* Component, EPalStatusID StatusID) { FString StatusName = StaticEnum()->GetNameStringByValue((int64)StatusID); UE_LOG(LogGame, Warning, TEXT("Status removed: %s"), *StatusName); } ``` -------------------------------- ### Initialize Pal Breeding Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalIndividualCharacterParameter.md Initiates the breeding cycle for the Pal. ```cpp UFUNCTION(BlueprintCallable) void InitializeBreeding(); ``` -------------------------------- ### GetCurrentAction - Get Currently Executing Action Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionComponent.md Returns the instance of the action that is currently being executed. If no action is active, it returns nullptr. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) UPalActionBase* GetCurrentAction() const; ``` -------------------------------- ### Respond to PalCharacter Events Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacter.md Set up delegates to listen for various character events, including parameter initialization, action beginnings, and status effect additions. Ensure the correct class and function are bound to the delegates. ```cpp // Bind to character state changes MyPal->CharacterParameterComponent->OnCompleteInitializeParameter.AddDynamic( this, &AMyClass::OnCharacterReady ); MyPal->ActionComponent->OnActionBeginDelegate.AddDynamic( this, &AMyClass::OnActionStarted ); MyPal->StatusComponent->OnAddStatus.AddDynamic( this, &AMyClass::OnStatusApplied ); ``` -------------------------------- ### Get Active Status Instance Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalStatusComponent.md Retrieves the active status instance for a given status ID. Returns nullptr if the status is not active. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) UPalStatusBase* GetExecutionStatus(EPalStatusID statusID); ``` -------------------------------- ### Playing Actions on Character Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacter.md Shows how to initiate actions on a Pal character, such as general attacks, and how to bind to the action's completion event. ```APIDOC ## Playing Actions on Character ### Description Initiate specific actions on a Pal character, like a general attack, and optionally bind a callback function to be executed when the action concludes. ### Usage ```cpp // Play action by type FActionDynamicParameter Param; Param.ActionTarget = TargetActor; Param.StartTransform = MyPal->GetActorTransform(); UPalActionBase* Action = MyPal->ActionComponent->PlayActionByTypeParameter( Param, EPalActionType::GeneralAttack ); if (Action) { // Bind to action end Action->OnActionEndDelegate.AddDynamic(this, &AMyClass::OnActionCompleted); } ``` ``` -------------------------------- ### Get Blocked Status IDs Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacterParameterComponent.md Retrieves the current list of status IDs that are blocked from being applied. This function is pure and callable from Blueprints. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) TArray GetDisableAddStatusIDs() const; ``` -------------------------------- ### CreateSession Method Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Creates a new game session on the server. This method is used to initiate a new game session. ```cpp UFUNCTION(BlueprintCallable, BlueprintPrivate) void CreateSession(const FString& Address); ``` -------------------------------- ### Play Attack Action and Listen for Completion Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/README.md Use this to play a general attack action on a character and register a callback for when the action completes. Ensure the character and its action component are valid before proceeding. ```cpp APalCharacter* Pal = GetMyPal(); if (!Pal || !Pal->ActionComponent) return; // Play attack action FActionDynamicParameter Param; Param.ActionTarget = EnemyCharacter; UPalActionBase* Action = Pal->ActionComponent->PlayActionByTypeParameter( Param, EPalActionType::GeneralAttack ); // Listen for completion if (Action) { Action->OnActionEndDelegate.AddDynamic(this, &AMyClass::OnActionDone); } ``` -------------------------------- ### Responding to Character Events Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacter.md Details how to subscribe to various character events, including parameter initialization, action beginnings, and status effect additions. ```APIDOC ## Responding to Character Events ### Description Register callbacks for significant character events such as the completion of parameter initialization, the commencement of an action, or the application of a status effect. ### Usage ```cpp // Bind to character state changes MyPal->CharacterParameterComponent->OnCompleteInitializeParameter.AddDynamic( this, &AMyClass::OnCharacterReady ); MyPal->ActionComponent->OnActionBeginDelegate.AddDynamic( this, &AMyClass::OnActionStarted ); MyPal->StatusComponent->OnAddStatus.AddDynamic( this, &AMyClass::OnStatusApplied ); ``` ``` -------------------------------- ### Get Execution Status Cache Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalStatusComponent.md Retrieves a cached status instance for fast internal lookup. Use this for quick checks when the exact status object is needed. ```cpp UFUNCTION(BlueprintCallable) UPalStatusBase* GetExecutionStatusCache(EPalStatusID statusID); ``` -------------------------------- ### UPalActionBase Constructor Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionBase.md Initializes default properties for a UPalActionBase instance. ```cpp UPalActionBase() ``` -------------------------------- ### PlayActionParameter - Action Playback with Full Parameters Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionComponent.md Plays an action with a full set of parameters, ensuring replication to all clients. Use this when precise control and network synchronization are required. ```cpp UFUNCTION(BlueprintCallable) UPalActionBase* PlayActionParameter(FActionDynamicParameter Param, TSubclassOf actionClass); ``` -------------------------------- ### RestartGame Method Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Restarts the current game instance. This function resets all world state and respawns players. ```cpp UFUNCTION(BlueprintCallable) void RestartGame(); ``` -------------------------------- ### GetActionTool - Get Action Tool Override Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionComponent.md Retrieves the tool actor override associated with a specific action type. If no override is found, it returns a provided default class. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) TSubclassOf GetActionTool(EPalActionType ActionType, TSubclassOf InDefaultClass) const; ``` -------------------------------- ### Handle Replication Mismatch in C++ Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/errors.md Illustrates the consequences of network state desynchronization. Prefer using official replicated methods over direct property modifications for state synchronization. ```cpp // Wrong - client-only action ActionComponent->CurrentAction = MyAction; // Doesn't replicate // Correct - replicated method ActionComponent->PlayAction(Target, ActionClass); ``` -------------------------------- ### GetCurrentActionType - Get Type of Current Action Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionComponent.md Retrieves the enum type of the currently executing action. If no action is active, it can optionally return the type of the next queued action. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) EPalActionType GetCurrentActionType(bool bIsCheckQueue) const; ``` -------------------------------- ### Check for Missing Individual Parameter Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/errors.md Illustrates how to safely access the IndividualParameter by checking for null pointers during character initialization. ```cpp if (!Character->CharacterParameterComponent->IndividualParameter) { // Character not properly initialized return; } ``` ```cpp if (Character && Character->CharacterParameterComponent && Character->CharacterParameterComponent->IndividualParameter) { // Safe to access } ``` -------------------------------- ### Shipping Build Configurations Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/configuration.md Lists the final executable targets for shipping builds across various platforms. These configurations are optimized for release and deployment. ```plaintext Pal-Linux-Shipping Pal-Windows-Shipping Pal-XSX-Shipping Pal-XB1-Shipping ``` -------------------------------- ### Handle Character Initialization Completion Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacterParameterComponent.md Callback function invoked when the character's initialization process is completed. This function is callable from Blueprints. ```cpp UFUNCTION(BlueprintCallable) void OnCompleteCharacter(APalCharacter* InCharacter); ``` -------------------------------- ### APalGameState Constructor Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Initializes the game state with default configuration. This is the standard constructor for the APalGameState class. ```cpp APalGameState(const FObjectInitializer& ObjectInitializer) ``` -------------------------------- ### Apply and Manage Status Effects Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacterParameterComponent.md Demonstrates how to apply status effects like stun, block specific status effects from being applied, remove individual effects, and clear all status effects. ```cpp UPalCharacterParameterComponent* CharParams = MyCharacter->CharacterParameterComponent; // Apply stun effect CharParams->AddStatus(EPalStatusID::Stun); // Block certain status effects TArray BlockedStatuses; BlockedStatuses.Add(EPalStatusID::Poison); BlockedStatuses.Add(EPalStatusID::Sleep); CharParams->SetDisableAddStatusIDs(BlockedStatuses); // Remove specific status CharParams->RemoveStatus(EPalStatusID::Stun); // Clear all effects CharParams->RemoveAll(); ``` -------------------------------- ### PlayAction - Basic Action Playback Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionComponent.md Plays a specified action on a target actor. Use this for general action initiation where the target is an actor. ```cpp UFUNCTION(BlueprintCallable) UPalActionBase* PlayAction(AActor* ActionTarget, TSubclassOf actionClass); ``` -------------------------------- ### CreateSession Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Creates a new game session on the server. This method requires the server address for the session and is marked as BlueprintPrivate, indicating it's intended for internal use or specific Blueprint contexts. ```APIDOC ## CreateSession ### Description Creates a new game session on the server. ### Method BlueprintCallable, BlueprintPrivate ### Endpoint N/A (Server-side C++ method) ### Parameters - **Address** (string) - Server address for the session ### Response None ``` -------------------------------- ### Action System Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/README.md Documentation for the action system, covering action management and base action classes. ```APIDOC ## UPalActionComponent ### Description Action management component. ### Details - Play, queue, and cancel actions - Action type mapping - Network replication for actions - Animation notify system ``` ```APIDOC ## UPalActionBase ### Description Base class for all actions. ### Details - Lifecycle events (begin, end, break, tick) - Animation events (attack, spawn, other) - Parameter and target queries - Blueprintable for custom actions ``` -------------------------------- ### UPalStatusComponent Constructor Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalStatusComponent.md Initializes the UPalStatusComponent. This constructor sets up the component with an empty list for executing status effects. ```APIDOC ## UPalStatusComponent Constructor ### Description Initializes status component with empty status execution list. ### Signature ```cpp UPalStatusComponent(const FObjectInitializer& ObjectInitializer) ``` ``` -------------------------------- ### Accessing APalGameState from Subsystem Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Shows how to obtain the APalGameState within a subsystem to interact with the replicated game state. ```APIDOC ## Accessing APalGameState from Subsystem ```cpp void AMySubsystem::GetGameState() { if (UWorld* World = GetWorld()) { APalGameState* GameState = World->GetGameState(); if (GameState) { // Use game state } } } ``` ``` -------------------------------- ### PalActionExample Implementation Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionBase.md Extends PalActionBase to create a custom character action. Override methods like OnBeginAction_Implementation, TickAction_Implementation, and OnEndAction_Implementation to define the action's behavior. CanGainSP_Implementation controls whether the character gains SP during the action. ```cpp UCLASS() class APalActionExample : public UPalActionBase { GENERATED_BODY() public: virtual void OnBeginAction_Implementation() override { APalCharacter* Character = GetActionCharacter(); if (Character) { // Play animation Character->GetMesh()->PlayAnimation(MyAnimMontage, false); } } virtual void TickAction_Implementation(float DeltaTime) override { // Update action each frame FVector TargetLocation = GetTargetLocation(false); APalCharacter* Character = GetActionCharacter(); if (Character) { FVector Direction = (TargetLocation - Character->GetActorLocation()).GetSafeNormal(); Character->SetActorLocation(Character->GetActorLocation() + Direction * 100.0f * DeltaTime); } } virtual void OnEndAction_Implementation() override { // Cleanup APalCharacter* Character = GetActionCharacter(); if (Character) { Character->GetMesh()->StopAllAnimMontages(0.3f); } } virtual bool CanGainSP_Implementation() const override { return true; // Allow SP gain during this action } }; ``` -------------------------------- ### Clamp Character Level Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/errors.md Demonstrates how to clamp character level to the valid range of 1-100 using FMath::Clamp. ```cpp IndividualParams->SetLevel(150); // Out of range // Likely clamped to 100 ``` ```cpp int32 NewLevel = FMath::Clamp(DesiredLevel, 1, 100); IndividualParams->SetLevel(NewLevel); ``` -------------------------------- ### PalActionBase Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/INDEX.md Documentation for the base action class UPalActionBase, covering its lifecycle methods, animation events, and parameter access. ```APIDOC ## UPalActionBase ### Description Base class for all actions, defining the lifecycle, animation events, and methods for accessing action-related parameters. ### Lifecycle Methods (Native Events) - **OnBeginAction()**: Called when an action begins. - **OnBreakAction()**: Called when an action is interrupted. - **OnEndAction()**: Called when an action completes. - **OnQueueAction()**: Called when an action is added to the queue. - **TickAction()**: Called every frame while the action is active. ### Animation Events - **AnimEventAttack()**: Triggered at a specific frame during an attack animation. - **AnimEventOther()**: For miscellaneous animation events. - **AnimEventSpawn()**: Triggered when an object needs to be spawned during an animation. ### Parameter Access Methods - **GetActionCharacter()**: Returns the character executing the action. - **GetActionTarget()**: Returns the primary target of the action. - **GetActionVelocity()**: Returns the current velocity parameter of the action. - **GetTargetLocation()**: Returns the target position for the action. - **GetDynamicParameter()**: Retrieves all dynamic parameters associated with the action. - **GetBlackboard()**: Accesses custom data stored in the action's blackboard. ### Implementation Example - Demonstrates how to implement a complete action subclass. ``` -------------------------------- ### Basic Character Access Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacter.md Demonstrates how to retrieve and inspect core character parameters such as health, and access components like the action system and status effects. ```APIDOC ## Basic Character Access ### Description Access character parameters like HP and MaxHP, check the current action status, and inspect status effects such as Stun. ### Usage ```cpp // Access character parameters APalCharacter* MyPal = GetMyPalCharacter(); if (MyPal && MyPal->CharacterParameterComponent) { float Health = MyPal->CharacterParameterComponent->GetHP(); float MaxHealth = MyPal->CharacterParameterComponent->GetMaxHP(); } // Access action system if (MyPal && MyPal->ActionComponent) { // Check current action EPalActionType CurrentAction = MyPal->ActionComponent->GetCurrentActionType(false); bool bInAction = !MyPal->ActionComponent->ActionIsEmpty(); // Get current action instance UPalActionBase* CurrentActionInstance = MyPal->ActionComponent->GetCurrentAction(); } // Access status effects if (MyPal && MyPal->StatusComponent) { bool bIsStunned = MyPal->StatusComponent->GetExecutionStatus(EPalStatusID::Stun) != nullptr; MyPal->StatusComponent->AddStatus(EPalStatusID::Stun); } ``` ``` -------------------------------- ### Listening to Parameter Changes Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalCharacterParameterComponent.md Explains how to bind to delegates to receive notifications when character parameters or status effects change. ```APIDOC ## Listening to Parameter Changes ### Description Bind to delegates to receive notifications when character parameters or status effects change. ### Method ```cpp UPalCharacterParameterComponent* Params = MyCharacter->CharacterParameterComponent; // Bind to parameter changes Params->OnParameterChangeDelegate.AddDynamic(this, &AMyClass::OnParameterChanged); // Bind to status changes Params->OnStatusChangeDelegate.AddDynamic(this, &AMyClass::OnStatusChanged); void AMyClass::OnParameterChanged(UPalCharacterParameterComponent* Component) { // Parameter updated float NewHP = Component->GetHP(); } void AMyClass::OnStatusChanged(bool bAdded, EPalStatusID StatusID) { if (bAdded) { // Status applied } } ``` ``` -------------------------------- ### Handle Missing Component Reference in C++ Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/errors.md Demonstrates checking for null component references before accessing them to prevent null pointer dereferences. Always verify component existence. ```cpp if (!Character || !Character->ActionComponent) { // Component not initialized return; } ``` ```cpp APalCharacter* Pal = GetCharacter(); if (Pal && Pal->ActionComponent && Pal->StatusComponent) { // Safe to use components } ``` -------------------------------- ### OnEOSLoginDedicatedServerComplete Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Callback function invoked when EOS (Epic Online Services) login for the dedicated server completes. It provides user info, a success status, and an error string if applicable. ```APIDOC ## OnEOSLoginDedicatedServerComplete ### Description Called when EOS (Epic Online Services) login for server completes. ### Method BlueprintCallable ### Endpoint N/A (Server-side C++ method) ### Parameters - **UserInfo** (UPocketpairUserInfo*) - Logged-in user information - **bSuccess** (bool) - Login succeeded - **ErrorStr** (string) - Error message if failed ### Response None ``` -------------------------------- ### Replication Settings Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/configuration.md Details networking replication settings, including update frequency, replication driver, and maximum actors replicated. ```plaintext Update Frequency: Variable Replication Driver: ReplicationGraph Max Actors Replicated: Dynamic ``` -------------------------------- ### UPalStatusComponent Constructor Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalStatusComponent.md Initializes the status component with an empty status execution list. This is the default constructor for the component. ```cpp UPalStatusComponent(const FObjectInitializer& ObjectInitializer) ``` -------------------------------- ### Basic Status Management Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalStatusComponent.md Demonstrates adding, applying with parameters, checking, removing, and clearing all status effects on a character. Ensure the character and its StatusComponent are valid before calling these methods. ```cpp APalCharacter* MyCharacter = GetCharacter(); if (!MyCharacter || !MyCharacter->StatusComponent) return; UPalStatusComponent* StatusComp = MyCharacter->StatusComponent; // Add basic status StatusComp->AddStatus(EPalStatusID::Sleep); // Add status with parameters FStatusDynamicParameter StunParams; StunParams.Duration = 5.0f; StunParams.Intensity = 1.0f; StatusComp->AddStatusParameter(EPalStatusID::Stun, StunParams); // Check if status is active UPalStatusBase* StunStatus = StatusComp->GetExecutionStatus(EPalStatusID::Stun); if (StunStatus) { // Character is stunned } // Remove status StatusComp->RemoveStatus(EPalStatusID::Stun); // Clear all effects StatusComp->RemoveAll(); ``` -------------------------------- ### Handle Action Not Found Error in C++ Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/errors.md Demonstrates how to handle cases where an action type is not registered with the ActionComponent. Ensure action types are mapped before attempting to play them. ```cpp UPalActionBase* Action = ActionComponent->PlayActionByType( Character, EPalActionType::CustomAction // Not registered ); if (!Action) { // Action not found - type not in ActionMap UE_LOG(LogGame, Error, TEXT("Action type not mapped")); } ``` ```cpp ActionComponent->ActionMap.Add(EPalActionType::CustomAction, ACustomAction::StaticClass()); ``` -------------------------------- ### Game State in Blueprint Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Explains how to access and use APalGameState properties and functions within Unreal Engine Blueprints. ```APIDOC ## Game State in Blueprint Game state can be accessed in Blueprint: ``` Get Game State (class type: Pal Game State) └─ Get Player Array └─ Get (index 0) └─ Get Player Name ``` ``` -------------------------------- ### GetBlackboard Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionBase.md Retrieves the custom data storage (Blackboard) associated with this action. ```APIDOC ## GetBlackboard ### Description Gets custom data storage for action. ### Method BlueprintPure ### Endpoint N/A (Blueprint Function) ### Returns FPalNetArchive - Blackboard archive reference ``` -------------------------------- ### OnCompleteCreateSession Callback Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Called when session creation completes. Handles the response from the session creation request. ```cpp UFUNCTION(BlueprintCallable) void OnCompleteCreateSession(const FString& ResponseBody, bool bResponseOK, int32 ResponseCode); ``` -------------------------------- ### OnCompleteCreateSession Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Callback function invoked when session creation completes. It provides the response body, a success status, and the HTTP response code. ```APIDOC ## OnCompleteCreateSession ### Description Called when session creation completes. ### Method BlueprintCallable ### Endpoint N/A (Server-side C++ method) ### Parameters - **ResponseBody** (string) - Session creation response - **bResponseOK** (bool) - Session created successfully - **ResponseCode** (int32) - HTTP status code ### Response None ``` -------------------------------- ### OnEOSLoginDedicatedServerComplete Callback Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameMode.md Called when EOS (Epic Online Services) login for the server completes. Handles success or failure of the login process. ```cpp UFUNCTION(BlueprintCallable) void OnEOSLoginDedicatedServerComplete(const UPocketpairUserInfo* UserInfo, bool bSuccess, const FString& ErrorStr); ``` -------------------------------- ### Accessing APalGameState from Character Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalGameState.md Demonstrates how to retrieve the APalGameState instance from a character to access game state information like elapsed time. ```APIDOC ## Accessing APalGameState from Character ```cpp APalGameState* GameState = GetWorld()->GetGameState(); if (GameState) { // Access game state uint32 ElapsedTime = GameState->ElapsedTime; } ``` ``` -------------------------------- ### PalCharacterParameterComponent Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/INDEX.md Documentation for UPalCharacterParameterComponent, managing runtime character statistics including combat, status, health, and equipment. ```APIDOC ## UPalCharacterParameterComponent ### Description Manages runtime character statistics and states, including combat parameters, status effects, health, and equipment. ### Property Categories - Combat state (SP overheat, hyper armor, elements) - Status and buffs (stun, invulnerability) - Health and resources (lean back, stun points) - Targeting and control (AI overrides) - Equipment and inventory - Environmental state (collision, overlap) ### Methods - **AddStatus(status, parameter)**: Applies a status effect to the character. - **RemoveStatus(status)**: Removes a status effect from the character. - **GetDisableAddStatusIDs()**: Retrieves a list of status effect IDs that are currently blocked. - **SetDisableAddStatusIDs(IDs)**: Sets a list of status effect IDs to block. - **BeginPlay()**: Initializes the component when the character begins playing. - **OnCompleteCharacter()**: Callback function when the character is fully initialized. ### Replicated Properties - bIsCooping, bIsEnableSendReticleTarget - bIsEnableMuteki, bIsDisableSummonWeapon - OverrideTargetLocation, Trainer, IsCanSneakAttacked ### Usage Examples - Checking character status effects. - Applying buffs and debuffs. - Modifying character parameters. ``` -------------------------------- ### State Query: IsInServer Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionBase.md Checks if the current execution context is the server. Returns true if the code is running on the game server. ```cpp UFUNCTION(BlueprintCallable) bool IsInServer() const; ``` -------------------------------- ### State Queries Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionBase.md These methods allow querying the current state of an action, such as whether it is ending, if it's replicated to clients, or if the character is locally controlled. ```APIDOC ## IsEndAction ### Description Checks if the action is currently in its completion state. ### Method BlueprintNativeEvent, BlueprintPure ### Endpoint PalActionBase::IsEndAction ### Returns - **bool** - True if the action is ending. ## IsReflectedForClient ### Description Checks if the action is being replicated to clients. ### Method BlueprintCallable, BlueprintPure ### Endpoint PalActionBase::IsReflectedForClient ### Returns - **bool** - True if the action is network replicated. ## IsInServer ### Description Checks if the current execution context is the server. ### Method BlueprintCallable ### Endpoint PalActionBase::IsInServer ### Returns - **bool** - True if running on the server. ## IsInLocalControlled ### Description Checks if the character associated with the action is locally controlled. ### Method BlueprintCallable ### Endpoint PalActionBase::IsInLocalControlled ### Returns - **bool** - True if the character is locally controlled. ``` -------------------------------- ### ActionIsEmpty - Check if Action System is Idle Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/api-reference/PalActionComponent.md Returns true if there are no actions currently executing or waiting in the queue. Use this to determine if the system is in a quiescent state. ```cpp UFUNCTION(BlueprintCallable, BlueprintPure) bool ActionIsEmpty(); ``` -------------------------------- ### Game Flow Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/README.md Documentation for game flow components, including game mode and game state. ```APIDOC ## APalGameMode ### Description Server-side game rules and session management. ### Details - Session management - Player spawning - Authentication and EOS integration - Dedicated server configuration ``` ```APIDOC ## APalGameState ### Description Replicated game state information. ### Details - Synchronized world state - Player array and spectators - Match timing ``` -------------------------------- ### PalActionComponent Source: https://github.com/localcc/palworldmoddingkit/blob/main/_autodocs/INDEX.md Documentation for the UPalActionComponent, which manages character actions, including methods for playing, canceling, and querying action states. ```APIDOC ## UPalActionComponent ### Description Action management system for characters, allowing execution, cancellation, and state querying of various actions. ### Methods Documented - **PlayAction(parameters)**: Execute actions with parameters. - **PlayActionByType(enum type)**: Execute actions by their enum type. - **PlayActionLocation(location)**: Execute actions at a specific location. - **CancelAllAction()**: Cancel all currently queued actions. - **CancelAction(action)**: Cancel a specific action. - **GetCurrentAction()**: Query the current active action. - **IsActiveActionType(type)**: Check if an action of a specific type is active. - **ActionIsEmpty()**: Check if the action queue is empty. ### Delegates - FAllActionFinishDelegate - FActionStartDelegate - FActionNotify ### Usage Examples - Basic action playing and cancellation. - Querying action states. ```