scummvm debugger

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

Moderator: ScummVM Team

jumpjack
Posts: 63
Joined: Tue May 23, 2006 8:21 am

scummvm debugger

Post by jumpjack »

I just discovered the existence of scummvm debugger, but I can't find detailed informations about supported commands and their syntax: does it exist a better method to know them, rather than looking into scummvm sources?... :roll:
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

No, there doesn't exist one (though you can type 'help' to get a list of commands). Nor do we have any plans to do so. This debugger is for use by the developers only, and those have no troubles finding out what each command does by looking at the source.

We discussed disabling it in release builds completely, but figured it could be nice to have it enabled to help remote analysis of bugs users encounter.
jumpjack
Posts: 63
Joined: Tue May 23, 2006 8:21 am

Post by jumpjack »

...so I'll have to ask here for questions. :wink:

For example, I read in another forum I can "change character", i.e. not being Guybrush but anyother of the characters....
I was only able to change my COSTUME: is this what they meant? Or can I actually "fit into" other characters and move them with the mouse?


Could at least the debugger help be improved, just to obtain a full list of available commands switches?
jumpjack
Posts: 63
Joined: Tue May 23, 2006 8:21 am

Post by jumpjack »

fingolfin wrote:No, there doesn't exist one (though you can type 'help' to get a list of commands). Nor do we have any plans to do so.
WHat lazy guys... :D :wink:

Let me try...

Code: Select all

continue, exit, quit = EXIT
restart = RESTART
actor
        <actornum> <command> <parameter>
        Use actornum=1000 to get number of actors
                COMMAND values&#58;
                "animvar" ???
                "anim" ???
                "ignoreboxes" Allow walking anywhere
                "x" Set position
                "y" Set position
                "_elevation" Set position
                "costume" Set actor graphic appearance &#40;use 'costume 1000' to get number of available costumes&#41;
                "name" Show actor name
                "condmask" ???
			
actors  Display actors data

box     Display "walk-boxes" in text and graphical format.

matrix  Display walk-matrix ???

camera 	Show camera position in format  "cur &#40;%d,%d&#41; - dest &#40;%d,%d&#41; - accel &#40;%d,%d&#41; -- last &#40;%d,%d&#41;"

room
	no parameter = show room
	<number> = go to %"number" room
	
objects Display objects in current room

object  <objectnum> <command> <parameter>
	COMMAND values&#58;
        "pickup"
        "state"
        "name"
"pickup" BUG?
00497         if &#40;argc == 3&#41;
00498             _vm->addObjectToInventory&#40;obj, _vm->_currentRoom&#41;;
00499         else
00500             _vm->addObjectToInventory&#40;obj, atoi&#40;argv&#91;3&#93;&#41;&#41;;


script
	"kill" <number> | "stop" <number>
	"run" <number> | "start" <number>
	
scr     ???

scripts	Display script data
	
importres
        <restype> <filename> <resnum>
        "scr"
        
drafts Command only works with Loom/LoomCD

loadgame <slotnum>

savegame <slotnum>

level Set/Display debug level

debug Set/display debug channels &#40;???&#41;

help

show ???
	"hex"
	"sta" &#40;for STACK dumping&#41;
hide ???
	"hex"
	"sta" &#40;for STACK dumping&#41;
imuse
	"panic" - Stop all music tracks
	"play" <number|"random">
	"stop" <number|"all">

I need some help with the "???"... :roll:

About object pickup: maybe I'm wrong, but it looks like if 3rd argument IS present it is IGNORED, else it is used... :?:
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

jumpjack wrote:For example, I read in another forum I can "change character", i.e. not being Guybrush but anyother of the characters....
Possibly. After all, some of the games allow you to do that as part of the story. But it's probably just as likely that the game will get confused and/or hang because a character isn't where he's expected to be. Even such a relatively simple thing as "teleporting" to another room can cause strange things to happen.

I don't see any reason to try and make the debug commands any friendlier or more crash-proof. Most of them were probably added to help debug a specific type of problems. E.g. when support for the EGA version of Loom was added, it turned out to be useful to have a "drafts" command to list all the known and unknown drafts. This was then used to see if that information had somehow become corrupted, or when someone submitted a bug report and a savegame, but forgot to tell what the random drafts were in that particular game.

But I was the one who added it, and even I don't remember off-hand what all the data it prints means any longer. And I don't have to know, because Loom has been working fine for quite some time now. :)
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Yup, exactly. Users can and will mess up their game state beyond repair using the debugger. That's why if at all I am interested in making it *harder* to use, or even completely disable it in non-development builds. If you want to use it, fine, do so, but anything that happens from that point on is totally your own problem 8-).

Which is also why we won't include any documentation for the debugger, even if somebody else writes it :-).
jumpjack
Posts: 63
Joined: Tue May 23, 2006 8:21 am

Post by jumpjack »

fingolfin wrote:Yup, exactly. Users can and will mess up their game state beyond repair using the debugger. That's why if at all I am interested in making it *harder* to use, or even completely disable it in non-development builds. If you want to use it, fine, do so, but anything that happens from that point on is totally your own problem 8-).

Which is also why we won't include any documentation for the debugger, even if somebody else writes it :-).
:P :P :P prrrrr
:wink:
User avatar
Adventureguy
Posts: 162
Joined: Sun Dec 25, 2005 4:09 pm
Location: Karlsruhe, Germany

Post by Adventureguy »

fingolfin wrote:Yup, exactly. Users can and will mess up their game state beyond repair using the debugger. That's why if at all I am interested in making it *harder* to use, or even completely disable it in non-development builds.
Now, come on! It's a lot of fun to mess with the debugger. Teleporting to the different rooms in a game can be as funny as changing the character costumes. It would be a shame that such an interesting toy in the VM would be missing. Besides, what possibility exists that you can damage your game files? I mean, there is not an option which could delete those files, is there?
jumpjack
Posts: 63
Joined: Tue May 23, 2006 8:21 am

Post by jumpjack »

Adventureguy wrote:
fingolfin wrote:Yup, exactly. Users can and will mess up their game state beyond repair using the debugger. That's why if at all I am interested in making it *harder* to use, or even completely disable it in non-development builds.
Now, come on! It's a lot of fun to mess with the debugger. Teleporting to the different rooms in a game can be as funny as changing the character costumes. It would be a shame that such an interesting toy in the VM would be missing. Besides, what possibility exists that you can damage your game files? I mean, there is not an option which could delete those files, is there?
Indeed :D
Being smaller than the mouse in the village or being BIG and with a hook rather than a hand is really funny! :D
And jumping around in every room I like and walking OVER buildings, too... :wink:
Other suggestions? 8) Can I BE another character rather than LOOKING like him?
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

jumpjack wrote:Other suggestions? 8) Can I BE another character rather than LOOKING like him?
I think this game is what you're looking for.
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Adventureguy wrote:Besides, what possibility exists that you can damage your game files? I mean, there is not an option which could delete those files, is there?
I never said that, read again what I wrote :-)
jumpjack
Posts: 63
Joined: Tue May 23, 2006 8:21 am

Post by jumpjack »

Guys, I didn't yet have a reply to this:
About object pickup: maybe I'm wrong, but it looks like if 3rd argument IS present it is IGNORED, else it is used...

Code: Select all

00497         if &#40;argc == 3&#41; 
00498             _vm->addObjectToInventory&#40;obj, _vm->_currentRoom&#41;; 
00499         else 
00500             _vm->addObjectToInventory&#40;obj, atoi&#40;argv&#91;3&#93;&#41;&#41;; 

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

jumpjack wrote:Guys, I didn't yet have a reply to this:
About object pickup: maybe I'm wrong, but it looks like if 3rd argument IS present it is IGNORED, else it is used...

Code: Select all

00497         if &#40;argc == 3&#41; 
00498             _vm->addObjectToInventory&#40;obj, _vm->_currentRoom&#41;; 
00499         else 
00500             _vm->addObjectToInventory&#40;obj, atoi&#40;argv&#91;3&#93;&#41;&#41;; 
No, argc and argv include the command as well as the parameters. So argc == 3 means there are three words (one command and two parameters), and since arrays start on index 0 argv[3] is the fourth word (the third parameter).
jumpjack
Posts: 63
Joined: Tue May 23, 2006 8:21 am

Post by jumpjack »

eriktorbjorn wrote:
jumpjack wrote:Guys, I didn't yet have a reply to this:
About object pickup: maybe I'm wrong, but it looks like if 3rd argument IS present it is IGNORED, else it is used...

Code: Select all

00497         if &#40;argc == 3&#41; 
00498             _vm->addObjectToInventory&#40;obj, _vm->_currentRoom&#41;; 
00499         else 
00500             _vm->addObjectToInventory&#40;obj, atoi&#40;argv&#91;3&#93;&#41;&#41;; 
No, argc and argv include the command as well as the parameters. So argc == 3 means there are three words (one command and two parameters), and since arrays start on index 0 argv[3] is the fourth word (the third parameter).
Yes, but I think this IF structure lets argv[3] be used only if argc is DIFFERENT from 3! Or not? :?:
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Post by clem »

from the non-SCUMM debugger department:

BASS:
http://www.unet.univie.ac.at/~a0200586/ ... rivia.html

kyra:
http://wiki.scummvm.org/index.php/Kyra_ ... andia_1%29
http://wiki.scummvm.org/index.php/Kyra_ ... andia_1%29

hope that helps (you screwing up your games for good)
clem
Post Reply