<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="46">
  <CheatEntries>
    <CheatEntry>
      <ID>13</ID>
      <Description>"God Mode"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(ISPLAYER,Player:IsPlayer)
define(SETHEALTH,Character:SetHealth)

assert(ISPLAYER,48 83 EC 08 B8 01 00 00 00 48 83 C4 08 C3)
assert(SETHEALTH,55 48 8B EC 48 83 EC 40 48 89 75 F0 48 89 7D F8)

alloc(godmem,$1000)

label(playerHook)
label(healthHook)
label(normalHealth)
label(blockDamage)
label(playerPtr)

godmem:

playerPtr:
  dq 0

playerHook:
  mov [playerPtr],rcx
  sub rsp,08
  mov eax,00000001
  add rsp,08
  ret

healthHook:
  cmp rcx,[playerPtr]
  jne normalHealth

  comiss xmm1,[rcx+524]

  jb blockDamage

normalHealth:
  push rbp
  mov rbp,rsp
  sub rsp,40
  mov [rbp-10],rsi
  mov [rbp-08],rdi

  jmp far SETHEALTH+10

blockDamage:
  ret

ISPLAYER:
  jmp far playerHook

SETHEALTH:
  jmp far healthHook
  nop 2

registersymbol(playerPtr)

[DISABLE]

ISPLAYER:
  db 48 83 EC 08 B8 01 00 00 00 48 83 C4 08 C3

SETHEALTH:
  db 55 48 8B EC 48 83 EC 40 48 89 75 F0 48 89 7D F8

unregistersymbol(playerPtr)
dealloc(godmem)
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>27</ID>
      <Description>"Max Health (125)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(MAXHEALTH,Player:SetMaxHealth)

assert(MAXHEALTH+F,F3 0F 11 4D F0)

alloc(maxhealthmem,$1000,MAXHEALTH+F)

label(return)
label(original)
label(minHealth)

maxhealthmem:

  comiss xmm1,[minHealth]
  jae original

  movss xmm1,[minHealth]

original:
  movss [rbp-10],xmm1
  jmp return

minHealth:
  dd (float)125

MAXHEALTH+F:
  jmp maxhealthmem

return:

[DISABLE]

define(MAXHEALTH,Player:SetMaxHealth)

MAXHEALTH+F:
  db F3 0F 11 4D F0

dealloc(maxhealthmem)
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>14</ID>
      <Description>"Infinite Stamina"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(USESTAMINA,Player:RPC_UseStamina)

assert(USESTAMINA+4C,F3 0F 11 AE 88 09 00 00)

USESTAMINA+4C:
  db 90 90 90 90 90 90 90 90

[DISABLE]

define(USESTAMINA,Player:RPC_UseStamina)

USESTAMINA+4C:
  db F3 0F 11 AE 88 09 00 00
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>42</ID>
      <Description>"CarryWeight 1000"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local p = getAddressSafe("Player:GetMaxCarryWeight")

if not p then
  error("Could not find Player:GetMaxCarryWeight")
end

local firstByte = readBytes(p,1,false)

if firstByte ~= 0xE9 then
  error("GetMaxCarryWeight is not using the expected DMD jump")
end

local rel = readInteger(p+1)

if rel &gt;= 0x80000000 then
  rel = rel - 0x100000000
end

local dmd = p + 5 + rel

local addr = dmd + 0xCB

local original = {
  0xF3,0x0F,0x10,0x45,0xF0,
  0xF3,0x0F,0x5A,0xC0,
  0xF2,0x0F,0x5A,0xC0
}

local current = readBytes(addr,13,true)

if not current then
  error("Could not read the carry-weight return code")
end

for i=1,13 do
  if current[i] ~= original[i] then
    error("Carry Weight: expected original bytes were not found")
  end
end

_G.ValheimCarryWeightPatch = addr

writeBytes(addr,
  0xB8,0x00,0x00,0x7A,0x44,
  0x66,0x0F,0x6E,0xC0,
  0x90,0x90,0x90,0x90
)

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

local addr = _G.ValheimCarryWeightPatch

if addr then
  writeBytes(addr,
    0xF3,0x0F,0x10,0x45,0xF0,
    0xF3,0x0F,0x5A,0xC0,
    0xF2,0x0F,0x5A,0xC0
  )
end

_G.ValheimCarryWeightPatch = nil

{$asm}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>52</ID>
      <Description>"Run Speed"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>48</ID>
          <Description>"1.5x Run Speed"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")

if not playerClass or playerClass == 0 then
  error("Could not find Player class")
end

local playerFields = mono_class_enumFields(playerClass)
local localPlayerField = nil

for i = 1, #playerFields do
  if playerFields[i].name == "m_localPlayer"
     and playerFields[i].isStatic then
    localPlayerField = playerFields[i]
    break
  end
end

if not localPlayerField then
  error("Could not find Player.m_localPlayer")
end

local domains = mono_enumDomains()
local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase or staticBase == 0 then
  error("Could not resolve Player static fields")
end

local player =
  readPointer(staticBase + localPlayerField.offset)

if not player or player == 0 then
  error("Local player not found. Load into your world first.")
end

local characterClass = mono_findClass("", "Character")

if not characterClass or characterClass == 0 then
  error("Could not find Character class")
end

local characterFields =
  mono_class_enumFields(characterClass)

local runOffset = nil
local swimOffset = nil

for i = 1, #characterFields do
  if characterFields[i].name == "m_runSpeed" then
    runOffset = characterFields[i].offset

  elseif characterFields[i].name == "m_swimSpeed" then
    swimOffset = characterFields[i].offset
  end
end

if not runOffset then
  error("Could not find Character.m_runSpeed")
end

if not swimOffset then
  error("Could not find Character.m_swimSpeed")
end

local state = _G.ValheimMovementSpeedState

if not state
   or state.player ~= player
   or state.runOffset ~= runOffset
   or state.swimOffset ~= swimOffset then

  local baseRun = readFloat(player + runOffset)
  local baseSwim = readFloat(player + swimOffset)

  if baseRun == nil then
    error("Could not read original run speed")
  end

  if baseSwim == nil then
    error("Could not read original swim speed")
  end

  state = {
    player = player,
    runOffset = runOffset,
    swimOffset = swimOffset,
    baseRun = baseRun,
    baseSwim = baseSwim
  }

  _G.ValheimMovementSpeedState = state
end

_G.ValheimMovementSpeedSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.runOffset,
  state.baseRun * 1.5
)

writeFloat(
  state.player + state.swimOffset,
  state.baseSwim * 1.5
)

_G.ValheimMovementSpeedSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimMovementSpeedSwitching then
  return
end

local state = _G.ValheimMovementSpeedState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.runOffset,
    state.baseRun
  )

  writeFloat(
    state.player + state.swimOffset,
    state.baseSwim
  )
end

_G.ValheimMovementSpeedState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>49</ID>
          <Description>"2x Run Speed"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")

if not playerClass or playerClass == 0 then
  error("Could not find Player class")
end

local playerFields = mono_class_enumFields(playerClass)
local localPlayerField = nil

for i = 1, #playerFields do
  if playerFields[i].name == "m_localPlayer"
     and playerFields[i].isStatic then
    localPlayerField = playerFields[i]
    break
  end
end

if not localPlayerField then
  error("Could not find Player.m_localPlayer")
end

local domains = mono_enumDomains()
local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase or staticBase == 0 then
  error("Could not resolve Player static fields")
end

local player =
  readPointer(staticBase + localPlayerField.offset)

if not player or player == 0 then
  error("Local player not found. Load into your world first.")
end

local characterClass = mono_findClass("", "Character")

if not characterClass or characterClass == 0 then
  error("Could not find Character class")
end

local characterFields =
  mono_class_enumFields(characterClass)

local runOffset = nil
local swimOffset = nil

for i = 1, #characterFields do
  if characterFields[i].name == "m_runSpeed" then
    runOffset = characterFields[i].offset

  elseif characterFields[i].name == "m_swimSpeed" then
    swimOffset = characterFields[i].offset
  end
end

if not runOffset then
  error("Could not find Character.m_runSpeed")
end

if not swimOffset then
  error("Could not find Character.m_swimSpeed")
end

local state = _G.ValheimMovementSpeedState

if not state
   or state.player ~= player
   or state.runOffset ~= runOffset
   or state.swimOffset ~= swimOffset then

  local baseRun = readFloat(player + runOffset)
  local baseSwim = readFloat(player + swimOffset)

  if baseRun == nil then
    error("Could not read original run speed")
  end

  if baseSwim == nil then
    error("Could not read original swim speed")
  end

  state = {
    player = player,
    runOffset = runOffset,
    swimOffset = swimOffset,
    baseRun = baseRun,
    baseSwim = baseSwim
  }

  _G.ValheimMovementSpeedState = state
end

_G.ValheimMovementSpeedSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.runOffset,
  state.baseRun * 2.0
)

writeFloat(
  state.player + state.swimOffset,
  state.baseSwim * 2.0
)

_G.ValheimMovementSpeedSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimMovementSpeedSwitching then
  return
end

local state = _G.ValheimMovementSpeedState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.runOffset,
    state.baseRun
  )

  writeFloat(
    state.player + state.swimOffset,
    state.baseSwim
  )
end

_G.ValheimMovementSpeedState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>50</ID>
          <Description>"3x Run Speed"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")

if not playerClass or playerClass == 0 then
  error("Could not find Player class")
end

local playerFields = mono_class_enumFields(playerClass)
local localPlayerField = nil

for i = 1, #playerFields do
  if playerFields[i].name == "m_localPlayer"
     and playerFields[i].isStatic then
    localPlayerField = playerFields[i]
    break
  end
end

if not localPlayerField then
  error("Could not find Player.m_localPlayer")
end

local domains = mono_enumDomains()
local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase or staticBase == 0 then
  error("Could not resolve Player static fields")
end

local player =
  readPointer(staticBase + localPlayerField.offset)

if not player or player == 0 then
  error("Local player not found. Load into your world first.")
end

local characterClass = mono_findClass("", "Character")

if not characterClass or characterClass == 0 then
  error("Could not find Character class")
end

local characterFields =
  mono_class_enumFields(characterClass)

local runOffset = nil
local swimOffset = nil

for i = 1, #characterFields do
  if characterFields[i].name == "m_runSpeed" then
    runOffset = characterFields[i].offset

  elseif characterFields[i].name == "m_swimSpeed" then
    swimOffset = characterFields[i].offset
  end
end

if not runOffset then
  error("Could not find Character.m_runSpeed")
end

if not swimOffset then
  error("Could not find Character.m_swimSpeed")
end

local state = _G.ValheimMovementSpeedState

if not state
   or state.player ~= player
   or state.runOffset ~= runOffset
   or state.swimOffset ~= swimOffset then

  local baseRun = readFloat(player + runOffset)
  local baseSwim = readFloat(player + swimOffset)

  if baseRun == nil then
    error("Could not read original run speed")
  end

  if baseSwim == nil then
    error("Could not read original swim speed")
  end

  state = {
    player = player,
    runOffset = runOffset,
    swimOffset = swimOffset,
    baseRun = baseRun,
    baseSwim = baseSwim
  }

  _G.ValheimMovementSpeedState = state
end

_G.ValheimMovementSpeedSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.runOffset,
  state.baseRun * 3.0
)

writeFloat(
  state.player + state.swimOffset,
  state.baseSwim * 3.0
)

_G.ValheimMovementSpeedSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimMovementSpeedSwitching then
  return
end

local state = _G.ValheimMovementSpeedState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.runOffset,
    state.baseRun
  )

  writeFloat(
    state.player + state.swimOffset,
    state.baseSwim
  )
end

_G.ValheimMovementSpeedState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>51</ID>
          <Description>"5x Runs Speed"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")

if not playerClass or playerClass == 0 then
  error("Could not find Player class")
end

local playerFields = mono_class_enumFields(playerClass)
local localPlayerField = nil

for i = 1, #playerFields do
  if playerFields[i].name == "m_localPlayer"
     and playerFields[i].isStatic then
    localPlayerField = playerFields[i]
    break
  end
end

if not localPlayerField then
  error("Could not find Player.m_localPlayer")
end

local domains = mono_enumDomains()
local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase or staticBase == 0 then
  error("Could not resolve Player static fields")
end

local player =
  readPointer(staticBase + localPlayerField.offset)

if not player or player == 0 then
  error("Local player not found. Load into your world first.")
end

local characterClass = mono_findClass("", "Character")

if not characterClass or characterClass == 0 then
  error("Could not find Character class")
end

local characterFields =
  mono_class_enumFields(characterClass)

local runOffset = nil
local swimOffset = nil

for i = 1, #characterFields do
  if characterFields[i].name == "m_runSpeed" then
    runOffset = characterFields[i].offset

  elseif characterFields[i].name == "m_swimSpeed" then
    swimOffset = characterFields[i].offset
  end
end

if not runOffset then
  error("Could not find Character.m_runSpeed")
end

if not swimOffset then
  error("Could not find Character.m_swimSpeed")
end

local state = _G.ValheimMovementSpeedState

if not state
   or state.player ~= player
   or state.runOffset ~= runOffset
   or state.swimOffset ~= swimOffset then

  local baseRun = readFloat(player + runOffset)
  local baseSwim = readFloat(player + swimOffset)

  if baseRun == nil then
    error("Could not read original run speed")
  end

  if baseSwim == nil then
    error("Could not read original swim speed")
  end

  state = {
    player = player,
    runOffset = runOffset,
    swimOffset = swimOffset,
    baseRun = baseRun,
    baseSwim = baseSwim
  }

  _G.ValheimMovementSpeedState = state
end

_G.ValheimMovementSpeedSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.runOffset,
  state.baseRun * 5.0
)

writeFloat(
  state.player + state.swimOffset,
  state.baseSwim * 5.0
)

_G.ValheimMovementSpeedSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimMovementSpeedSwitching then
  return
end

local state = _G.ValheimMovementSpeedState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.runOffset,
    state.baseRun
  )

  writeFloat(
    state.player + state.swimOffset,
    state.baseSwim
  )
end

_G.ValheimMovementSpeedState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>65</ID>
          <Description>"10x Runs Speed"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")

if not playerClass or playerClass == 0 then
  error("Could not find Player class")
end

local playerFields = mono_class_enumFields(playerClass)
local localPlayerField = nil

for i = 1, #playerFields do
  if playerFields[i].name == "m_localPlayer"
     and playerFields[i].isStatic then
    localPlayerField = playerFields[i]
    break
  end
end

if not localPlayerField then
  error("Could not find Player.m_localPlayer")
end

local domains = mono_enumDomains()
local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase or staticBase == 0 then
  error("Could not resolve Player static fields")
end

local player =
  readPointer(staticBase + localPlayerField.offset)

if not player or player == 0 then
  error("Local player not found. Load into your world first.")
end

local characterClass = mono_findClass("", "Character")

if not characterClass or characterClass == 0 then
  error("Could not find Character class")
end

local characterFields =
  mono_class_enumFields(characterClass)

local runOffset = nil
local swimOffset = nil

for i = 1, #characterFields do
  if characterFields[i].name == "m_runSpeed" then
    runOffset = characterFields[i].offset

  elseif characterFields[i].name == "m_swimSpeed" then
    swimOffset = characterFields[i].offset
  end
end

if not runOffset then
  error("Could not find Character.m_runSpeed")
end

if not swimOffset then
  error("Could not find Character.m_swimSpeed")
end

local state = _G.ValheimMovementSpeedState

if not state
   or state.player ~= player
   or state.runOffset ~= runOffset
   or state.swimOffset ~= swimOffset then

  local baseRun = readFloat(player + runOffset)
  local baseSwim = readFloat(player + swimOffset)

  if baseRun == nil then
    error("Could not read original run speed")
  end

  if baseSwim == nil then
    error("Could not read original swim speed")
  end

  state = {
    player = player,
    runOffset = runOffset,
    swimOffset = swimOffset,
    baseRun = baseRun,
    baseSwim = baseSwim
  }

  _G.ValheimMovementSpeedState = state
end

_G.ValheimMovementSpeedSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.runOffset,
  state.baseRun * 10.0
)

writeFloat(
  state.player + state.swimOffset,
  state.baseSwim * 10.0
)

_G.ValheimMovementSpeedSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimMovementSpeedSwitching then
  return
end

local state = _G.ValheimMovementSpeedState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.runOffset,
    state.baseRun
  )

  writeFloat(
    state.player + state.swimOffset,
    state.baseSwim
  )
end

_G.ValheimMovementSpeedState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>59</ID>
      <Description>"Jump Hight"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>58</ID>
          <Description>"Jump Hight 1.5"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")
if not playerClass then
  error("Could not find Player class")
end

local characterClass = mono_findClass("", "Character")
if not characterClass then
  error("Could not find Character class")
end

local domains = mono_enumDomains()
if not domains or #domains == 0 then
  error("Could not find Mono domain")
end

local localPlayerOffset = nil
local playerFields = mono_class_enumFields(playerClass)

for i,field in ipairs(playerFields) do
  if field.name == "m_localPlayer" then
    localPlayerOffset = field.offset
    break
  end
end

if not localPlayerOffset then
  error("Could not find Player.m_localPlayer")
end

local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase then
  error("Could not resolve Player static fields")
end

local player = readPointer(staticBase + localPlayerOffset)

if not player or player == 0 then
  error("Local player is not available")
end

local jumpOffset = nil
local characterFields = mono_class_enumFields(characterClass)

for i,field in ipairs(characterFields) do
  if field.name == "m_jumpForce" then
    jumpOffset = field.offset
    break
  end
end

if not jumpOffset then
  error("Could not find Character.m_jumpForce")
end

local state = _G.ValheimJumpHeightState

if not state
or state.player ~= player
or state.offset ~= jumpOffset then

  local baseJump = readFloat(player + jumpOffset)

  if baseJump == nil then
    error("Could not read original jump force")
  end

  state = {
    player = player,
    offset = jumpOffset,
    baseJump = baseJump
  }

  _G.ValheimJumpHeightState = state
end

_G.ValheimJumpHeightSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.offset,
  state.baseJump * 1.5
)

_G.ValheimJumpHeightSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimJumpHeightSwitching then
  return
end

local state = _G.ValheimJumpHeightState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.offset,
    state.baseJump
  )
end

_G.ValheimJumpHeightState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>62</ID>
          <Description>"Jump Hight 2x"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")
if not playerClass then
  error("Could not find Player class")
end

local characterClass = mono_findClass("", "Character")
if not characterClass then
  error("Could not find Character class")
end

local domains = mono_enumDomains()
if not domains or #domains == 0 then
  error("Could not find Mono domain")
end

local localPlayerOffset = nil
local playerFields = mono_class_enumFields(playerClass)

for i,field in ipairs(playerFields) do
  if field.name == "m_localPlayer" then
    localPlayerOffset = field.offset
    break
  end
end

if not localPlayerOffset then
  error("Could not find Player.m_localPlayer")
end

local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase then
  error("Could not resolve Player static fields")
end

local player = readPointer(staticBase + localPlayerOffset)

if not player or player == 0 then
  error("Local player is not available")
end

local jumpOffset = nil
local characterFields = mono_class_enumFields(characterClass)

for i,field in ipairs(characterFields) do
  if field.name == "m_jumpForce" then
    jumpOffset = field.offset
    break
  end
end

if not jumpOffset then
  error("Could not find Character.m_jumpForce")
end

local state = _G.ValheimJumpHeightState

if not state
or state.player ~= player
or state.offset ~= jumpOffset then

  local baseJump = readFloat(player + jumpOffset)

  if baseJump == nil then
    error("Could not read original jump force")
  end

  state = {
    player = player,
    offset = jumpOffset,
    baseJump = baseJump
  }

  _G.ValheimJumpHeightState = state
end

_G.ValheimJumpHeightSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.offset,
  state.baseJump * 2.0
)

_G.ValheimJumpHeightSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimJumpHeightSwitching then
  return
end

local state = _G.ValheimJumpHeightState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.offset,
    state.baseJump
  )
end

_G.ValheimJumpHeightState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>61</ID>
          <Description>"Jump Hight 3x"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")
if not playerClass then
  error("Could not find Player class")
end

local characterClass = mono_findClass("", "Character")
if not characterClass then
  error("Could not find Character class")
end

local domains = mono_enumDomains()
if not domains or #domains == 0 then
  error("Could not find Mono domain")
end

local localPlayerOffset = nil
local playerFields = mono_class_enumFields(playerClass)

for i,field in ipairs(playerFields) do
  if field.name == "m_localPlayer" then
    localPlayerOffset = field.offset
    break
  end
end

if not localPlayerOffset then
  error("Could not find Player.m_localPlayer")
end

local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase then
  error("Could not resolve Player static fields")
end

local player = readPointer(staticBase + localPlayerOffset)

if not player or player == 0 then
  error("Local player is not available")
end

local jumpOffset = nil
local characterFields = mono_class_enumFields(characterClass)

for i,field in ipairs(characterFields) do
  if field.name == "m_jumpForce" then
    jumpOffset = field.offset
    break
  end
end

if not jumpOffset then
  error("Could not find Character.m_jumpForce")
end

local state = _G.ValheimJumpHeightState

if not state
or state.player ~= player
or state.offset ~= jumpOffset then

  local baseJump = readFloat(player + jumpOffset)

  if baseJump == nil then
    error("Could not read original jump force")
  end

  state = {
    player = player,
    offset = jumpOffset,
    baseJump = baseJump
  }

  _G.ValheimJumpHeightState = state
end

_G.ValheimJumpHeightSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.offset,
  state.baseJump * 3.0
)

_G.ValheimJumpHeightSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimJumpHeightSwitching then
  return
end

local state = _G.ValheimJumpHeightState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.offset,
    state.baseJump
  )
end

_G.ValheimJumpHeightState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>60</ID>
          <Description>"Jump Hight 5x"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")
if not playerClass then
  error("Could not find Player class")
end

local characterClass = mono_findClass("", "Character")
if not characterClass then
  error("Could not find Character class")
end

local domains = mono_enumDomains()
if not domains or #domains == 0 then
  error("Could not find Mono domain")
end

local localPlayerOffset = nil
local playerFields = mono_class_enumFields(playerClass)

for i,field in ipairs(playerFields) do
  if field.name == "m_localPlayer" then
    localPlayerOffset = field.offset
    break
  end
end

if not localPlayerOffset then
  error("Could not find Player.m_localPlayer")
end

local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase then
  error("Could not resolve Player static fields")
end

local player = readPointer(staticBase + localPlayerOffset)

if not player or player == 0 then
  error("Local player is not available")
end

local jumpOffset = nil
local characterFields = mono_class_enumFields(characterClass)

for i,field in ipairs(characterFields) do
  if field.name == "m_jumpForce" then
    jumpOffset = field.offset
    break
  end
end

if not jumpOffset then
  error("Could not find Character.m_jumpForce")
end

local state = _G.ValheimJumpHeightState

if not state
or state.player ~= player
or state.offset ~= jumpOffset then

  local baseJump = readFloat(player + jumpOffset)

  if baseJump == nil then
    error("Could not read original jump force")
  end

  state = {
    player = player,
    offset = jumpOffset,
    baseJump = baseJump
  }

  _G.ValheimJumpHeightState = state
end

_G.ValheimJumpHeightSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.offset,
  state.baseJump * 5.0
)

_G.ValheimJumpHeightSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimJumpHeightSwitching then
  return
end

local state = _G.ValheimJumpHeightState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.offset,
    state.baseJump
  )
end

_G.ValheimJumpHeightState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>63</ID>
          <Description>"Jump Hight 10x"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local playerClass = mono_findClass("", "Player")
if not playerClass then
  error("Could not find Player class")
end

local characterClass = mono_findClass("", "Character")
if not characterClass then
  error("Could not find Character class")
end

local domains = mono_enumDomains()
if not domains or #domains == 0 then
  error("Could not find Mono domain")
end

local localPlayerOffset = nil
local playerFields = mono_class_enumFields(playerClass)

for i,field in ipairs(playerFields) do
  if field.name == "m_localPlayer" then
    localPlayerOffset = field.offset
    break
  end
end

if not localPlayerOffset then
  error("Could not find Player.m_localPlayer")
end

local staticBase =
  mono_class_getStaticFieldAddress(domains[1], playerClass)

if not staticBase then
  error("Could not resolve Player static fields")
end

local player = readPointer(staticBase + localPlayerOffset)

if not player or player == 0 then
  error("Local player is not available")
end

local jumpOffset = nil
local characterFields = mono_class_enumFields(characterClass)

for i,field in ipairs(characterFields) do
  if field.name == "m_jumpForce" then
    jumpOffset = field.offset
    break
  end
end

if not jumpOffset then
  error("Could not find Character.m_jumpForce")
end

local state = _G.ValheimJumpHeightState

if not state
or state.player ~= player
or state.offset ~= jumpOffset then

  local baseJump = readFloat(player + jumpOffset)

  if baseJump == nil then
    error("Could not read original jump force")
  end

  state = {
    player = player,
    offset = jumpOffset,
    baseJump = baseJump
  }

  _G.ValheimJumpHeightState = state
end

_G.ValheimJumpHeightSwitching = true

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

writeFloat(
  state.player + state.offset,
  state.baseJump * 10.0
)

_G.ValheimJumpHeightSwitching = false

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

if _G.ValheimJumpHeightSwitching then
  return
end

local state = _G.ValheimJumpHeightState

if state and state.player and state.player ~= 0 then
  writeFloat(
    state.player + state.offset,
    state.baseJump
  )
end

_G.ValheimJumpHeightState = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>40</ID>
      <Description>"Extra Damage"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end
{$asm}

define(MODDAMAGE,Attack:ModifyDamage)

assert(MODDAMAGE+16,F3 0F 11 55 E0 F3 0F 10 87 24 01 00 00 F3 0F 5A C0)

alloc(damagemem,$1000)

label(normalDamage)
label(damageMultiplier)

damagemem:

  cmp qword ptr [rdi+90],00
  jne normalDamage

  mulss xmm2,[damageMultiplier]

normalDamage:

  movss [rbp-20],xmm2
  movss xmm0,[rdi+00000124]
  cvtss2sd xmm0,xmm0

  jmp far MODDAMAGE+27

damageMultiplier:
  dd (float)10.0

MODDAMAGE+16:
  jmp far damagemem
  nop 3

[DISABLE]

define(MODDAMAGE,Attack:ModifyDamage)

MODDAMAGE+16:
  db F3 0F 11 55 E0
  db F3 0F 10 87 24 01 00 00
  db F3 0F 5A C0

dealloc(damagemem)
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>23</ID>
      <Description>"Infinite Ammo"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(USEAMMO,Attack:UseAmmo)

assert(USEAMMO+298,41 FF D3)

USEAMMO+298:
  db 90 90 90

[DISABLE]

define(USEAMMO,Attack:UseAmmo)

USEAMMO+298:
  db 41 FF D3
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>41</ID>
      <Description>"Durability"</Description>
      <Options moAlwaysHideChildren="1" moActivateChildrenAsWell="1" moDeactivateChildrenAsWell="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>17</ID>
          <Description>"Melee Durability"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(MELEEDURABILITY,Attack:DoMeleeAttack)

assert(MELEEDURABILITY+5B32,F3 0F 11 68 3C)

MELEEDURABILITY+5B32:
  db 90 90 90 90 90

[DISABLE]

define(MELEEDURABILITY,Attack:DoMeleeAttack)

MELEEDURABILITY+5B32:
  db F3 0F 11 68 3C
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>20</ID>
          <Description>"Ranged Durability"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(PROJECTILEDURABILITY,Attack:ProjectileAttackTriggered)

assert(PROJECTILEDURABILITY+418,F3 0F 11 68 3C)

PROJECTILEDURABILITY+418:
  db 90 90 90 90 90

[DISABLE]

define(PROJECTILEDURABILITY,Attack:ProjectileAttackTriggered)

PROJECTILEDURABILITY+418:
  db F3 0F 11 68 3C
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>29</ID>
          <Description>"Armour Durability"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(ARMORDURABILITY,Player:DamageArmorDurability)

assert(ARMORDURABILITY+3B4,F3 41 0F 11 6F 3C)

ARMORDURABILITY+3B4:
  db 90 90 90 90 90 90

[DISABLE]

define(ARMORDURABILITY,Player:DamageArmorDurability)

ARMORDURABILITY+3B4:
  db F3 41 0F 11 6F 3C
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>46</ID>
          <Description>"Hammer Durability"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local p = getAddressSafe("Player:UpdatePlacement")

if not p then
  error("Could not find Player:UpdatePlacement")
end

local firstByte = readBytes(p,1,false)

if firstByte ~= 0xE9 then
  error("Player:UpdatePlacement is not using the expected DMD jump")
end

local rel = readInteger(p+1)

if rel &gt;= 0x80000000 then
  rel = rel - 0x100000000
end

local dmd = p + 5 + rel
local addr = dmd + 0xF55

local original = {
  0xF3,0x41,0x0F,0x11,0x6F,0x3C
}

local current = readBytes(addr,6,true)

if not current then
  error("Could not read hammer durability instruction")
end

for i=1,6 do
  if current[i] ~= original[i] then
    error("Hammer Durability: expected original bytes were not found")
  end
end

_G.ValheimHammerDurabilityPatch = addr

writeBytes(addr,
  0x90,0x90,0x90,0x90,0x90,0x90
)

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

local addr = _G.ValheimHammerDurabilityPatch

if addr then
  writeBytes(addr,
    0xF3,0x41,0x0F,0x11,0x6F,0x3C
  )
end

_G.ValheimHammerDurabilityPatch = nil

{$asm}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>55</ID>
          <Description>"Shield"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(SHIELDDURABILITY,Humanoid:BlockAttack)

assert(SHIELDDURABILITY+CE6,F3 41 0F 11 6E 3C)

SHIELDDURABILITY+CE6:
  db 90 90 90 90 90 90

[DISABLE]

define(SHIELDDURABILITY,Humanoid:BlockAttack)

SHIELDDURABILITY+CE6:
  db F3 41 0F 11 6E 3C
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>75</ID>
      <Description>"Free Build (No Resources)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono")
end

local function signed32(v)
  if v &gt;= 0x80000000 then
    return v - 0x100000000
  end
  return v
end

local function followE9(addr)

  local seen = {}

  for i=1,10 do

    if not addr or addr == 0 or seen[addr] then
      break
    end

    seen[addr] = true

    if readBytes(addr,1,false) ~= 0xE9 then
      break
    end

    local rel = signed32(readInteger(addr+1))
    addr = addr + 5 + rel

  end

  return addr
end

local function addTargetChain(set,addr)

  local seen = {}

  for i=1,10 do

    if not addr or addr == 0 or seen[addr] then
      break
    end

    seen[addr] = true
    set[addr] = true

    if readBytes(addr,1,false) ~= 0xE9 then
      break
    end

    local rel = signed32(readInteger(addr+1))
    addr = addr + 5 + rel

  end
end

local function matchesTarget(addr,set,namePart)

  if not addr or addr == 0 then
    return false
  end

  if set[addr] then
    return true
  end

  local final = followE9(addr)

  if set[final] then
    return true
  end

  local n = getNameFromAddress(addr) or ""
  local nf = getNameFromAddress(final) or ""

  if string.find(n,namePart,1,true)
  or string.find(nf,namePart,1,true) then
    return true
  end

  return false
end

local function findCalls(base,set,namePart,maxOffset)

  local results = {}

  for offset=0,maxOffset do

    local a = base + offset
    local b1,b2 = readBytes(a,2,false)

    if b1 == 0x49 and b2 == 0xBB then

      local target = readQword(a+2)

      local c1,c2,c3 =
        readBytes(a+10,3,false)

      if c1 == 0x41
      and c2 == 0xFF
      and c3 == 0xD3
      and matchesTarget(target,set,namePart) then

        table.insert(results,{
          start=a,
          call=a+10,
          fullLength=13,
          callLength=3,
        })

      end

    elseif b1 == 0xE8 then

      local rel =
        signed32(readInteger(a+1))

      local target =
        a + 5 + rel

      if matchesTarget(target,set,namePart) then

        table.insert(results,{
          start=a,
          call=a,
          fullLength=5,
          callLength=5,
        })

      end
    end
  end

  return results
end

local function saveBytes(addr,count)

  local t = readBytes(addr,count,true)

  if not t or #t ~= count then
    error("Could not save original bytes")
  end

  return t
end

local update =
  getAddressSafe("Player:UpdatePlacement")

if not update then
  error("Could not find Player:UpdatePlacement")
end

local updateBody =
  followE9(update)

local playerClass =
  mono_findClass("", "Player")

if not playerClass then
  error("Player class not found")
end

local methods =
  mono_class_enumMethods(playerClass)

local reqTargets = {}

for _,m in ipairs(methods) do

  if m.name == "HaveRequirements" then

    local sig =
      mono_method_getSignature(m.method)

    if sig == "Piece,Player/RequirementMode" then

      local a =
        mono_compile_method(m.method)

      addTargetChain(reqTargets,a)

    end
  end
end

local consumeTargets = {}

for _,m in ipairs(methods) do

  if m.name == "ConsumeResources" then

    local a =
      mono_compile_method(m.method)

    addTargetChain(consumeTargets,a)

  end
end

local reqCalls =
  findCalls(
    updateBody,
    reqTargets,
    "Player:HaveRequirements",
    0x5000
  )

if #reqCalls == 0 then
  error("Could not find building HaveRequirements call")
end

local consumeCalls =
  findCalls(
    updateBody,
    consumeTargets,
    "ConsumeResources",
    0x5000
  )

if #consumeCalls == 0 then
  error("Could not find building ConsumeResources call")
end

local state = {
  req={},
  consume={}
}

for _,x in ipairs(reqCalls) do

  table.insert(state.req,{
    addr=x.start,
    bytes=saveBytes(
      x.start,
      x.fullLength
    ),
    length=x.fullLength
  })

end

for _,x in ipairs(consumeCalls) do

  table.insert(state.consume,{
    addr=x.call,
    bytes=saveBytes(
      x.call,
      x.callLength
    ),
    length=x.callLength
  })

end

for _,x in ipairs(state.req) do

  writeBytes(
    x.addr,
    0xB8,0x01,0x00,0x00,0x00
  )

  for i=6,x.length do
    writeBytes(x.addr+i-1,0x90)
  end

end

for _,x in ipairs(state.consume) do

  for i=1,x.length do
    writeBytes(x.addr+i-1,0x90)
  end

end

_G.ValheimFreeBuildState = state

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

local state = _G.ValheimFreeBuildState

if state then

  local function restore(addr,t)

    for i=1,#t do
      writeBytes(addr+i-1,t[i])
    end

  end

  if state.req then
    for _,x in ipairs(state.req) do
      restore(x.addr,x.bytes)
    end
  end

  if state.consume then
    for _,x in ipairs(state.consume) do
      restore(x.addr,x.bytes)
    end
  end

end

_G.ValheimFreeBuildState = nil

{$asm}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>31</ID>
      <Description>"Skill Multiplier"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>30</ID>
          <Description>"Skill Multiplier x5"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end
{$asm}

define(RAISESKILL,Skills:RaiseSkill)

assert(RAISESKILL+1D,F3 0F 11 55 C8)

alloc(skillmem,$1000,RAISESKILL+1D)

label(return)
label(xpMultiplier)

skillmem:

  mulss xmm2,[xpMultiplier]

  movss [rbp-38],xmm2

  jmp return

xpMultiplier:
  dd (float)5.0

RAISESKILL+1D:
  jmp skillmem

return:

[DISABLE]

define(RAISESKILL,Skills:RaiseSkill)

RAISESKILL+1D:
  db F3 0F 11 55 C8

dealloc(skillmem)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>32</ID>
          <Description>"Skill Multiplier x10"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end
{$asm}

define(RAISESKILL,Skills:RaiseSkill)

assert(RAISESKILL+1D,F3 0F 11 55 C8)

alloc(skillmem,$1000,RAISESKILL+1D)

label(return)
label(xpMultiplier)

skillmem:

  mulss xmm2,[xpMultiplier]

  movss [rbp-38],xmm2

  jmp return

xpMultiplier:
  dd (float)10.0

RAISESKILL+1D:
  jmp skillmem

return:

[DISABLE]

define(RAISESKILL,Skills:RaiseSkill)

RAISESKILL+1D:
  db F3 0F 11 55 C8

dealloc(skillmem)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>33</ID>
          <Description>"Skill Multiplier x25"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end
{$asm}

define(RAISESKILL,Skills:RaiseSkill)

assert(RAISESKILL+1D,F3 0F 11 55 C8)

alloc(skillmem,$1000,RAISESKILL+1D)

label(return)
label(xpMultiplier)

skillmem:

  mulss xmm2,[xpMultiplier]

  movss [rbp-38],xmm2

  jmp return

xpMultiplier:
  dd (float)25.0

RAISESKILL+1D:
  jmp skillmem

return:

[DISABLE]

define(RAISESKILL,Skills:RaiseSkill)

RAISESKILL+1D:
  db F3 0F 11 55 C8

dealloc(skillmem)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>34</ID>
          <Description>"Skill Multiplier x50"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end
{$asm}

define(RAISESKILL,Skills:RaiseSkill)

assert(RAISESKILL+1D,F3 0F 11 55 C8)

alloc(skillmem,$1000,RAISESKILL+1D)

label(return)
label(xpMultiplier)

skillmem:

  mulss xmm2,[xpMultiplier]

  movss [rbp-38],xmm2

  jmp return

xpMultiplier:
  dd (float)50.0

RAISESKILL+1D:
  jmp skillmem

return:

[DISABLE]

define(RAISESKILL,Skills:RaiseSkill)

RAISESKILL+1D:
  db F3 0F 11 55 C8

dealloc(skillmem)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>35</ID>
          <Description>"Skill Multiplier x100"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end
{$asm}

define(RAISESKILL,Skills:RaiseSkill)

assert(RAISESKILL+1D,F3 0F 11 55 C8)

alloc(skillmem,$1000,RAISESKILL+1D)

label(return)
label(xpMultiplier)

skillmem:

  mulss xmm2,[xpMultiplier]

  movss [rbp-38],xmm2

  jmp return

xpMultiplier:
  dd (float)100.0

RAISESKILL+1D:
  jmp skillmem

return:

[DISABLE]

define(RAISESKILL,Skills:RaiseSkill)

RAISESKILL+1D:
  db F3 0F 11 55 C8

dealloc(skillmem)
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>57</ID>
      <Description>"Free Trader (no gold required in inventory)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(CANAFFORD,StoreGui:CanAfford)

assert(CANAFFORD+36,40 0F 94 C0)

CANAFFORD+36:
  db B0 01 90 90

[DISABLE]

define(CANAFFORD,StoreGui:CanAfford)

CANAFFORD+36:
  db 40 0F 94 C0
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>64</ID>
      <Description>"Free Boss Summoning"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

{$asm}

define(BOSSUSEITEM,OfferingBowl:UseItem)
define(BOSSREMOVE,OfferingBowl:RPC_RemoveBossSpawnInventoryItems)

assert(BOSSUSEITEM+D5,0F 84 3F 06 00 00)

BOSSUSEITEM+D5:
  db 90 90 90 90 90 90

assert(BOSSUSEITEM+12A,0F 8D A6 02 00 00)

BOSSUSEITEM+12A:
  db E9 A7 02 00 00 90

assert(BOSSREMOVE,55)

BOSSREMOVE:
  db C3

[DISABLE]

define(BOSSUSEITEM,OfferingBowl:UseItem)
define(BOSSREMOVE,OfferingBowl:RPC_RemoveBossSpawnInventoryItems)

BOSSUSEITEM+D5:
  db 0F 84 3F 06 00 00

BOSSUSEITEM+12A:
  db 0F 8D A6 02 00 00

BOSSREMOVE:
  db 55
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>68</ID>
      <Description>"Pickup Multiplier"</Description>
      <Options moHideChildren="1"/>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>67</ID>
          <Description>"2x "</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

{$asm}

assert(Humanoid:Pickup+1DA,49 8B 86 A0 05 00 00)

alloc(pickupmult2,256,Humanoid:Pickup+1DA)

label(return2)

pickupmult2:

  mov rdx,[r13+20]

  mov eax,[rdx+38]

  imul eax,eax,2

  mov [rdx+38],eax

  mov rax,[r14+000005A0]

  jmp return2

Humanoid:Pickup+1DA:
  jmp pickupmult2
  nop
  nop

return2:

[DISABLE]

Humanoid:Pickup+1DA:
  db 49 8B 86 A0 05 00 00

dealloc(pickupmult2)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>70</ID>
          <Description>"3x "</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

{$asm}

assert(Humanoid:Pickup+1DA,49 8B 86 A0 05 00 00)

alloc(pickupmult3,256,Humanoid:Pickup+1DA)

label(return3)

pickupmult3:

  mov rdx,[r13+20]

  mov eax,[rdx+38]

  imul eax,eax,3

  mov [rdx+38],eax

  mov rax,[r14+000005A0]

  jmp return3

Humanoid:Pickup+1DA:
  jmp pickupmult3
  nop
  nop

return3:

[DISABLE]

Humanoid:Pickup+1DA:
  db 49 8B 86 A0 05 00 00

dealloc(pickupmult3)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>69</ID>
          <Description>"5x "</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

{$asm}

assert(Humanoid:Pickup+1DA,49 8B 86 A0 05 00 00)

alloc(pickupmult5,256,Humanoid:Pickup+1DA)

label(return5)

pickupmult5:

  mov rdx,[r13+20]

  mov eax,[rdx+38]

  imul eax,eax,5

  mov [rdx+38],eax

  mov rax,[r14+000005A0]

  jmp return5

Humanoid:Pickup+1DA:
  jmp pickupmult5
  nop
  nop

return5:

[DISABLE]

Humanoid:Pickup+1DA:
  db 49 8B 86 A0 05 00 00

dealloc(pickupmult5)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>71</ID>
          <Description>"10x "</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono. Make sure Valheim is fully loaded.")
end

local parent = memrec.Parent

if parent then
  for i = 0, parent.Count - 1 do
    local mr = parent.Child[i]

    if mr ~= memrec and mr.Active then
      mr.Active = false
    end
  end
end

{$asm}

assert(Humanoid:Pickup+1DA,49 8B 86 A0 05 00 00)

alloc(pickupmult10,256,Humanoid:Pickup+1DA)

label(return10)

pickupmult10:

  mov rdx,[r13+20]

  mov eax,[rdx+38]

  imul eax,eax,#10

  mov [rdx+38],eax

  mov rax,[r14+000005A0]

  jmp return10

Humanoid:Pickup+1DA:
  jmp pickupmult10
  nop
  nop

return10:

[DISABLE]

Humanoid:Pickup+1DA:
  db 49 8B 86 A0 05 00 00

dealloc(pickupmult10)
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>77</ID>
      <Description>"Free Crafting &amp; Upgrades"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

{$lua}
if syntaxcheck then return end

if LaunchMonoDataCollector() == 0 then
  error("Could not activate Mono")
end

local function signed32(v)
  if v &gt;= 0x80000000 then
    return v - 0x100000000
  end
  return v
end

local function followE9(addr)

  local seen = {}

  for i=1,10 do

    if not addr or addr == 0 or seen[addr] then
      break
    end

    seen[addr] = true

    if readBytes(addr,1,false) ~= 0xE9 then
      break
    end

    local rel = signed32(readInteger(addr+1))
    addr = addr + 5 + rel

  end

  return addr
end

local function addTargetChain(set,addr)

  local seen = {}

  for i=1,10 do

    if not addr or addr == 0 or seen[addr] then
      break
    end

    seen[addr] = true
    set[addr] = true

    if readBytes(addr,1,false) ~= 0xE9 then
      break
    end

    local rel = signed32(readInteger(addr+1))
    addr = addr + 5 + rel

  end
end

local function matchesTarget(addr,set,namePart)

  if not addr or addr == 0 then
    return false
  end

  if set[addr] then
    return true
  end

  local final = followE9(addr)

  if set[final] then
    return true
  end

  local n =
    getNameFromAddress(addr) or ""

  local nf =
    getNameFromAddress(final) or ""

  return
    string.find(n,namePart,1,true) ~= nil
    or
    string.find(nf,namePart,1,true) ~= nil
end

local function findCalls(base,set,namePart,maxOffset)

  local results = {}

  for offset=0,maxOffset do

    local a = base + offset
    local b1,b2 = readBytes(a,2,false)

    if b1 == 0x49
    and b2 == 0xBB then

      local target =
        readQword(a+2)

      local c1,c2,c3 =
        readBytes(a+10,3,false)

      if c1 == 0x41
      and c2 == 0xFF
      and c3 == 0xD3
      and matchesTarget(
        target,
        set,
        namePart
      ) then

        table.insert(results,{
          addr=a+10,
          length=3
        })

      end

    elseif b1 == 0xE8 then

      local rel =
        signed32(readInteger(a+1))

      local target =
        a + 5 + rel

      if matchesTarget(
        target,
        set,
        namePart
      ) then

        table.insert(results,{
          addr=a,
          length=5
        })

      end
    end
  end

  return results
end

local function saveBytes(addr,count)

  local t =
    readBytes(addr,count,true)

  if not t or #t ~= count then
    error("Could not save original bytes")
  end

  return t
end

local function relativeBytes(fromEnd,toAddr)

  local d = toAddr - fromEnd

  if d &lt; -0x80000000
  or d &gt; 0x7FFFFFFF then
    error("Relative branch is out of range")
  end

  if d &lt; 0 then
    d = d + 0x100000000
  end

  local b1 = d % 256
  d = math.floor(d/256)

  local b2 = d % 256
  d = math.floor(d/256)

  local b3 = d % 256
  d = math.floor(d/256)

  local b4 = d % 256

  return b1,b2,b3,b4
end

local playerClass =
  mono_findClass("", "Player")

if not playerClass then
  error("Player class not found")
end

local methods =
  mono_class_enumMethods(playerClass)

local reqMethod = nil

for _,m in ipairs(methods) do

  if m.name == "HaveRequirements" then

    local sig =
      mono_method_getSignature(m.method)

    if sig == "Recipe,bool,int,int" then
      reqMethod = m.method
      break
    end

  end
end

if not reqMethod then
  error("Crafting HaveRequirements overload not found")
end

local reqEntry =
  mono_compile_method(reqMethod)

if not reqEntry or reqEntry == 0 then
  error("Could not JIT crafting HaveRequirements")
end

if readBytes(reqEntry,1,false) ~= 0xE9 then
  error("Unexpected crafting HaveRequirements entry")
end

local reqNormal =
  followE9(reqEntry)

local reqOriginal =
  saveBytes(reqEntry,15)

local consumeTargets = {}

for _,m in ipairs(methods) do

  if m.name == "ConsumeResources" then

    local a =
      mono_compile_method(m.method)

    addTargetChain(
      consumeTargets,
      a
    )

  end
end

local invClass =
  mono_findClass("", "InventoryGui")

if not invClass then
  error("InventoryGui class not found")
end

local invMethods =
  mono_class_enumMethods(invClass)

local craftBodies = {}

for _,m in ipairs(invMethods) do

  if m.name == "DoCrafting" then

    local a =
      mono_compile_method(m.method)

    if a and a ~= 0 then

      local body =
        followE9(a)

      craftBodies[body] = true

    end
  end
end

if next(craftBodies) == nil then
  error("Could not JIT InventoryGui:DoCrafting")
end

local consumeCalls = {}

for body,_ in pairs(craftBodies) do

  local found =
    findCalls(
      body,
      consumeTargets,
      "ConsumeResources",
      0x6000
    )

  for _,x in ipairs(found) do

    table.insert(
      consumeCalls,
      {
        addr=x.addr,
        length=x.length,
        bytes=saveBytes(
          x.addr,
          x.length
        )
      }
    )

  end
end

if #consumeCalls == 0 then
  error("Could not locate crafting ConsumeResources call")
end

local r1,r2,r3,r4 =
  relativeBytes(
    reqEntry + 9,
    reqNormal
  )

local reqPatch = {

  0x45,0x85,0xC0,

  0x0F,0x85,
  r1,r2,r3,r4,

  0xB8,0x01,0x00,0x00,0x00,

  0xC3
}

_G.ValheimFreeCraftingState = {
  reqEntry=reqEntry,
  reqOriginal=reqOriginal,
  consume=consumeCalls
}

for i=1,#reqPatch do
  writeBytes(
    reqEntry+i-1,
    reqPatch[i]
  )
end

for _,x in ipairs(consumeCalls) do

  for i=1,x.length do
    writeBytes(
      x.addr+i-1,
      0x90
    )
  end

end

{$asm}

[DISABLE]

{$lua}
if syntaxcheck then return end

local state =
  _G.ValheimFreeCraftingState

if state then

  if state.reqEntry
  and state.reqOriginal then

    for i=1,#state.reqOriginal do

      writeBytes(
        state.reqEntry+i-1,
        state.reqOriginal[i]
      )

    end
  end

  if state.consume then

    for _,x in ipairs(state.consume) do

      for i=1,#x.bytes do

        writeBytes(
          x.addr+i-1,
          x.bytes[i]
        )

      end
    end
  end

end

_G.ValheimFreeCraftingState = nil

{$asm}
</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
