Lulu wrote: ↑Thu Apr 29, 2021 3:51 pm
Can someone show me how to use Item Finder to find specific items and change their quantities please ? I got to the "View this memory region" part but idk what to do next.
This is another Item FInder, editing specific item quantities. WARNING: not limit max quantity.
usage: replace "Item FInder" with below entries, check "Item Finder" and "Populate Item Name".
edit: fixed bug of original code (should not use RAX to compute ItemBase, and allocate 8 bytes to ItemBase due to 64-bit), and temporarily drop HaveAll code because I can't check valid offset for now
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>4</ID>
<Description>"Item Finder"</Description>
<Options moHideChildren="1"/>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : NieR Replicant ver.1.22474487139.exe
Version:
Date : 2021-04-23
Author : Zach
This script does blah blah blah
}
[ENABLE]
aobscanmodule(Item_Base,NieR Replicant ver.1.22474487139.exe,0F B6 84 08 C0 00 00 00 C3 32) // should be unique
alloc(newmem,$1000,"NieR Replicant ver.1.22474487139.exe"+3BB671)
globalalloc(ItemBase,8)
label(code)
label(return)
label(item_idx)
newmem:
push rax
lea rax,[rcx+000000C0]
mov [ItemBase],rax
pop rax
code:
movzx eax,byte ptr [rax+rcx+000000C0]
jmp return
item_idx:
dw 0 // some mem for save item index
Item_Base:
jmp newmem
nop 3
return:
registersymbol(Item_Base)
registersymbol(item_idx)
[DISABLE]
Item_Base:
db 0F B6 84 08 C0 00 00 00
unregistersymbol(item_idx)
unregistersymbol(Item_Base)
dealloc(newmem)
dealloc(ItemBase)
{
// ORIGINAL CODE - INJECTION POINT: "NieR Replicant ver.1.22474487139.exe"+3BB671
"NieR Replicant ver.1.22474487139.exe"+3BB649: 80 3D 60 D6 F9 03 00 - cmp byte ptr ["NieR Replicant ver.1.22474487139.exe"+4358CB0],00
"NieR Replicant ver.1.22474487139.exe"+3BB650: 75 14 - jne "NieR Replicant ver.1.22474487139.exe"+3BB666
"NieR Replicant ver.1.22474487139.exe"+3BB652: 81 FA FF 02 00 00 - cmp edx,000002FF
"NieR Replicant ver.1.22474487139.exe"+3BB658: 77 20 - ja "NieR Replicant ver.1.22474487139.exe"+3BB67A
"NieR Replicant ver.1.22474487139.exe"+3BB65A: 48 63 C2 - movsxd rax,edx
"NieR Replicant ver.1.22474487139.exe"+3BB65D: 0F B6 84 08 44 0E 00 00 - movzx eax,byte ptr [rax+rcx+00000E44]
"NieR Replicant ver.1.22474487139.exe"+3BB665: C3 - ret
"NieR Replicant ver.1.22474487139.exe"+3BB666: 81 FA FF 02 00 00 - cmp edx,000002FF
"NieR Replicant ver.1.22474487139.exe"+3BB66C: 77 0C - ja "NieR Replicant ver.1.22474487139.exe"+3BB67A
"NieR Replicant ver.1.22474487139.exe"+3BB66E: 48 63 C2 - movsxd rax,edx
// ---------- INJECTING HERE ----------
"NieR Replicant ver.1.22474487139.exe"+3BB671: 0F B6 84 08 C0 00 00 00 - movzx eax,byte ptr [rax+rcx+000000C0]
// ---------- DONE INJECTING ----------
"NieR Replicant ver.1.22474487139.exe"+3BB679: C3 - ret
"NieR Replicant ver.1.22474487139.exe"+3BB67A: 32 C0 - xor al,al
"NieR Replicant ver.1.22474487139.exe"+3BB67C: C3 - ret
"NieR Replicant ver.1.22474487139.exe"+3BB67D: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB67E: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB67F: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB680: E9 4B 1B 94 05 - jmp "NieR Replicant ver.1.22474487139.exe"+5CFD1D0
"NieR Replicant ver.1.22474487139.exe"+3BB685: 31 BF 82 E9 18 D1 - xor [rdi-2EE7167E],edi
"NieR Replicant ver.1.22474487139.exe"+3BB68B: FF - db -01
"NieR Replicant ver.1.22474487139.exe"+3BB68C: FF AE E0 C6 B7 F2 - jmp far [rsi-0D483920]
}
</AssemblerScript>
<CheatEntries>
<CheatEntry>
<ID>77</ID>
<Description>"Populate Item Name"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{$lua}
[ENABLE]
if syntaxcheck then return end
local localized_text_ptrs = {}
local text_ptr = getAddress("1427de300")
local count = readInteger(text_ptr + 0xf070, true)
for i=0,count-1,1 do
local pos = text_ptr + i * 0x10
localized_text_ptrs[readInteger(pos, true)] = readPointer(pos+0x8)
end
local count = readInteger(text_ptr + 0xf478, true)
for i=0,count-1,1 do
local pos = text_ptr + i * 0x10 + 0xf078
localized_text_ptrs[readInteger(pos, true)] = readPointer(pos+0x8)
end
local dropdown = createStringList()
local item_defs_ptr = getAddress("[1443592c8]")
local count = readInteger(item_defs_ptr + 0x10, true)
local items_ptr = readPointer(item_defs_ptr + 0x18)
for i=0,count-1,1 do
local pos = items_ptr + i * 0x40
local item_id = readInteger(pos, true)
if item_id < 0x300 then
local item_name_id = readInteger(pos+0xc, true)
local item_description_id = readInteger(pos+0x10, true)
local item_name_ptr = localized_text_ptrs[item_name_id]
if item_name_ptr ~= nil then
local item_name = readString(item_name_ptr)
local item_description = readString(localized_text_ptrs[item_description_id], 0x100)
dropdown.add(item_id .. ":" .. item_name .. " : " .. string.gsub(item_description, "\n", " "))
end
end
end
local itemID = getAddressList().getMemoryRecordByDescription("item index")
itemID.DropDownList.setText(dropdown.getText())
itemID.DisplayAsDropDownListItem = true
[DISABLE]
local itemID = getAddressList().getMemoryRecordByDescription("item index")
itemID.DropDownList.clear()
itemID.DisplayAsDropDownListItem = false
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>75</ID>
<Description>"item index"</Description>
<LastState Value="0" RealAddress="13A4C0020"/>
<ShowAsSigned>0</ShowAsSigned>
<VariableType>4 Bytes</VariableType>
<Address>item_idx</Address>
</CheatEntry>
<CheatEntry>
<ID>76</ID>
<Description>"Item Quantity"</Description>
<LastState Value="10" RealAddress="144372850"/>
<ShowAsSigned>0</ShowAsSigned>
<VariableType>Byte</VariableType>
<Address>ItemBase</Address>
<Offsets>
<Offset>[item_idx]</Offset>
</Offsets>
</CheatEntry>
</CheatEntries>
</CheatEntry>
</CheatEntries>
</CheatTable>