For someone wants to get weapon one by one or modify its level, you can use below entries.
Personally I don't use this type of cheat, so I didn't test it so much. sorry.
note: it contains
lea rax,[rcx+000004AC]
change, so I think "Have All" should be stable too.
note2: Words entry remains untouched, I think no changes required for it, but I didn't test it at all.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>12</ID>
<Description>"Weapon 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(Wep_Base,NieR Replicant ver.1.22474487139.exe,0F BE 84 08 AC 04 00 00) // should be unique
alloc(newmem,$1000,"NieR Replicant ver.1.22474487139.exe"+3BB858)
globalalloc(WepBase,8)
label(code)
label(return)
label(wep_idx)
newmem:
push rax
lea rax,[rcx+000004AC]
mov [WepBase],rax
pop rax
code:
movsx eax,byte ptr [rax+rcx+000004AC]
jmp return
wep_idx:
dw 0 // some mem to save weapon index
Wep_Base:
jmp newmem
nop 3
return:
registersymbol(Wep_Base)
registersymbol(wep_idx)
[DISABLE]
Wep_Base:
db 0F BE 84 08 AC 04 00 00
unregistersymbol(wep_idx)
unregistersymbol(Wep_Base)
dealloc(newmem)
dealloc(WepBase)
{
// ORIGINAL CODE - INJECTION POINT: "NieR Replicant ver.1.22474487139.exe"+3BB858
"NieR Replicant ver.1.22474487139.exe"+3BB849: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB84A: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB84B: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB84C: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB84D: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB84E: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB84F: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB850: 83 FA 3F - cmp edx,3F
"NieR Replicant ver.1.22474487139.exe"+3BB853: 77 0C - ja "NieR Replicant ver.1.22474487139.exe"+3BB861
"NieR Replicant ver.1.22474487139.exe"+3BB855: 48 63 C2 - movsxd rax,edx
// ---------- INJECTING HERE ----------
"NieR Replicant ver.1.22474487139.exe"+3BB858: 0F BE 84 08 AC 04 00 00 - movsx eax,byte ptr [rax+rcx+000004AC]
// ---------- DONE INJECTING ----------
"NieR Replicant ver.1.22474487139.exe"+3BB860: C3 - ret
"NieR Replicant ver.1.22474487139.exe"+3BB861: B8 FF FF FF FF - mov eax,FFFFFFFF
"NieR Replicant ver.1.22474487139.exe"+3BB866: C3 - ret
"NieR Replicant ver.1.22474487139.exe"+3BB867: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB868: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB869: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB86A: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB86B: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB86C: CC - int 3
"NieR Replicant ver.1.22474487139.exe"+3BB86D: CC - int 3
}
</AssemblerScript>
<CheatEntries>
<CheatEntry>
<ID>79</ID>
<Description>"Populate Weapon 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 weapon_info_ptr = getAddress("1447c03e0")
for i=0,0x40-1,1 do
local pos = readPointer(weapon_info_ptr + i * 8)
if pos ~= 0 then
local weapon_name_id = readInteger(pos+0x14, true)
local weapon_name_ptr = localized_text_ptrs[weapon_name_id]
if weapon_name_ptr ~= nil then
local weapon_name = readString(weapon_name_ptr)
dropdown.add(i .. ":" .. weapon_name)
end
end
end
local weaponID = getAddressList().getMemoryRecordByDescription("weapon index")
weaponID.DropDownList.setText(dropdown.getText())
weaponID.DisplayAsDropDownListItem = true
[DISABLE]
local weaponID = getAddressList().getMemoryRecordByDescription("weapon index")
weaponID.DropDownList.clear()
weaponID.DisplayAsDropDownListItem = false
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>78</ID>
<Description>"weapon index"</Description>
<LastState Value="0" RealAddress="13F970020"/>
<ShowAsSigned>0</ShowAsSigned>
<VariableType>4 Bytes</VariableType>
<Address>wep_idx</Address>
</CheatEntry>
<CheatEntry>
<ID>80</ID>
<Description>"weapon_level"</Description>
<DropDownList DescriptionOnly="1" DisplayValueAsItem="1">-1:None
0:Lv. 1
1:Lv. 2
2:Lv. 3
3:Lv. 4
</DropDownList>
<LastState Value="1" RealAddress="144372C3C"/>
<ShowAsSigned>1</ShowAsSigned>
<VariableType>Byte</VariableType>
<Address>WepBase</Address>
<Offsets>
<Offset>[wep_idx]</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>13</ID>
<Description>"Have All"</Description>
<DropDownList DescriptionOnly="1" DisplayValueAsItem="1">00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00:On
</DropDownList>
<LastState Value="01 FF 00 FF FF FF FF FF 00 00 FF 01 FF FF FF 00 00 FF FF FF FF FF FF FF FF FF FF FF FF 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 FF FF FF FF FF FF FF FF FF FF FF FF FF" RealAddress="144372C3C"/>
<ShowAsHex>1</ShowAsHex>
<VariableType>Array of byte</VariableType>
<ByteLength>64</ByteLength>
<Address>WepBase</Address>
<Offsets>
<Offset>0</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>26</ID>
<Description>"Words"</Description>
<DropDownList DescriptionOnly="1" DisplayValueAsItem="1">FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF:Have All
</DropDownList>
<LastState Value="255 255 0 0 0 0 28 0 0 0 0 0 17 68 0" RealAddress="144372E96"/>
<ShowAsSigned>0</ShowAsSigned>
<VariableType>Array of byte</VariableType>
<ByteLength>15</ByteLength>
<Address>WepBase</Address>
<Offsets>
<Offset>25a</Offset>
</Offsets>
</CheatEntry>
</CheatEntries>
</CheatEntry>
</CheatEntries>
</CheatTable>