Skip to content

Commit 935f1bc

Browse files
authored
API 3.54
API 3.54
2 parents 87797ee + f55a324 commit 935f1bc

14 files changed

Lines changed: 128 additions & 27 deletions

File tree

out_lib/ArkApi.lib

0 Bytes
Binary file not shown.

version/Core/Private/Ark/ArkBaseApi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace API
1818
{
19-
constexpr float api_version = 3.53f;
19+
constexpr float api_version = 3.54f;
2020

2121
ArkBaseApi::ArkBaseApi()
2222
: commands_(std::make_unique<ArkApi::Commands>()),

version/Core/Private/Ark/HooksImpl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ namespace ArkApi
153153
command->CheckOnTimerCallbacks();
154154
}
155155

156+
API::PluginManager::DetectPluginChangesTimerCallback(); // We call this here to avoid UnknownModule crashes
157+
156158
AGameState_DefaultTimer_original(_this);
157159
}
158160

version/Core/Private/PluginManager/PluginManager.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212

1313
namespace API
1414
{
15-
PluginManager::PluginManager()
16-
{
17-
ArkApi::GetCommands().AddOnTimerCallback(L"PluginManager.DetectPluginChangesTimerCallback", &DetectPluginChangesTimerCallback);
18-
}
19-
2015
PluginManager& PluginManager::Get()
2116
{
2217
static PluginManager instance;
@@ -347,9 +342,10 @@ namespace API
347342
// Save the world in case the unload/load procedure causes crash
348343
if (save_world)
349344
{
350-
//Log::GetLog()->info("Saving world before reloading plugins ...");
351-
//ArkApi::GetApiUtils().GetShooterGameMode()->SaveWorld();
352-
//Log::GetLog()->info("World saved.");
345+
Log::GetLog()->info("Saving world before reloading plugins ...");
346+
ArkApi::GetApiUtils().GetShooterGameMode()->SaveWorld();
347+
Log::GetLog()->info("World saved.");
348+
353349
save_world = false; // do not save again if multiple plugins are reloaded in this loop
354350
}
355351

@@ -360,15 +356,19 @@ namespace API
360356
copy_file(new_plugin_file_path, plugin_file_path, fs::copy_options::overwrite_existing);
361357
fs::remove(new_plugin_file_path);
362358

359+
// Wait 1 second before loading to let things clean up correctly...
360+
// This will load the plugin in the next timer callback
361+
//auto_reload_pending_plugins_.emplace_back(filename);
362+
363363
LoadPlugin(filename);
364+
365+
Log::GetLog()->info("Reloaded plugin - {}", filename);
364366
}
365367
catch (const std::exception& error)
366368
{
367369
Log::GetLog()->warn("({}) {}", __FUNCTION__, error.what());
368370
continue;
369371
}
370-
371-
Log::GetLog()->info("Reloaded plugin - {}", filename);
372372
}
373373
}
374374
}

version/Core/Private/PluginManager/PluginManager.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,12 @@ namespace API
7878
*/
7979
bool IsPluginLoaded(const std::string& plugin_name);
8080

81+
/**
82+
* \brief Checks for auto plugin reloads
83+
*/
84+
static void DetectPluginChangesTimerCallback();
8185
private:
82-
PluginManager();
86+
PluginManager() = default;
8387
~PluginManager() = default;
8488

8589
static nlohmann::json ReadPluginInfo(const std::string& plugin_name);
@@ -88,7 +92,6 @@ namespace API
8892

8993
void CheckPluginsDependencies();
9094

91-
static void DetectPluginChangesTimerCallback();
9295
void DetectPluginChanges();
9396

9497
std::vector<std::shared_ptr<Plugin>> loaded_plugins_;

version/Core/Public/API/ARK/Actor.h

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,16 +1166,16 @@ struct AActor : UObject
11661166
void K2_OnBecomeViewTarget(APlayerController* PC) { NativeCall<void, APlayerController*>(this, "AActor.K2_OnBecomeViewTarget", PC); }
11671167
void K2_OnEndViewTarget(APlayerController* PC) { NativeCall<void, APlayerController*>(this, "AActor.K2_OnEndViewTarget", PC); }
11681168
void ModifyHudMultiUseLoc(FVector2D* theVec, APlayerController* PC, int index) { NativeCall<void, FVector2D*, APlayerController*, int>(this, "AActor.ModifyHudMultiUseLoc", theVec, PC, index); }
1169-
void MulticastDrawDebugArrow(FVector LineStart, FVector LineEnd, float ArrowSize, FLinearColor LineColor, float Duration) { NativeCall<void, FVector, FVector, float, FLinearColor, float>(this, "AActor.MulticastDrawDebugArrow", LineStart, LineEnd, ArrowSize, LineColor, Duration); }
1170-
void MulticastDrawDebugBox(FVector Center, FVector Extent, FLinearColor LineColor, FRotator Rotation, float Duration) { NativeCall<void, FVector, FVector, FLinearColor, FRotator, float>(this, "AActor.MulticastDrawDebugBox", Center, Extent, LineColor, Rotation, Duration); }
1169+
void MulticastDrawDebugArrow(FVector LineStart, FVector LineEnd, float ArrowSize, FLinearColor LineColor, float Duration, bool enableInShipping) { NativeCall<void, FVector, FVector, float, FLinearColor, float, bool>(this, "AActor.MulticastDrawDebugArrow", LineStart, LineEnd, ArrowSize, LineColor, Duration, enableInShipping); }
1170+
void MulticastDrawDebugBox(FVector Center, FVector Extent, FLinearColor LineColor, FRotator Rotation, float Duration, bool enableInShipping) { NativeCall<void, FVector, FVector, FLinearColor, FRotator, float, bool>(this, "AActor.MulticastDrawDebugBox", Center, Extent, LineColor, Rotation, Duration, enableInShipping); }
11711171
void MulticastDrawDebugCapsule(FVector Center, float HalfHeight, float Radius, FRotator Rotation, FLinearColor LineColor, float Duration, bool enableInShipping) { NativeCall<void, FVector, float, float, FRotator, FLinearColor, float, bool>(this, "AActor.MulticastDrawDebugCapsule", Center, HalfHeight, Radius, Rotation, LineColor, Duration, enableInShipping); }
11721172
void MulticastDrawDebugCapsuleWithExtents(FVector Top, FVector Bottom, float Radius, FLinearColor LineColor, float Duration, bool bPersistent) { NativeCall<void, FVector, FVector, float, FLinearColor, float, bool>(this, "AActor.MulticastDrawDebugCapsuleWithExtents", Top, Bottom, Radius, LineColor, Duration, bPersistent); }
11731173
void MulticastDrawDebugCoordinateSystem(FVector AxisLoc, FRotator AxisRot, float Scale, float Duration, float Thickness) { NativeCall<void, FVector, FRotator, float, float, float>(this, "AActor.MulticastDrawDebugCoordinateSystem", AxisLoc, AxisRot, Scale, Duration, Thickness); }
11741174
void MulticastDrawDebugCylinder(FVector Start, FVector End, float Radius, int Segments, FLinearColor LineColor, float Duration) { NativeCall<void, FVector, FVector, float, int, FLinearColor, float>(this, "AActor.MulticastDrawDebugCylinder", Start, End, Radius, Segments, LineColor, Duration); }
11751175
void MulticastDrawDebugLine(FVector LineStart, FVector LineEnd, FLinearColor LineColor, float Duration, float Thickness, bool enableInShipping) { NativeCall<void, FVector, FVector, FLinearColor, float, float, bool>(this, "AActor.MulticastDrawDebugLine", LineStart, LineEnd, LineColor, Duration, Thickness, enableInShipping); }
1176-
void MulticastDrawDebugPoint(FVector Position, float Size, FLinearColor PointColor, float Duration) { NativeCall<void, FVector, float, FLinearColor, float>(this, "AActor.MulticastDrawDebugPoint", Position, Size, PointColor, Duration); }
1176+
void MulticastDrawDebugPoint(FVector Position, float Size, FLinearColor PointColor, float Duration, bool enableInShipping) { NativeCall<void, FVector, float, FLinearColor, float, bool>(this, "AActor.MulticastDrawDebugPoint", Position, Size, PointColor, Duration, enableInShipping); }
11771177
void MulticastDrawDebugSphere(FVector Center, float Radius, int Segments, FLinearColor LineColor, float Duration, bool enableInShipping) { NativeCall<void, FVector, float, int, FLinearColor, float, bool>(this, "AActor.MulticastDrawDebugSphere", Center, Radius, Segments, LineColor, Duration, enableInShipping); }
1178-
void MulticastDrawDebugString(FVector TextLocation, FString* Text, AActor* TestBaseActor, FLinearColor TextColor, float Duration) { NativeCall<void, FVector, FString*, AActor*, FLinearColor, float>(this, "AActor.MulticastDrawDebugString", TextLocation, Text, TestBaseActor, TextColor, Duration); }
1178+
void MulticastDrawDebugString(FVector TextLocation, FString* Text, AActor* TestBaseActor, FLinearColor TextColor, float Duration, bool enableInShipping) { NativeCall<void, FVector, FString*, AActor*, FLinearColor, float, bool>(this, "AActor.MulticastDrawDebugString", TextLocation, Text, TestBaseActor, TextColor, Duration, enableInShipping); }
11791179
void NetAttachRootComponentTo(USceneComponent* InParent, FName InSocketName, FVector RelativeLocation, FRotator RelativeRotation) { NativeCall<void, USceneComponent*, FName, FVector, FRotator>(this, "AActor.NetAttachRootComponentTo", InParent, InSocketName, RelativeLocation, RelativeRotation); }
11801180
void OnInventoryItemGrind() { NativeCall<void>(this, "AActor.OnInventoryItemGrind"); }
11811181
void PerformanceThrottledTick() { NativeCall<void>(this, "AActor.PerformanceThrottledTick"); }
@@ -7085,6 +7085,9 @@ struct APrimalDinoCharacter : APrimalCharacter
70857085
void UpdateImprintingQuality(float NewImprintingQuality) { NativeCall<void, float>(this, "APrimalDinoCharacter.UpdateImprintingQuality", NewImprintingQuality); }
70867086
void UpdateTribeGroupRanks(char NewTribeGroupPetOrderingRank, char NewTribeGroupPetRidingRank) { NativeCall<void, char, char>(this, "APrimalDinoCharacter.UpdateTribeGroupRanks", NewTribeGroupPetOrderingRank, NewTribeGroupPetRidingRank); }
70877087
void GetDinoData(FARKDinoData * OutDinoData) { NativeCall<void, FARKDinoData *>(this, "APrimalDinoCharacter.GetDinoData", OutDinoData); }
7088+
FString* GetColorSetInidcesAsString(FString* result) { return NativeCall<FString*, FString*>(this, "APrimalDinoCharacter.GetColorSetInidcesAsString", result); }
7089+
TArray<FName>* GetColorSetNamesAsArray(TArray<FName>* result) { return NativeCall<TArray<FName>*, TArray<FName>*>(this, "APrimalDinoCharacter.GetColorSetNamesAsArray", result); }
7090+
static APrimalDinoCharacter* SpawnFromDinoDataEx(FARKDinoData* InDinoData, UWorld* InWorld, FVector* AtLocation, FRotator* AtRotation, bool* dupedDino, int ForTeam, bool bGenerateNewDinoID, AShooterPlayerController* TamerController, bool beginPlay) { return NativeCall<APrimalDinoCharacter*, FARKDinoData*, UWorld*, FVector*, FRotator*, bool*, int, bool, AShooterPlayerController*, bool>(nullptr, "APrimalDinoCharacter.SpawnFromDinoData", InDinoData, InWorld, AtLocation, AtRotation, dupedDino, ForTeam, bGenerateNewDinoID, TamerController, beginPlay); }
70887091
};
70897092

70907093
struct AShooterWeapon : AActor
@@ -8591,6 +8594,9 @@ struct ANPCZoneManager
85918594

85928595
struct AShooterProjectile : AActor
85938596
{
8597+
TWeakObjectPtr<AActor>& DamageCauserField() { return *GetNativePointerField<TWeakObjectPtr<AActor>*>(this, "AShooterProjectile.DamageCauser"); }
8598+
// Functions
8599+
85948600
static UClass* GetPrivateStaticClass() { return NativeCall<UClass*>(nullptr, "AShooterProjectile.GetPrivateStaticClass"); }
85958601
};
85968602

@@ -8874,7 +8880,9 @@ struct APrimalBuff : AActor
88748880

88758881
struct APrimalBuff_Grappled : APrimalBuff
88768882
{
8883+
// Functions
88778884

8885+
void BreakAllTethers() { NativeCall<void>(this, "APrimalBuff_Grappled.BreakAllTethers"); }
88788886
};
88798887

88808888
struct FHarvestResourceEntry
@@ -9270,6 +9278,11 @@ struct UStaticMeshComponent : UMeshComponent
92709278
bool ShouldRecreateProxyOnUpdateTransform() { return NativeCall<bool>(this, "UStaticMeshComponent.ShouldRecreateProxyOnUpdateTransform"); }
92719279
};
92729280

9281+
struct UInstancedStaticMeshComponent : UStaticMeshComponent
9282+
{
9283+
void DealDirectDamage(APlayerController* ForPC, float DamageAmount, TSubclassOf<UDamageType> DamageTypeClass, int hitBodyIndex) { NativeCall<void, APlayerController*, float, TSubclassOf<UDamageType>, int>(this, "UInstancedStaticMeshComponent.DealDirectDamage", ForPC, DamageAmount, DamageTypeClass, hitBodyIndex); }
9284+
};
9285+
92739286
struct UStaticMeshSocket : UObject
92749287
{
92759288
FName& SocketNameField() { return *GetNativePointerField<FName*>(this, "UStaticMeshSocket.SocketName"); }
@@ -9380,6 +9393,7 @@ struct UPrimalHarvestingComponent : UActorComponent
93809393
static UClass* GetPrivateStaticClass(const wchar_t* Package) { return NativeCall<UClass*, const wchar_t*>(nullptr, "UPrimalHarvestingComponent.GetPrivateStaticClass", Package); }
93819394
static void StaticRegisterNativesUPrimalHarvestingComponent() { NativeCall<void>(nullptr, "UPrimalHarvestingComponent.StaticRegisterNativesUPrimalHarvestingComponent"); }
93829395
bool TemplateCheckForHarvestRepopulation(bool bForceReinit, UWorld* world, FVector* where) { NativeCall<bool, UWorld*, FVector*>(this, "UPrimalHarvestingComponent.TemplateCheckForHarvestRepopulation", world, where); }
9396+
void DealDirectDamage(APlayerController* ForPC, float DamageAmount, TSubclassOf<UDamageType> DamageTypeClass) { NativeCall<void, APlayerController*, float, TSubclassOf<UDamageType>>(this, "UPrimalHarvestingComponent.DealDirectDamage", ForPC, DamageAmount, DamageTypeClass); }
93839397

93849398
TArray<FHarvestResourceEntry>& HarvestResourceEntries() { return *GetNativePointerField<TArray<FHarvestResourceEntry>*>(this, "UPrimalHarvestingComponent.HarvestResourceEntries"); }
93859399
TArray<FHarvestResourceEntry>& BaseHarvestResourceEntries() { return *GetNativePointerField<TArray<FHarvestResourceEntry>*>(this, "UPrimalHarvestingComponent.BaseHarvestResourceEntries"); }
@@ -9395,6 +9409,8 @@ struct UPrimalHarvestingComponent : UActorComponent
93959409

93969410
struct AMissionType : AActor
93979411
{
9412+
FString& MissionDisplayNameField() { return *GetNativePointerField<FString*>(this, "AMissionType.MissionDisplayName"); }
9413+
93989414
static void GetNearbyPlayersAndTamedDinos(UObject* WorldContextObject, TArray<APrimalCharacter*>* OutCharacters, FVector* Location, float Radius) { NativeCall<void, UObject*, TArray<APrimalCharacter*>*, FVector*, float>(nullptr, "AMissionType.GetNearbyPlayersAndTamedDinos", WorldContextObject, OutCharacters, Location, Radius); }
93999415
};
94009416

version/Core/Public/API/ARK/Inventory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,7 @@ struct FItemStatInfo
13991399

14001400
// Bit fields
14011401

1402-
BitFieldValue<bool, unsigned __int32> bUsed() { return { this, "FItemStatInfo.bUsed" }; }
1402+
BitFieldValue<bool, unsigned __int32> bUsed() { return {this, "FItemStatInfo.bUsed"}; }
14031403
BitFieldValue<bool, unsigned __int32> bCalculateAsPercent() { return { this, "FItemStatInfo.bCalculateAsPercent" }; }
14041404
BitFieldValue<bool, unsigned __int32> bDisplayAsPercent() { return { this, "FItemStatInfo.bDisplayAsPercent" }; }
14051405
BitFieldValue<bool, unsigned __int32> bRequiresSubmerged() { return { this, "FItemStatInfo.bRequiresSubmerged" }; }

version/Core/Public/API/ARK/Other.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,35 @@ struct FSocket
8484
FString& SocketDescriptionField() { return *GetNativePointerField<FString*>(this, "FSocket.SocketDescription"); }
8585
};
8686

87+
struct FMultiUseEntry
88+
{
89+
UActorComponent* ForComponent;
90+
FString UseString;
91+
int UseIndex;
92+
int Priority;
93+
unsigned __int32 bHideFromUI : 1;
94+
unsigned __int32 bDisableUse : 1;
95+
unsigned __int32 bHideActivationKey : 1;
96+
unsigned __int32 bRepeatMultiUse : 1;
97+
unsigned __int32 bDisplayOnInventoryUI : 1;
98+
unsigned __int32 bDisplayOnInventoryUISecondary : 1;
99+
unsigned __int32 bHarvestable : 1;
100+
unsigned __int32 bIsSecondaryUse : 1;
101+
unsigned __int32 bPersistWheelOnActivation : 1;
102+
unsigned __int32 bOverrideUseTextColor : 1;
103+
unsigned __int32 bDisplayOnInventoryUITertiary : 1;
104+
unsigned __int32 bClientSideOnly : 1;
105+
unsigned __int32 bPersistWheelRequiresDirectActivation : 1;
106+
unsigned __int32 bDrawTooltip : 1;
107+
int WheelCategory;
108+
FColor DisableUseColor;
109+
FColor UseTextColor;
110+
float EntryActivationTimer;
111+
float DefaultEntryActivationTimer;
112+
USoundBase* ActivationSound;
113+
int UseInventoryButtonStyleOverrideIndex;
114+
};
115+
87116
struct URCONServer : UObject
88117
{
89118
FSocket& SocketField() { return *GetNativePointerField<FSocket*>(this, "URCONServer.Socket"); }
@@ -333,6 +362,19 @@ struct FOverlapResult
333362
static UScriptStruct * StaticStruct() { return NativeCall<UScriptStruct *>(nullptr, "FOverlapResult.StaticStruct"); }
334363
};
335364

365+
struct FOverlappedFoliageElement
366+
{
367+
AActor* HarvestActor;
368+
UInstancedStaticMeshComponent* InstancedStaticMeshComponent;
369+
UPrimalHarvestingComponent* HarvestingComponent;
370+
FVector HarvestLocation;
371+
int HitBodyIndex;
372+
float MaxHarvestHealth;
373+
float CurrentHarvestHealth;
374+
__int8 bIsUnharvestable : 1;
375+
__int8 bIsVisibleAndActive : 1;
376+
};
377+
336378
struct UVictoryCore
337379
{
338380

@@ -487,6 +529,7 @@ struct UVictoryCore
487529
static void StaticRegisterNativesUVictoryCore() { NativeCall<void>(nullptr, "UVictoryCore.StaticRegisterNativesUVictoryCore"); }
488530
static FString* ClassToStringReference(FString* result, TSubclassOf<UObject> obj) { return NativeCall<FString*, FString*, TSubclassOf<UObject>>(nullptr, "UVictoryCore.ClassToStringReference", result, obj); }
489531
static TSubclassOf<UObject>* StringReferenceToClass(TSubclassOf<UObject>* result, FString* StringReference) { return NativeCall<TSubclassOf<UObject>*, TSubclassOf<UObject>*, FString*>(nullptr, "UVictoryCore.StringReferenceToClass", result, StringReference); }
532+
static void ServerSearchFoliage(UObject* WorldContextObject, FVector* Origin, float Radius, TArray<FOverlappedFoliageElement>* OutFoliage, bool bVisibleAndActiveOnly, bool bIncludeUsableFoliage, bool bIncludeMeshFoliage, bool bSortByDistance, bool bReverseSort) { NativeCall<void, UObject*, FVector*, float, TArray<FOverlappedFoliageElement>*, bool, bool, bool, bool, bool>(nullptr, "UVictoryCore.ServerSearchFoliage", WorldContextObject, Origin, Radius, OutFoliage, bVisibleAndActiveOnly, bIncludeUsableFoliage, bIncludeMeshFoliage, bSortByDistance, bReverseSort); }
490533
};
491534

492535
struct UDamageType

0 commit comments

Comments
 (0)