Joined: 20 Jul 2017
|Posted: Fri Dec 03, 2021 1:34 pm Post subject: FYI: redirect Print()
|CT table: [ https://www101.zippyshare.com/v/igKtT6It/file.html ]
additional info: [ https://imgur.com/a/lVyFDUl ]
I have been using this routine for some time in several of my tables, but recently replaced that feature using a Form. However: i wanted to extend that feature so that i could use it for any type of loging (to file/disk).
As proof of concept, you can just run the script: the 1st loop prints to the Lua window; the 2nd one to a file (edit script to your needs first)
As practical example, i "redirected" the 'Find out what address...' info to disk (in fact, using the 'break condition'). For this purpose, I evaluated a game's opcode that would basically grind my game to a halt (iow became unworkeable). As soon as i enabled the script, i got back in business - and even with some minor lag - i could still move around... (although this will surely have its limitations as well)
The idea is: to log all that info, add additional 'skips' to your script, which gradually will/should improve responsiveness more...
any suggestions to finetune/complete this routine are most welcome ofc.
a. current routine i never used in practise; apart from the redirect, most logic sat in the report script itself
b. did not do any extensive testing: f.e. loging past the string's limitation
c. did some testing with 'stringlist': routine still works fine, but adds an empty line with each addition
(tried to remove it, but sofar no luck ~ C++ seems to have a method for dealing with emptly lines; did check CE github but no cigar it seems)
(looping the stringlist should do the trick though)
d. for completeness sake: CE's debug setting 'Wait after gui update' helps in those situations when even stopping log_process becomes irresponsive.
e. indirectly related to this topic: [ https://forum.cheatengine.org/viewtopic.php?t=618637 ]
ps: tried to attach table, but limit is 8 bytes (?)