<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="45">
  <CheatEntries>
    <CheatEntry>
      <ID>26722</ID>
      <Description>"CE compact mode"</Description>
      <LastState/>
      <Color>FF0000</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
--------------------------------------------------------------------------------
if syntaxcheck then return end
--------------------------------------------------------------------------------
function ToggleCECompactMode()
  local f = getMainForm()
  local controls = {f.Splitter1, f.Panel4, f.Panel5}
  for k,c in ipairs(controls) do c.Visible = not c.Visible end
end
ToggleCECompactMode()
--------------------------------------------------------------------------------
{$asm}
[DISABLE]
{$lua}
--------------------------------------------------------------------------------
if syntaxcheck then return end
--------------------------------------------------------------------------------
ToggleCECompactMode()
--------------------------------------------------------------------------------
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>9210</ID>
      <Description>"Attach CE to the game process"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <LastState/>
      <Color>FF0000</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
--------------------------------------------------------------------------------
if syntaxcheck then return end
--------------------------------------------------------------------------------
GetLuaEngine().MenuItem5.doClick() -- clear lua output
if OpenProcess("Diggles.exe") then
  return
else
  msg = "Cannot open process!"
  print(msg)
  error(msg)
end
--------------------------------------------------------------------------------
{$asm}
[DISABLE]
{$lua}
--------------------------------------------------------------------------------
if syntaxcheck then return end
--------------------------------------------------------------------------------
local function DeleteUserdefinedSymbols()
  local mv = getMemoryViewForm()
  if mv.frmSymbolhandler == nil then
    mv.Symbolhandler1.doClick()
    mv.frmSymbolhandler.Close()
  end
  local items = mv.frmSymbolhandler.ListView1.Items
  for i=0,items.Count-1 do
    unregisterSymbol(items.Item[0].Caption)
  end
end
--------------------------------------------------------------------------------
DeleteUserdefinedSymbols()
--------------------------------------------------------------------------------
</AssemblerScript>
      <Hotkeys>
        <Hotkey>
          <Action>Activate</Action>
          <Keys>
            <Key>18</Key>
            <Key>45</Key>
          </Keys>
          <ID>0</ID>
          <ActivateSound>Activate</ActivateSound>
        </Hotkey>
        <Hotkey>
          <Action>Deactivate</Action>
          <Keys>
            <Key>18</Key>
            <Key>46</Key>
          </Keys>
          <ID>1</ID>
          <DeactivateSound>Deactivate</DeactivateSound>
        </Hotkey>
        <Hotkey>
          <Action>Toggle Activation</Action>
          <Keys>
            <Key>17</Key>
            <Key>99</Key>
          </Keys>
          <ID>2</ID>
          <ActivateSound>Activate</ActivateSound>
          <DeactivateSound>Deactivate</DeactivateSound>
        </Hotkey>
      </Hotkeys>
      <CheatEntries>
        <CheatEntry>
          <ID>1337196683</ID>
          <Description>"Max your pawns stats"</Description>
          <Options moHideChildren="1"/>
          <LastState/>
          <Color>FF0000</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
aobscanmodule(codeReadYourStat,Diggles.exe,8B 8A 1C 02 00 00) // should be unique
alloc(memReadYourStat,$100,codeReadYourStat)

memReadYourStat:
  mov ecx,[edx+0000021C]
  mov [ptrReadYourStat],ecx

  cmp byte ptr [bExperience],0
  je @f
  mov [ecx+2C],(float)50
  mov [ecx+34],(float)2
  mov [ecx+38],(float)2
  mov [ecx+3C],(float)2
  mov [ecx+40],(float)2
  mov [ecx+44],(float)2
  mov [ecx+48],(float)2
  mov [ecx+4C],(float)2
  mov [ecx+50],(float)2
  mov [ecx+54],(float)2
  mov [ecx+58],(float)2
  mov [ecx+5C],(float)2
  mov [ecx+60],(float)2
  mov [ecx+64],(float)2

@@:
  cmp byte ptr [bHealth],0
  je @f
  mov [ecx+68],(float)1

@@:
  cmp byte ptr [bNeeds],0
  je @f
  mov [ecx+6C],(float)1
  mov [ecx+70],(float)1
  mov [ecx+74],(float)1

@@:
  jmp return

bkpReadYourStat:
  readmem(codeReadYourStat,6)

ptrReadYourStat:
  dd 0

bHealth:
  db 0
bNeeds:
  db 0
bExperience:
  db 0

codeReadYourStat:
  jmp memReadYourStat
  nop

return:
registersymbol(codeReadYourStat)
registersymbol(memReadYourStat)
registersymbol(bkpReadYourStat)
registersymbol(ptrReadYourStat)

registersymbol(bHealth)
registersymbol(bNeeds)
registersymbol(bExperience)

[DISABLE]

codeReadYourStat:
  readmem(bkpReadYourStat,6)

unregistersymbol(*)
dealloc(memReadYourStat)

{
// ORIGINAL CODE - INJECTION POINT: Diggles.exe+135990

Diggles.exe+13596A: EB 24                 - jmp Diggles.exe+135990
Diggles.exe+13596C: 85 C9                 - test ecx,ecx
Diggles.exe+13596E: B8 10 00 00 00        - mov eax,00000010
Diggles.exe+135973: B9 01 00 00 00        - mov ecx,00000001
Diggles.exe+135978: 0F 4E C1              - cmovle eax,ecx
Diggles.exe+13597B: 89 45 DC              - mov [ebp-24],eax
Diggles.exe+13597E: EB 10                 - jmp Diggles.exe+135990
Diggles.exe+135980: C7 45 DC 80 00 00 00  - mov [ebp-24],00000080
Diggles.exe+135987: EB 07                 - jmp Diggles.exe+135990
Diggles.exe+135989: C7 45 DC 08 00 00 00  - mov [ebp-24],00000008
// ---------- INJECTING HERE ----------
Diggles.exe+135990: 8B 8A 1C 02 00 00     - mov ecx,[edx+0000021C]
// ---------- DONE INJECTING  ----------
Diggles.exe+135996: 83 CF FF              - or edi,-01
Diggles.exe+135999: 85 C9                 - test ecx,ecx
Diggles.exe+13599B: 0F 85 D5 00 00 00     - jne Diggles.exe+135A76
Diggles.exe+1359A1: E8 4A 47 0A 00        - call Diggles.exe+1DA0F0
Diggles.exe+1359A6: 6A 19                 - push 19
Diggles.exe+1359A8: BA B0 64 D8 00        - mov edx,Diggles.exe+3364B0
Diggles.exe+1359AD: 89 7D CC              - mov [ebp-34],edi
Diggles.exe+1359B0: 8D 4F 21              - lea ecx,[edi+21]
Diggles.exe+1359B3: 8B F0                 - mov esi,eax
Diggles.exe+1359B5: E8 56 4E 18 00        - call Diggles.exe+2BA810
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>1337196703</ID>
              <Description>"Experience"</Description>
              <LastState Activated="1"/>
              <Color>FF0000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]
bExperience:
  db 1
[DISABLE]
bExperience:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>1337196704</ID>
              <Description>"Health"</Description>
              <LastState Activated="1"/>
              <Color>FF0000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]
bHealth:
  db 1
[DISABLE]
bHealth:
  db 0
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>1337196705</ID>
              <Description>"Needs"</Description>
              <LastState Activated="1"/>
              <Color>FF0000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]
bNeeds:
  db 1
[DISABLE]
bNeeds:
  db 0
</AssemblerScript>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>1337196658</ID>
          <Description>"Set game speed"</Description>
          <Options moHideChildren="1"/>
          <LastState/>
          <Color>FF0000</Color>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
aobscanmodule(codeReadSpeedThreshold,Diggles.exe,66 0F 2F 05 E8 71 D8 00) // should be unique
alloc(memReadSpeedThreshold,$100,codeReadSpeedThreshold)

memReadSpeedThreshold:
  mov [ptrReadSpeedThreshold],ecx
  comisd xmm0,[desiredSpeedThreshold] // the player controls aren't blocked if the speed value remains within [1-t, 1+t], where t = desiredSpeedThreshold
  jmp return

bkpReadSpeedThreshold:
  readmem(codeReadSpeedThreshold,8)

ptrReadSpeedThreshold:
  dd 0

desiredSpeedThreshold:
  dq (double)64.0

codeReadSpeedThreshold:
  jmp memReadSpeedThreshold
  nop 3

return:
registersymbol(codeReadSpeedThreshold)
registersymbol(memReadSpeedThreshold)
registersymbol(bkpReadSpeedThreshold)
registersymbol(ptrReadSpeedThreshold)
registersymbol(desiredSpeedThreshold)

[DISABLE]

codeReadSpeedThreshold:
  readmem(bkpReadSpeedThreshold,8)

unregistersymbol(*)
dealloc(memReadSpeedThreshold)

{
// ORIGINAL CODE - INJECTION POINT: Diggles.exe+129F29

Diggles.exe+129EEB: E8 E0 BF FD FF                 - call Diggles.exe+105ED0
Diggles.exe+129EF0: E8 5B 75 FD FF                 - call Diggles.exe+101450
Diggles.exe+129EF5: 83 B8 FC 01 01 00 02           - cmp dword ptr [eax+000101FC],02
Diggles.exe+129EFC: 0F 85 46 22 00 00              - jne Diggles.exe+12C148
Diggles.exe+129F02: E8 49 75 FD FF                 - call Diggles.exe+101450
Diggles.exe+129F07: C7 80 FC 01 01 00 04 00 00 00  - mov [eax+000101FC],00000004
Diggles.exe+129F11: E9 32 22 00 00                 - jmp Diggles.exe+12C148
Diggles.exe+129F16: F2 0F 10 81 90 A0 00 00        - movsd xmm0,[ecx+0000A090]
Diggles.exe+129F1E: F2 0F 5C 05 A8 72 D8 00        - subsd xmm0,[Diggles.exe+3372A8]
Diggles.exe+129F26: 0F 54 C1                       - andps xmm0,xmm1
// ---------- INJECTING HERE ----------
Diggles.exe+129F29: 66 0F 2F 05 E8 71 D8 00        - comisd xmm0,[Diggles.exe+3371E8]
// ---------- DONE INJECTING  ----------
Diggles.exe+129F31: 0F 86 5D 01 00 00              - jbe Diggles.exe+12A094
Diggles.exe+129F37: 83 BF E8 00 00 00 00           - cmp dword ptr [edi+000000E8],00
Diggles.exe+129F3E: 0F 85 99 00 00 00              - jne Diggles.exe+129FDD
Diggles.exe+129F44: 8B 4F 18                       - mov ecx,[edi+18]
Diggles.exe+129F47: 2B 4F 10                       - sub ecx,[edi+10]
Diggles.exe+129F4A: 8B 47 14                       - mov eax,[edi+14]
Diggles.exe+129F4D: 2B 47 0C                       - sub eax,[edi+0C]
Diggles.exe+129F50: 6A 03                          - push 03
Diggles.exe+129F52: 51                             - push ecx
Diggles.exe+129F53: 89 45 C8                       - mov [ebp-38],eax
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>1337196662</ID>
              <Description>"Pause hotkey (Space)"</Description>
              <LastState/>
              <Color>FF0000</Color>
              <VariableType>Auto Assembler Script</VariableType>
              <AssemblerScript>[ENABLE]
{$lua}
--------------------------------------------------------------------------------
if syntaxcheck then return end
--------------------------------------------------------------------------------
oldSpeed = 1
function TogglePause()
  if getOpenedProcessID() == getForegroundProcess() then
    local mr = getAddressList().getMemoryRecordByDescription('Game speed')
    if tonumber(mr.Value) == 0 then
      mr.Value = oldSpeed
    else
      oldSpeed = mr.Value
      mr.Value = 0
    end
  end
end
--------------------------------------------------------------------------------
if TogglePauseHotkey then
  TogglePauseHotkey.destroy()
  TogglePauseHotkey = nil
end
TogglePauseHotkey = createHotkey(TogglePause, VK_SPACE)
--------------------------------------------------------------------------------
{$asm}
[DISABLE]
{$lua}
--------------------------------------------------------------------------------
if syntaxcheck then return end
--------------------------------------------------------------------------------
if TogglePauseHotkey then
  TogglePauseHotkey.destroy()
  TogglePauseHotkey = nil
end
--------------------------------------------------------------------------------
</AssemblerScript>
            </CheatEntry>
            <CheatEntry>
              <ID>1337196661</ID>
              <Description>"Speed threshold"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>808000</Color>
              <VariableType>Double</VariableType>
              <Address>desiredSpeedThreshold</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>1337196660</ID>
              <Description>"Game speed"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>Double</VariableType>
              <Address>ptrReadSpeedThreshold</Address>
              <Offsets>
                <Offset>A090</Offset>
              </Offsets>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <Comments>░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
【 TABLE INFO 】
❖ CE Version required: 7.5
❖ Game process: Diggles.exe
❖ Game engine: Unknown
❖ Tested game versions: Steam (see history below for details)
❖ Author: mece
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
【 FEATURES 】
❖ Max your pawns stats: the script frequently updates different pawn stats:
  - Experience: set each experience level to 200 and experience cap to 5000
  - Health: set health to making pawns invulnerable to regular damage
  - Needs: set Nutrition, Attention, Mood to 100%
❖ Set game speed: edit different game speed parameters:
  - Game speed: 0 - pause, 1 - normal, 2 - 2x, etc
  - Speed threshold: the player controls aren't blocked when speed isn't normal
  - Pause hotkey (Space): adds tactical pause to the game
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
【 USAGE TIPS 】
❖  
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
【 KNOWN ISSUES 】
❖ 
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
【 CHANGE LOG 】
⋯ 2023-12-09 ⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯
❖ Game version: 2.1.1.10 (from .exe properties), Steam build ID: 6012233 
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
【 TABLE UPDATE TIPS 】
❖ 
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
【 FUTURE PLANS 】
❖ 
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
【 CONTACT THE AUTHOR 】
❖ https://opencheattables.com/memberlist.php?mode=viewprofile&amp;u=64
</Comments>
</CheatTable>
