<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="45">
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"Compact Mode"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
--https://forum.cheatengine.org/viewtopic.php?t=570055
LuaCall(function cycleFullCompact(sender,force) local state = not(compactmenuitem.Caption == 'Compact View Mode'); if force~=nil then state = not force end; compactmenuitem.Caption = state and 'Compact View Mode' or 'Full View Mode'; getMainForm().Splitter1.Visible = state; getMainForm().Panel4.Visible    = state; getMainForm().Panel5.Visible    = state; end; function addCompactMenu() if compactmenualreadyexists then return end; local parent = getMainForm().Menu.Items; compactmenuitem = createMenuItem(parent); parent.add(compactmenuitem); compactmenuitem.Caption = 'Compact View Mode'; compactmenuitem.OnClick = cycleFullCompact; compactmenualreadyexists = 'yes'; end; addCompactMenu(); cycleFullCompact(nil,true))

[DISABLE]
LuaCall(cycleFullCompact(nil,false))

</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>1</ID>
      <Description>"Enable"</Description>
      <Options moHideChildren="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then
    return
end
if process == nil then
    ShowMessage("Process is not selected.")
elseif readInteger(process) == 0 then
    ShowMessage("Process cannot be opened.")
else
    if monopipe ~= nil and monopipe.ProcessID ~= getOpenedProcessID() then
        monopipe.destroy()
        monopipe = nil
    end
    if monopipe == nil then
        LaunchMonoDataCollector()
    end
end


{$asm}
define(ResourceManagerClearItemCountsProc, "ResourceManager.ClearItemCounts")
define(ResidenceUpdateFirewoodProc, "Residence.UpdateFirewood")
define(ResidenceUpdateWaterProc, "Residence.UpdateWater")
define(VillagerEatIfNecessaryProc, "Villager.EatIfNecessary")
define(ItemStorageRemoveItemsProc, "ItemStorage.RemoveItems")
define(Characterget_movementSpeedProc, "Character.get_movementSpeed")
define(ItemBundleUpdateNumberOfItemsProc, "ItemBundle.UpdateNumberOfItems")
define(ItemStorageUpdateItemInfoWithDegradeProc, "ItemStorage.UpdateItemInfoWithDegrade")
define(ReservableItemStorageGetItemCountOfAllUnneededItemsProc, "ReservableItemStorage.GetItemCountOfAllUnneededItems")

//Residence.UpdateFirewood   GameAssembly.dll+80E820
//GameAssembly.dll+80E9E4

//Residence.UpdateWater GameAssembly.dll+80EE42
//GameAssembly.dll+80EF60 (11E)

//Villager.EatIfNecessary
//GameAssembly.dll+5A64EF - 41 B8 01000000        - mov r8d,00000001

//Villager.CalculateToolWear   GameAssembly.dll+5A4CD0
//GameAssembly.dll+5A4E49


//ItemStorage.RemoveItems  GameAssembly.dll+938C74

registersymbol(ResourceManagerClearItemCountsProc)
registersymbol(ResidenceUpdateFirewoodProc)
registersymbol(ResidenceUpdateWaterProc)
registersymbol(VillagerEatIfNecessaryProc)
registersymbol(ItemStorageRemoveItemsProc)
registersymbol(Characterget_movementSpeedProc)
registersymbol(ItemBundleUpdateNumberOfItemsProc)
registersymbol(ItemStorageUpdateItemInfoWithDegradeProc)
registersymbol(ReservableItemStorageGetItemCountOfAllUnneededItemsProc)

[DISABLE]
{$lua}
if syntaxcheck then return end;if not syntaxcheck and monopipe then monopipe=nil,monopipe.Destroy()end

{$asm}
unregistersymbol(*)

</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>2</ID>
          <Description>"Enable twice: 1st: waiting for IL2CPP to complete, then re-enabling"</Description>
          <Color>8000FF</Color>
          <GroupHeader>1</GroupHeader>
        </CheatEntry>
        <CheatEntry>
          <ID>30</ID>
          <Description>"No residence consumes firewood"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-11-19
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

//aobscanmodule(INJECT_RESIDENCE_FIREWOOD_BURN_RATE,GameAssembly.dll,F3 0F 58 87 78 05 00 00) // should be unique
aobscanregion(INJECT_RESIDENCE_FIREWOOD_BURN_RATE,ResidenceUpdateFirewoodProc+260,ResidenceUpdateFirewoodProc+320,F3 0F 58 ?? ?? ?? 00 00 F3 0F 11 ?? ?? ?? 00 00 48 8B 0D) // should be unique
alloc(newmem,$1000,INJECT_RESIDENCE_FIREWOOD_BURN_RATE)

alloc(INJECT_RESIDENCE_FIREWOOD_BURN_RATEo,8)

label(code)
label(return)


INJECT_RESIDENCE_FIREWOOD_BURN_RATEo:
  readmem(INJECT_RESIDENCE_FIREWOOD_BURN_RATE, 8)

newmem:


code:
  //addss xmm0,[rbx+00000590]
  jmp return

INJECT_RESIDENCE_FIREWOOD_BURN_RATE:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_RESIDENCE_FIREWOOD_BURN_RATE)
registersymbol(INJECT_RESIDENCE_FIREWOOD_BURN_RATEo)

[DISABLE]

INJECT_RESIDENCE_FIREWOOD_BURN_RATE:
  //db F3 0F 58 87 FC 05 00 00
  readmem(INJECT_RESIDENCE_FIREWOOD_BURN_RATEo, 8)

unregistersymbol(*)
unregistersymbol(INJECT_RESIDENCE_FIREWOOD_BURN_RATEo)
dealloc(newmem)
dealloc(INJECT_RESIDENCE_FIREWOOD_BURN_RATEo)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+D5063F

GameAssembly.dll+D5060D: 0F 28 74 24 50           - movaps xmm6,[rsp+50]
GameAssembly.dll+D50612: 4C 8B 7C 24 60           - mov r15,[rsp+60]
GameAssembly.dll+D50617: 48 8B B4 24 90 00 00 00  - mov rsi,[rsp+00000090]
GameAssembly.dll+D5061F: 48 8B AC 24 88 00 00 00  - mov rbp,[rsp+00000088]
GameAssembly.dll+D50627: 48 8B 9C 24 80 00 00 00  - mov rbx,[rsp+00000080]
GameAssembly.dll+D5062F: 48 83 C4 68              - add rsp,68
GameAssembly.dll+D50633: 41 5E                    - pop r14
GameAssembly.dll+D50635: 5F                       - pop rdi
GameAssembly.dll+D50636: C3                       - ret
GameAssembly.dll+D50637: F3 0F 10 87 F8 05 00 00  - movss xmm0,[rdi+000005F8]
// ---------- INJECTING HERE ----------
GameAssembly.dll+D5063F: F3 0F 58 87 FC 05 00 00  - addss xmm0,[rdi+000005FC]
// ---------- DONE INJECTING  ----------
GameAssembly.dll+D50647: F3 0F 11 87 FC 05 00 00  - movss [rdi+000005FC],xmm0
GameAssembly.dll+D5064F: 48 8B 0D F2 EB A1 02     - mov rcx,[GameAssembly.dll+376F248]
GameAssembly.dll+D50656: 44 39 B1 E0 00 00 00     - cmp [rcx+000000E0],r14d
GameAssembly.dll+D5065D: 75 05                    - jne GameAssembly.dll+D50664
GameAssembly.dll+D5065F: E8 EC 37 5B FF           - call GameAssembly.dll+303E50
GameAssembly.dll+D50664: 44 38 35 FD 21 BD 02     - cmp [GameAssembly.dll+3922868],r14b
GameAssembly.dll+D5066B: 75 13                    - jne GameAssembly.dll+D50680
GameAssembly.dll+D5066D: 48 8D 0D D4 EB A1 02     - lea rcx,[GameAssembly.dll+376F248]
GameAssembly.dll+D50674: E8 27 E4 60 FF           - call GameAssembly.GlobalizationNative_GetTimeZoneDisplayName+54E0
GameAssembly.dll+D50679: C6 05 E8 21 BD 02 01     - mov byte ptr [GameAssembly.dll+3922868],01
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>38</ID>
          <Description>"No residence consumes water "</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-01-05
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

//aobscanmodule(INJECT_RESIDENCE_WATER_USAGE_RATE,GameAssembly.dll,F3 0F 58 8F 80 05 00 00) // should be unique
aobscanmodule(INJECT_RESIDENCE_WATER_USAGE_RATE,GameAssembly.dll,F3 0F 58 8F ?? ?? 00 00 0F 2F 0D ?? ?? ?? ?? F3 0F 11 8F ?? ?? 00 00) // should be unique
alloc(newmem,$1000,INJECT_RESIDENCE_WATER_USAGE_RATE)

alloc(INJECT_RESIDENCE_WATER_USAGE_RATEo,8)

label(code)
label(return)


INJECT_RESIDENCE_WATER_USAGE_RATEo:
  readmem(INJECT_RESIDENCE_WATER_USAGE_RATE, 8)

newmem:

code:
  //addss xmm1,[rdi+00000600]
  jmp return

INJECT_RESIDENCE_WATER_USAGE_RATE:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_RESIDENCE_WATER_USAGE_RATE)
registersymbol(INJECT_RESIDENCE_WATER_USAGE_RATEo)

[DISABLE]

INJECT_RESIDENCE_WATER_USAGE_RATE:
  //db F3 0F 58 8F 00 06 00 00
  readmem(INJECT_RESIDENCE_WATER_USAGE_RATEo, 8)

unregistersymbol(INJECT_RESIDENCE_WATER_USAGE_RATE)
unregistersymbol(INJECT_RESIDENCE_WATER_USAGE_RATEo)
dealloc(newmem)
dealloc(INJECT_RESIDENCE_WATER_USAGE_RATEo)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+D4FE35

GameAssembly.dll+D4FE05: 89 9F 04 06 00 00        - mov [rdi+00000604],ebx
GameAssembly.dll+D4FE0B: 4C 8B 7C 24 50           - mov r15,[rsp+50]
GameAssembly.dll+D4FE10: 4C 8B 74 24 58           - mov r14,[rsp+58]
GameAssembly.dll+D4FE15: 48 8B B4 24 80 00 00 00  - mov rsi,[rsp+00000080]
GameAssembly.dll+D4FE1D: 48 8B 6C 24 78           - mov rbp,[rsp+78]
GameAssembly.dll+D4FE22: 48 8B 5C 24 70           - mov rbx,[rsp+70]
GameAssembly.dll+D4FE27: 48 83 C4 60              - add rsp,60
GameAssembly.dll+D4FE2B: 5F                       - pop rdi
GameAssembly.dll+D4FE2C: C3                       - ret
GameAssembly.dll+D4FE2D: F3 0F 10 8F 04 06 00 00  - movss xmm1,[rdi+00000604]
// ---------- INJECTING HERE ----------
GameAssembly.dll+D4FE35: F3 0F 58 8F 00 06 00 00  - addss xmm1,[rdi+00000600]
// ---------- DONE INJECTING  ----------
GameAssembly.dll+D4FE3D: 0F 2F 0D A4 11 73 02     - comiss xmm1,[GameAssembly.dll+3480FE8]
GameAssembly.dll+D4FE44: F3 0F 11 8F 04 06 00 00  - movss [rdi+00000604],xmm1
GameAssembly.dll+D4FE4C: 72 BD                    - jb GameAssembly.dll+D4FE0B
GameAssembly.dll+D4FE4E: 0F 57 C0                 - xorps xmm0,xmm0
GameAssembly.dll+D4FE51: 8B C0                    - mov eax,eax
GameAssembly.dll+D4FE53: F2 48 0F 2A C0           - cvtsi2sd xmm0,rax
GameAssembly.dll+D4FE58: 66 0F 5A D0              - cvtpd2ps xmm2,xmm0
GameAssembly.dll+D4FE5C: 0F 57 C0                 - xorps xmm0,xmm0
GameAssembly.dll+D4FE5F: F3 0F 5D D1              - minss xmm2,xmm1
GameAssembly.dll+D4FE63: 0F 2F C2                 - comiss xmm0,xmm2
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>36</ID>
          <Description>"Villagers consume no food"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-01-05
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_VILLAGER_NO_NEED_EAT,GameAssembly.dll,41 B8 01 00 00 00 48 8B D6 49) // should be unique
alloc(newmem,$1000,INJECT_VILLAGER_NO_NEED_EAT)

label(code)
label(return)

newmem:

code:
  mov r8d,00000001
  //
  xor r8d, r8d
  //
  jmp return

INJECT_VILLAGER_NO_NEED_EAT:
  jmp newmem
  nop
return:
registersymbol(INJECT_VILLAGER_NO_NEED_EAT)

[DISABLE]

INJECT_VILLAGER_NO_NEED_EAT:
  db 41 B8 01 00 00 00

unregistersymbol(INJECT_VILLAGER_NO_NEED_EAT)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+E29D82

GameAssembly.dll+E29D51: 0F 84 0A 01 00 00     - je GameAssembly.dll+E29E61
GameAssembly.dll+E29D57: C6 44 24 42 00        - mov byte ptr [rsp+42],00
GameAssembly.dll+E29D5C: C6 44 24 41 00        - mov byte ptr [rsp+41],00
GameAssembly.dll+E29D61: 4C 89 7C 24 38        - mov [rsp+38],r15
GameAssembly.dll+E29D66: C6 44 24 30 00        - mov byte ptr [rsp+30],00
GameAssembly.dll+E29D6B: 48 8D 4C 24 41        - lea rcx,[rsp+41]
GameAssembly.dll+E29D70: 48 89 4C 24 28        - mov [rsp+28],rcx
GameAssembly.dll+E29D75: 48 8D 4C 24 42        - lea rcx,[rsp+42]
GameAssembly.dll+E29D7A: 48 89 4C 24 20        - mov [rsp+20],rcx
GameAssembly.dll+E29D7F: 4C 8B C8              - mov r9,rax
// ---------- INJECTING HERE ----------
GameAssembly.dll+E29D82: 41 B8 01 00 00 00     - mov r8d,00000001
// ---------- DONE INJECTING  ----------
GameAssembly.dll+E29D88: 48 8B D6              - mov rdx,rsi
GameAssembly.dll+E29D8B: 49 8B CE              - mov rcx,r14
GameAssembly.dll+E29D8E: E8 2D 9C 9D FF        - call ItemStorage.RemoveItems
GameAssembly.dll+E29D93: 48 8B 8B E0 00 00 00  - mov rcx,[rbx+000000E0]
GameAssembly.dll+E29D9A: 48 85 C9              - test rcx,rcx
GameAssembly.dll+E29D9D: 0F 84 B3 00 00 00     - je GameAssembly.dll+E29E56
GameAssembly.dll+E29DA3: 45 33 C9              - xor r9d,r9d
GameAssembly.dll+E29DA6: 45 8D 41 01           - lea r8d,[r9+01]
GameAssembly.dll+E29DAA: 48 8B D6              - mov rdx,rsi
GameAssembly.dll+E29DAD: E8 EE F2 01 00        - call VillagerHealth.Eat
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>131</ID>
          <Description>"(X) No HP damage to building"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-01-16
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_SET_BUILDING_LIFE,GameAssembly.dll,F3 0F 11 77 48 48 8B) // should be unique
alloc(newmem,$1000,INJECT_SET_BUILDING_LIFE)

label(code)
label(return)

newmem:
//DamageableComponent.set_life
  cmp byte ptr [rdi+B8], 1 //_stationary
  jne code
  vmovss xmm15, [rdi+58] //&lt;baseMaxLife&gt;k__BackingField
  vucomiss xmm6, xmm15
  jae code
  vmovss xmm6, [rdi+58]


code:
  movss [rdi+48],xmm6
  jmp return

INJECT_SET_BUILDING_LIFE:
  jmp newmem
return:
registersymbol(INJECT_SET_BUILDING_LIFE)

[DISABLE]

INJECT_SET_BUILDING_LIFE:
  db F3 0F 11 77 48

unregistersymbol(INJECT_SET_BUILDING_LIFE)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+50F84A

GameAssembly.dll+50F820: 0F 2F F3              - comiss xmm6,xmm3
GameAssembly.dll+50F823: 76 08                 - jna GameAssembly.dll+50F82D
GameAssembly.dll+50F825: 0F 28 F3              - movaps xmm6,xmm3
GameAssembly.dll+50F828: EB 03                 - jmp GameAssembly.dll+50F82D
GameAssembly.dll+50F82A: 0F 57 F6              - xorps xmm6,xmm6
GameAssembly.dll+50F82D: F3 0F 10 47 48        - movss xmm0,[rdi+48]
GameAssembly.dll+50F832: F3 0F 5C C6           - subss xmm0,xmm6
GameAssembly.dll+50F836: 0F 54 05 93 29 26 02  - andps xmm0,[GameAssembly.dll+27721D0]
GameAssembly.dll+50F83D: 0F 2F 05 80 14 26 02  - comiss xmm0,[GameAssembly.dll+2770CC4]
GameAssembly.dll+50F844: 0F 82 77 01 00 00     - jb GameAssembly.dll+50F9C1
// ---------- INJECTING HERE ----------
GameAssembly.dll+50F84A: F3 0F 11 77 48        - movss [rdi+48],xmm6
// ---------- DONE INJECTING  ----------
GameAssembly.dll+50F84F: 48 8B CF              - mov rcx,rdi
GameAssembly.dll+50F852: 48 8B 15 B7 45 48 02  - mov rdx,[GameAssembly.dll+2993E10]
GameAssembly.dll+50F859: 48 89 5C 24 70        - mov [rsp+70],rbx
GameAssembly.dll+50F85E: E8 9D D1 B0 00        - call GameAssembly.dll+101CA00
GameAssembly.dll+50F863: 48 8B 0D 3E 09 4B 02  - mov rcx,[GameAssembly.dll+29C01A8]
GameAssembly.dll+50F86A: 48 8B D8              - mov rbx,rax
GameAssembly.dll+50F86D: 83 B9 E0 00 00 00 00  - cmp dword ptr [rcx+000000E0],00
GameAssembly.dll+50F874: 75 05                 - jne GameAssembly.dll+50F87B
GameAssembly.dll+50F876: E8 05 3F D9 FF        - call GameAssembly.dll+2A3780
GameAssembly.dll+50F87B: 80 3D 62 E5 5F 02 00  - cmp byte ptr [GameAssembly.dll+2B0DDE4],00
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>151</ID>
              <Description>"Apply to all buildings, include enemy"</Description>
              <Color>8000FF</Color>
              <GroupHeader>1</GroupHeader>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>175</ID>
          <Description>"Item degrade (corrpution) speed multiplier in storage"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-11-19
  Author : bbfox@https://opencheattables.com
}

[ENABLE]
//ItemStorageUpdateItemInfoWithDegradeProc

aobscanmodule(INJECT_DEGRADE_MULTI,GameAssembly.dll,8B 7B 24 8B 76 7C) // should be unique
alloc(newmem,$1000,INJECT_DEGRADE_MULTI)

label(code)
label(return)
label(vf_degrade_multi)

newmem:

code:
  // orig. code start
  mov edi,[rbx+24] //ItemInfo:&lt;spoilingSoonCount&gt;k__BackingField
  mov esi,[rsi+7C] //ItemStorage:&lt;lifetimeModifierPercent&gt;k__BackingField
  // orig. code end

  test esi, esi
  jz return

  vmovss xmm14, [vf_degrade_multi]
  vcvtsi2ss xmm15, xmm15, esi
  vmulss xmm15, xmm15, xmm14
  vcvtss2si esi, xmm15

  jmp return
align 10 cc
  vf_degrade_multi:
  dd (float)5

INJECT_DEGRADE_MULTI:
  jmp newmem
  nop
return:
registersymbol(INJECT_DEGRADE_MULTI)
registersymbol(vf_degrade_multi)

[DISABLE]

INJECT_DEGRADE_MULTI:
  db 8B 7B 24 8B 76 7C

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+8036F8

GameAssembly.dll+8036DB: 74 63                 - je GameAssembly.dll+803740
GameAssembly.dll+8036DD: 3B 4A 18              - cmp ecx,[rdx+18]
GameAssembly.dll+8036E0: 73 64                 - jae GameAssembly.dll+803746
GameAssembly.dll+8036E2: 48 63 C1              - movsxd  rax,ecx
GameAssembly.dll+8036E5: FF C1                 - inc ecx
GameAssembly.dll+8036E7: 44 03 4C 82 20        - add r9d,[rdx+rax*4+20]
GameAssembly.dll+8036EC: 83 F9 64              - cmp ecx,64
GameAssembly.dll+8036EF: 7E E7                 - jle GameAssembly.dll+8036D8
GameAssembly.dll+8036F1: 43 8D 04 01           - lea eax,[r9+r8]
GameAssembly.dll+8036F5: 89 43 38              - mov [rbx+38],eax
// ---------- INJECTING HERE ----------
GameAssembly.dll+8036F8: 8B 7B 24              - mov edi,[rbx+24]
// ---------- DONE INJECTING  ----------
GameAssembly.dll+8036FB: 8B 76 7C              - mov esi,[rsi+7C]
GameAssembly.dll+8036FE: E8 CD 1F 81 FF        - call GameAssembly.il2cpp_string_length+E370
GameAssembly.dll+803703: 48 85 C0              - test rax,rax
GameAssembly.dll+803706: 74 38                 - je GameAssembly.dll+803740
GameAssembly.dll+803708: 48 8B 80 80 00 00 00  - mov rax,[rax+00000080]
GameAssembly.dll+80370F: 48 85 C0              - test rax,rax
GameAssembly.dll+803712: 74 2C                 - je GameAssembly.dll+803740
GameAssembly.dll+803714: 44 8B 40 54           - mov r8d,[rax+54]
GameAssembly.dll+803718: 45 33 C9              - xor r9d,r9d
GameAssembly.dll+80371B: 8B D6                 - mov edx,esi
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>176</ID>
              <Description>"multiplier (&gt;1 ---&gt; slower)"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>Float</VariableType>
              <Address>vf_degrade_multi</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>158</ID>
          <Description>"Prevent item corruption in storage &amp; set max count for some items"</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-11-19
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

//aobscanmodule(INJECT_UPDATE_MAX_ITEM_COUNT,GameAssembly.dll,03 B7 90 00 00 00 FF C3 E9 4B FF FF FF 48 8B 5C) // should be unique
aobscanregion(INJECT_UPDATE_MAX_ITEM_COUNT,ReservableItemStorageGetItemCountOfAllUnneededItemsProc+110,ReservableItemStorageGetItemCountOfAllUnneededItemsProc+160,03 B7 88 00 00 00) // should be unique
alloc(newmem,$1000,INJECT_UPDATE_MAX_ITEM_COUNT)

label(code)
label(return)
label(is_prevent_corrput_in_unneeded)
label(i_max_count_for_unneeded)
label(i_min_count_for_unneeded)
label(i_max_count_for_weapon_unneeded)
label(i_min_count_for_weapon_unneeded)
label(i_min_count_for_base_unneeded)
label(i_max_count_for_base_unneeded)

newmem:
  pushfq
  push rax
  push r14
  push rcx
  push rdx

  mov rax, [rdi+90] //percentDegradationQtyArray
  test rax, rax
  jz endp

  xor r14, r14
  xor rcx, rcx
  //mov dword ptr [i_tmp1], 0

calc_loop:
  cmp dword ptr [rax+rcx*4+20], 0
  jz to_next_loop

  add r14d, [rax+rcx*4+20]

  cmp ecx, 64
  jae to_100p_loop

  // item no degrade

  push r14
  mov r14d, [rax+rcx*4+20]
  mov dword ptr [rax+rcx*4+20], 0
  add dword ptr [rax+1B0], r14d  // 100% bucket
  pop r14
  jmp to_next_loop

to_100p_loop:

to_next_loop:
  inc ecx
  cmp ecx, 65
  jae calc_loop_sum
  jmp calc_loop

calc_loop_sum:
  //set max for some items
  //3:  ItemBerries
  //6:  ItemBread
  //10: ItemHide
  //11: ItemHideCoat
  //12: ItemMeat
  //13: ItemRootVegetable
  //14: ItemBeans
  //14: ItemBeans
  //15: ItemGreens
  //17: ItemMushroom
  //18: ItemRoots
  //19: ItemNuts
  //20: ItemFruit
  //21: ItemPreservedVeg
  //22: ItemPreserves
  //23: ItemHerbs
  //24: ItemEggs
  //27: ItemTool
  //28: ItemHeavyTool
  //39: ItemFish
  //40: ItemShoes
  //43: ItemSmokedMeat
  //44: ItemSmokedFish
  //45: ItemFlax
  //49: ItemWater
  //52: ItemPottery
  //53: ItemWheatBeer
  //54: ItemHoney
  //55: ItemBasket
  //56: ItemWillow
  //60: ItemFurniture
  //61: ItemTallow
  //62: ItemWax
  //63: ItemSoap
  //64: ItemCandle
  //65: ItemSpice
  //70: ItemCheese
  //74: ItemGlass
  //76: ItemMedicine

  cmp dword ptr [rdi+10], #3 //ItemBerries
  je do_set_limit

  cmp dword ptr [rdi+10], #6 //ItemBread
  je do_set_limit

  cmp dword ptr [rdi+10], #10 //ItemHide
  je do_set_limit

  cmp dword ptr [rdi+10], #11 //ItemHideCoat
  je do_set_limit

  cmp dword ptr [rdi+10], #12 //ItemMeat
  je do_set_limit

  cmp dword ptr [rdi+10], #13 //ItemRootVegetable
  je do_set_limit

  cmp dword ptr [rdi+10], #14 //ItemBeans
  je do_set_limit

  cmp dword ptr [rdi+10], #15 //ItemGreens
  je do_set_limit

  cmp dword ptr [rdi+10], #17 //ItemMushroom
  je do_set_limit

  cmp dword ptr [rdi+10], #18 //ItemRoots
  je do_set_limit

  cmp dword ptr [rdi+10], #19 //ItemNuts
  je do_set_limit

  cmp dword ptr [rdi+10], #20 //ItemFruit
  je do_set_limit

  cmp dword ptr [rdi+10], #21 //ItemPreservedVeg
  je do_set_limit

  cmp dword ptr [rdi+10], #22 //ItemPreserves
  je do_set_limit

  cmp dword ptr [rdi+10], #23 //ItemHerbs
  je do_set_limit

  cmp dword ptr [rdi+10], #24 //ItemEggs
  je do_set_limit

  cmp dword ptr [rdi+10], #27 //ItemTool
  je do_set_limit

  cmp dword ptr [rdi+10], #28 //ItemHeavyTool
  je do_set_limit

  cmp dword ptr [rdi+10], #39 //ItemFish
  je do_set_limit

  cmp dword ptr [rdi+10], #40 //ItemShoes
  je do_set_limit

  cmp dword ptr [rdi+10], #43 //ItemSmokedMeat
  je do_set_limit

  cmp dword ptr [rdi+10], #44 //ItemSmokedFish
  je do_set_limit

  cmp dword ptr [rdi+10], #45 //ItemFlax
  je do_set_limit

  cmp dword ptr [rdi+10], #49 //ItemWater
  je do_set_limit

  cmp dword ptr [rdi+10], #52 //ItemPottery
  je do_set_limit

  cmp dword ptr [rdi+10], #53 //ItemWheatBeer
  je do_set_limit

  cmp dword ptr [rdi+10], #54 //ItemHoney
  je do_set_limit

  cmp dword ptr [rdi+10], #55 //ItemBasket
  je do_set_limit

  cmp dword ptr [rdi+10], #56 //ItemWillow
  je do_set_limit

  cmp dword ptr [rdi+10], #60 //ItemFurniture
  je do_set_limit

  cmp dword ptr [rdi+10], #61 //ItemTallow
  je do_set_limit

  cmp dword ptr [rdi+10], #62 //ItemWax
  je do_set_limit

  cmp dword ptr [rdi+10], #63 //ItemSoap
  je do_set_limit

  cmp dword ptr [rdi+10], #64 //ItemCandle
  je do_set_limit

  cmp dword ptr [rdi+10], #65 //ItemSpice
  je do_set_limit

  cmp dword ptr [rdi+10], #70 //ItemCheese
  je do_set_limit

  cmp dword ptr [rdi+10], #74 //ItemGlass
  je do_set_limit

  cmp dword ptr [rdi+10], #76 //ItemMedicine
  je do_set_limit

  // weapon/arrow/armor
  cmp dword ptr [rdi+10], #29 //ItemWeapon
  je do_weapon_set_limit

  cmp dword ptr [rdi+10], #31 //ItemHeavyWeapon
  je do_weapon_set_limit

  cmp dword ptr [rdi+10], #32 //ItemShield
  je do_weapon_set_limit

  cmp dword ptr [rdi+10], #33 //ItemHauberk
  je do_weapon_set_limit

  cmp dword ptr [rdi+10], #34 //ItemPlatemail
  je do_weapon_set_limit

  cmp dword ptr [rdi+10], #35 //ItemArrow
  je do_weapon_set_limit

  cmp dword ptr [rdi+10], #37 //ItemBow
  je do_weapon_set_limit

  cmp dword ptr [rdi+10], #38 //ItemCrossbow
  je do_weapon_set_limit




  //base material
  cmp dword ptr [rdi+10], #2 //ItemLogs
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #4 //ItemStone
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #5 //ItemPlunks
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #8 //ItemFirewood
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #9 //ItemFlour
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #16 //ItemGrain
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #25 //ItemIronOre
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #26 //ItemIron
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #36 //ItemBrick
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #47 //ItemCoal
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #48 //ItemClay
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #69 //ItemMilk
  je chk_base_set_limit

  cmp dword ptr [rdi+10], #73 //ItemSand
  je chk_base_set_limit


  jmp endp_pre


do_set_limit:
  mov ecx, [rax+1B0]
  cmp ecx, [i_max_count_for_unneeded]
  jb chk_lower_limit
  mov ecx, [i_max_count_for_unneeded]
  mov [rax+1B0], ecx
  mov r14d, ecx
  jmp endp_pre

chk_lower_limit:
  mov ecx, [rax+1B0]
  cmp ecx, [i_min_count_for_unneeded]
  jae endp_pre
  mov ecx, [i_min_count_for_unneeded]
  mov [rax+1B0], ecx
  mov r14d, ecx
  jmp endp_pre


do_weapon_set_limit:
  mov ecx, [rax+1B0]
  cmp ecx, [i_max_count_for_weapon_unneeded]
  jb chk_weapon_lower_limit
  mov ecx, [i_max_count_for_weapon_unneeded]
  mov [rax+1B0], ecx
  mov r14d, ecx
  jmp endp_pre

chk_weapon_lower_limit:
  mov ecx, [rax+1B0]
  cmp ecx, [i_min_count_for_weapon_unneeded]
  jae endp_pre
  mov ecx, [i_min_count_for_weapon_unneeded]
  mov [rax+1B0], ecx
  mov r14d, ecx
  jmp endp_pre


chk_base_set_limit:
  mov ecx, [rax+1B0]
  cmp ecx, [i_max_count_for_base_unneeded]
  jb chk_base_lower_limit
  mov ecx, [i_max_count_for_base_unneeded]
  mov [rax+1B0], ecx
  mov r14d, ecx
  jmp endp_pre

chk_base_lower_limit:
  mov ecx, [rax+1B0]
  cmp ecx, [i_min_count_for_base_unneeded]
  jae endp_pre
  mov ecx, [i_min_count_for_base_unneeded]
  mov [rax+1B0], ecx
  mov r14d, ecx
  jmp endp_pre


endp_pre:
  mov [rdi+88], r14d
endp:
  pop rdx
  pop rcx
  pop r14
  pop rax
  popfq

code:
  add esi,[rdi+00000088]
  jmp return
align 10 cc
  is_prevent_corrput_in_unneeded:
  dd 1
  i_max_count_for_unneeded:
  dd #295
  i_min_count_for_unneeded:
  dd #33
  i_max_count_for_weapon_unneeded:
  dd #310
  i_min_count_for_weapon_unneeded:
  dd #31
  i_max_count_for_base_unneeded:
  dd #395
  i_min_count_for_base_unneeded:
  dd #91



INJECT_UPDATE_MAX_ITEM_COUNT:
  jmp newmem
  nop
return:
registersymbol(INJECT_UPDATE_MAX_ITEM_COUNT)
registersymbol(is_prevent_corrput_in_unneeded)
registersymbol(i_max_count_for_unneeded)
registersymbol(i_min_count_for_unneeded)
registersymbol(i_max_count_for_weapon_unneeded)
registersymbol(i_min_count_for_weapon_unneeded)
registersymbol(i_min_count_for_base_unneeded)
registersymbol(i_max_count_for_base_unneeded)

[DISABLE]

INJECT_UPDATE_MAX_ITEM_COUNT:
  db 03 B7 88 00 00 00

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+82ECE8

GameAssembly.dll+82ECCA: E8 81 51 AD FF     - call GameAssembly.dll+303E50
GameAssembly.dll+82ECCF: 48 85 FF           - test rdi,rdi
GameAssembly.dll+82ECD2: 74 1A              - je GameAssembly.dll+82ECEE
GameAssembly.dll+82ECD4: 48 85 ED           - test rbp,rbp
GameAssembly.dll+82ECD7: 74 0F              - je GameAssembly.dll+82ECE8
GameAssembly.dll+82ECD9: 48 8B D7           - mov rdx,rdi
GameAssembly.dll+82ECDC: 48 8B CD           - mov rcx,rbp
GameAssembly.dll+82ECDF: E8 DC 99 7F FF     - call GameAssembly.il2cpp_method_get_class+17B0
GameAssembly.dll+82ECE4: 84 C0              - test al,al
GameAssembly.dll+82ECE6: 75 06              - jne GameAssembly.dll+82ECEE
// ---------- INJECTING HERE ----------
GameAssembly.dll+82ECE8: 03 B7 88 00 00 00  - add esi,[rdi+00000088]
// ---------- DONE INJECTING  ----------
GameAssembly.dll+82ECEE: FF C3              - inc ebx
GameAssembly.dll+82ECF0: E9 4B FF FF FF     - jmp GameAssembly.dll+82EC40
GameAssembly.dll+82ECF5: 48 8B 5C 24 30     - mov rbx,[rsp+30]
GameAssembly.dll+82ECFA: 8B C6              - mov eax,esi
GameAssembly.dll+82ECFC: 48 8B 74 24 40     - mov rsi,[rsp+40]
GameAssembly.dll+82ED01: 48 8B 6C 24 38     - mov rbp,[rsp+38]
GameAssembly.dll+82ED06: 48 8B 7C 24 48     - mov rdi,[rsp+48]
GameAssembly.dll+82ED0B: 48 83 C4 20        - add rsp,20
GameAssembly.dll+82ED0F: 41 5E              - pop r14
GameAssembly.dll+82ED11: C3                 - ret
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>162</ID>
              <Description>"Set some items' min/max. amount in each storage location and market"</Description>
              <Color>8000FF</Color>
              <GroupHeader>1</GroupHeader>
              <CheatEntries>
                <CheatEntry>
                  <ID>168</ID>
                  <Description>"Most foods, goods...."</Description>
                  <Color>8000FF</Color>
                  <GroupHeader>1</GroupHeader>
                </CheatEntry>
                <CheatEntry>
                  <ID>163</ID>
                  <Description>"Min"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <Color>C08000</Color>
                  <VariableType>4 Bytes</VariableType>
                  <Address>i_min_count_for_unneeded</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>161</ID>
                  <Description>"Max"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <Color>C08000</Color>
                  <VariableType>4 Bytes</VariableType>
                  <Address>i_max_count_for_unneeded</Address>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
            <CheatEntry>
              <ID>164</ID>
              <Description>"Set weapon/arrow/armor's min/max. amount in each storage location."</Description>
              <Color>8000FF</Color>
              <GroupHeader>1</GroupHeader>
              <CheatEntries>
                <CheatEntry>
                  <ID>166</ID>
                  <Description>"Min"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <Color>C08000</Color>
                  <VariableType>4 Bytes</VariableType>
                  <Address>i_min_count_for_weapon_unneeded</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>167</ID>
                  <Description>"Max"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <Color>C08000</Color>
                  <VariableType>4 Bytes</VariableType>
                  <Address>i_max_count_for_weapon_unneeded</Address>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
            <CheatEntry>
              <ID>160</ID>
              <Description>"Set base material min/max amount in each storage location."</Description>
              <Color>8000FF</Color>
              <GroupHeader>1</GroupHeader>
              <CheatEntries>
                <CheatEntry>
                  <ID>169</ID>
                  <Description>"Logs, stone,..."</Description>
                  <Color>8000FF</Color>
                  <GroupHeader>1</GroupHeader>
                </CheatEntry>
                <CheatEntry>
                  <ID>170</ID>
                  <Description>"Min"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <Color>C08000</Color>
                  <VariableType>4 Bytes</VariableType>
                  <Address>i_min_count_for_base_unneeded</Address>
                </CheatEntry>
                <CheatEntry>
                  <ID>171</ID>
                  <Description>"Max"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <Color>C08000</Color>
                  <VariableType>4 Bytes</VariableType>
                  <Address>i_max_count_for_base_unneeded</Address>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>177</ID>
          <Description>"Set transport wagon speed"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2024-09-11
  Author : bbfox@https://opencheattables.com
}

[ENABLE]
//TransportWagon.get_movementSpeed
aobscanmodule(INJECT_SET_TRANS_WAGON_SPPEED,GameAssembly.dll,F3 0F 10 8B A8 00 00 00 0F) // should be unique
alloc(newmem,$1000,INJECT_SET_TRANS_WAGON_SPPEED)

label(code)
label(return)

newmem:

code:
  movss xmm1,[rbx+000000A8]
  vmovss xmm15, [vf_wagon_multi]
  vmulss xmm1, xmm1, xmm15

  jmp return
  align 10 cc
  vf_wagon_multi:
  dd (float)6.6666666

INJECT_SET_TRANS_WAGON_SPPEED:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_SET_TRANS_WAGON_SPPEED)

[DISABLE]

INJECT_SET_TRANS_WAGON_SPPEED:
  db F3 0F 10 8B A8 00 00 00

unregistersymbol(INJECT_SET_TRANS_WAGON_SPPEED)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+EA0CDF

GameAssembly.dll+EA0CB5: 74 47                    - je GameAssembly.dll+EA0CFE
GameAssembly.dll+EA0CB7: 48 8B 0D AA D6 BB 02     - mov rcx,[GameAssembly.dll+3A5E368]
GameAssembly.dll+EA0CBE: 83 B9 E0 00 00 00 00     - cmp dword ptr [rcx+000000E0],00
GameAssembly.dll+EA0CC5: 75 05                    - jne GameAssembly.dll+EA0CCC
GameAssembly.dll+EA0CC7: E8 D4 AE 4E FF           - call GameAssembly.il2cpp_field_static_set_value+4490
GameAssembly.dll+EA0CCC: 48 83 7F 10 00           - cmp qword ptr [rdi+10],00
GameAssembly.dll+EA0CD1: 74 2B                    - je GameAssembly.dll+EA0CFE
GameAssembly.dll+EA0CD3: 48 8B 83 48 01 00 00     - mov rax,[rbx+00000148]
GameAssembly.dll+EA0CDA: 48 85 C0                 - test rax,rax
GameAssembly.dll+EA0CDD: 74 32                    - je GameAssembly.dll+EA0D11
// ---------- INJECTING HERE ----------
GameAssembly.dll+EA0CDF: F3 0F 10 8B A8 00 00 00  - movss xmm1,[rbx+000000A8]
// ---------- DONE INJECTING  ----------
GameAssembly.dll+EA0CE7: 0F 28 C1                 - movaps xmm0,xmm1
GameAssembly.dll+EA0CEA: F3 0F 59 40 38           - mulss xmm0,[rax+38]
GameAssembly.dll+EA0CEF: F3 0F 58 C1              - addss xmm0,xmm1
GameAssembly.dll+EA0CF3: 48 8B 5C 24 30           - mov rbx,[rsp+30]
GameAssembly.dll+EA0CF8: 48 83 C4 20              - add rsp,20
GameAssembly.dll+EA0CFC: 5F                       - pop rdi
GameAssembly.dll+EA0CFD: C3                       - ret 
GameAssembly.dll+EA0CFE: F3 0F 10 83 A8 00 00 00  - movss xmm0,[rbx+000000A8]
GameAssembly.dll+EA0D06: 48 8B 5C 24 30           - mov rbx,[rsp+30]
GameAssembly.dll+EA0D0B: 48 83 C4 20              - add rsp,20
}
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>111</ID>
          <Description>"Set villager move speed / life"</Description>
          <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-11-19
  Author : bbfox@https://opencheattables.com
}

[ENABLE]
//Character.get_movementSpeed
//aobscanmodule(INJECT_SET_VILLAGER_DATA,GameAssembly.dll,F3 0F 10 73 58 F3 0F 59) // should be unique
aobscanregion(INJECT_SET_VILLAGER_DATA,Characterget_movementSpeedProc+20,Characterget_movementSpeedProc+40,F3 0F 10 7B 58 F3) // should be unique
alloc(newmem,$1000,INJECT_SET_VILLAGER_DATA)

label(code)
label(return)
label(vf_moving_speed_multi)
label(vf_shoe_bonus_base)
label(is_set_life)
label(is_set_armor)
label(vf_min_armor_value)
label(is_weaken_raider)
label(vf_raider_moving_speed_multi)

newmem:

  // v0.8.1a
  // Raider:
  // Float: 44: _movementSpeedBase = 3 (Villager = 4.199999809)
  // Pointer: E0: _raiderGroup &lt;&gt; 0 (Villiger = 0 (E0 equals to onDeath)
  // Byte: 70:94 &lt;combatComp&gt;k__BackingField:canBeWounded = 0 (villager = 1)
  // Float: 70: &lt;retreatTimeTillIgnore&gt;k__BackingField = 7.599225998
  // Pointer: 70:80 &lt;immuneSystem&gt;k__BackingField = 0

  // v0.9.1
  // Raider:
  // Float: 4C: _movementSpeedBase = 3 (Villager = 4.199999809)
  // Pointer: F0: _raiderGroup &lt;&gt; 0 (Villiger = 0 (E0 equals to onDeath)
  // Byte: 78:B4 &lt;combatComp&gt;k__BackingField:canBeWounded = 0 (villager = 1)
  // Float: 78:26C: &lt;retreatTimeTillIgnore&gt;k__BackingField = 7.599225998
  // Pointer: E8 &lt;immuneSystem&gt;k__BackingField = 0

  // v0.9.2
  // Raider:
  // Float: 58: _movementSpeedBase = 3 (Villager = 4.199999809 / Immigrant = 4.125)
  // ???Pointer: F0: _raiderGroup &lt;&gt; 0 (Villiger = 0 (E0 equals to onDeath)
  // Byte: 88:BC &lt;combatComp&gt;k__BackingField:canBeWounded = 0 (villager = 1)
  // Float: 88:2A4: &lt;retreatTimeTillIgnore&gt;k__BackingField = 7.599225998 (villager = 3.349962711)
  // Pointer: E8 &lt;immuneSystem&gt;k__BackingField = 0

  // v0.9.4
  // Raider:
  // Float: 58: _movementSpeedBase = ? (Villager = 3.099999905 / Immigrant = ?)
  // ???Pointer: F0: _raiderGroup &lt;&gt; 0 (Villiger = 0 (E0 equals to onDeath)
  // Byte: 90:CC &lt;combatComp&gt;k__BackingField:canBeWounded = 0 (villager = 1)
  // Float: 90:2BC: &lt;retreatTimeTillIgnore&gt;k__BackingField = 7.599225998 (villager = 6.262869358)
  // Pointer: 100 &lt;immuneSystem&gt;k__BackingField = 0



  mov dword ptr [is_this_object_rider], 0

  cmp dword ptr [is_set_life], 1
  jne check_armor

  push r15
  mov r15, [rbx+90] //&lt;combatComp&gt;k__BackingField
  test r15, r15
  jz endp1

  mov dword ptr [is_this_object_rider], 1
  cmp dword ptr [rbx+58], (float)4.125 //_movementSpeedBase
  je chk_v1 //Immigrant

  cmp byte ptr [r15+CC], 1 //canBeWounded = 0 -&gt; assume Rider
  jne endp1

chk_v1:
  // Villager
  mov dword ptr [is_this_object_rider], 0

  vmovss xmm15, [r15+68] //&lt;baseMaxLife&gt;k__BackingField
  vmovss xmm14, [r15+58] //_life
  vucomiss xmm14, xmm15
  jae endp1
  vmovss [r15+58], xmm15 //_life

endp1:
  pop r15


check_armor:
  cmp dword ptr [is_set_armor], 1
  jne check_rider

  push r15
  mov r15, [rbx+90] //&lt;combatComp&gt;k__BackingField
  test r15, r15
  jz endp2

  mov dword ptr [is_this_object_rider], 1

  //cmp dword ptr [rbx+58], (float)4.125 //_movementSpeedBase
  cmp dword ptr [rbx+58], (float)3.099999905 //_movementSpeedBase
  je chk_v2 //Immigrant

  cmp byte ptr [r15+CC], 1 //canBeWounded = 0 -&gt; assume Rider
  jne endp2

  //Villager
chk_v2:
  mov dword ptr [is_this_object_rider], 0

  vmovss xmm15, [vf_min_armor_value]
  vmovss xmm14, [r15+90] //baseArmor
  vucomiss xmm14, xmm15
  jae endp2
  vmovss [r15+90], xmm15

endp2:
  pop r15


check_rider:
  cmp dword ptr [is_weaken_raider], 1
  jne code

  push r15
  mov r15, [rbx+90] //&lt;combatComp&gt;k__BackingField
  test r15, r15
  jz endp3

  mov dword ptr [is_this_object_rider], 0

  cmp dword ptr [rbx+58], (float)3.099999905 //_movementSpeedBase
  je endp3 // Immigrant

  cmp byte ptr [r15+CC], 0 //canBeWounded = 0 -&gt; assume Rider
  jne endp3

  // Rider
  mov dword ptr [is_this_object_rider], 1

  mov dword ptr [r15+90], 0 // baseArmor
  mov dword ptr [r15+E8], 0 // _trainingLevel

endp3:
  pop r15


code:
  // orig code
  movss xmm7,[rbx+58] //_movementSpeedBase
  //

  cmp dword ptr [is_this_object_rider], 1
  je set_rider_moving_speed

  vmovss xmm14, [vf_moving_speed_multi]
  vmulss xmm7, xmm7, xmm14

  vmovss xmm15, [vf_shoe_bonus_base]
  vmovss [rbx+60], xmm15 //_shoeBonusBase
  jmp return

set_rider_moving_speed:
  vmovss xmm14, [vf_raider_moving_speed_multi]
  vmulss xmm7, xmm7, xmm14

  //vmovss xmm15, [vf_shoe_bonus_base]
  vxorps xmm15, xmm15, xmm15
  vmovss [rbx+60], xmm15 //_shoeBonusBase

  jmp return
align 10 cc
  vf_moving_speed_multi:
  dd (float)1.2
  vf_raider_moving_speed_multi:
  dd (float)0.66666666666
  vf_shoe_bonus_base:
  dd (float)1.5
  is_set_life:
  dd 0
  is_set_armor:
  dd 1
  vf_20:
  dd (float)20
  vf_min_armor_value:
  dd (float)50
  is_weaken_raider:
  dd 1
  is_this_object_rider:
  dd 0
  vf_Immigrant_move_speed:
  dd (float)4.125

INJECT_SET_VILLAGER_DATA:
  jmp newmem
return:
registersymbol(INJECT_SET_VILLAGER_DATA)
registersymbol(vf_moving_speed_multi)
registersymbol(vf_shoe_bonus_base)
registersymbol(is_set_life)
registersymbol(is_set_armor)
registersymbol(vf_min_armor_value)
registersymbol(is_weaken_raider)
registersymbol(vf_raider_moving_speed_multi)

[DISABLE]

INJECT_SET_VILLAGER_DATA:
  db F3 0F 10 7B 58 F3

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+F0FAC5

GameAssembly.dll+F0FA95: 57                    - push rdi
GameAssembly.dll+F0FA96: 48 83 EC 40           - sub rsp,40
GameAssembly.dll+F0FA9A: 80 3D 2B C9 D0 02 00  - cmp byte ptr [GameAssembly.dll+3C1C3CC],00
GameAssembly.dll+F0FAA1: 48 8B D9              - mov rbx,rcx
GameAssembly.dll+F0FAA4: 0F 29 7C 24 20        - movaps [rsp+20],xmm7
GameAssembly.dll+F0FAA9: 75 13                 - jne GameAssembly.dll+F0FABE
GameAssembly.dll+F0FAAB: 48 8D 0D B6 E8 B4 02  - lea rcx,[GameAssembly.dll+3A5E368]
GameAssembly.dll+F0FAB2: E8 19 91 45 FF        - call GameAssembly.GlobalizationNative_GetTimeZoneDisplayName+5B0
GameAssembly.dll+F0FAB7: C6 05 0E C9 D0 02 01  - mov byte ptr [GameAssembly.dll+3C1C3CC],01
GameAssembly.dll+F0FABE: 48 8B 0D A3 E8 B4 02  - mov rcx,[GameAssembly.dll+3A5E368]
// ---------- INJECTING HERE ----------
GameAssembly.dll+F0FAC5: F3 0F 10 7B 58        - movss xmm7,[rbx+58]
// ---------- DONE INJECTING  ----------
GameAssembly.dll+F0FACA: F3 0F 59 7B 48        - mulss xmm7,[rbx+48]
GameAssembly.dll+F0FACF: 48 8B BB 90 00 00 00  - mov rdi,[rbx+00000090]
GameAssembly.dll+F0FAD6: 83 B9 E0 00 00 00 00  - cmp dword ptr [rcx+000000E0],00
GameAssembly.dll+F0FADD: 75 05                 - jne GameAssembly.dll+F0FAE4
GameAssembly.dll+F0FADF: E8 BC C0 47 FF        - call GameAssembly.il2cpp_field_static_set_value+4490
GameAssembly.dll+F0FAE4: 80 3D 85 8D D1 02 00  - cmp byte ptr [GameAssembly.dll+3C28870],00
GameAssembly.dll+F0FAEB: 75 13                 - jne GameAssembly.dll+F0FB00
GameAssembly.dll+F0FAED: 48 8D 0D 74 E8 B4 02  - lea rcx,[GameAssembly.dll+3A5E368]
GameAssembly.dll+F0FAF4: E8 D7 90 45 FF        - call GameAssembly.GlobalizationNative_GetTimeZoneDisplayName+5B0
GameAssembly.dll+F0FAF9: C6 05 70 8D D1 02 01  - mov byte ptr [GameAssembly.dll+3C28870],01
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>125</ID>
              <Description>"May not apply to all NPCs"</Description>
              <Color>8000FF</Color>
              <GroupHeader>1</GroupHeader>
            </CheatEntry>
            <CheatEntry>
              <ID>112</ID>
              <Description>"Moving speed multiplier"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>Float</VariableType>
              <Address>vf_moving_speed_multi</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>113</ID>
              <Description>"Shoe bonus"</Description>
              <DropDownList DisplayValueAsItem="1">0.1000000015:Default
0.3:3x
0.8999999762:0.9x
1.5:15x
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>Float</VariableType>
              <Address>vf_shoe_bonus_base</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>114</ID>
              <Description>"Set life when moving? (not recommended)"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>is_set_life</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>115</ID>
              <Description>"Set min. armor when moving?"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>is_set_armor</Address>
              <CheatEntries>
                <CheatEntry>
                  <ID>116</ID>
                  <Description>"Min. armor value"</Description>
                  <ShowAsSigned>0</ShowAsSigned>
                  <Color>C08000</Color>
                  <VariableType>Float</VariableType>
                  <Address>vf_min_armor_value</Address>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
            <CheatEntry>
              <ID>122</ID>
              <Description>"Make rider weak? (training level 0 &amp; no base armor)"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>is_weaken_raider</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>124</ID>
              <Description>"Rider moving speed multiplier"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>Float</VariableType>
              <Address>vf_raider_moving_speed_multi</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>18</ID>
          <Description>"Item gather number multiplier"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-11-19
  Author : bbfox@https://opencheattables.com
}

[ENABLE]
aobscanmodule(INJECT_MASS_ADD,GameAssembly.dll,42 01 04 09 41 83 F8 65) // should be unique
alloc(newmem,$1000,INJECT_MASS_ADD)

label(code)
label(return)
label(vf_item_add_multi)
label(vf_item_add_gold_multi)
label(i_item_cnt_threshold)
label(is_prevent_corruption)
label(is_skip_gold_limit)

//ItemBundle.AddItems #2
//ID: 66 ItemPoop
//ID: 51 ItemGoldIngot
newmem:
  push r15
  mov r15d, [rdx+10]
  cmp r15d, #66 //ItemPoop
  pop r15
  je code

  push r15
  mov r15d, [rdx+10]
  cmp r15d, #51 //ItemGoldIngot
  pop r15
  je start_gold_multi //No threshold for GoldIngot

  cmp eax, 0
  je code
  push r15
  mov r15d, [i_item_cnt_threshold]
  cmp dword ptr [rcx+r9], r15d
  pop r15
  jae code
  jmp start_multi

start_gold_multi:
  vmovss xmm14, [vf_item_add_gold_multi]
  jmp start_multi_calc

start_multi:
  vmovss xmm14, [vf_item_add_multi]

start_multi_calc:
  cvtsi2ss xmm15, eax
  vmulss xmm15, xmm15, xmm14
  vcvtss2si eax, xmm15
  push r15
  mov r15d, [rcx+r9]
  pop r15

chk_corrupt:
  cmp r8d, #40
  ja code
  cmp dword ptr [is_prevent_corruption], 1
  jne code

  add [rcx+r9],eax
  mov eax, [rcx+r9]
  mov dword ptr [rcx+r9], 0

  add [r9+1B0], eax //0020 + 64*4 = 1B0, slot 100% address
  mov eax, 0


code:
  add [rcx+r9],eax
  cmp r8d,65
  jmp return
align 10 cc
  vf_item_add_multi:
  dd (float)3.333333334
  vf_item_add_gold_multi:
  dd (float)3.33333334
  db EB 3B 54 68 69 73 20 74 61 62 6C 65 20 63 6F 6D 65 73 20 66 72 6F 6D 20 68 74 74 70 73 3A 2F
  db 2F 6F 70 65 6E 63 68 65 61 74 74 61 62 6C 65 73 2E 63 6F 6D 20 2F 20 43 45 20 37 2E 34 2B
  i_item_cnt_threshold:
  dd 64
  i_item_min_cnt_threshold:
  dd 2
  is_prevent_corruption:
  dd 1
  is_skip_gold_limit:
  dd 1

INJECT_MASS_ADD:
  jmp newmem
  nop 3
return:
registersymbol(INJECT_MASS_ADD)
registersymbol(vf_item_add_multi)
registersymbol(i_item_cnt_threshold)
registersymbol(is_prevent_corruption)
registersymbol(is_skip_gold_limit)
registersymbol(vf_item_add_gold_multi)

[DISABLE]

INJECT_MASS_ADD:
  db 42 01 04 09 41 83 F8 65

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+7FF217
GameAssembly.dll+7FF1CF - CC                    - int 3
ItemBundle.AddItems     - 48 83 EC 28           - sub rsp,28
GameAssembly.dll+7FF1D4 - 4C 8B D1              - mov r10,rcx
GameAssembly.dll+7FF1D7 - 45 33 C0              - xor r8d,r8d
GameAssembly.dll+7FF1DA - 66 0F1F 44 00 00      - nop word ptr [rax+rax+00]
GameAssembly.dll+7FF1E0 - 4D 8B 8A 90000000     - mov r9,[r10+00000090]
GameAssembly.dll+7FF1E7 - 4D 85 C9              - test r9,r9
GameAssembly.dll+7FF1EA - 74 72                 - je GameAssembly.dll+7FF25E
GameAssembly.dll+7FF1EC - 45 3B 41 18           - cmp r8d,[r9+18]
GameAssembly.dll+7FF1F0 - 73 72                 - jae GameAssembly.dll+7FF264
GameAssembly.dll+7FF1F2: 4A 8D 0C 85 20 00 00 00           - lea rcx,[r8*4+00000020]
GameAssembly.dll+7FF1FA: 48 85 D2                          - test rdx,rdx
GameAssembly.dll+7FF1FD: 74 5F                             - je GameAssembly.dll+7FF25E
GameAssembly.dll+7FF1FF: 48 8B 82 90 00 00 00              - mov rax,[rdx+00000090]
GameAssembly.dll+7FF206: 48 85 C0                          - test rax,rax
GameAssembly.dll+7FF209: 74 53                             - je GameAssembly.dll+7FF25E
GameAssembly.dll+7FF20B: 44 3B 40 18                       - cmp r8d,[rax+18]
GameAssembly.dll+7FF20F: 73 53                             - jae GameAssembly.dll+7FF264
GameAssembly.dll+7FF211: 8B 04 01                          - mov eax,[rcx+rax]
GameAssembly.dll+7FF214: 41 FF C0                          - inc r8d
// ---------- INJECTING HERE ----------
GameAssembly.dll+7FF217: 42 01 04 09                       - add [rcx+r9],eax
// ---------- DONE INJECTING  ----------
GameAssembly.dll+7FF21B: 41 83 F8 65                       - cmp r8d,65
GameAssembly.dll+7FF21F: 72 BF                             - jb GameAssembly.dll+7FF1E0
GameAssembly.dll+7FF221: 4D 8B 82 90 00 00 00              - mov r8,[r10+00000090]
GameAssembly.dll+7FF228: B8 01 00 00 00                    - mov eax,00000001
GameAssembly.dll+7FF22D: 41 C7 82 88 00 00 00 00 00 00 00  - mov [r10+00000088],00000000
GameAssembly.dll+7FF238: 4D 85 C0                          - test r8,r8
GameAssembly.dll+7FF23B: 74 21                             - je GameAssembly.dll+7FF25E
GameAssembly.dll+7FF23D: 41 3B 40 18                       - cmp eax,[r8+18]
GameAssembly.dll+7FF241: 73 21                             - jae GameAssembly.dll+7FF264
GameAssembly.dll+7FF243: 48 63 C8                          - movsxd  rcx,eax
GameAssembly.dll+7FF246 - FF C0                 - inc eax
GameAssembly.dll+7FF248 - 41 8B 54 88 20        - mov edx,[r8+rcx*4+20]
GameAssembly.dll+7FF24D - 41 01 92 88000000     - add [r10+00000088],edx
GameAssembly.dll+7FF254 - 83 F8 65              - cmp eax,65
GameAssembly.dll+7FF257 - 7C DF                 - jl GameAssembly.dll+7FF238
GameAssembly.dll+7FF259 - 48 83 C4 28           - add rsp,28
GameAssembly.dll+7FF25D - C3                    - ret
GameAssembly.dll+7FF25E - E8 2DA9B5FF           - call GameAssembly.GlobalizationNative_GetTimeZoneDisplayName+5D0
GameAssembly.dll+7FF263 - CC                    - int 3
GameAssembly.dll+7FF264 - E8 37A9B5FF           - call GameAssembly.GlobalizationNative_GetTimeZoneDisplayName+5E0
GameAssembly.dll+7FF269 - CC                    - int 3
GameAssembly.dll+7FF26A - CC                    - int 3

}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>20</ID>
              <Description>"No threshold for gold ingot; multiplier does not apply to poop"</Description>
              <Color>8000FF</Color>
              <GroupHeader>1</GroupHeader>
            </CheatEntry>
            <CheatEntry>
              <ID>19</ID>
              <Description>"Multiplier"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>Float</VariableType>
              <Address>vf_item_add_multi</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>139</ID>
              <Description>"Multiplier for Gold ingot"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>Float</VariableType>
              <Address>vf_item_add_gold_multi</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>29</ID>
              <Description>"Multiplier threshold limt"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_item_cnt_threshold</Address>
              <CheatEntries>
                <CheatEntry>
                  <ID>138</ID>
                  <Description>"multiplier is disabled, if stock# exceed this value"</Description>
                  <Color>8000FF</Color>
                  <GroupHeader>1</GroupHeader>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
            <CheatEntry>
              <ID>136</ID>
              <Description>"Try to prevent corruption?"</Description>
              <DropDownList DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>is_prevent_corruption</Address>
              <CheatEntries>
                <CheatEntry>
                  <ID>140</ID>
                  <Description>"Only checked when adding a new item"</Description>
                  <Color>8000FF</Color>
                  <GroupHeader>1</GroupHeader>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
            <CheatEntry>
              <ID>137</ID>
              <Description>"No threshold limit for gold ingot?"</Description>
              <DropDownList DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>is_skip_gold_limit</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>143</ID>
          <Description>"When item remove: try to prevent corruption"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-11-19
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_REMOVE_ITEM,GameAssembly.dll,01 8E 88 00 00 00) // should be unique
alloc(newmem,$1000,INJECT_REMOVE_ITEM)

label(code)
label(return)
label(vf_item_remove_multi)
label(is_prevent_corrupt_after_remove)

//ItemBundle.RemoveItems

newmem:
  jmp start_p
  cvtsi2ss xmm15, ecx
  vmovss xmm14, [vf_item_remove_multi]
  vmulss xmm15, xmm15, xmm14
  vcvtss2si ecx, xmm15

start_p:
  cmp dword ptr [is_prevent_corrupt_after_remove], 1
  jne code
  cmp eax, #40
  ja code

  mov ecx, [r8+rax*4+20]
  mov dword ptr [r8+rax*4+20], 0
  add [r8+1B0], ecx
  mov ecx, 0

code:
  add [rsi+00000088],ecx

  jmp return
align 10 cc
  vf_item_remove_multi:
  dd (float)1.05
  is_prevent_corrupt_after_remove:
  dd 1

INJECT_REMOVE_ITEM:
  jmp newmem
  nop
return:
registersymbol(INJECT_REMOVE_ITEM)
registersymbol(vf_item_remove_multi)
registersymbol(is_prevent_corrupt_after_remove)

[DISABLE]

INJECT_REMOVE_ITEM:
  db 01 8E 88 00 00 00

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+7FF3F9

GameAssembly.dll+7FF3D1: 4C 8B 86 90 00 00 00  - mov r8,[rsi+00000090]
GameAssembly.dll+7FF3D8: BA 01 00 00 00        - mov edx,00000001
GameAssembly.dll+7FF3DD: 44 89 A6 88 00 00 00  - mov [rsi+00000088],r12d
GameAssembly.dll+7FF3E4: 4D 85 C0              - test r8,r8
GameAssembly.dll+7FF3E7: 74 3C                 - je GameAssembly.dll+7FF425
GameAssembly.dll+7FF3E9: 41 3B 50 18           - cmp edx,[r8+18]
GameAssembly.dll+7FF3ED: 73 3C                 - jae GameAssembly.dll+7FF42B
GameAssembly.dll+7FF3EF: 48 63 C2              - movsxd  rax,edx
GameAssembly.dll+7FF3F2: FF C2                 - inc edx
GameAssembly.dll+7FF3F4: 41 8B 4C 80 20        - mov ecx,[r8+rax*4+20]
// ---------- INJECTING HERE ----------
GameAssembly.dll+7FF3F9: 01 8E 88 00 00 00     - add [rsi+00000088],ecx
// ---------- DONE INJECTING  ----------
GameAssembly.dll+7FF3FF: 83 FA 65              - cmp edx,65
GameAssembly.dll+7FF402: 7C E0                 - jl GameAssembly.dll+7FF3E4
GameAssembly.dll+7FF404: 4C 8B 74 24 48        - mov r14,[rsp+48]
GameAssembly.dll+7FF409: 49 8B C7              - mov rax,r15
GameAssembly.dll+7FF40C: 48 8B 7C 24 40        - mov rdi,[rsp+40]
GameAssembly.dll+7FF411: 48 8B 5C 24 50        - mov rbx,[rsp+50]
GameAssembly.dll+7FF416: 48 8B 6C 24 58        - mov rbp,[rsp+58]
GameAssembly.dll+7FF41B: 48 83 C4 20           - add rsp,20
GameAssembly.dll+7FF41F: 41 5F                 - pop r15
GameAssembly.dll+7FF421: 41 5C                 - pop r12
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>145</ID>
              <Description>"Try to prevent corruption?"</Description>
              <DropDownList DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>is_prevent_corrupt_after_remove</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>132</ID>
          <Description>"When add item to storage"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>{ Game   : Farthest Frontier.exe
  Version: 
  Date   : 2023-11-19
  Author : bbfox@https://opencheattables.com
}

[ENABLE]

aobscanmodule(INJECT_STOR_ITEM_MULTI,GameAssembly.dll,41 01 04 10 83 F9 65 72 AE) // should be unique
alloc(newmem,$1000,INJECT_STOR_ITEM_MULTI)

label(code)
label(return)
label(vf_item_count_multi)
label(i_min_storage_item)
label(i_max_poop_count)
label(i_min_gold_count)
label(i_min_amount_in_100_slot)

//ItemStorage.AddItems

newmem:
  //cmp ecx, 64
  //jne do_next
  mov [i_tmp1], eax
  cvtsi2ss xmm15, eax
  vmovss xmm14, [vf_item_count_multi]
  vmulss xmm15, xmm14, xmm15
  vcvtss2si eax, xmm15


do_next:
  push r15
  push r14

  // rdi: ItemBundle
  mov r15d, [rdi+10] // &lt;itemID&gt;k__BackingField
  cmp r15d, #66 //ItemPoop
  jne chk_gold
  // Poop
  mov eax, [i_tmp1]
  mov r15, [rdi+90] //percentDegradationQtyArray
  mov r14d, [r15+1B0] //100%
  cmp r14d, [i_max_poop_count]
  jbe chk_gold
  mov r14d, [i_max_poop_count]
  mov [r15+1B0], r14d

chk_gold:
  mov r15d, [rdi+10]
  cmp r15d, #51 //ItemGoldIngot
  jne chk_min_amount
  mov r15, [rdi+90] //percentDegradationQtyArray
  mov r14d, [r15+1B0] //100%
  cmp r14d, [i_min_gold_count]
  jae chk_min_amount
  mov r14d, [i_min_gold_count]
  mov [r15+1B0], r14d


chk_min_amount:
  cmp ecx, 65
  jne endp
  mov r15, [rdi+90] //percentDegradationQtyArray
  mov r14d, [r15+1B0] //100%
  cmp r14d, [i_min_amount_in_100_slot]
  jae endp
  mov r14d, [i_min_amount_in_100_slot]
  mov [r15+1B0], r14d


endp:
  pop r14
  pop r15

code:
  add [r8+rdx],eax
  mov eax, [i_tmp1]
  cmp ecx,65
  jmp return
align 10 cc
  vf_item_count_multi:
  dd (float)3.3333333333
  i_min_storage_item:
  dd A
  i_max_poop_count:
  dd 14
  i_min_gold_count:
  dd #200
  i_tmp1:
  dd 0
  i_min_amount_in_100_slot:
  dd 4

INJECT_STOR_ITEM_MULTI:
  jmp newmem
  nop 2
return:
registersymbol(INJECT_STOR_ITEM_MULTI)
registersymbol(vf_item_count_multi)
registersymbol(i_min_storage_item)
registersymbol(i_max_poop_count)
registersymbol(i_min_gold_count)
registersymbol(i_min_amount_in_100_slot)

[DISABLE]

INJECT_STOR_ITEM_MULTI:
  db 41 01 04 10 83 F9 65

unregistersymbol(*)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+803359

GameAssembly.dll+803329: 4C 8D 04 8D 20 00 00 00        - lea r8,[rcx*4+00000020]
GameAssembly.dll+803331: 48 85 FF                       - test rdi,rdi
GameAssembly.dll+803334: 0F 84 84 01 00 00              - je GameAssembly.dll+8034BE
GameAssembly.dll+80333A: 48 8B 87 90 00 00 00           - mov rax,[rdi+00000090]
GameAssembly.dll+803341: 48 85 C0                       - test rax,rax
GameAssembly.dll+803344: 0F 84 74 01 00 00              - je GameAssembly.dll+8034BE
GameAssembly.dll+80334A: 3B 48 18                       - cmp ecx,[rax+18]
GameAssembly.dll+80334D: 0F 83 71 01 00 00              - jae GameAssembly.dll+8034C4
GameAssembly.dll+803353: 41 8B 04 00                    - mov eax,[r8+rax]
GameAssembly.dll+803357: FF C1                          - inc ecx
// ---------- INJECTING HERE ----------
GameAssembly.dll+803359: 41 01 04 10                    - add [r8+rdx],eax
// ---------- DONE INJECTING  ----------
GameAssembly.dll+80335D: 83 F9 65                       - cmp ecx,65
GameAssembly.dll+803360: 72 AE                          - jb GameAssembly.dll+803310
GameAssembly.dll+803362: 4C 8B 83 90 00 00 00           - mov r8,[rbx+00000090]
GameAssembly.dll+803369: BA 01 00 00 00                 - mov edx,00000001
GameAssembly.dll+80336E: C7 83 88 00 00 00 00 00 00 00  - mov [rbx+00000088],00000000
GameAssembly.dll+803378: 0F 1F 84 00 00 00 00 00        - nop dword ptr [rax+rax+00000000]
GameAssembly.dll+803380: 4D 85 C0                       - test r8,r8
GameAssembly.dll+803383: 0F 84 35 01 00 00              - je GameAssembly.dll+8034BE
GameAssembly.dll+803389: 41 3B 50 18                    - cmp edx,[r8+18]
GameAssembly.dll+80338D: 0F 83 31 01 00 00              - jae GameAssembly.dll+8034C4
}
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>141</ID>
              <Description>"Affect traiding post"</Description>
              <Color>8000FF</Color>
              <GroupHeader>1</GroupHeader>
            </CheatEntry>
            <CheatEntry>
              <ID>133</ID>
              <Description>"Multiplier"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>Float</VariableType>
              <Address>vf_item_count_multi</Address>
              <CheatEntries>
                <CheatEntry>
                  <ID>150</ID>
                  <Description>"If you notice that the required amount of building materials is never met, please set this value to 1"</Description>
                  <Color>8000FF</Color>
                  <GroupHeader>1</GroupHeader>
                </CheatEntry>
                <CheatEntry>
                  <ID>152</ID>
                  <Description>"If upgrade button is disabled, please set this value to 1"</Description>
                  <Color>8000FF</Color>
                  <GroupHeader>1</GroupHeader>
                </CheatEntry>
                <CheatEntry>
                  <ID>154</ID>
                  <Description>"Transfer items between "town storage" &lt;=&gt; "trading post" in Trading post menu to increase item count"</Description>
                  <Color>8000FF</Color>
                  <GroupHeader>1</GroupHeader>
                </CheatEntry>
              </CheatEntries>
            </CheatEntry>
            <CheatEntry>
              <ID>134</ID>
              <Description>"Max poop count"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_max_poop_count</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>135</ID>
              <Description>"Min. gold amount"</Description>
              <ShowAsSigned>0</ShowAsSigned>
              <Color>C08000</Color>
              <VariableType>4 Bytes</VariableType>
              <Address>i_min_gold_count</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
    <CheatEntry>
      <ID>28</ID>
      <Description>"Farthest Frontier v0.9.4 /  https://opencheattables.com  /  CE 7.5+"</Description>
      <Color>009700</Color>
      <GroupHeader>1</GroupHeader>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
  <LuaScript>--[[
from https://forum.cheatengine.org/viewtopic.php?p=5659739&amp;sid=72bd2d145c30bf0d344304bce17ea990#5659739
FauDrei
--]]
function toHex(num)
    if num == 0 then
        return '0'
    end
    local neg = false
    if num &lt; 0 then
        neg = true
        num = num * -1
    end
    local hexstr = "0123456789ABCDEF"
    local result = ""
    while num &gt; 0 do
        local n = math.mod(num, 16)
        result = string.sub(hexstr, n + 1, n + 1) .. result
        num = math.floor(num / 16)
    end
    if neg then
        result = '-' .. result
    end
    return result
end


function reEscape(s)
  local escPatChars = [[().%+-*?[^]]
  s = s:gsub('.',function(c) if escPatChars:find(c,1,true) then return '%'..c end end)
  return s
end

function findMethodAddrBySignature(namespace,classname,methodname,signature,check)
  local meth = findMethodBySignature(namespace,classname,methodname,signature,check)
  if meth~=nil and meth&gt;0 then
    return mono_compile_method(meth)
  end
end

function findMethodBySignature(namespace,classname,methodname,signature,check)
  assert(type(signature)=='string',"invalid signature")
  signature="^"..reEscape(signature:gsub(";",","))
  local class = mono_findClass(namespace,classname)
  if type(class)~='number' or class==0 then return nil end
  local methods=mono_class_enumMethods(class)
  if type(methods)~='table' or #methods&lt;1 then return nil end
  if check then  print('check:'..methodname..": &lt;"..signature.."&gt; vs ") end
  for i=1,#methods do
   if methodname == methods[i].name then
     local sign = mono_method_getSignature(methods[i].method)
     if check then  print("  &gt;&gt; &lt;"..sign..'&gt;') end
     if sign:match(signature) then
       return methods[i].method
     end
   end
  end
end

--registerLuaFunctionHighlight('tohex')
registerLuaFunctionHighlight('toHex')
registerLuaFunctionHighlight('reEscape')
registerLuaFunctionHighlight('findMethodAddrBySignature')
registerLuaFunctionHighlight('findMethodBySignature')

</LuaScript>
</CheatTable>
