Gibsonsg wrote: ↑Wed Aug 04, 2021 1:33 am
I'm only knowledgeable in js, so I dunno, but why can't the injection process modify the Z.js? Why do we need to supply a modified version for the shadowban and now keybinds? I'd assume you can still access the code from Z.js? You could just inject your edits on the fly?
That's a good question, I'll start things off with the generalized state of where we currently are.
The first thing to understand is how iBelg's tool functions with the game:
So this game Idleon is basically a web-based game that loads and runs a webpage full of javascripts, including ofc
Z.js. With that said,
LegendsOfIdleon.exe is actually just a small user agent built from Electron.
And so, iBelg's injector basically executes this user agent whilst at the same time HTTP intercepting the
Z.js file. Upon interception, whatever is inside
cheats.js is then added to this live-version of
Z.js. The exact location within Z.js is obviously pinpointed through Regex, so that cheats.js is added to the correct line where it should work.
Now back to the topic, I'm honestly not sure if I fully understand your question, but I'm assuming that you're asking whether you can dynamically inject code at any time while the game's already running.
(Feel free to correct me if I misinterpreted it)
So assuming that to be the question, the answer is: No you cannot do that. The code from cheats.js has to be added to
Z.js prior to the game being fully loaded.
Due to this nature, iBelg's tool has to be rebuild with the addition of more replacements, in case you'd like to use his tool instead of making raw changes to the
Z.js code inside
app.asar. Thanks to the variety of cheating capabilities given by the external console, we often don't need raw editing anymore
(as long as we have the JavaScript skills to back it up).
The unban methodology is different however, as we'd absolutely want the source code to already-never flip the shadowing variables before the game's been loaded. That's why for this particular thing we do have to perform a raw edit. So since this particular cheat requires raw editing, I opted for the expansion to
InjectCheatsF2, which indeed lets iBelg's tool replace the code for us
(just to skip the hassle of manually editing every new patch). Moreover, the injection process has a larger likelihood to failure against a beautified
Z.js.
Lastly about unbanning came my choice to expand the tool with
config.json, where my reason is the very-slim chance that the unban modifications can potentially yield some harm. So I've included the non-unban option as default for anybody that aims to safely cheat without ever being shadow banned, as my shadow-unban does not truly unban the account (just un-hides).
Alright, long story already, but here's the final topic e.g. keybinds:
The reason that I'm doing raw editing for the keybind cheats, is simply because I lack the skills to code the same thing as a console cheat
yet.