SDK
SoT SDK Dump
FindPattern Signatures
v2.0.10
GObjects:
89 0D ? ? ? ? 48 8B DF 48 89 5C 24
offset = address + 2
(UObject::GObjects)address + 6 + offset
\x89\x0D\x00\x00\x00\x00\x48\x8B\xDF\x48\x89\x5C\x24
xx????xxxxxxx
GNames
48 8B 1D ? ? ? ? 48 85 ? 75 3A
offset = address + 3
((FName::GNames))(*)address + 7 + offset
\x48\x8B\x1D\x00\x00\x00\x00\x48\x85\x00\x75\x3A
xxx????xx?xx
UWorld:
48 8B 05 ? ? ? ? 48 8B 88 ? ? ? ? 48 85 C9 74 06 48 8B 49 70
offset = address + 3
(UWorld)(*)address + 7 + offset
\x48\x8B\x05\x00\x00\x00\x00\x48\x8B\x88\x00\x00\x00\x00\x48\x85\xC9\x74\x06\x48\x8B\x49\x70
xxx????xxx????xxxxxxxxx
Distance to Meter scale
The distance scale in UE4 is 100 units = 1m.
So distance between two FVector's * 0.01f = distance in meter
(You can also use / 100.f, but multiplication is faster than division and has no problems with 0)
auto DistanceScale = 0.01f;
auto distanceInMeter = UVectorMaths::Distance(cameraLocation, enemyLocation) * DistanceScale;
Actor Array location
Like in all other UE4 games, the actor array is in ULevel under offset 0xA0.
The SDK Generator can't find it, so it's always hidden in UnknownData bytes block.
It has to be fixed manually.
Create a second UnknownData that will be placed under the actor array, change the size of UnknownData00 and add the actor array.
Caclucalting
UnknownData00 new size = AActors offset - UnknownData00 offset
UnknownData10 offset = AActors offset + AActors size
UnknownData10 size = ActorCluster offset - UnknownData10 offset
Before:
unsigned char UnknownData00[0xA0];
class ULevelActorContainer* ActorCluster;
After:
unsigned char UnknownData00[0x78];
TArray<class AActor*> AActors;
unsigned char UnknownData10[0x18];
class ULevelActorContainer* ActorCluster;
Get UAthenaGameViewportClient and PostRender address
auto AthenaGameViewportClient = UObject::FindObject<UAthenaGameViewportClient>("AthenaGameViewportClient Transient.AthenaGameEngine_1.AthenaGameViewportClient_1");
const size_t PostRenderIndex = 88;
const auto vmtPostRender = *reinterpret_cast<uintptr_t***>(AthenaGameViewportClient) + PostRenderIndex;
PostRender hook
typedef void(__thiscall *tPostRender)(UGameViewportClient* uObject, UCanvas* Canvas);
tPostRender OriginalPostRender;
void HookedPostRender(UGameViewportClient* thisPointer, UCanvas* canvas)
{
OriginalPostRender(thisPointer, canvas);
}
Get UWord and GameInstance
auto uWord = AthenaGameViewportClient->World;
auto gameInstance = AthenaGameViewportClient->GameInstance;
ULocalPlayer, APlayerController and AAthenaPlayerCharacter from LocalPlayer
ULocalPlayer
auto localPlayer = AthenaGameViewportClient->GameInstance->LocalPlayers[0];
APlayerController
auto playerController = localPlayer->PlayerController;
AAthenaPlayerCharacter
auto localPlayerActor = (AAthenaPlayerCharacter*)playerController->Pawn;
auto localPlayerActor = (AAthenaPlayerCharacter*)playerController->K2_GetPawn();
Fonts
Two methods to get a font for engine drawing.
1. Find a font object by name
Available fonts / UFont names
Font Engine.Default__Font
Font Roboto.Roboto
Font RobotoDistanceField.RobotoDistanceField
Font RobotoTiny.RobotoTiny
Font RobotoMono.RobotoMono
Font MapFont.MapFont
Font RiddleMapFont.RiddleMapFont
Font Windlass.Windlass
Font PerfCounterFont.PerfCounterFont
To get a font:
auto font = UObject::FindObject<UFont>("Font Roboto.Roboto");
2. Get a font from the UEngine
Each UE4 game got an instance of the UEngine class with default fonts set. The UAthenaGameEngine class derives from UEngine.
Get a default font from UAthenaGameEngine:
auto font = AthenaGameEngine->MediumFont;
Check out the UEngine class in the SoT SDK dump for more fonts.
Credits
Name | Reason |
igromanru | SDK Dump, this guide and most infromation |
gummy8unny | Open source external, Ship water level and many other contibutions |
xyz12 | Help with compilable SDK, public release and many other contibutions |
Janck7 | Bones dump, hints for some functions, his ReClass file |
sotgamer91 | TableMap pins, Levels array and other contibutions |
Special thanks to the OSH Community
Name | Reason |
KN4CK3R | SDK Generator and ReClass.NET |
Dr.Pepper | Help with SDK Generator, Unreal Engine, C++ and ASM |
SilverDeath | C++, ASM, Math and some UE SDK stuff |
Jeon | C++ and ASM |