Yea, I first attempted to use my template that I have used on a few games before like Interstellar Space Genesis (an example) :cfemen wrote: ↑Mon Jun 21, 2021 8:13 pm
I tested your scripts, Brushes/Consumables /Gold is not activating (coz JIT and different AOBs )
the best approach in this case are pointers ( inject at a prologue or get a public static instance):
e.g get the runDataService or loadedRun and you can access the gold and brush pointers.
for the consumables:
you are doing a aobscanregion for this:
( my machine is generating different AOBs so your aobscanregion can't find it )Code: Select all
mov r11,Abrakam.Data.Runs:Run:RemoveConsumable call r11
then i asked myself "why not a return on Abrakam.Data.Runs:Run:RemoveConsumable" ... then i realized why you do a aobscan to NOP the call,coz RemoveConsumable has a overload.
so yeah just keep that in mind, AOBs for your machine will not work for all systems (even on my machine on different game starts the AOBs sometimes are changing ... yeah JIT can be annoying ...) so i would recommend to do most of the stuff at the function/method prologue or search for public static instances and call stuff instead of doing aobscans, you'll get the hang of it
too bad i barely have time for playing/cheating at the moment ...
Code: Select all
{$lua}
if syntaxcheck then return end
--function definition
function findMethodBySignature(nameSpace,className,methodName,signature)
local classId = mono_findClass(nameSpace,className)
local methodTable = mono_class_enumMethods(classId)
for i = 1,#methodTable do
local currentMethod = methodTable[i]
if currentMethod.name == methodName then
local sig = mono_method_getSignature(currentMethod.method)
if sig:match(signature) then return currentMethod.method end
end
end
return nil
end
--variable declarations
local nameSpace = ''
local className = 'EmpireState'
local methodName = 'calcResearchTotal'
local signature = 'Technology,single'
local methId = findMethodBySignature(nameSpace,className,methodName,signature)
if methId ~= nil then
local methAddr = mono_compile_method(methId)
unregisterSymbol('res_pointMethod')
registerSymbol('res_pointMethod',methAddr+0x43)
end
--function call
{$asm}
[ENABLE]
define(res_point_total,res_pointMethod) etc..
Ya know I had another game that I just updated called The Life and Suffering of Sir Brante. Well some people had issues due to the AOBs like you were saying. Well when I updated I hooked the prologue on one scrip but had to go a little further down on the other script because the only address it was reading from pulled the address/call from a generic dictionary.Can you ALWAYS hook at the prologue of something for everything? Not sure how to approach that so I stuck with an AOB but would definitely had preferred otherwise. Im getting to where I really try to hook in at the prologue on unity games..
How to use this cheat table?
- Install Cheat Engine
- Double-click the .CT file in order to open it.
- Click the PC icon in Cheat Engine in order to select the game process.
- Keep the list.
- Activate the trainer options by checking boxes or setting values from 0 to 1