Detecting text-only mode from within the game

I’m authoring a TADS game that contains concept art at certain parts of the game, and minor HTML formatting during NPC conversations. While these elements are non-essential to the plot or gameplay, I’d like to put a message at the beginning of the game for text-only users that they should use a multimedia interpreter if possible on their system. (This could also be useful in other games - let’s say you have a map system in your game, and you want to know whether you should display an image or an ASCII art version of the map.)

In any case, does anyone know if it’s possible to detect text-only mode from within TADS itself, or is this entirely up to the interpreter?

Hiram A


Try outputManager.htmlMode perhaps.

Hey Hiram, welcome to TADS!
I wrote my own function to query whether the player can use graphics at runtime:

qGraphics() { return systemInfo(SysInfoInterpClass) == 
                    && systemInfo(SysInfoPrefImages); }

Then you can do things like

obj: Thing
  desc {
    "The object has a strange diagram on it, that looks like this: \b";
    if(qGraphics()) "<img src=diagram.png>";
    else { 
        "[Optional prompt the player to use a
             graphical interpreter] \b";
        "ascii art here";

And of course you can also call the same function at game startup to alert the player that they will have a better experience with a terp like QTads (I included the download link to the latest version of QTads in my own game)…