Implementing Cheats?

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
balpat
Posts: 58
Joined: Fri May 08, 2009 8:46 am

Implementing Cheats?

Post by balpat »

Hi! I'm a big fan of ScummVM and I've been using it since the time even SCUMM-Games didn't work competely.

I have a (probably stupid) question: Would it be possible to implement cheats?

Now hear me out! I know that you might ask how you're supposed to cheat in an adventure game.
Well, there are a few ways.

In Gobliiins 1, for example, there's this unnecessary health-bar.

Or in the Indiana Jones games there's also a health bar. Granted, you can finish the game without a single fight but anyway...

Or how about in Zak McKraken if you could eliminate darkness? I remember taht at one time darkness (and therefore the flashlight/lighter) wasn't implemented - it can't be difficult to create a switch to disable it again.

Operation Stealth also has thos godawful minigames that, in my opinion, would benefit greatly from a cheating-option.

And of course the Elvira-Games and Waxworks...

What do you think?
User avatar
sanguinehearts
Posts: 378
Joined: Mon Oct 31, 2005 12:42 am
Location: Hampshire, United Kingdom

Post by sanguinehearts »

I think the general consensus is that if you couldnt do it in the original game then it has no place in ScummVM, except for the obvious like compressed media file support.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Re: Implementing Cheats?

Post by eriktorbjorn »

balpat wrote: I have a (probably stupid) question: Would it be possible to implement cheats?
Almost certainly, though in many cases it would probably require someone to sit down and figure out exactly how the relevant game scripts work. (And if you're unlucky, they may work differently in some other version of the game.) So the big questions, to my mind, is "Will someone do it?" and "Would those patches be accepted?" and I have no idea what the answer to that would be.

There actually is a cheat present in ScummVM, and that's the drafts command in the ScummVM debug console when you're playing Loom. It can be used to display all the drafts and their notes, or to instantly learn all drafts and notes. It was added for two reasons, as I recall it:

1) There used to be bugs in ScummVM that made it corrupt the drafts data structure, so it was useful to see what it looked like.

2) Back when we still received plenty of bug reports for Loom, it was useful to see what the drafts were in an attached savegame, since they're partly random.

Also, it made it trivially easy to reach the end of the game. I vaguely recall a bug report which involved doing something at the very start of the game, which would then show up at the very end of the game.
Kirben
Posts: 421
Joined: Wed Sep 21, 2005 12:15 pm
Location: Melbourne, Victoria, Australia

Re: Implementing Cheats?

Post by Kirben »

balpat wrote:And of course the Elvira-Games and Waxworks...
There is actually a cheat in the scripts of Elvira 1, that can be activated under ScummVM.

Open the debugger (Ctrl d), and type the following:
var 498 1

Which make you invincible during battles, although you can still die in other ways.


A superbeing/wizard mode exists in Personal Nightmare too, but I have no idea how it was triggered.
balpat
Posts: 58
Joined: Fri May 08, 2009 8:46 am

Post by balpat »

Thanks for your replies!

Interresting... Would it be possible to have a page that lists all scummvm-internal cheats?


A follow up question, if you allow: Judging by the "var" debugging thingy it looks to me like this is a variable in Elvira that has the HP-information.
Now I'm just guessing but wouldn't taht mean that this variable is probably the same for each version of the game?
If so, wouldn't it be easy to "freeze" that variable? That migjht be easier than tampering with the scripts...

I'm just brainstorming. ;)
Kirben
Posts: 421
Joined: Wed Sep 21, 2005 12:15 pm
Location: Melbourne, Victoria, Australia

Post by Kirben »

balpat wrote:Interresting... Would it be possible to have a page that lists all scummvm-internal cheats?
Only for games produced by Humongous Entertainment, which offered cheats, debug mode and secrets via scripts:
Cheats for the arcade games.
Debug Modes for adventure games (usually only requires debug mode enabled under ScummVM)
INI Settings that can be used, several which can enable hidden secrets.
balpat wrote:A follow up question, if you allow: Judging by the "var" debugging thingy it looks to me like this is a variable in Elvira that has the HP-information.
Now I'm just guessing but wouldn't taht mean that this variable is probably the same for each version of the game?
If so, wouldn't it be easy to "freeze" that variable? That migjht be easier than tampering with the scripts...
Changing that variable in Elvira 1, resets HP back to maximum, when it reaches zero in battles. It isn't the actual variable used for HP, the variables for attributes are different in Elivra 1/2 and Waxworks.

The exact variables used for attributes in Elvira 1/2 are listed in the printStats() function of ScummVM source code, although changing directly might not work as expected.
Last edited by Kirben on Tue May 12, 2009 9:31 am, edited 2 times in total.
User avatar
sev
ScummVM Lead
Posts: 2308
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

And of course Shift+V for instantly winning Full Throttle bike battles.


Eugene
User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Post by Raziel »

Kirben wrote:
balpat wrote:Interresting... Would it be possible to have a page that lists all scummvm-internal cheats?
Only for games produced by Humongous Entertainment, which offered cheats, debug mode and secrets via scripts:
Cheats for the arcade games.
Debug Modes for adventure games (usually only requires debug mode enabled under ScummVM)
INI Settings that can be used, several which can enable hidden secrets.
The INI settings for Freddi Fish doesn't work though.

Putting the commands

BretIsTheOverlord
EddieEatsLuther
EnableFishBradSword
PeteIsAlsoTheOverlord

to the INI file results in ScummVM spilling out a
"Config file buggy: Junk found in line line 262: 'BretIsTheOverlord'!"
for every line.

It looks they are missing the appropriate values to add to the commands to make them work?

Like it's said in Freddi 2
E3Demo Set to 72296, to see the E3 demo.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

Raziel wrote: BretIsTheOverlord
EddieEatsLuther
EnableFishBradSword
PeteIsAlsoTheOverlord

to the INI file results in ScummVM spilling out a
"Config file buggy: Junk found in line line 262: 'BretIsTheOverlord'!"
for every line.
I believe ScummVM expects the lines to be on the form variable=value, so maybe "BretIsTheOverlord=true" would work. But I don't have that game, so I wouldn't know.
User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Post by Raziel »

eriktorbjorn wrote:
Raziel wrote: BretIsTheOverlord
EddieEatsLuther
EnableFishBradSword
PeteIsAlsoTheOverlord

to the INI file results in ScummVM spilling out a
"Config file buggy: Junk found in line line 262: 'BretIsTheOverlord'!"
for every line.
I believe ScummVM expects the lines to be on the form variable=value, so maybe "BretIsTheOverlord=true" would work. But I don't have that game, so I wouldn't know.
At least you got me a step further, Torbjorn :-)

(0:1:0x28F): ConfigManager::getInt(EddieEatsLuther,): 'true' is not a valid integer!
balpat
Posts: 58
Joined: Fri May 08, 2009 8:46 am

Post by balpat »

Would "1" be a valid integer? ;)

I must confess though, that I'm not such a big fan of the Humongous games... :)
User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Post by Raziel »

balpat wrote:Would "1" be a valid integer? ;)
Yup, that worked :-)
I must confess though, that I'm not such a big fan of the Humongous games... :)
What do you mean???

They are grand!!!!11!

...if your a 5 year old ;-)

edit: Updated the corresponding WIKI entrys
balpat
Posts: 58
Joined: Fri May 08, 2009 8:46 am

Post by balpat »

Hey everyone!

I know this is an old topic but I wanted to give it a second chance. I think it deserves it!

:)


I still believe that ScummVM would benefit immensely from a cheating option. Not only would it make testing a lot easier (granted, there isn't all that much to test anymore) but an adventure enthusiast would no longer be bothered by certain situations.

Implementing cheats should be easy, I think. Yes, I'm no programmer but isn't, say, the value of your health (for example) saved in a specific variable?
Wouldn't it be easy to freeze such a variable?

Or is there even a debugging command that displays all variables and, maybe, even let's you change them?
There doesn't even need to be a fancy GUI.

I'm asking this because of the same reasons that I wrote in my OP - but know, there is even "Lands of Lore" which I would love to play again but I don't want to spend countless hours levelgrinding.

What do you think? Is this still nothing worth discussing?
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

balpat wrote: Implementing cheats should be easy, I think. Yes, I'm no programmer but isn't, say, the value of your health (for example) saved in a specific variable?
Wouldn't it be easy to freeze such a variable?
In some cases it might be. In Lands of Lore, I think the handling of hit points etc. is part of the game engine itself, so everything's in plain view in the C++ source code. In the LucasArts games, just about everything is scripted so the hit points in, say, Indiana Jones and the Last Crusade are presumably stored in one of the game engine's variables. These are referred to only by number, and there's no easy way of figuring out which number corresponds to what aspect of the game.
balpat wrote: Or is there even a debugging command that displays all variables and, maybe, even let's you change them?
There doesn't even need to be a fancy GUI.
It depends on the game engine. Each has its own set of debugging commands. You can view and change variables in the SCUMM engine's debug console, at least, but I forget the exact syntax. Again, that's only useful if you know the number of the variable.
User avatar
lazylazyjoe
Posts: 131
Joined: Mon Oct 01, 2007 4:14 pm

Post by lazylazyjoe »

I know its not necessarily cheating and all games don't support it, but there's the --boot-param option for jumping around to different points in a game.
Post Reply