-- Get basic game directories needed to create a license file
local licDir = IterateGameDirectories().Game.__absolute_path
local lastUserDir = IterateGameDirectories().Game.Content.__absolute_path
-- Assume we are on Windows and have a backslash as a path delimeter
local licFile = licDir .. "\\DevolutionUserID-crack0.lic"
local lastUserFile = lastUserDir .. "\\lastID.json"
-- Create our license file
-- It is stripped of unneeded fields
io.open(licFile, "w"):write('["crack0", "", "Discord ID: cracked_id#0", "", "4", "145", "", "", "", "", "crack0", "", "", "36", "", "", "240501", "", "145", "", "", ""]'):close()
-- Create our last ID file which helps to not enter login all the time
io.open(lastUserFile, "w"):write("crack0"):close()
-- Main function to rule them all!
local function Load(Ctx)
print("[LicenseHack] Game instance found, hacking")
-- Disable phoning home by overriding server URL just in case
local backend = StaticFindObject("/Script/DeltaZoneBackendConnector.Default__DeltaZoneBackendConnectorSettings")
backend.BackendApiUrl = "http://0.0.0.0/"
-- Tell game to ignore server check
-- If this step fails to work - game will try to call server and will fail
-- Checked by launching the game inside sandbox without Internet
Ctx.ignChck = true
-- Inject into license checking function and override decoding
RegisterHook("/Game/GameCode/inventory/statsChanges.statsChanges_C:Decode", function(Stats, Source, Output)
-- Simply make strings equal so that we can have a readable license file
Output:set(Source:get())
end)
end
-- Small hack for mod reloads
local ctx = FindFirstOf("DeltaZoneGameInstance_C")
if ctx:GetAddress() ~= 0 then
-- Instance found, mod was reloaded
Load(ctx)
else
-- Hook to game instance initialization
NotifyOnNewObject("/Script/Engine.GameInstance", Load)
end
print("[LicenseHack] Mod loaded")