7#define ARK_API __declspec(dllexport)
9#define ARK_API __declspec(dllimport)
76struct UObjectSerializer;
105struct UMaterialInterface;
110struct FMinimalViewInfo;
128struct UPaintingTexture;
129struct APrimalStructureExplosiveTransGPS;
130struct ITargetableInterface;
136struct UAudioComponent;
141struct ASpectatorPawn;
142struct APlayerCameraManager;
143struct UAntiDupeTransactionLog;
147struct UPrimalLocalProfile;
148struct UPrimalBuffPersistentData;
150struct FDinoExtraDefaultItemList;
157struct APrimalStructurePlacer;
163struct FCollisionResponseSet;
236struct ADirectionalLight;
238struct ADestroyedMeshActor;
240struct ALevelScriptActor;
241struct ADayCycleManager;
242struct ASOTFNotification;
244struct AShipPathManager;
245struct AOceanDinoManager;
249struct APrimalStructureWaterPipe;
250struct APrimalStructureClaimFlag;
254struct ADroppedItemLowQuality;
258struct FComponentBeginOverlapSignature;
259struct FComponentEndOverlapSignature;
260struct FComponentBeginCursorOverSignature;
261struct FComponentEndCursorOverSignature;
262struct FComponentOnClickedSignature;
263struct FComponentOnReleasedSignature;
264struct FComponentOnInputTouchBeginSignature;
265struct FComponentOnInputTouchEndSignature;
266struct FComponentBeginTouchOverSignature;
267struct FComponentEndTouchOverSignature;
268struct FWalkableSlopeOverride;
270struct FNetworkPredictionData_Client;
271struct FNetworkPredictionData_Client_Character;
272struct FNetworkPredictionData_Server;
273struct FNetworkPredictionData_Server_Character;
274struct FStoredMoveData;
278struct FAsyncSharedLogCleanup;
279struct FQualityTierCraftingResourceRequirements;
281struct FStatColorMapping;
282struct FItemStatGroupValue;
286struct FShorelineProps;
287struct FShorelineMetadata;
288struct FAtlasSaveObjectData;
289struct FOctreeElementSimple;
292struct FGameNameRedirect;
293struct FClassRedirect;
294struct FPluginRedirect;
295struct FStructRedirect;
297struct FRigidBodyErrorCorrection;
298struct FScreenMessageString;
300struct FRunnableThread;
301struct FScreenSaverInhibitor;
302struct FNetDriverDefinition;
305struct FHardwareSurveyResults;
322struct FSeamlessTravelHandler;
324struct FStreamableManager;
325struct FTribeNotification;
326struct FQueuedThreadPool;
328struct FEngramEntryOverride;
329struct FEngramEntryAutoUnlock;
330struct FDinoSpawnWeightMultiplier;
331struct FClassMultiplier;
333struct FItemCraftingCostOverride;
334struct FConfigItemCraftingCostOverride;
335struct FConfigSupplyCrateItemsOverride;
336struct FConfigNPCSpawnEntriesContainer;
338struct FSeamlessTravelPlayerData;
339struct FTickCallbacks;
340struct FGridCellServerInfo;
341struct FRegionGeneralOverrides;
342struct FDisciplineDefinition;
343struct FShipTypeDisplayInformation;
344struct FBonePresetSlider;
345struct FAdvancedBoneModifierSlider;
346struct FSoilTypeDescription;
348struct FSoilTypeRegionMapping;
349struct FReplicatedFoliageOverride;
350struct FTransformedSubLevel;
351struct FAsyncUpdatableTexture2D;
352struct FOnHTTPGetProcessed;
353struct FOnHTTPPostResponse;
354struct FPlayerLocatorEffectMap;
355struct FGlobalGameplaySetup;
362struct FMatineeActorFinished;
363struct FMatineeActorStopped;
364struct FOrderingGroupInfo;
368struct FSlotAnimationTrack;
369struct FInstalledItemInfo;
370struct FShooterSessionData;
371struct FShooterGameSessionParams;
372struct FShooterOnlineSessionSettings;
373struct FShooterOnlineSearchSettings;
374struct FOnlineSessionSearchResult;
375struct FMemoryArchive;
380struct FCustomVersion;
381struct FCustomVersionContainer;
383struct FAttachmentPoint;
385struct FShownTreasureData;
387struct FDodgeMovementInfo;
393struct FExplorerNoteEntry;
394struct FExplorerNoteAchievement;
395struct FMultiAchievement;
396struct FClassRemapping;
397struct FClassAddition;
401struct FObjectCorrelation;
402struct FHairStyleDefinition;
403struct FNamedTeamDefinition;
404struct FTutorialDefinition;
405struct FColorDefinition;
407struct FDebugFloatHistory;
408struct FPubSub_TribeNotification_Chat;
409struct FFloatingTextEntry;
411struct FDefaultItemEntry;
412struct FDiscoveredZone;
416struct FPlayerCharacterGenderDefinition;
420struct FPenetrationTraceHit;
422struct FRecoveryRateOverride;
424struct FDamagePrimalCharacterStatusValueModifier;
425struct FMaxStatScaler;
426struct FPrimalCharacterNotifyAttackStarted;
427struct FPrimalCharacterNotifyAttackEnded;
428struct FPrimalStructureSnapPointOverride;
430struct FPrimalCharacterStatusValueDefinition;
432struct FPrimalItemStatDefinition;
433struct FPrimalItemDefinition;
434struct FPrimalEquipmentDefinition;
435struct FPrimalItemQuality;
436struct FPrimalStatGroupDefinition;
439struct FEngramEntries;
440struct FEngramItemEntry;
441struct FEngramBuffEntry;
442struct FEngramStatEntry;
444struct FPostProcessMaterialAdjuster;
446struct FItemSlotTypeDefinition;
447struct FInventoryComponentDefaultItemsAppend;
452struct FUnlockableEmoteEntry;
455struct FDialogueContext;
457struct FDatabase_ClusterInfo_Server;
459struct FTributePlayerTribeInfo;
460struct FPlayerFlagData;
461struct FDatabase_TravelEntry;
462struct FTribeTravelCount;
463struct FServerTribeAtMax;
464struct FDatabase_AllianceWrapper;
465struct FDatabase_TribeWrapper;
466struct FDatabase_TribeEntities;
467struct FDatabase_PlayerJoinedTribe;
468struct FDatabase_PlayerRemovedFromTribe;
469struct FDatabase_LogEntryWrapper;
470struct FDatabase_CreateShapshot;
472struct FDinoBabySetup;
477struct IStereoRendering;
478struct IHeadMountedDisplay;
479struct IDelegateInstance;
482struct UWeaponAttackData;
484struct UPrimalItem_Dye;
485struct UPrimalItem_Shield;
488struct UPrimalStructureSnapSettings;
489struct FPrimalStructureSnapPoint;
491struct UWaveWorksComponent;
492struct UUI_HostSession;
494struct UGameUserSettings;
499struct UDeviceProfileManager;
500struct UPendingNetGame;
501struct UUI_GenericConfirmationDialog;
503struct UPubSub_TribeNotifications;
505struct USeamlessDataServer;
506struct UPaintingCache;
510struct UDatabase_SharedLog;
511struct UDatabase_TravelData;
512struct UDatabase_TribeDataManager;
513struct UDatabase_TerritoryMap;
514struct UDatabase_RemoteFileManager;
516struct UGenericDataListEntry;
517struct UToolTipWidget;
518struct UUI_XBoxFooter;
519struct UUI_Notification;
520struct UPrimalStructureToolTipWidget;
521struct UChildActorComponent;
524struct USoundAttenuation;
526struct UShooterGameUserSettings;
527struct UDiscoveryZoneDataListEntry;
528struct FTribeLogEntry;
565struct FPlacementData;
592struct UObjectSerializer;
619struct UMaterialInterface;
623struct FMinimalViewInfo;
633struct UPaintingTexture;
634struct APrimalStructureExplosiveTransGPS;
635struct ITargetableInterface;
640struct UAudioComponent;
643struct ASpectatorPawn;
644struct APlayerCameraManager;
645struct UAntiDupeTransactionLog;
649struct UPrimalLocalProfile;
650struct UPrimalBuffPersistentData;
656struct APrimalStructurePlacer;
690#define DECLARE_HOOK(name, returnType, ...) typedef returnType(__fastcall * name ## _Func)(__VA_ARGS__); inline
691 name ## _Func name ## _original; returnType
692 __fastcall Hook_ ## name(__VA_ARGS__)
static unsigned int GetBuildUniqueId()
ARK_API LPVOID GetDataAddress(const std::string &name)
ARK_API BitField GetBitField(LPVOID base, const std::string &name)
ARK_API BitField GetBitField(const void *base, const std::string &name)
ARK_API DWORD64 GetAddress(const void *base, const std::string &name)
ARK_API LPVOID GetAddress(const std::string &name)
ApiUtils & operator=(ApiUtils &&)=delete
void SetCheatManager(UShooterCheatManager *cheatmanager)
void SetWorld(UWorld *uworld)
ApiUtils & operator=(const ApiUtils &)=delete
void SetShooterGameMode(AShooterGameMode *shooter_game_mode)
std::unordered_map< uint64, AShooterPlayerController * > steam_id_map_
UShooterCheatManager * GetCheatManager() const override
Returns a point to URCON CheatManager.
ApiUtils(ApiUtils &&)=delete
AShooterGameMode * shooter_game_mode_
AShooterGameMode * GetShooterGameMode() const override
Returns a pointer to AShooterGameMode.
void RemovePlayerController(AShooterPlayerController *player_controller)
UShooterCheatManager * cheatmanager_
void SetPlayerController(AShooterPlayerController *player_controller)
ServerStatus GetStatus() const override
Returns the current server status.
AShooterPlayerController * FindPlayerFromSteamId_Internal(uint64 steam_id) const override
~ApiUtils() override=default
void SetStatus(ServerStatus status)
UWorld * GetWorld() const override
Returns a pointer to UWorld.
ApiUtils(const ApiUtils &)=delete
static FString GetSteamName(AController *player_controller)
Returns the steam name of player.
static FORCEINLINE FString GetItemBlueprint(UPrimalItem *item)
Returns blueprint from UPrimalItem.
static FVector GetPosition(APlayerController *player_controller)
Returns the position of a player.
uint64 GetSteamIDForPlayerID(int player_id) const
static FORCEINLINE FString GetClassBlueprint(UClass *the_class)
Returns blueprint path from any UClass.
void SendServerMessageToAll(FLinearColor msg_color, const T *msg, Args &&... args)
Sends server message to all players. Using fmt::format.
virtual UShooterCheatManager * GetCheatManager() const =0
Returns a point to URCON CheatManager.
UPrimalGameData * GetGameData()
Returns pointer to Primal Game Data.
static bool IsRidingDino(AShooterPlayerController *player_controller)
Returns true if character is riding a dino, false otherwise.
AShooterGameState * GetGameState()
Get Shooter Game State.
virtual ~IApiUtils()=default
AShooterPlayerController * FindPlayerFromSteamName(const FString &steam_name) const
Finds player from the given steam name.
static UShooterCheatManager * GetCheatManagerByPC(AShooterPlayerController *SPC)
Get UShooterCheatManager* of player controller.
static uint64 GetPlayerID(AController *controller)
static bool IsPlayerDead(AShooterPlayerController *player)
Returns true if player is dead, false otherwise.
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.
APrimalDinoCharacter * SpawnDino(AShooterPlayerController *player, FString blueprint, FVector *location, int lvl, bool force_tame, bool neutered) const
Spawns a dino near player or at specific coordinates.
TArray< AShooterPlayerController * > FindPlayerFromCharacterName(const FString &character_name, ESearchCase::Type search, bool full_match) const
Finds all matching players from the given character name.
static FORCEINLINE FString GetBlueprint(UObjectBase *object)
Returns blueprint path from any UObject.
static FString GetCharacterName(AShooterPlayerController *player_controller, bool include_first_name=true, bool include_last_name=true)
Returns the character name of player.
TArray< AActor * > GetAllActorsInRange(FVector location, float radius, EServerOctreeGroup::Type ActorType)
Gets all actors in radius at location.
void SendChatMessageToAll(const FString &sender_name, const T *msg, Args &&... args)
Sends chat message to all players. Using fmt::format.
TArray< AActor * > GetAllActorsInRange(FVector location, float radius, EServerOctreeGroup::Type ActorType, TArray< AActor * > ignores)
Gets all actors in radius at location, with ignore actors.
virtual AShooterGameMode * GetShooterGameMode() const =0
Returns a pointer to AShooterGameMode.
static uint64 GetSteamIdFromController(AController *controller)
Returns Steam ID from player controller.
virtual UWorld * GetWorld() const =0
Returns a pointer to UWorld.
static bool TeleportToPos(AShooterPlayerController *player_controller, const FVector &pos)
Teleports player to the given position.
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.
static uint64 GetPlayerID(APrimalCharacter *character)
virtual AShooterPlayerController * FindPlayerFromSteamId_Internal(uint64 steam_id) const =0
AShooterPlayerController * FindControllerFromCharacter(AShooterCharacter *character) const
Finds player controller from the given player character.
static APrimalDinoCharacter * GetRidingDino(AShooterPlayerController *player_controller)
Returns the dino the character is riding.
static FString GetIPAddress(AShooterPlayerController *player_controller)
Returns IP address of player.
AShooterPlayerController * FindPlayerFromSteamId(uint64 steam_id) const
Finds player from the given steam id.
virtual ServerStatus GetStatus() const =0
Returns the current server status.
void SendServerMessage(AShooterPlayerController *player_controller, FLinearColor msg_color, const T *msg, Args &&... args)
Sends server message to the specific player. Using fmt::format.
static std::optional< FString > TeleportToPlayer(AShooterPlayerController *me, AShooterPlayerController *him, bool check_for_dino, float max_dist)
Teleport one player to another.
static int GetInventoryItemCount(AShooterPlayerController *player_controller, const FString &item_name)
Counts a specific items quantity.
void SendChatMessage(AShooterPlayerController *player_controller, const FString &sender_name, const T *msg, Args &&... args)
Sends chat message to the specific player. Using fmt::format.
FString Replace(const TCHAR *From, const TCHAR *To, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FORCEINLINE bool FindChar(TCHAR InChar, int32 &Index) const
FORCEINLINE FString Mid(int32 Start, int32 Count=INT_MAX) const
FORCEINLINE friend bool operator==(const FString &Lhs, const FString &Rhs)
FORCEINLINE bool FindLastChar(TCHAR InChar, int32 &Index) const
FORCEINLINE FString(const CharType *Src, typename TEnableIf< TIsCharType< CharType >::Value >::Type *Dummy=nullptr)
FORCEINLINE friend FString operator+(const TCHAR *Lhs, FString &&Rhs)
bool StartsWith(const FString &InPrefix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FORCEINLINE bool Equals(const FString &Other, ESearchCase::Type SearchCase=ESearchCase::CaseSensitive) const
bool EndsWith(const TCHAR *InSuffix, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase) const
FORCEINLINE bool IsEmpty() const
FORCEINLINE int32 Len() const
FORCEINLINE friend FString operator+(FString &&Lhs, const TCHAR *Rhs)
FORCEINLINE int32 Add(const ElementType &Item)
int32 Remove(const ElementType &Item)
FORCEINLINE ObjectType * Get() const
IApiUtils & GetApiUtils()
FVector & DefaultActorLocationField()
int & TargetingTeamField()
USceneComponent * RootComponentField()
APlayerState * PlayerStateField()
UCheatManager * CheatManagerField()
FString * GetPlayerNetworkAddress(FString *result)
FUniqueNetIdRepl & UniqueIdField()
FString & PlayerNameField()
bool TeleportTo(FVector *DestLocation, FRotator *DestRotation, bool bIsATest, bool bNoCheck)
UPrimalInventoryComponent * MyInventoryComponentField()
void DoNeuter_Implementation()
static UClass * GetPrivateStaticClass()
void TameDino(AShooterPlayerController *ForPC, bool bIgnoreMaxTameLimit, int OverrideTamingTeamID)
int & TamingTeamIDField()
FString & TamerStringField()
int & AbsoluteBaseLevelField()
UPrimalPlayerData * GetPlayerData()
APrimalDinoCharacter * GetRidingDino()
unsigned __int64 GetSteamIDForPlayerID(int playerDataID)
void AddPlayerID(int playerDataID, unsigned __int64 netUniqueID)
__int64 & LinkedPlayerIDField()
void SetPlayerPos(float X, float Y, float Z)
AActor * SpawnActor(FString *blueprintPath, float spawnDistance, float spawnYOffset, float ZOffset, bool bDoDeferBeginPlay)
AShooterCharacter * GetPlayerCharacter()
FString * GetPlayerName(FString *result)
void SetTribeTamingDinoSettings(APrimalDinoCharacter *aDinoChar)
unsigned __int64 & PlayerDataIDField()
FORCEINLINE FRotator(float InPitch, float InYaw, float InRoll)
TSharedPtr< FUniqueNetId > UniqueNetId
FORCEINLINE CONSTEXPR FVector(float InX, float InY, float InZ)
static FORCEINLINE float Distance(const FVector &V1, const FVector &V2)
T * Get(bool bEvenIfPendingKill=false)
FORCEINLINE T * operator->()
UObject * GetDefaultObject(bool bCreateIfNeeded)
FString * GetFullName(FString *result, UObject *StopOuter)
bool IsA(UClass *SomeBase)
UPrimalGameData * PrimalGameDataOverrideField()
UPrimalGameData * PrimalGameDataField()
FPrimalPlayerDataStruct * MyDataField()
FVector * GetWorldLocation(FVector *result)
static TArray< AActor * > * ServerOctreeOverlapActors(TArray< AActor * > *result, UWorld *theWorld, FVector AtLoc, float Radius, EServerOctreeGroup::Type OctreeType, bool bForceActorLocationDistanceCheck)
TArray< TAutoWeakObjectPtr< APlayerController > > & PlayerControllerListField()
APlayerController * GetFirstPlayerController()
AGameState * GameStateField()