Ever since SGW3 went out, soon followed by Prey, I became interested in CryEngine. So much, that I got to study it quite a bit, making use of the available free SDK and various online sources. In time, I've figured out that most games have a working console in release build, but there's a catch: the console is disabled via a BOOL and the rendering text is not processed as some auxiliary rendering functions are not compiled (they're available only in the debug build). However, with proper enabling, the console accepts input from the keyboard (you just won't see the text being typed on screen or the query's response -- e.g.: querying CVars for their status/value).
The reason no text is displayed in the console (although it's there) is GetIRenderAuxGeom member-function in IRenderer class doesn't return the appropriate pointer. Next after this call, another is executed, and the offset to the member-function points to a RETN (thus nothing gets executed, as opposed to the behavior seen while debugging the SDK demo game). The function that should've been executed is called DrawStringImmediate, declared in IRenderAuxGeom.h file. But, as mentioned, it's not compiled in release builds. Smarty developers, eh?
I've tried these days to emulate it (rip the SDK code, fix it to work with SGW3 -- although I don't have all sub-helper-functions available -- and call it from the CryFont reference making use of it), but there's too much dilly-dallying that I ended up using it as is.
In short, the attached script:
- disables sys_DeactivateConsole CVar in IConsole (sets it to 0)
- enables a BOOL (sets it to 1) in IConsole I named bUnrestrictCVars (this allows you to query/set CVars through the console -- e.g.: g_godMode 2 [Enter] -- no need to use my other table anymore for this )
- patches two locations dealing with console commands whitelisting and CVars considered VF_CHEATS
- allows you to see what you type in Cheat Engine in a referenced buffer (you'll have to use windowed mode to see what you're typing; if sure on your typing skills, don't need to look at it)
- note the console is and will always be "empty", looking like an Unix password input line (you can type, the text is there, but you won't see it)
Demo video of usage, including some nifty console commands/variables:
List of useful console commands/variables:
SpoilerShow
Let me know if you have any questions; I strongly encourage you to post feedback.
Soon to follow is the mini-SDK for this game It's based on the logic of the work done here by daemonium, but applied to SGW3 on an x64 CryEngine: https://www.fearlessrevolution.com/forum/othe ... i-sdk.html. According to Wiki ([Link]), SGW2 is running on CryEngine 3 (it's actually 3.4.0 from investigating), x86, while SGW3 is running on CryEngine 4, x64. So yeah, it took a bit to figure out the mapping and order of the class members.
BR,
Sun
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