Skip to content

Instantly share code, notes, and snippets.

@FreeER
Last active August 6, 2020 18:05
Show Gist options
  • Save FreeER/efef49607ac17cfe9687e7adc1b7e342 to your computer and use it in GitHub Desktop.
Save FreeER/efef49607ac17cfe9687e7adc1b7e342 to your computer and use it in GitHub Desktop.
Cheat Table for Polytopia initial release to change zoom
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="31">
<CheatEntries>
<CheatEntry>
<ID>1</ID>
<Description>"Find Zoom"</Description>
<Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
<LastState Activated="1"/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{$lua}
local timerName = 'CameraTimer'
LaunchMonoDataCollector()
-- don't run this code when editing
if syntaxcheck then return end
[ENABLE]
memrec.Description = 'Searching...'
local addr = 'CameraController.Update'
local function safeToEnable() return getAddressSafe(addr) end
local function onEnable()
-- find camera controller instance/zoom address via update function
debug_setBreakpoint(addr, function()
debug_removeBreakpoint(addr)
AddressList.getMemoryRecordByDescription('CameraController').Address = RCX
memrec.Description = 'Find Zoom'
end)
end
if safeToEnable() then onEnable()
else -- wait
_G[timerName] = createTimer()
local t = _G[timerName]
t.Interval = 3 * 1000 -- wait twenty seconds
t.OnTimer = function(t)
if safeToEnable() then -- success
t.destroy()
_G[timerName] = nil
onEnable()
else --reinit and wait to see if it can be found later
if not monopipe or not monoSymbolList then LaunchMonoDataCollector() end
reinitializeDotNetSymbolhandler()
end
end
end
[DISABLE]
if _G[timerName] then _G[timerName].destroy() _G[timerName] = nil end
memrec.Description = 'Find Zoom'
</AssemblerScript>
<Hotkeys>
<Hotkey>
<Action>Toggle Activation</Action>
<Keys>
<Key>112</Key>
</Keys>
<ID>0</ID>
</Hotkey>
</Hotkeys>
<CheatEntries>
<CheatEntry>
<ID>7</ID>
<Description>"CameraController"</Description>
<LastState Value="00000262CF8606F0" RealAddress="26338FD3C00"/>
<ShowAsHex>1</ShowAsHex>
<VariableType>8 Bytes</VariableType>
<Address>26338FD3C00</Address>
<CheatEntries>
<CheatEntry>
<ID>2</ID>
<Description>"moveSpeedMinZoom"</Description>
<LastState Value="3" RealAddress="26338FD3C20"/>
<VariableType>Float</VariableType>
<Address>+20</Address>
</CheatEntry>
<CheatEntry>
<ID>6</ID>
<Description>"moveSpeedMaxZoom"</Description>
<LastState Value="10" RealAddress="26338FD3C24"/>
<VariableType>Float</VariableType>
<Address>+24</Address>
</CheatEntry>
<CheatEntry>
<ID>5</ID>
<Description>"MinZoom"</Description>
<LastState Value="3.5" RealAddress="26338FD3C28"/>
<VariableType>Float</VariableType>
<Address>+28</Address>
</CheatEntry>
<CheatEntry>
<ID>4</ID>
<Description>"MaxZoom"</Description>
<LastState Value="10" RealAddress="26338FD3C2C"/>
<VariableType>Float</VariableType>
<Address>+2C</Address>
</CheatEntry>
<CheatEntry>
<ID>3</ID>
<Description>"Zoom"</Description>
<LastState Value="0" RealAddress="26338FD3C44"/>
<VariableType>Float</VariableType>
<Address>+44</Address>
</CheatEntry>
</CheatEntries>
</CheatEntry>
</CheatEntries>
</CheatEntry>
</CheatEntries>
<UserdefinedSymbols/>
<LuaScript>getAutoAttachList().add('Polytopia.exe')
</LuaScript>
</CheatTable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment