Armageddon General Discussion Board

General => Player Announcements and Collaboration => Topic started by: MarshallDFX on April 07, 2023, 06:27:58 PM

Title: screen reader tintin++ configuration
Post by: MarshallDFX on April 07, 2023, 06:27:58 PM
Because playing the game is too intimidating, I entertained myself learning triggers by making something that might be useful for those who use screen readers with Armageddon.  These features were suggested on Discord.

This tintin++ script does the following:
#NOP INSERT ANY CONFIGS HERE... ARM IGNORES SCREEN READER MTTS ANYWAYS BUT COMMAND ECHOS PROBABLY NOT DESIRABLE;
#config {SCREEN READER} {ON}
#config {COMMAND ECHO} {OFF}

#NOP PACKET PATCH IS IMPORTANT FOR ARM, TRIGGERS MISBEHAVE WITHOUT IT;
#config {PACKET PATCH}  {0.20}

#NOP This gags the default launch menu of Armageddon and changes it to brief;
#event {SESSION CONNECTED} {#showme Welcome to Armageddon!; #line gag 37; B; C;}

#NOP SET PROMPT FOR CAPTURE, AND ROOMNAME/EXIT COLOURS FOR CAPTURE;
#alias myprompt {
   prompt hp:%h/%H mn:%m/%M mv:%v/%V st:%t/%T fs:%x/%X [%i] [%s] [%f] [%o] [%a] [%k] [%w] [%A] [%E] [%p] FINPROMPT;
   change color fg_room_name 105;
   change color fg_room_exits 111;
   }

#NOP ALIAS FOR TURNING OFF PRINTING OF PROMPT CHANGES;
#var showdrops on;
#alias {showdrops} {
#if {"$showdrops" == "on"} {#var showdrops off};#else {#var showdrops on};
  #showme Printing prompt changes now ${showdrops}.
};

#NOP ACTION CAPTURES PROMPT VALUES AND STORES THEM, PRINTS CHANGES;
#action {hp:%1/%2 mn:%3/%4 mv:%5/%6 st:%7/%8 fs:%9/%10 [%11] [%12] [%13] [%14] [%15] [%16] [%17] [%18] [%19] [%20] FINPROMPT} {
#if {&{h}} {
#math {d_h} {$h - %1};
#math {d_v} {$v - %5};
#math {d_m} {$m - %3};
#math {d_t} {$t - %7};

#if {$d_h > 0 && "$showdrops" == "on"} {#showme Lost $d_h health};
#if {$d_v > 0 && "$showdrops" == "on"} {#showme Lost $d_v movement};
#if {$d_m > 0 && "$showdrops" == "on"} {#showme Lost $d_m mana};
#if {$d_t > 0 && "$showdrops" == "on"} {#showme Lost $d_t stun};

#if {$x/$X >= 0.1 && %9/%10 < 0.1} {#showme Focus critical!};
#if {$h/$H >= 0.1 && %1/%2 < 0.1} {#showme Health critical!};

};
#var h %1;
#var H %2;
#var m %3;
#var M %4;
#var v %5;
#var V %6;
#var t %7;
#var T %8;
#var x %9;
#var X %10;
#var i %11;
#var s %12;
#var f %13;
#var o %14;
#var a %15;
#var k %16;
#var w %17;
#var A %18;
#var E %19;
#var p %20;
} {1};

#NOP GAG THE PROMPT;
#substitute {hp:%*FINPROMPT} {};

#alias {hp} {#showme $h health.}
#alias {maxhp} {#showme $H max health.}
#alias {mv} {#showme $v movement.}
#alias {maxmv} {#showme $V max movement.}
#alias {stun} {#showme $t stun.}
#alias {maxstun} {#showme $T max stun.}
#alias {mn} {#showme $m mana.}
#alias {maxmn} {#showme $M max mana.}
#alias {fs} {#showme $x focus.}
#alias {maxfs} {#showme $X max focus.}
#alias {invis} {#showme Invisibility status: $i.}
#alias {pos} {#showme Position: $s.}
#alias {flying} {#showme Flying status: $f.}
#alias {lang} {#showme Speaking $o with a %a accent.}
#alias {riding} {#showme $k.}
#alias {speed} {#showme You are $w.}
#alias {armed} {#showme You are $A.}
#alias {enc} {#showme Encumbrance $E.}
#alias {scanning} {#showme $p.}

#NOP THESE FUNCTIONS PUT SPACES BETWEEN CHARACTERS WITHIN ROOMEXITS; MIGHT NEED A FIX FOR 'LEAVE';
#substitute {~\e[38;5;105m%1\e[0m\e[38;5;111m [%2]\e[0m} {\e[38;5;105m%1\e[0m\e[38;5;111m [@space_exits{%1;%2}]\e[0m}
#function space_exits
{
  #var roomname %1;
  #list roomexits tokenize {%2};
  #list roomexits collapse { };
  #return $roomexits
}

#NOP Separate input from output with split;
#split 0 0;

#NOP Connect to Arm;
#session Armageddon ginka.armageddon.org 4050

Title: Re: screen reader tintin++ configuration
Post by: MarshallDFX on April 10, 2023, 04:41:25 AM
added #split 0 0 to separate input from console per tt++ faq suggestions