Viewing the real-time state of variables...

Is there a command that shows you the value of a variable while in-game? Showme only works on objects.

No, you’d have to write your own out-of-world action.

Well, that seems like a debugging oversight…

Anyway, obliged for the insight, sir.

For some games, for some variables, I actually just stick it in the Status Bar (or the prompt) during testing :slight_smile:

That absolutely works in some situations. But I think that for debugging how a certain extension affects your world, or how some things are happening when, it’d be nice to be able to say something like “Showstate Variable” and just be told what it is, instead of having to change the code on each compile to display something in the status bar. I would think that given everything else Inform is capable of, this would be one of those “given” kinds of things. Especially for the uninitiated.

S’okay, though. I’m working on trying to figure out how to write this out of world action to show me the specified variable.

Oh, dude, I wasn’t recommending it. Just an example of the kind of clownish crap I do while swimming in a sea of my own ignorance :slight_smile:

I do it this way (there’s probably a better method):

[code]Cave is a room. “Whatta dump.”

BOOJUM is a number variable. BOOJUM is 876.

Every turn: increase BOOJUM by a random number from 1 to 100;

Snarkasking is an action out of world. Understand “snark” as snarkasking.

Carry out snarkasking: say “[BOOJUM]!”;

Test me with “snark/wait/snark/wait/snark”.
[/code]

It’s certainly something I’d like to see, but I think the problem is parsing. The parser is built to understand things, and on rare occasions, rooms, numbers and kinds-of-value. But I’m not sure the names of variables and properties are even preserved in the compiled story, much less in a form that can be understood by the parser.

If I’m wrong, please let me know how it can be done!

I do sometimes “showme [object]” when the object has a property I want to know about. But sometimes I want to know how the result of a dynamic property or relation for an object or pair of objects. Not sure if that can be done either.