Skip to content

Commit

Permalink
Updated ARK API
Browse files Browse the repository at this point in the history
  • Loading branch information
Michidu committed Mar 5, 2019
1 parent a24e13e commit f6f54cc
Show file tree
Hide file tree
Showing 14 changed files with 640 additions and 287 deletions.
3 changes: 0 additions & 3 deletions version.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ark|x64 = Ark|x64
Atlas|x64 = Atlas|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3941E9F8-2E29-4D69-8717-F74562ED5301}.Ark|x64.ActiveCfg = Ark|x64
{3941E9F8-2E29-4D69-8717-F74562ED5301}.Ark|x64.Build.0 = Ark|x64
{3941E9F8-2E29-4D69-8717-F74562ED5301}.Atlas|x64.ActiveCfg = Atlas|x64
{3941E9F8-2E29-4D69-8717-F74562ED5301}.Atlas|x64.Build.0 = Atlas|x64
{3941E9F8-2E29-4D69-8717-F74562ED5301}.Release|x64.ActiveCfg = Release|x64
{3941E9F8-2E29-4D69-8717-F74562ED5301}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
173 changes: 155 additions & 18 deletions version/Core/Public/API/ARK/Actor.h

Large diffs are not rendered by default.

118 changes: 74 additions & 44 deletions version/Core/Public/API/ARK/Enums.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once

namespace EPrimalEquipmentType
{
enum Type
Expand All @@ -12,7 +13,9 @@ namespace EPrimalEquipmentType
Trophy = 0x6,
Costume = 0x7,
Shield = 0x8,
MAX = 0x9,
Weapon = 0x9,
Snapshot = 0xA,
MAX = 0xB
};
}

Expand All @@ -28,7 +31,7 @@ namespace EPrimalItemStat
HypothermalInsulation = 0x5,
Weight = 0x6,
HyperthermalInsulation = 0x7,
MAX = 0x8,
MAX = 0x8
};
}

Expand All @@ -48,7 +51,7 @@ namespace EPrimalCharacterStatusValue
SpeedMultiplier = 0x9,
TemperatureFortitude = 0xA,
CraftingSpeedMultiplier = 0xB,
MAX = 0xC,
MAX = 0xC
};
}

Expand All @@ -70,7 +73,7 @@ namespace EPrimalCharacterStatusState
Cold = 0xB,
Hot = 0xC,
Crafting = 0xD,
MAX = 0xE,
MAX = 0xE
};
}

Expand All @@ -87,29 +90,29 @@ namespace EPrimalItemType
Skin = 0x6,
WeaponAttachment = 0x7,
Artifact = 0x8,
MAX = 0x9,
MAX = 0x9
};
}

namespace EPrimalConsumableType
{
enum Type
{
Food,
Water,
Medicine,
Other,
MAX
Food = 0x0,
Water = 0x1,
Medicine = 0x2,
Other = 0x3,
MAX = 0x4
};
}

namespace EPrimalItemMessage
{
enum Type
{
Broken,
Repaired,
MAX
Broken = 0x0,
Repaired = 0x1,
MAX = 0x2
};
}

Expand All @@ -122,28 +125,28 @@ namespace EXPType
XP_HARVEST = 0x2,
XP_CRAFT = 0x3,
XP_SPECIAL = 0x4,
MAX = 0x5,
MAX = 0x5
};
}

namespace EBabyCuddleType
{
enum Type
{
Pet,
Food,
Walk,
MAX
PET = 0x0,
FOOD = 0x1,
WALK = 0x2,
MAX = 0x3
};
}

namespace EAttachLocation
{
enum Type
{
KeepRelativeOffset,
KeepWorldPosition,
SnapToTarget
KeepRelativeOffset = 0x0,
KeepWorldPosition = 0x1,
SnapToTarget = 0x2
};
}

Expand All @@ -152,34 +155,34 @@ namespace EEndPlayReason
{
enum Type
{
ActorDestroyed,
LevelTransition,
EndPlayInEditor,
RemovedFromWorld,
Quit
ActorDestroyed = 0x0,
LevelTransition = 0x1,
EndPlayInEditor = 0x2,
RemovedFromWorld = 0x3,
Quit = 0x4
};
}

namespace EPrimalARKTributeDataType
{
enum Type
{
Items,
TamedDinos,
CharacterData,
MAX
Items = 0x0,
TamedDinos = 0x1,
CharacterData = 0x2,
MAX = 0x3
};
}

namespace ESTOFNotificationType
{
enum Type
{
Death,
TribeEliminated,
MatchVictory,
MatchDraw,
MAX
Death = 0x0,
TribeEliminated = 0x1,
MatchVictory = 0x2,
MatchDraw = 0x3,
MAX = 0x4
};
}

Expand All @@ -196,7 +199,8 @@ namespace EDinoTamedOrder
StopFollowing = 0x6,
CycleFollowDistance = 0x7,
SetAggressionPassiveFlee = 0x8,
MAX = 0x9,
LandingToMe = 0x9,
MAX = 0xA
};
}

Expand Down Expand Up @@ -242,11 +246,11 @@ namespace EWeaponState
{
enum Type
{
Idle,
Firing,
Reloading,
Equipping,
UnEquipping
Idle = 0x0,
Firing = 0x1,
Reloading = 0x2,
Equipping = 0x3,
UnEquipping = 0x4
};
}

Expand Down Expand Up @@ -326,7 +330,7 @@ namespace ELevelExperienceRampType
DinoEasy = 0x1,
DinoMedium = 0x2,
DinoHard = 0x3,
MAX = 0x4,
MAX = 0x4
};
}

Expand All @@ -339,7 +343,8 @@ namespace EEngramGroup
ARK_TEK = 0x8,
ARK_UNLEARNED = 0x10,
ARK_ABERRATION = 0x20,
MAX = 0x21,
ARK_EXTINCTION = 0x40,
MAX = 0x41
};
}

Expand All @@ -354,6 +359,31 @@ namespace EPrimalStatsValueTypes
HitsDinoCritical = 0x4,
HitsPlayerBody = 0x5,
HitsPlayerCritical = 0x6,
MAX = 0x7,
MAX = 0x7
};
}

namespace EChatSendMode
{
enum Type
{
GlobalChat = 0x0,
GlobalTribeChat = 0x1,
LocalChat = 0x2,
AllianceChat = 0x3,
MAX = 0x4
};
}

namespace EChatType
{
enum Type
{
GlobalChat = 0x0,
ProximityChat = 0x1,
RadioChat = 0x2,
GlobalTribeChat = 0x3,
AllianceChat = 0x4,
MAX = 0x5
};
}
250 changes: 171 additions & 79 deletions version/Core/Public/API/ARK/GameMode.h

Large diffs are not rendered by default.

25 changes: 20 additions & 5 deletions version/Core/Public/API/ARK/GameState.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "API/Base.h"

struct AGameState
{
TSubclassOf<AGameMode>& GameModeClassField() { return *GetNativePointerField<TSubclassOf<AGameMode>*>(this, "AGameState.GameModeClass"); }
Expand Down Expand Up @@ -111,7 +113,8 @@ struct AShooterGameState : AGameState
FName& ActiveEventField() { return *GetNativePointerField<FName*>(this, "AShooterGameState.ActiveEvent"); }
bool& bAllowPaintingWithoutResourcesField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bAllowPaintingWithoutResources"); }
bool& bEnableExtraStructurePreventionVolumesField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bEnableExtraStructurePreventionVolumes"); }
//TArray<FItemCraftingCostOverride>& OverrideItemCraftingCostsField() { return *GetNativePointerField<TArray<FItemCraftingCostOverride>*>(this, "AShooterGameState.OverrideItemCraftingCosts"); }
TArray<FItemCraftingCostOverride>& OverrideItemCraftingCostsField() { return *GetNativePointerField<TArray<FItemCraftingCostOverride>*>(this, "AShooterGameState.OverrideItemCraftingCosts"); }
TArray<FItemMaxItemQuantityOverride>& OverrideItemMaxQuantityField() { return *GetNativePointerField<TArray<FItemMaxItemQuantityOverride>*>(this, "AShooterGameState.OverrideItemMaxQuantity"); }
long double& LastServerSaveTimeField() { return *GetNativePointerField<long double*>(this, "AShooterGameState.LastServerSaveTime"); }
float& ServerSaveIntervalField() { return *GetNativePointerField<float*>(this, "AShooterGameState.ServerSaveInterval"); }
float& TribeNameChangeCooldownField() { return *GetNativePointerField<float*>(this, "AShooterGameState.TribeNameChangeCooldown"); }
Expand All @@ -123,11 +126,12 @@ struct AShooterGameState : AGameState
bool& bPlayingDynamicMusic2Field() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bPlayingDynamicMusic2"); }
float& LastHadMusicTimeField() { return *GetNativePointerField<float*>(this, "AShooterGameState.LastHadMusicTime"); }
TArray<FLevelExperienceRamp>& LevelExperienceRampOverridesField() { return *GetNativePointerField<TArray<FLevelExperienceRamp>*>(this, "AShooterGameState.LevelExperienceRampOverrides"); }
//TArray<FEngramEntryOverride>& OverrideEngramEntriesField() { return *GetNativePointerField<TArray<FEngramEntryOverride>*>(this, "AShooterGameState.OverrideEngramEntries"); }
TArray<FEngramEntryOverride>& OverrideEngramEntriesField() { return *GetNativePointerField<TArray<FEngramEntryOverride>*>(this, "AShooterGameState.OverrideEngramEntries"); }
TArray<FString>& PreventDinoTameClassNamesField() { return *GetNativePointerField<TArray<FString>*>(this, "AShooterGameState.PreventDinoTameClassNames"); }
float& ListenServerTetherDistanceMultiplierField() { return *GetNativePointerField<float*>(this, "AShooterGameState.ListenServerTetherDistanceMultiplier"); }
FString& PGMapNameField() { return *GetNativePointerField<FString*>(this, "AShooterGameState.PGMapName"); }
TArray<int>& SupportedSpawnRegionsField() { return *GetNativePointerField<TArray<int>*>(this, "AShooterGameState.SupportedSpawnRegions"); }
UPaintingCache * PaintingCacheField() { return *GetNativePointerField<UPaintingCache **>(this, "AShooterGameState.PaintingCache"); }
USoundBase * StaticOverrideMusicField() { return *GetNativePointerField<USoundBase **>(this, "AShooterGameState.StaticOverrideMusic"); }
bool& bEnableDeathTeamSpectatorField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bEnableDeathTeamSpectator"); }
FVector& PlayerFloatingHUDOffsetField() { return *GetNativePointerField<FVector*>(this, "AShooterGameState.PlayerFloatingHUDOffset"); }
Expand All @@ -148,11 +152,13 @@ struct AShooterGameState : AGameState
float& ExtinctionEventPercentField() { return *GetNativePointerField<float*>(this, "AShooterGameState.ExtinctionEventPercent"); }
int& ExtinctionEventSecondsRemainingField() { return *GetNativePointerField<int*>(this, "AShooterGameState.ExtinctionEventSecondsRemaining"); }
bool& bDoExtinctionEventField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bDoExtinctionEvent"); }
TArray<FInventoryComponentDefaultItemsAppend>& InventoryComponentAppendsField() { return *GetNativePointerField<TArray<FInventoryComponentDefaultItemsAppend>*>(this, "AShooterGameState.InventoryComponentAppends"); }
bool& bPreventOfflinePvPField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bPreventOfflinePvP"); }
bool& bPvPDinoDecayField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bPvPDinoDecay"); }
bool& bAllowUnclaimDinosConfigField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bAllowUnclaimDinosConfig"); }
bool& bForceUseInventoryAppendsField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bForceUseInventoryAppends"); }
bool& bOverideStructurePlatformPreventionField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bOverideStructurePlatformPrevention"); }
float& ItemStackSizeMultiplierField() { return *GetNativePointerField<float*>(this, "AShooterGameState.ItemStackSizeMultiplier"); }
TArray<int>& PreventOfflinePvPLiveTeamsField() { return *GetNativePointerField<TArray<int>*>(this, "AShooterGameState.PreventOfflinePvPLiveTeams"); }
TArray<int>& PreventOfflinePvPExpiringTeamsField() { return *GetNativePointerField<TArray<int>*>(this, "AShooterGameState.PreventOfflinePvPExpiringTeams"); }
TArray<double>& PreventOfflinePvPExpiringTimesField() { return *GetNativePointerField<TArray<double>*>(this, "AShooterGameState.PreventOfflinePvPExpiringTimes"); }
Expand All @@ -161,7 +167,7 @@ struct AShooterGameState : AGameState
bool& bAllowAnyoneBabyImprintCuddleField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bAllowAnyoneBabyImprintCuddle"); }
bool& bDisableImprintDinoBuffField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bDisableImprintDinoBuff"); }
int& MaxPersonalTamedDinosField() { return *GetNativePointerField<int*>(this, "AShooterGameState.MaxPersonalTamedDinos"); }
//TArray<FFloatingTextEntry>& FloatingTextEntriesField() { return *GetNativePointerField<TArray<FFloatingTextEntry>*>(this, "AShooterGameState.FloatingTextEntries"); }
TArray<FFloatingTextEntry>& FloatingTextEntriesField() { return *GetNativePointerField<TArray<FFloatingTextEntry>*>(this, "AShooterGameState.FloatingTextEntries"); }
bool& bIsCustomMapField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bIsCustomMap"); }
bool& bIsClientField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bIsClient"); }
bool& bIsDedicatedServerField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bIsDedicatedServer"); }
Expand All @@ -181,6 +187,8 @@ struct AShooterGameState : AGameState
float& HairGrowthSpeedMultiplierField() { return *GetNativePointerField<float*>(this, "AShooterGameState.HairGrowthSpeedMultiplier"); }
float& FastDecayIntervalField() { return *GetNativePointerField<float*>(this, "AShooterGameState.FastDecayInterval"); }
float& OxygenSwimSpeedStatMultiplierField() { return *GetNativePointerField<float*>(this, "AShooterGameState.OxygenSwimSpeedStatMultiplier"); }
FOnHTTPGetProcessed& OnHTTPGetResponseField() { return *GetNativePointerField<FOnHTTPGetProcessed*>(this, "AShooterGameState.OnHTTPGetResponse"); }
FOnHTTPPostResponse& OnHTTPPostResponseField() { return *GetNativePointerField<FOnHTTPPostResponse*>(this, "AShooterGameState.OnHTTPPostResponse"); }
bool& bAllowMultipleAttachedC4Field() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bAllowMultipleAttachedC4"); }
bool& bCrossARKAllowForeignDinoDownloadsField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bCrossARKAllowForeignDinoDownloads"); }
long double& LastPlayedDynamicMusic1Field() { return *GetNativePointerField<long double*>(this, "AShooterGameState.LastPlayedDynamicMusic1"); }
Expand All @@ -203,7 +211,7 @@ struct AShooterGameState : AGameState
int& LimitTurretsNumField() { return *GetNativePointerField<int*>(this, "AShooterGameState.LimitTurretsNum"); }
bool& bForceAllowAllStructuresField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bForceAllowAllStructures"); }
bool& bShowCreativeModeField() { return *GetNativePointerField<bool*>(this, "AShooterGameState.bShowCreativeMode"); }
//TArray<FPlayerLocatorEffectMap>& PlayerLocatorEffectMapsField() { return *GetNativePointerField<TArray<FPlayerLocatorEffectMap>*>(this, "AShooterGameState.PlayerLocatorEffectMaps"); }
TArray<FPlayerLocatorEffectMap>& PlayerLocatorEffectMapsField() { return *GetNativePointerField<TArray<FPlayerLocatorEffectMap>*>(this, "AShooterGameState.PlayerLocatorEffectMaps"); }
int& AmbientSoundCheckIncrementField() { return *GetNativePointerField<int*>(this, "AShooterGameState.AmbientSoundCheckIncrement"); }
float& PreventOfflinePvPConnectionInvincibleIntervalField() { return *GetNativePointerField<float*>(this, "AShooterGameState.PreventOfflinePvPConnectionInvincibleInterval"); }
float& PassiveTameIntervalMultiplierField() { return *GetNativePointerField<float*>(this, "AShooterGameState.PassiveTameIntervalMultiplier"); }
Expand All @@ -217,6 +225,7 @@ struct AShooterGameState : AGameState
static APrimalBuff * BaseSpawnBuffAndAttachToCharacter(UClass * Buff, APrimalCharacter * PrimalCharacter, float ExperiencePoints) { return NativeCall<APrimalBuff *, UClass *, APrimalCharacter *, float>(nullptr, "AShooterGameState.BaseSpawnBuffAndAttachToCharacter", Buff, PrimalCharacter, ExperiencePoints); }
void Destroyed() { NativeCall<void>(this, "AShooterGameState.Destroyed"); }
void GetLifetimeReplicatedProps(TArray<FLifetimeProperty> * OutLifetimeProps) { NativeCall<void, TArray<FLifetimeProperty> *>(this, "AShooterGameState.GetLifetimeReplicatedProps", OutLifetimeProps); }
bool GetItemMaxQuantityOverride(TSubclassOf<UPrimalItem> ForClass, FMaxItemQuantityOverride * OutMaxQuantity) { return NativeCall<bool, TSubclassOf<UPrimalItem>, FMaxItemQuantityOverride *>(this, "AShooterGameState.GetItemMaxQuantityOverride", ForClass, OutMaxQuantity); }
void OnRep_SupportedSpawnRegions() { NativeCall<void>(this, "AShooterGameState.OnRep_SupportedSpawnRegions"); }
void OnRep_ReplicateLocalizedChatRadius() { NativeCall<void>(this, "AShooterGameState.OnRep_ReplicateLocalizedChatRadius"); }
void Tick(float DeltaSeconds) { NativeCall<void, float>(this, "AShooterGameState.Tick", DeltaSeconds); }
Expand Down Expand Up @@ -289,10 +298,15 @@ struct AGameSession
void UpdateSessionJoinability(FName InSessionName, bool bPublicSearchable, bool bAllowInvites, bool bJoinViaPresence, bool bJoinViaPresenceFriendsOnly) { NativeCall<void, FName, bool, bool, bool, bool>(this, "AGameSession.UpdateSessionJoinability", InSessionName, bPublicSearchable, bAllowInvites, bJoinViaPresence, bJoinViaPresenceFriendsOnly); }
};

struct AShooterGameSession : AGameSession
struct AShooterGameSession
{
TArray<FInstalledItemInfo>& CachedModsField() { return *GetNativePointerField<TArray<FInstalledItemInfo>*>(this, "AShooterGameSession.CachedMods"); }
TArray<FShooterSessionData>& ThreadSafeSearchResultsField() { return *GetNativePointerField<TArray<FShooterSessionData>*>(this, "AShooterGameSession.ThreadSafeSearchResults"); }
TArray<UNetConnection *> FailedAuthTokenClientConnectionsField() { return *GetNativePointerField<TArray<UNetConnection *>*>(this, "AShooterGameSession.FailedAuthTokenClientConnections"); }
TArray<FUniqueNetIdUInt64>& FailedAuthTokenClientUniqueIDsField() { return *GetNativePointerField<TArray<FUniqueNetIdUInt64>*>(this, "AShooterGameSession.FailedAuthTokenClientUniqueIDs"); }
FShooterGameSessionParams& CurrentSessionParamsField() { return *GetNativePointerField<FShooterGameSessionParams*>(this, "AShooterGameSession.CurrentSessionParams"); }
TSharedPtr<FShooterOnlineSessionSettings, 0>& HostSettingsField() { return *GetNativePointerField<TSharedPtr<FShooterOnlineSessionSettings, 0>*>(this, "AShooterGameSession.HostSettings"); }
TSharedPtr<FShooterOnlineSearchSettings, 0>& SearchSettingsField() { return *GetNativePointerField<TSharedPtr<FShooterOnlineSearchSettings, 0>*>(this, "AShooterGameSession.SearchSettings"); }
bool& bFoundSessionField() { return *GetNativePointerField<bool*>(this, "AShooterGameSession.bFoundSession"); }

// Functions
Expand All @@ -314,6 +328,7 @@ struct AShooterGameSession : AGameSession
void OnFoundSession() { NativeCall<void>(this, "AShooterGameSession.OnFoundSession"); }
void CancelFindSessions() { NativeCall<void>(this, "AShooterGameSession.CancelFindSessions"); }
bool JoinSession(TSharedPtr<FUniqueNetId, 0> UserId, FName SessionName, int SessionIndexInSearchResults) { return NativeCall<bool, TSharedPtr<FUniqueNetId, 0>, FName, int>(this, "AShooterGameSession.JoinSession", UserId, SessionName, SessionIndexInSearchResults); }
bool JoinSession(TSharedPtr<FUniqueNetId, 0> UserId, FName SessionName, FOnlineSessionSearchResult * SearchResult) { return NativeCall<bool, TSharedPtr<FUniqueNetId, 0>, FName, FOnlineSessionSearchResult *>(this, "AShooterGameSession.JoinSession", UserId, SessionName, SearchResult); }
bool TravelToSession(int ControllerId, FName SessionName) { return NativeCall<bool, int, FName>(this, "AShooterGameSession.TravelToSession", ControllerId, SessionName); }
void Restart() { NativeCall<void>(this, "AShooterGameSession.Restart"); }
};
Loading

0 comments on commit f6f54cc

Please sign in to comment.