Z9Ryan wrote: ↑Wed Apr 01, 2020 10:25 am
So before this Table dropped I tried to play around with troop number via Cheat Engine. I changed the wrong address and now it's impossible for me to change it back. Can any of you brain boxes who's more familiar with Cheat Engine help me out? This is the only place I thought someone could help so apologies in advance if this is a no no to post.
Changing it directly will screw your save, so far I can't fix it. So I start a new save before the change. I got the trick of changing the number on reddit from the user "BadWorksFun" so credit goes to him.
1. Find the value of the army quantity using Cheat Engine
2. On the army menu, change to the desire value, for example 100 recruits, click done
3. Enter again the same army menu, change the 100 to 1, click cancel
4. Your army quantity become 100 and correctly shown on map.
My finding after getting screwed even after following above instruction:
1. Every time u want to change something, better reduced the army unit value to 1.
2. Then, follow above instruction again. So far, I got everything correct.
Here's a code to detect the top most army unit right after your main character. (non-aob btw)
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>8</ID>
<Description>"Troop Editor Lazy Version"</Description>
<Options moHideChildren="1"/>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048,TaleWorlds.CampaignSystem.TroopRoster::RemoveZeroCounts+4C)
alloc(_troop,4)
registersymbol(_troop)
label(returnhere)
label(originalcode)
label(exit)
newmem:
mov rcx,rdx
cmp r14,1
jne originalcode
cmp [rcx+9c],0
jne originalcode
mov [_troop],rcx
cmp dword ptr [rcx+08],00
jmp returnhere
originalcode:
cmp dword ptr [rcx+08],00
jmp returnhere
exit:
jmp returnhere
TaleWorlds.CampaignSystem.TroopRoster::RemoveZeroCounts+4C:
jmp newmem
nop 2
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
TaleWorlds.CampaignSystem.TroopRoster::RemoveZeroCounts+4C:
mov rcx,rdx
cmp dword ptr [rcx+08],00
//Alt: db 48 8B CA 83 79 08 00
unregistersymbol(_troop)
dealloc(_troop)
</AssemblerScript>
<CheatEntries>
<CheatEntry>
<ID>9</ID>
<Description>"Number"</Description>
<VariableType>2 Bytes</VariableType>
<Address>_troop</Address>
<Offsets>
<Offset>8</Offset>
</Offsets>
</CheatEntry>
</CheatEntries>
</CheatEntry>
</CheatEntries>
</CheatTable>