Repository navigation
Load records with attributes on their tag; run Cheat Engine tables' Lua - #16
Merged
Merged
Conversation
Cheat Engine marks some records on the tag itself (<CheatEntry NoCheckbox="1">, <CheatEntry NoScriptTag="1">). The loader looked only for "<CheatEntry>", so it skipped such a record and moved its children to the top level, and the nesting count missed them too. The Dave the Diver table from issue #15 loaded 550 of its 1040 records, without its "Initialize Mono" script and all 18 hooks under it. Start tags are now matched with or without attributes, and the attributes are kept and written back on save (through the GUI's records as well). The same table's Lua needed more of Cheat Engine: - Cheat Engine registers every Lua function under both cases of its first letter, and tables call OpenProcess and ShellExecute. Engine functions now get the other name too (not Lua's own, and never over a name in use); the pass runs again after the GUI's functions. - getProcessIDFromProcessName and openProcess find a Windows program under Wine by the .exe name in argv[0], ignoring case. Only the program itself has it there, not Proton's launcher or steam.exe. - mono_initialize() and LaunchMonoDataCollector() exist. Mono and IL2CPP support is built in, so nothing is injected; the latter returns the runtime module's base, or 0, as Cheat Engine does. - beep() exists (the desktop bell in the GUI).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #15. The table from that issue (Dave the Diver, fearlessrevolution) did not load properly. I could not reproduce the crash itself, so the issue stays open for the reporter's details.
Table loading. Cheat Engine marks some records on the tag itself, as
<CheatEntry NoCheckbox="1">or<CheatEntry NoScriptTag="1">. The loader looked only for<CheatEntry>, so it skipped such a record and moved its children to the top level. Its nesting count missed these tags as well.For this table that meant 550 of 1040 records. None of its 19 scripts loaded: "Initialize Mono" and every hook under it were gone, and the remaining records point through symbols only those scripts register.
Now:
Lua the table needs
lua_registerin LuaHandler.pas), and the table callsOpenProcessandShellExecute.getProcessIDFromProcessName/openProcessfind a Windows program under Wine by the.exename inargv[0], ignoring case. Only the program has it there. Proton's launcher,steam.exeand the runtime's wrappers name it later in their arguments.mono_initialize()andLaunchMonoDataCollector()are accepted. Mono and IL2CPP support is built in, so nothing is injected. The second returns the runtime module's base, or 0, like Cheat Engine's.beep()exists.Tests
cecore_testcovers:PrintandDofilestay absent);.exelookup on a process whoseargv[0]is a Windows path;DaveTheDiver.exe, with this table loaded and its Lua accepted: