Sniper: Ghost Warrior 3 - Enable CryEngine Console


Staff member
Mar 2, 2017
Hello folks.

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 :p)
- 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:
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: ... i-sdk.html. According to Wiki (, 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.



May 6, 2017
Nice, I've been using the remote console for Cry-Engine games ( ) but it's a bit flaky depending on just what the game you're using it against might be missing or have locked away in some form, also varies depending on the Cry-Engine version used since cvars and other functions can and will differ.


What is cheating?
Aug 1, 2017
I become a Lua Error

Error:Failure determining what SSystemGlobalEnvironment_AOB means
Error:Failure determining what SSystemGlobalEnvironment_AOB means


What is cheating?
Sep 6, 2017
SunBeam post_id=14804 time=1502046120 user_id=57 said:
66Nemesis66 post_id=14802 time=1502045221 user_id=7521 said:
I become a Lua Error

Error:Failure determining what SSystemGlobalEnvironment_AOB means
Error:Failure determining what SSystemGlobalEnvironment_AOB means
Open game (let it load fully till main menu), then run the table. If you have CE open and load table manually, you'll have to run the Lua code and manually select SGW3.exe, in this order; else Lua code will get stuck in a loop, waiting for SGW3.exe process on attach. So: game first, run table afterwards.
I'm getting this error too. I'm executing the table with the game fully loaded (ex: inside a safe house). I also tried loading it manually with CE opened first. But the thing is, it worked when I first tested it, back when you released it. But now, on a new save (and a game update later) I get this error. It might be a conflict of some sorts..
May 6, 2017
Perhaps a compatibility issue with 1.04 which was released a few days ago. (Finally improved the loading times in addition to compatibility with a newly released DLC.)

I haven't tested the table myself yet though with the new version of the game but I'll give it a try to see what happens.

EDIT: Yep, same error as soon as the game is started.

EDIT: Guessing CE can't locate the address for this version of the game even if it's using AOB.
Mar 3, 2017
I'm using CPY (1.04) and also got this error. Maybe it because CPY ver.

My order was run the game till main menu, go to desktop and run SGW3.CT and let the table run. After that it get Error:Failure determining what SSystemGlobalEnvironment_AOB means. Re-select the game exe process get the same error.


What is cheating?
Sep 6, 2017
SunBeam post_id=17298 time=1505291740 user_id=57 said:
P.S.: You're not required to be anywhere in-game for table to work - safe house or whatever - just run the table and that's that.
I only mentioned the safe house for it to be clear I was in-game and not at the intro videos, so you'll know not to repeat the previous answer. I know the (very) basics of cheat engine, I'm a long time user.
That being said, I am aware how stupid some people are, and what retarded questions they often ask, so your answer was to be expected.

Sorry for the off topic post.
Mar 3, 2017
Thanks for the update sir!

Edit : Maybe I did something wrong. The table enable and in-game console enable, but it seems I can't type anything to work (resource hook works fine). I'm reassure that I'm typing in English but nothing work.

EDIT2 : I use universal remote console with this table and works fine now :D


What is cheating?
May 25, 2017
SunBeam post_id=14757 time=1501977230 user_id=57 said:
List of useful console commands/variables:

pl_health (usage: pl_health value -> e.g.: pl_health 1000)
lock_all_skills ("Locks all skills.")
give_skill_points (usage: give_skill_points path(sniper/ghost/warrior) number(max available points == 255) -> e.g.: give_skill_points sniper 12)
replenish_stamina (e.g.: replenish_stamina 1)
takeDamage (e.g.: takeDamage 10; works with negative values too, as heal -> takeDamage -10)
revive ("Revives player".)
v_kill ("Kills player vehicle.")
kill ("Kills the player.")
unlock_safehouse_and_fasttravel ("Unlocks all safehouses and fast travel points.")
show_loot_items_on_map ("Show all items from Loot category on map.")
items_in_weaponcache_unlock ("Unlock all items in weapon cache.")
complete_current_mission ("Completes current active mission.")
unlock_all_characters_and_factions ("Unlocks all characters and factions.")
unlock_all_missions ("Unlocks all regions, chapters and missions.")
unlock_all_collectibles ("Unlocks all collectibles.")
drone_upgrade ("Add drone upgrade.")
drone_remove ("Remove drone upgrade.")
items_in_weaponcache_reset ("Reset weapon cache.")
pl_unlockSkills ("Unlock all skills.")


pl_movement.speedScale (default is 1.200000048)
pl_movement.strafe_SpeedScale (default is 0.8999999762)
pl_movement.sprint_SpeedScale (default is 1.700000048)
pl_movement.crouch_SpeedScale (default is 1.0)
pl_movement.acceleration (default is 13.0)
pl_health.normal_regeneration_rateSP (default is 250.0)
pl_drownRecoveryTime (default is 1)
ai_ignorePlayer (default is 0; set to 1 to make AI ignore the player)
ai_ignoreDrone (default is 0; set to 1 to make the AI ignore the drone)
g_godMode (default is 0; set to 2 to enable)
g_infiniteAmmo (default is 0; set to 1 to enable)
g_infiniteDroneBattery (default is 0; set to 1 to enable)
g_instantKillDamageThreshold (set to 0.1 for instant kill -- untested)

i_staminaConsumptionScale 0 (default is )
i_zoom_sway_scale 0 (default is )
i_enable_aim_assist (default is 1 in normal mode; can be 0 in hard)
i_enable_hb_slomo (default is )
i_enable_red_dot (default is 1; can be 0 in hard
i_enable_ricochet (default is )
g_killstreakTimeLimit (default is )

Enable File Logging:

log_Verbosity 3
log_WriteToFileVerbosity 3
log_VerbosityOverridesWriteToFile 1


i_giveammo (and params: e.g.: i_giveammo PistolBullet 999)
p_fly_mode 0/1
check spread/recoil cvars
Thank you very much for this mr. Sunbeam!;) Don`t you know any commands for noclip or higher jump?