Fake a cheat console
During modding some kind of cheat console appears to be somewhat useful.
And there is:
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
and everything will work fine.
View attachment 170
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');
...
}
View attachment 170
Attachments
Last edited: