Ark Server API 3.54
Serverside plugin support for Ark Survival Evolved.
Loading...
Searching...
No Matches
ArkApi::IApiUtils Class Referenceabstract

#include <ArkApiUtils.h>

Inheritance diagram for ArkApi::IApiUtils:
ArkApi::ApiUtils AtlasApi::ApiUtils

Public Member Functions

virtual ~IApiUtils ()=default
 
virtual UWorldGetWorld () const =0
 Returns a pointer to UWorld.
 
virtual AShooterGameModeGetShooterGameMode () const =0
 Returns a pointer to AShooterGameMode.
 
virtual ServerStatus GetStatus () const =0
 Returns the current server status.
 
virtual UShooterCheatManagerGetCheatManager () const =0
 Returns a point to URCON CheatManager.
 
template<typename T , typename... Args>
FORCEINLINE void SendServerMessage (AShooterPlayerController *player_controller, FLinearColor msg_color, const T *msg, Args &&... args)
 Sends server message to the specific player. Using fmt::format.
 
template<typename T , typename... Args>
FORCEINLINE void SendNotification (AShooterPlayerController *player_controller, FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args)
 Sends notification (on-screen message) to the specific player. Using fmt::format.
 
template<typename T , typename... Args>
FORCEINLINE void SendChatMessage (AShooterPlayerController *player_controller, const FString &sender_name, const T *msg, Args &&... args)
 Sends chat message to the specific player. Using fmt::format.
 
template<typename T , typename... Args>
FORCEINLINE void SendServerMessageToAll (FLinearColor msg_color, const T *msg, Args &&... args)
 Sends server message to all players. Using fmt::format.
 
template<typename T , typename... Args>
FORCEINLINE void SendNotificationToAll (FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args)
 Sends notification (on-screen message) to all players. Using fmt::format.
 
template<typename T , typename... Args>
FORCEINLINE void SendChatMessageToAll (const FString &sender_name, const T *msg, Args &&... args)
 Sends chat message to all players. Using fmt::format.
 
FORCEINLINE AShooterPlayerControllerFindPlayerFromSteamName (const FString &steam_name) const
 Finds player from the given steam name.
 
FORCEINLINE AShooterPlayerControllerFindControllerFromCharacter (AShooterCharacter *character) const
 Finds player controller from the given player character.
 
FORCEINLINE TArray< AShooterPlayerController * > FindPlayerFromCharacterName (const FString &character_name, ESearchCase::Type search, bool full_match) const
 Finds all matching players from the given character name.
 
FORCEINLINE AShooterPlayerControllerFindPlayerFromSteamId (uint64 steam_id) const
 Finds player from the given steam id.
 
FORCEINLINE bool SpawnDrop (const wchar_t *blueprint, FVector pos, int amount, float item_quality=0.0f, bool force_blueprint=false, float life_span=0.0f) const
 Spawns an item drop.
 
FORCEINLINE APrimalDinoCharacterSpawnDino (AShooterPlayerController *player, FString blueprint, FVector *location, int lvl, bool force_tame, bool neutered) const
 Spawns a dino near player or at specific coordinates.
 
FORCEINLINE uint64 GetSteamIDForPlayerID (int player_id) const
 
FORCEINLINE AShooterGameStateGetGameState ()
 Get Shooter Game State.
 
FORCEINLINE UPrimalGameDataGetGameData ()
 Returns pointer to Primal Game Data.
 
FORCEINLINE TArray< AActor * > GetAllActorsInRange (FVector location, float radius, EServerOctreeGroup::Type ActorType)
 Gets all actors in radius at location.
 
FORCEINLINE TArray< AActor * > GetAllActorsInRange (FVector location, float radius, EServerOctreeGroup::Type ActorType, TArray< AActor * > ignores)
 Gets all actors in radius at location, with ignore actors.
 
FORCEINLINE MapCoords FVectorToCoords (FVector actor_position)
 Converts FVector into coords that are displayed when you view the ingame map.
 
FORCEINLINE uint64 GetAttackerSteamID (AActor *target, AController *killer, AActor *damage_causer, bool tribe_check=true)
 obtains the steam ID of an attacker, meant to be used in hooks such as TakeDamage
 
void RunHiddenCommand (AShooterPlayerController *_this, FString *Command)
 
virtual ~IApiUtils ()=default
 
virtual UWorldGetWorld () const =0
 Returns a pointer to UWorld.
 
virtual AShooterGameModeGetShooterGameMode () const =0
 Returns a pointer to AShooterGameMode.
 
virtual ServerStatus GetStatus () const =0
 Returns the current server status.
 
virtual UShooterCheatManagerGetCheatManager () const =0
 Returns a point to URCON CheatManager.
 
template<typename T , typename... Args>
void SendServerMessage (AShooterPlayerController *player_controller, FLinearColor msg_color, const T *msg, Args &&... args)
 Sends server message to the specific player. Using fmt::format.
 
template<typename T , typename... Args>
void SendNotification (AShooterPlayerController *player_controller, FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args)
 Sends notification (on-screen message) to the specific player. Using fmt::format.
 
template<typename T , typename... Args>
void SendChatMessage (AShooterPlayerController *player_controller, const FString &sender_name, const T *msg, Args &&... args)
 Sends chat message to the specific player. Using fmt::format.
 
template<typename T , typename... Args>
void SendServerMessageToAll (FLinearColor msg_color, const T *msg, Args &&... args)
 Sends server message to all players. Using fmt::format.
 
template<typename T , typename... Args>
void SendNotificationToAll (FLinearColor color, float display_scale, float display_time, UTexture2D *icon, const T *msg, Args &&... args)
 Sends notification (on-screen message) to all players. Using fmt::format.
 
template<typename T , typename... Args>
void SendChatMessageToAll (const FString &sender_name, const T *msg, Args &&... args)
 Sends chat message to all players. Using fmt::format.
 
AShooterPlayerControllerFindPlayerFromSteamName (const FString &steam_name) const
 Finds player from the given steam name.
 
AShooterPlayerControllerFindControllerFromCharacter (AShooterCharacter *character) const
 Finds player controller from the given player character.
 
TArray< AShooterPlayerController * > FindPlayerFromCharacterName (const FString &character_name, ESearchCase::Type search, bool full_match) const
 Finds all matching players from the given character name.
 
AShooterPlayerControllerFindPlayerFromSteamId (uint64 steam_id) const
 Finds player from the given steam id.
 
APrimalDinoCharacterSpawnDino (AShooterPlayerController *player, FString blueprint, FVector *location, int lvl, bool force_tame, bool neutered) const
 Spawns a dino near player or at specific coordinates.
 
uint64 GetSteamIDForPlayerID (int player_id) const
 
AShooterGameStateGetGameState ()
 Get Shooter Game State.
 
UPrimalGameDataGetGameData ()
 Returns pointer to Primal Game Data.
 
TArray< AActor * > GetAllActorsInRange (FVector location, float radius, EServerOctreeGroup::Type ActorType)
 Gets all actors in radius at location.
 
TArray< AActor * > GetAllActorsInRange (FVector location, float radius, EServerOctreeGroup::Type ActorType, TArray< AActor * > ignores)
 Gets all actors in radius at location, with ignore actors.
 

Static Public Member Functions

static FORCEINLINE uint64 GetSteamIdFromController (AController *controller)
 Returns Steam ID from player controller.
 
static FORCEINLINE FString GetCharacterName (AShooterPlayerController *player_controller)
 Returns the character name of player.
 
static FORCEINLINE FString GetSteamName (AController *player_controller)
 Returns the steam name of player.
 
static FORCEINLINE bool IsRidingDino (AShooterPlayerController *player_controller)
 Returns true if character is riding a dino, false otherwise.
 
static FORCEINLINE APrimalDinoCharacterGetRidingDino (AShooterPlayerController *player_controller)
 Returns the dino the character is riding.
 
static FORCEINLINE FVector GetPosition (APlayerController *player_controller)
 Returns the position of a player.
 
static FORCEINLINE std::optional< FStringTeleportToPlayer (AShooterPlayerController *me, AShooterPlayerController *him, bool check_for_dino, float max_dist)
 Teleport one player to another.
 
static FORCEINLINE bool TeleportToPos (AShooterPlayerController *player_controller, const FVector &pos)
 Teleports player to the given position.
 
static FORCEINLINE int GetInventoryItemCount (AShooterPlayerController *player_controller, const FString &item_name)
 Counts a specific items quantity.
 
static FORCEINLINE FString GetIPAddress (AShooterPlayerController *player)
 Returns IP address of player.
 
static FORCEINLINE FString GetItemBlueprint (UPrimalItem *item)
 Returns blueprint from UPrimalItem.
 
static FORCEINLINE bool IsPlayerDead (AShooterPlayerController *player)
 Returns true if player is dead, false otherwise.
 
static FORCEINLINE uint64 GetPlayerID (APrimalCharacter *character)
 
static FORCEINLINE uint64 GetPlayerID (AController *controller)
 
static FORCEINLINE FString GetBlueprint (UObjectBase *object)
 Returns blueprint path from any UObject.
 
static FORCEINLINE FString GetClassBlueprint (UClass *the_class)
 Returns blueprint path from any UClass.
 
static FORCEINLINE UShooterCheatManagerGetCheatManagerByPC (AShooterPlayerController *SPC)
 Get UShooterCheatManager* of player controller.
 
static FORCEINLINE int GetTribeID (AShooterPlayerController *player_controller)
 Get Tribe ID of player controller.
 
static FORCEINLINE int GetTribeID (AShooterCharacter *player_character)
 Get Tribe ID of character.
 
static uint64 GetSteamIdFromController (AController *controller)
 Returns Steam ID from player controller.
 
static FString GetCharacterName (AShooterPlayerController *player_controller, bool include_first_name=true, bool include_last_name=true)
 Returns the character name of player.
 
static FString GetSteamName (AController *player_controller)
 Returns the steam name of player.
 
static bool IsRidingDino (AShooterPlayerController *player_controller)
 Returns true if character is riding a dino, false otherwise.
 
static APrimalDinoCharacterGetRidingDino (AShooterPlayerController *player_controller)
 Returns the dino the character is riding.
 
static FVector GetPosition (APlayerController *player_controller)
 Returns the position of a player.
 
static std::optional< FStringTeleportToPlayer (AShooterPlayerController *me, AShooterPlayerController *him, bool check_for_dino, float max_dist)
 Teleport one player to another.
 
static bool TeleportToPos (AShooterPlayerController *player_controller, const FVector &pos)
 Teleports player to the given position.
 
static int GetInventoryItemCount (AShooterPlayerController *player_controller, const FString &item_name)
 Counts a specific items quantity.
 
static FString GetIPAddress (AShooterPlayerController *player_controller)
 Returns IP address of player.
 
static FORCEINLINE FString GetItemBlueprint (UPrimalItem *item)
 Returns blueprint from UPrimalItem.
 
static bool IsPlayerDead (AShooterPlayerController *player)
 Returns true if player is dead, false otherwise.
 
static uint64 GetPlayerID (APrimalCharacter *character)
 
static uint64 GetPlayerID (AController *controller)
 
static FORCEINLINE FString GetBlueprint (UObjectBase *object)
 Returns blueprint path from any UObject.
 
static FORCEINLINE FString GetClassBlueprint (UClass *the_class)
 Returns blueprint path from any UClass.
 
static UShooterCheatManagerGetCheatManagerByPC (AShooterPlayerController *SPC)
 Get UShooterCheatManager* of player controller.
 

Private Member Functions

virtual AShooterPlayerControllerFindPlayerFromSteamId_Internal (uint64 steam_id) const =0
 
virtual AShooterPlayerControllerFindPlayerFromSteamId_Internal (uint64 steam_id) const =0
 

Detailed Description

Definition at line 18 of file ArkApiUtils.h.

Constructor & Destructor Documentation

◆ ~IApiUtils() [1/2]

virtual ArkApi::IApiUtils::~IApiUtils ( )
virtualdefault

◆ ~IApiUtils() [2/2]

virtual ArkApi::IApiUtils::~IApiUtils ( )
virtualdefault

Member Function Documentation

◆ FindControllerFromCharacter() [1/2]

FORCEINLINE AShooterPlayerController * ArkApi::IApiUtils::FindControllerFromCharacter ( AShooterCharacter character) const
inline

Finds player controller from the given player character.

Parameters
characterPlayer character
Returns
Pointer to AShooterPlayerController

Definition at line 240 of file ArkApiUtils.h.

References AActor::GetInstigatorController(), APawn::GetOwnerController(), and APrimalCharacter::IsDead().

◆ FindControllerFromCharacter() [2/2]

AShooterPlayerController * ArkApi::IApiUtils::FindControllerFromCharacter ( AShooterCharacter character) const
inline

Finds player controller from the given player character.

Parameters
characterPlayer character
Returns
Pointer to AShooterPlayerController

Definition at line 248 of file AtlasApiUtils.h.

◆ FindPlayerFromCharacterName() [1/2]

FORCEINLINE TArray< AShooterPlayerController * > ArkApi::IApiUtils::FindPlayerFromCharacterName ( const FString character_name,
ESearchCase::Type  search,
bool  full_match 
) const
inline

Finds all matching players from the given character name.

Parameters
character_nameCharacter name
searchType Defaulted To ESearchCase::Type::IgnoreCase
full_matchWill match the full length of the string if true
Returns
Array of AShooterPlayerController*

Definition at line 263 of file ArkApiUtils.h.

References TArray< InElementType, InAllocator >::Add(), FString::Equals(), FString::IsEmpty(), and FString::StartsWith().

◆ FindPlayerFromCharacterName() [2/2]

TArray< AShooterPlayerController * > ArkApi::IApiUtils::FindPlayerFromCharacterName ( const FString character_name,
ESearchCase::Type  search,
bool  full_match 
) const
inline

Finds all matching players from the given character name.

Parameters
character_nameCharacter name
searchType Defaulted To ESearchCase::Type::IgnoreCase
full_matchWill match the full length of the string if true
Returns
Array of AShooterPlayerController*

Definition at line 274 of file AtlasApiUtils.h.

References TArray< InElementType, InAllocator >::Add(), FString::Equals(), FString::IsEmpty(), and FString::StartsWith().

◆ FindPlayerFromSteamId() [1/2]

FORCEINLINE AShooterPlayerController * ArkApi::IApiUtils::FindPlayerFromSteamId ( uint64  steam_id) const
inline

Finds player from the given steam id.

Parameters
steam_idSteam id
Returns
Pointer to AShooterPlayerController

Definition at line 316 of file ArkApiUtils.h.

◆ FindPlayerFromSteamId() [2/2]

AShooterPlayerController * ArkApi::IApiUtils::FindPlayerFromSteamId ( uint64  steam_id) const
inline

Finds player from the given steam id.

Parameters
steam_idSteam id
Returns
Pointer to AShooterPlayerController

Definition at line 341 of file AtlasApiUtils.h.

◆ FindPlayerFromSteamId_Internal() [1/2]

virtual AShooterPlayerController * ArkApi::IApiUtils::FindPlayerFromSteamId_Internal ( uint64  steam_id) const
privatepure virtual

Implemented in ArkApi::ApiUtils, and AtlasApi::ApiUtils.

◆ FindPlayerFromSteamId_Internal() [2/2]

virtual AShooterPlayerController * ArkApi::IApiUtils::FindPlayerFromSteamId_Internal ( uint64  steam_id) const
privatepure virtual

Implemented in ArkApi::ApiUtils, and AtlasApi::ApiUtils.

◆ FindPlayerFromSteamName() [1/2]

FORCEINLINE AShooterPlayerController * ArkApi::IApiUtils::FindPlayerFromSteamName ( const FString steam_name) const
inline

Finds player from the given steam name.

Parameters
steam_nameSteam name
Returns
Pointer to AShooterPlayerController

Definition at line 215 of file ArkApiUtils.h.

◆ FindPlayerFromSteamName() [2/2]

AShooterPlayerController * ArkApi::IApiUtils::FindPlayerFromSteamName ( const FString steam_name) const
inline

Finds player from the given steam name.

Parameters
steam_nameSteam name
Returns
Pointer to AShooterPlayerController

Definition at line 223 of file AtlasApiUtils.h.

◆ FVectorToCoords()

FORCEINLINE MapCoords ArkApi::IApiUtils::FVectorToCoords ( FVector  actor_position)
inline

◆ GetAllActorsInRange() [1/4]

FORCEINLINE TArray< AActor * > ArkApi::IApiUtils::GetAllActorsInRange ( FVector  location,
float  radius,
EServerOctreeGroup::Type  ActorType 
)
inline

Gets all actors in radius at location.

Definition at line 721 of file ArkApiUtils.h.

References UVictoryCore::ServerOctreeOverlapActors().

◆ GetAllActorsInRange() [2/4]

TArray< AActor * > ArkApi::IApiUtils::GetAllActorsInRange ( FVector  location,
float  radius,
EServerOctreeGroup::Type  ActorType 
)
inline

Gets all actors in radius at location.

Definition at line 704 of file AtlasApiUtils.h.

References UVictoryCore::ServerOctreeOverlapActors().

◆ GetAllActorsInRange() [3/4]

FORCEINLINE TArray< AActor * > ArkApi::IApiUtils::GetAllActorsInRange ( FVector  location,
float  radius,
EServerOctreeGroup::Type  ActorType,
TArray< AActor * >  ignores 
)
inline

Gets all actors in radius at location, with ignore actors.

Definition at line 733 of file ArkApiUtils.h.

References TArray< InElementType, InAllocator >::Remove(), and UVictoryCore::ServerOctreeOverlapActors().

◆ GetAllActorsInRange() [4/4]

TArray< AActor * > ArkApi::IApiUtils::GetAllActorsInRange ( FVector  location,
float  radius,
EServerOctreeGroup::Type  ActorType,
TArray< AActor * >  ignores 
)
inline

Gets all actors in radius at location, with ignore actors.

Definition at line 716 of file AtlasApiUtils.h.

References TArray< InElementType, InAllocator >::Remove(), and UVictoryCore::ServerOctreeOverlapActors().

◆ GetAttackerSteamID()

FORCEINLINE uint64 ArkApi::IApiUtils::GetAttackerSteamID ( AActor target,
AController killer,
AActor damage_causer,
bool  tribe_check = true 
)
inline

obtains the steam ID of an attacker, meant to be used in hooks such as TakeDamage

Parameters
tribe_checkif set to true will return NULL if the target is from the same tribe as the attacker

Definition at line 776 of file ArkApiUtils.h.

References APrimalStructureExplosive::ConstructorPlayerDataIDField(), AShooterPlayerController::GetPrivateStaticClass(), UObjectBaseUtility::IsA(), AController::IsLocalController(), APrimalStructureExplosive::StaticClass(), and AActor::TargetingTeamField().

◆ GetBlueprint() [1/2]

static FORCEINLINE FString ArkApi::IApiUtils::GetBlueprint ( UObjectBase object)
inlinestatic

Returns blueprint path from any UObject.

Definition at line 629 of file ArkApiUtils.h.

◆ GetBlueprint() [2/2]

static FORCEINLINE FString ArkApi::IApiUtils::GetBlueprint ( UObjectBase object)
inlinestatic

Returns blueprint path from any UObject.

Definition at line 632 of file AtlasApiUtils.h.

◆ GetCharacterName() [1/2]

static FORCEINLINE FString ArkApi::IApiUtils::GetCharacterName ( AShooterPlayerController player_controller)
inlinestatic

Returns the character name of player.

Parameters
player_controllerPlayer

Definition at line 290 of file ArkApiUtils.h.

References AShooterPlayerController::GetPlayerCharacterName().

◆ GetCharacterName() [2/2]

static FString ArkApi::IApiUtils::GetCharacterName ( AShooterPlayerController player_controller,
bool  include_first_name = true,
bool  include_last_name = true 
)
inlinestatic

Returns the character name of player.

Parameters
player_controllerPlayer

Definition at line 301 of file AtlasApiUtils.h.

References FString::FindLastChar(), FString::Len(), FString::Mid(), and AController::PlayerStateField().

◆ GetCheatManager() [1/2]

virtual UShooterCheatManager * ArkApi::IApiUtils::GetCheatManager ( ) const
pure virtual

Returns a point to URCON CheatManager.

Implemented in ArkApi::ApiUtils, and AtlasApi::ApiUtils.

◆ GetCheatManager() [2/2]

virtual UShooterCheatManager * ArkApi::IApiUtils::GetCheatManager ( ) const
pure virtual

Returns a point to URCON CheatManager.

Implemented in ArkApi::ApiUtils, and AtlasApi::ApiUtils.

◆ GetCheatManagerByPC() [1/2]

static FORCEINLINE UShooterCheatManager * ArkApi::IApiUtils::GetCheatManagerByPC ( AShooterPlayerController SPC)
inlinestatic

Get UShooterCheatManager* of player controller.

Definition at line 665 of file ArkApiUtils.h.

References APlayerController::CheatManagerField().

◆ GetCheatManagerByPC() [2/2]

static UShooterCheatManager * ArkApi::IApiUtils::GetCheatManagerByPC ( AShooterPlayerController SPC)
inlinestatic

Get UShooterCheatManager* of player controller.

Definition at line 678 of file AtlasApiUtils.h.

References APlayerController::CheatManagerField().

◆ GetClassBlueprint() [1/2]

static FORCEINLINE FString ArkApi::IApiUtils::GetClassBlueprint ( UClass the_class)
inlinestatic

Returns blueprint path from any UClass.

Definition at line 642 of file ArkApiUtils.h.

References UVictoryCore::ClassToStringReference(), and FString::LeftChop().

◆ GetClassBlueprint() [2/2]

static FORCEINLINE FString ArkApi::IApiUtils::GetClassBlueprint ( UClass the_class)
inlinestatic

◆ GetGameData() [1/2]

FORCEINLINE UPrimalGameData * ArkApi::IApiUtils::GetGameData ( )
inline

Returns pointer to Primal Game Data.

Definition at line 712 of file ArkApiUtils.h.

References Globals::GEngine(), UPrimalGlobals::PrimalGameDataField(), and UPrimalGlobals::PrimalGameDataOverrideField().

◆ GetGameData() [2/2]

UPrimalGameData * ArkApi::IApiUtils::GetGameData ( )
inline

Returns pointer to Primal Game Data.

Definition at line 695 of file AtlasApiUtils.h.

References Globals::GEngine(), UPrimalGlobals::PrimalGameDataField(), and UPrimalGlobals::PrimalGameDataOverrideField().

◆ GetGameState() [1/2]

FORCEINLINE AShooterGameState * ArkApi::IApiUtils::GetGameState ( )
inline

Get Shooter Game State.

Definition at line 657 of file ArkApiUtils.h.

◆ GetGameState() [2/2]

AShooterGameState * ArkApi::IApiUtils::GetGameState ( )
inline

Get Shooter Game State.

Definition at line 670 of file AtlasApiUtils.h.

◆ GetInventoryItemCount() [1/2]

static FORCEINLINE int ArkApi::IApiUtils::GetInventoryItemCount ( AShooterPlayerController player_controller,
const FString item_name 
)
inlinestatic

Counts a specific items quantity.

Parameters
player_controllerPlayer
item_nameThe name of the item you want to count the quantity of
Returns
On success, the function returns amount of items player has. Returns -1 if the function has failed.

Definition at line 531 of file ArkApiUtils.h.

References FString::Equals(), AShooterPlayerController::GetPlayerCharacter(), ESearchCase::IgnoreCase, UPrimalInventoryComponent::InventoryItemsField(), and APrimalCharacter::MyInventoryComponentField().

◆ GetInventoryItemCount() [2/2]

static int ArkApi::IApiUtils::GetInventoryItemCount ( AShooterPlayerController player_controller,
const FString item_name 
)
inlinestatic

Counts a specific items quantity.

Parameters
player_controllerPlayer
item_nameThe name of the item you want to count the quantity of
Returns
On success, the function returns amount of items player has. Returns -1 if the function has failed.

Definition at line 526 of file AtlasApiUtils.h.

References FString::Equals(), AShooterPlayerController::GetPlayerCharacter(), ESearchCase::IgnoreCase, UPrimalInventoryComponent::InventoryItemsField(), and APrimalCharacter::MyInventoryComponentField().

◆ GetIPAddress() [1/2]

static FORCEINLINE FString ArkApi::IApiUtils::GetIPAddress ( AShooterPlayerController player)
inlinestatic

Returns IP address of player.

Definition at line 564 of file ArkApiUtils.h.

References UNetConnection::ClientGivenIPField(), APlayerController::GetNetConnection(), and FString::IsEmpty().

◆ GetIPAddress() [2/2]

static FString ArkApi::IApiUtils::GetIPAddress ( AShooterPlayerController player_controller)
inlinestatic

Returns IP address of player.

Definition at line 559 of file AtlasApiUtils.h.

References APlayerController::GetPlayerNetworkAddress().

◆ GetItemBlueprint() [1/2]

static FORCEINLINE FString ArkApi::IApiUtils::GetItemBlueprint ( UPrimalItem item)
inlinestatic

Returns blueprint from UPrimalItem.

Definition at line 572 of file ArkApiUtils.h.

◆ GetItemBlueprint() [2/2]

static FORCEINLINE FString ArkApi::IApiUtils::GetItemBlueprint ( UPrimalItem item)
inlinestatic

Returns blueprint from UPrimalItem.

Definition at line 569 of file AtlasApiUtils.h.

◆ GetPlayerID() [1/4]

static FORCEINLINE uint64 ArkApi::IApiUtils::GetPlayerID ( AController controller)
inlinestatic

Definition at line 598 of file ArkApiUtils.h.

References AShooterPlayerController::LinkedPlayerIDField().

◆ GetPlayerID() [2/4]

static uint64 ArkApi::IApiUtils::GetPlayerID ( AController controller)
inlinestatic

Definition at line 600 of file AtlasApiUtils.h.

References AShooterPlayerController::LinkedPlayerIDField().

◆ GetPlayerID() [3/4]

static FORCEINLINE uint64 ArkApi::IApiUtils::GetPlayerID ( APrimalCharacter character)
inlinestatic

◆ GetPlayerID() [4/4]

static uint64 ArkApi::IApiUtils::GetPlayerID ( APrimalCharacter character)
inlinestatic

◆ GetPosition() [1/2]

static FORCEINLINE FVector ArkApi::IApiUtils::GetPosition ( APlayerController player_controller)
inlinestatic

Returns the position of a player.

Parameters
player_controllerPlayer
Returns
FVector

Definition at line 468 of file ArkApiUtils.h.

References AActor::DefaultActorLocationField().

◆ GetPosition() [2/2]

static FVector ArkApi::IApiUtils::GetPosition ( APlayerController player_controller)
inlinestatic

Returns the position of a player.

Parameters
player_controllerPlayer
Returns
FVector

Definition at line 459 of file AtlasApiUtils.h.

References USceneComponent::GetWorldLocation(), and AActor::RootComponentField().

◆ GetRidingDino() [1/2]

static FORCEINLINE APrimalDinoCharacter * ArkApi::IApiUtils::GetRidingDino ( AShooterPlayerController player_controller)
inlinestatic

Returns the dino the character is riding.

Parameters
player_controllerPlayer
Returns
APrimalDinoCharacter*

Definition at line 456 of file ArkApiUtils.h.

References AShooterPlayerController::GetPlayerCharacter(), and AShooterCharacter::GetRidingDino().

◆ GetRidingDino() [2/2]

static APrimalDinoCharacter * ArkApi::IApiUtils::GetRidingDino ( AShooterPlayerController player_controller)
inlinestatic

Returns the dino the character is riding.

Parameters
player_controllerPlayer
Returns
APrimalDinoCharacter*

Definition at line 447 of file AtlasApiUtils.h.

References AShooterPlayerController::GetPlayerCharacter(), and AShooterCharacter::GetRidingDino().

◆ GetShooterGameMode() [1/2]

virtual AShooterGameMode * ArkApi::IApiUtils::GetShooterGameMode ( ) const
pure virtual

Returns a pointer to AShooterGameMode.

Implemented in ArkApi::ApiUtils, and AtlasApi::ApiUtils.

Referenced by API::PluginManager::DetectPluginChanges().

◆ GetShooterGameMode() [2/2]

virtual AShooterGameMode * ArkApi::IApiUtils::GetShooterGameMode ( ) const
pure virtual

Returns a pointer to AShooterGameMode.

Implemented in ArkApi::ApiUtils, and AtlasApi::ApiUtils.

◆ GetStatus() [1/2]

virtual ServerStatus ArkApi::IApiUtils::GetStatus ( ) const
pure virtual

Returns the current server status.

Implemented in ArkApi::ApiUtils, and AtlasApi::ApiUtils.

◆ GetStatus() [2/2]

virtual ServerStatus ArkApi::IApiUtils::GetStatus ( ) const
pure virtual

Returns the current server status.

Implemented in ArkApi::ApiUtils, and AtlasApi::ApiUtils.

◆ GetSteamIDForPlayerID() [1/2]

FORCEINLINE uint64 ArkApi::IApiUtils::GetSteamIDForPlayerID ( int  player_id) const
inline

Definition at line 604 of file ArkApiUtils.h.

References AShooterPlayerController::GetUniqueNetIdAsUINT64().

◆ GetSteamIDForPlayerID() [2/2]

uint64 ArkApi::IApiUtils::GetSteamIDForPlayerID ( int  player_id) const
inline

Definition at line 606 of file AtlasApiUtils.h.

◆ GetSteamIdFromController() [1/2]

static FORCEINLINE uint64 ArkApi::IApiUtils::GetSteamIdFromController ( AController controller)
inlinestatic

◆ GetSteamIdFromController() [2/2]

static uint64 ArkApi::IApiUtils::GetSteamIdFromController ( AController controller)
inlinestatic

◆ GetSteamName() [1/2]

static FORCEINLINE FString ArkApi::IApiUtils::GetSteamName ( AController player_controller)
inlinestatic

Returns the steam name of player.

Parameters
player_controllerPlayer

Definition at line 306 of file ArkApiUtils.h.

References APlayerState::PlayerNameField(), and AController::PlayerStateField().

◆ GetSteamName() [2/2]

static FString ArkApi::IApiUtils::GetSteamName ( AController player_controller)
inlinestatic

Returns the steam name of player.

Parameters
player_controllerPlayer

Definition at line 331 of file AtlasApiUtils.h.

References APlayerState::PlayerNameField(), and AController::PlayerStateField().

◆ GetTribeID() [1/2]

static FORCEINLINE int ArkApi::IApiUtils::GetTribeID ( AShooterCharacter player_character)
inlinestatic

Get Tribe ID of character.

Definition at line 697 of file ArkApiUtils.h.

References AActor::TargetingTeamField().

◆ GetTribeID() [2/2]

static FORCEINLINE int ArkApi::IApiUtils::GetTribeID ( AShooterPlayerController player_controller)
inlinestatic

Get Tribe ID of player controller.

Definition at line 682 of file ArkApiUtils.h.

References AActor::TargetingTeamField().

◆ GetWorld() [1/2]

virtual UWorld * ArkApi::IApiUtils::GetWorld ( ) const
pure virtual

◆ GetWorld() [2/2]

virtual UWorld * ArkApi::IApiUtils::GetWorld ( ) const
pure virtual

Returns a pointer to UWorld.

Implemented in ArkApi::ApiUtils, and AtlasApi::ApiUtils.

◆ IsPlayerDead() [1/2]

static FORCEINLINE bool ArkApi::IApiUtils::IsPlayerDead ( AShooterPlayerController player)
inlinestatic

Returns true if player is dead, false otherwise.

Definition at line 580 of file ArkApiUtils.h.

References AShooterPlayerController::GetPlayerCharacter(), and APrimalCharacter::IsDead().

◆ IsPlayerDead() [2/2]

static bool ArkApi::IApiUtils::IsPlayerDead ( AShooterPlayerController player)
inlinestatic

Returns true if player is dead, false otherwise.

Definition at line 582 of file AtlasApiUtils.h.

References AShooterPlayerController::GetPlayerCharacter(), and APrimalCharacter::IsDead().

◆ IsRidingDino() [1/2]

static FORCEINLINE bool ArkApi::IApiUtils::IsRidingDino ( AShooterPlayerController player_controller)
inlinestatic

Returns true if character is riding a dino, false otherwise.

Parameters
player_controllerPlayer

Definition at line 445 of file ArkApiUtils.h.

References AShooterPlayerController::GetPlayerCharacter(), and AShooterCharacter::GetRidingDino().

◆ IsRidingDino() [2/2]

static bool ArkApi::IApiUtils::IsRidingDino ( AShooterPlayerController player_controller)
inlinestatic

Returns true if character is riding a dino, false otherwise.

Parameters
player_controllerPlayer

Definition at line 436 of file AtlasApiUtils.h.

References AShooterPlayerController::GetPlayerCharacter(), and AShooterCharacter::GetRidingDino().

◆ RunHiddenCommand()

void ArkApi::IApiUtils::RunHiddenCommand ( AShooterPlayerController _this,
FString Command 
)
inline

Definition at line 796 of file ArkApiUtils.h.

References AShooterPlayerController::ConsoleCommand(), and HideCommand.

◆ SendChatMessage() [1/2]

template<typename T , typename... Args>
FORCEINLINE void ArkApi::IApiUtils::SendChatMessage ( AShooterPlayerController player_controller,
const FString sender_name,
const T *  msg,
Args &&...  args 
)
inline

Sends chat message to the specific player. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
player_controllerPlayer
sender_nameName of the sender
msgMessage
argsOptional arguments

Definition at line 97 of file ArkApiUtils.h.

References AShooterPlayerController::ClientChatMessage(), FString::Format(), FChatMessage::Message, and FChatMessage::SenderName.

◆ SendChatMessage() [2/2]

template<typename T , typename... Args>
void ArkApi::IApiUtils::SendChatMessage ( AShooterPlayerController player_controller,
const FString sender_name,
const T *  msg,
Args &&...  args 
)
inline

Sends chat message to the specific player. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
player_controllerPlayer
sender_nameName of the sender
msgMessage
argsOptional arguments

Definition at line 90 of file AtlasApiUtils.h.

References AShooterPlayerController::ClientChatMessage(), FString::Format(), FChatMessage::Message, and FChatMessage::SenderName.

◆ SendChatMessageToAll() [1/2]

template<typename T , typename... Args>
FORCEINLINE void ArkApi::IApiUtils::SendChatMessageToAll ( const FString sender_name,
const T *  msg,
Args &&...  args 
)
inline

Sends chat message to all players. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
sender_nameName of the sender
msgMessage
argsOptional arguments

Definition at line 175 of file ArkApiUtils.h.

References AShooterPlayerController::ClientChatMessage(), FString::Format(), FChatMessage::Message, and FChatMessage::SenderName.

◆ SendChatMessageToAll() [2/2]

template<typename T , typename... Args>
void ArkApi::IApiUtils::SendChatMessageToAll ( const FString sender_name,
const T *  msg,
Args &&...  args 
)
inline

Sends chat message to all players. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
sender_nameName of the sender
msgMessage
argsOptional arguments

Definition at line 168 of file AtlasApiUtils.h.

References AShooterPlayerController::ClientChatMessage(), FString::Format(), FChatMessage::Message, and FChatMessage::SenderName.

◆ SendNotification() [1/2]

template<typename T , typename... Args>
FORCEINLINE void ArkApi::IApiUtils::SendNotification ( AShooterPlayerController player_controller,
FLinearColor  color,
float  display_scale,
float  display_time,
UTexture2D icon,
const T *  msg,
Args &&...  args 
)
inline

Sends notification (on-screen message) to the specific player. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
player_controllerPlayer
colorMessage color
display_scaleSize of text
display_timeDisplay time
iconMessage icon (optional)
msgMessage
argsOptional arguments

Definition at line 75 of file ArkApiUtils.h.

References AShooterPlayerController::ClientServerSOTFNotificationCustom(), and FString::Format().

◆ SendNotification() [2/2]

template<typename T , typename... Args>
void ArkApi::IApiUtils::SendNotification ( AShooterPlayerController player_controller,
FLinearColor  color,
float  display_scale,
float  display_time,
UTexture2D icon,
const T *  msg,
Args &&...  args 
)
inline

Sends notification (on-screen message) to the specific player. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
player_controllerPlayer
colorMessage color
display_scaleSize of text
display_timeDisplay time
iconMessage icon (optional)
msgMessage
argsOptional arguments

Definition at line 68 of file AtlasApiUtils.h.

References AShooterPlayerController::ClientServerSOTFNotificationCustom(), and FString::Format().

◆ SendNotificationToAll() [1/2]

template<typename T , typename... Args>
FORCEINLINE void ArkApi::IApiUtils::SendNotificationToAll ( FLinearColor  color,
float  display_scale,
float  display_time,
UTexture2D icon,
const T *  msg,
Args &&...  args 
)
inline

Sends notification (on-screen message) to all players. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
colorMessage color
display_scaleSize of text
display_timeDisplay time
iconMessage icon (optional)
msgMessage
argsOptional arguments

Definition at line 149 of file ArkApiUtils.h.

References FString::Format().

◆ SendNotificationToAll() [2/2]

template<typename T , typename... Args>
void ArkApi::IApiUtils::SendNotificationToAll ( FLinearColor  color,
float  display_scale,
float  display_time,
UTexture2D icon,
const T *  msg,
Args &&...  args 
)
inline

Sends notification (on-screen message) to all players. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
colorMessage color
display_scaleSize of text
display_timeDisplay time
iconMessage icon (optional)
msgMessage
argsOptional arguments

Definition at line 142 of file AtlasApiUtils.h.

References FString::Format().

◆ SendServerMessage() [1/2]

template<typename T , typename... Args>
FORCEINLINE void ArkApi::IApiUtils::SendServerMessage ( AShooterPlayerController player_controller,
FLinearColor  msg_color,
const T *  msg,
Args &&...  args 
)
inline

Sends server message to the specific player. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
player_controllerPlayer
msg_colorMessage color
msgMessage
argsOptional arguments

Definition at line 52 of file ArkApiUtils.h.

References AShooterPlayerController::ClientServerChatDirectMessage(), and FString::Format().

Referenced by API::ArkBaseApi::LoadPluginCmd(), API::AtlasBaseApi::LoadPluginCmd(), API::ArkBaseApi::UnloadPluginCmd(), and API::AtlasBaseApi::UnloadPluginCmd().

◆ SendServerMessage() [2/2]

template<typename T , typename... Args>
void ArkApi::IApiUtils::SendServerMessage ( AShooterPlayerController player_controller,
FLinearColor  msg_color,
const T *  msg,
Args &&...  args 
)
inline

Sends server message to the specific player. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
player_controllerPlayer
msg_colorMessage color
msgMessage
argsOptional arguments

Definition at line 45 of file AtlasApiUtils.h.

References AShooterPlayerController::ClientServerChatDirectMessage(), and FString::Format().

◆ SendServerMessageToAll() [1/2]

template<typename T , typename... Args>
FORCEINLINE void ArkApi::IApiUtils::SendServerMessageToAll ( FLinearColor  msg_color,
const T *  msg,
Args &&...  args 
)
inline

Sends server message to all players. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
msg_colorMessage color
msgMessage
argsOptional arguments

Definition at line 121 of file ArkApiUtils.h.

References AShooterPlayerController::ClientServerChatDirectMessage(), and FString::Format().

◆ SendServerMessageToAll() [2/2]

template<typename T , typename... Args>
void ArkApi::IApiUtils::SendServerMessageToAll ( FLinearColor  msg_color,
const T *  msg,
Args &&...  args 
)
inline

Sends server message to all players. Using fmt::format.

Template Parameters
TEither a a char or wchar_t
ArgsOptional arguments types
Parameters
msg_colorMessage color
msgMessage
argsOptional arguments

Definition at line 114 of file AtlasApiUtils.h.

References AShooterPlayerController::ClientServerChatDirectMessage(), and FString::Format().

◆ SpawnDino() [1/2]

FORCEINLINE APrimalDinoCharacter * ArkApi::IApiUtils::SpawnDino ( AShooterPlayerController player,
FString  blueprint,
FVector location,
int  lvl,
bool  force_tame,
bool  neutered 
) const
inline

Spawns a dino near player or at specific coordinates.

Parameters
playerPlayer. If null, random player will be chosen. At least one player should be on the map
blueprintBlueprint path
locationSpawn position. If null, dino will be spawned near player
lvlLevel of the dino
force_tameForce tame
neuteredNeuter dino
Returns
Spawned dino or null

Definition at line 387 of file ArkApiUtils.h.

References APrimalDinoCharacter::GetPrivateStaticClass(), UObjectBaseUtility::IsA(), FVector::IsZero(), AController::PlayerStateField(), AShooterPlayerController::SpawnActor(), and AActor::TargetingTeamField().

◆ SpawnDino() [2/2]

APrimalDinoCharacter * ArkApi::IApiUtils::SpawnDino ( AShooterPlayerController player,
FString  blueprint,
FVector location,
int  lvl,
bool  force_tame,
bool  neutered 
) const
inline

Spawns a dino near player or at specific coordinates.

Parameters
playerPlayer. If null, random player will be chosen. At least one player should be on the map
blueprintBlueprint path
locationSpawn position. If null, dino will be spawned near player
lvlLevel of the dino
force_tameForce tame
neuteredNeuter dino
Returns
Spawned dino or null

Definition at line 378 of file AtlasApiUtils.h.

References APrimalDinoCharacter::GetPrivateStaticClass(), UObjectBaseUtility::IsA(), FVector::IsZero(), AController::PlayerStateField(), AShooterPlayerController::SpawnActor(), and AActor::TargetingTeamField().

◆ SpawnDrop()

FORCEINLINE bool ArkApi::IApiUtils::SpawnDrop ( const wchar_t *  blueprint,
FVector  pos,
int  amount,
float  item_quality = 0.0f,
bool  force_blueprint = false,
float  life_span = 0.0f 
) const
inline

Spawns an item drop.

Parameters
blueprintItem simplified BP Example: '/Game/PrimalEarth/CoreBlueprints/Items/Armor/Riot/PrimalItemArmor_RiotPants.PrimalItemArmor_RiotPants_C'
posSpawn position
amountQuantity
item_qualityQuality
force_blueprintIs blueprint
life_spanLife span
Returns
Returns true if drop was spawned, false otherwise

Definition at line 332 of file ArkApiUtils.h.

References UPrimalItem::AddNewItem(), FMemory::Free(), UPrimalItem::GetItemNetInfo(), FMemory::Malloc(), UObject::StaticClass(), UPrimalInventoryComponent::StaticDropItem(), Globals::StaticLoadObject(), and TSubclassOf< T >::uClass.

◆ TeleportToPlayer() [1/2]

static FORCEINLINE std::optional< FString > ArkApi::IApiUtils::TeleportToPlayer ( AShooterPlayerController me,
AShooterPlayerController him,
bool  check_for_dino,
float  max_dist 
)
inlinestatic

Teleport one player to another.

Parameters
mePlayer
himOther Player
check_for_dinoIf set true prevents players teleporting with dino's or teleporting to a player on a dino
max_distIs the max distance the characters can be away from each other -1 is disabled

Definition at line 480 of file ArkApiUtils.h.

References AActor::DefaultActorLocationField(), FVector::Distance(), AShooterPlayerController::GetPlayerCharacter(), APrimalCharacter::IsDead(), AShooterPlayerController::SetPlayerPos(), FVector::X, FVector::Y, and FVector::Z.

◆ TeleportToPlayer() [2/2]

static std::optional< FString > ArkApi::IApiUtils::TeleportToPlayer ( AShooterPlayerController me,
AShooterPlayerController him,
bool  check_for_dino,
float  max_dist 
)
inlinestatic

Teleport one player to another.

Parameters
mePlayer
himOther Player
check_for_dinoIf set true prevents players teleporting with dino's or teleporting to a player on a dino
max_distIs the max distance the characters can be away from each other -1 is disabled

Definition at line 475 of file AtlasApiUtils.h.

References AActor::DefaultActorLocationField(), FVector::Distance(), AShooterPlayerController::GetPlayerCharacter(), APrimalCharacter::IsDead(), AShooterPlayerController::SetPlayerPos(), FVector::X, FVector::Y, and FVector::Z.

◆ TeleportToPos() [1/2]

static FORCEINLINE bool ArkApi::IApiUtils::TeleportToPos ( AShooterPlayerController player_controller,
const FVector pos 
)
inlinestatic

Teleports player to the given position.

Parameters
player_controllerPlayer
posNew position

Definition at line 514 of file ArkApiUtils.h.

References AShooterPlayerController::SetPlayerPos(), FVector::X, FVector::Y, and FVector::Z.

◆ TeleportToPos() [2/2]

static bool ArkApi::IApiUtils::TeleportToPos ( AShooterPlayerController player_controller,
const FVector pos 
)
inlinestatic

Teleports player to the given position.

Parameters
player_controllerPlayer
posNew position

Definition at line 509 of file AtlasApiUtils.h.

References AShooterPlayerController::SetPlayerPos(), FVector::X, FVector::Y, and FVector::Z.


The documentation for this class was generated from the following files: