Forums
Games
Cyberpunk 2077 Thronebreaker: The Witcher Tales GWENT®: The Witcher Card Game The Witcher 3: Wild Hunt The Witcher 2: Assassins of Kings The Witcher The Witcher Adventure Game
Jobs Store Support Log in Register
Forums - CD PROJEKT RED
Menu
Forums - CD PROJEKT RED
  • Hot Topics
  • NEWS
  • GENERAL
    THE WITCHER ADVENTURE GAME
  • STORY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 THE WITCHER TALES
  • GAMEPLAY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 MODS (THE WITCHER) MODS (THE WITCHER 2) MODS (THE WITCHER 3)
  • TECHNICAL
    THE WITCHER THE WITCHER 2 (PC) THE WITCHER 2 (XBOX) THE WITCHER 3 (PC) THE WITCHER 3 (PLAYSTATION) THE WITCHER 3 (XBOX) THE WITCHER 3 (SWITCH)
  • COMMUNITY
    FAN ART (THE WITCHER UNIVERSE) FAN ART (CYBERPUNK UNIVERSE) OTHER GAMES
  • RED Tracker
    The Witcher Series Cyberpunk GWENT
THE WITCHER
THE WITCHER 2
THE WITCHER 3
MODS (THE WITCHER)
MODS (THE WITCHER 2)
MODS (THE WITCHER 3)
Menu

Register

Fake a cheat console

+
S

shak-otay

Senior user
#1
Jun 23, 2013
Fake a cheat console

During modding some kind of cheat console appears to be somewhat useful.

And there is:
Code:
00412F37  |>  33C0          XOR EAX,EAX
00412F39  |>  56            PUSH ESI                                 ; /Arg3
00412F3A  |.  68 88ADF100   PUSH OFFSET 00F1AD88                     ; |Arg2 = UNICODE "CHEAT_Console"
00412F3F  |.  A3 ECD26701   MOV DWORD PTR DS:[167D2EC],EAX           ; |
00412F44  |.  E8 B8F8FEFF   CALL 00402801                            ; |
00412F49  |.  50            PUSH EAX                                 ; |Arg1
00412F4A  |.  E8 5B0C7000   CALL 00B13BAA                            ; \witcher2.00B13BAA
To be found in the game exe and the editor.exe, too.
But how to launch it?
(On another little project "How to compile scripts without the scriptStudio" I managed to start the "Reload scripts" routine from outside the editor but then it crashed. So I stopped my investigations.)

But, there's a fairly simple workaround for the cheat thingie:

just place your cheat code here in witchergame.ws
Code:
	// Game started (world is already loaded)
	event OnGameStarted()
	{	
		theHud.OnGameStarted();
		
		//bToggle = false ;
		thePlayer.SetImmortalityModePersistent( AIM_Invulnerable );		
		thePlayer.GetInventory().AddItem('Forgotten Sword of Vrans');
		...
	}
and everything will work fine.

View attachment 170
 

Attachments

  • cheatViaScript.jpg
    cheatViaScript.jpg
    31.1 KB Views: 171
Last edited: Jun 23, 2013
M

Milgo

Forum regular
#2
Jun 23, 2013
Hm, now you create a item with an startup event - where is the connection to a faked console?
 
S

shak-otay

Senior user
#3
Jun 23, 2013
Don't understand the question.
If you don't need it don't use it.

This thread was merely meant for people who like to share ideas for maybe someday having a working debug console for the Witcher 2.
 
Last edited: Jun 23, 2013
P

Puruko

Forum regular
#4
Jun 28, 2013
I am not sure if I follow you. While in Redkit editor there is a proper debug console just by pressing "`" key (the one above Tab). What you want is create a mod to enable it in the regular game?
 
S

shak-otay

Senior user
#5
Jun 28, 2013
Puruko said:
While in Redkit editor there is a proper debug console just by pressing "`" key (the one above Tab).
Click to expand...
Well, I didn't know this. Thx, man!:)
But how to use it correctly? FreeCamera is working.
Teleport seems to require a parameter. Which?
Is there a help command or something similar?
Is this command list complete? -> Console, DebugPages, InstantKill, MovementOnPhysics, TimeScaling, FreeCamera, Teleport

What you want is create a mod to enable it in the regular game?
Click to expand...
Since console seems to be present in the game code, too, I will try to enable the hotkey. (Maybe adding the console key to the input_xxxxx.ini will do the job?)

Above all I wanted to have an expandable console (like lua_console for Mafia 2) in the editor.
So far I got a teleport via hotkey more or less working. I also can spawn NPCs. This was my main intention.

It's working in an editor game session but not in the "standalone" game.
 
Last edited: Jun 28, 2013
P

Puruko

Forum regular
#6
Jun 28, 2013
Is not working with the standalone because it doesnt use the scripts in \Witcher2EE\bin\scripts\, it uses the ones in Cooked PC possibly the one called compiledscripts.w2scripts.
One easy way to test it in stand alone is to make any level in editor, and use the usercontentcooker to make the files that can be used with the UserContentManager.
 
Share:
Facebook Twitter Reddit Pinterest Tumblr WhatsApp Email Link
  • English
    English Polski (Polish) Deutsch (German) Русский (Russian) Français (French) Português brasileiro (Brazilian Portuguese) Italiano (Italian) 日本語 (Japanese) Español (Spanish)

STAY CONNECTED

Facebook Twitter YouTube
CDProjekt RED Mature 17+
  • Contact administration
  • User agreement
  • Privacy policy
  • Cookie policy
  • Press Center
© 2018 CD PROJEKT S.A. ALL RIGHTS RESERVED

The Witcher® is a trademark of CD PROJEKT S. A. The Witcher game © CD PROJEKT S. A. All rights reserved. The Witcher game is based on the prose of Andrzej Sapkowski. All other copyrights and trademarks are the property of their respective owners.

Forum software by XenForo® © 2010-2020 XenForo Ltd.