Internal Strings: Difference between revisions
No edit summary |
(Text windows) |
||
| Line 1: | Line 1: | ||
ZZT has a number of internal strings that it displays for several purposes. | |||
== Message Strings == | |||
This is a list of internal string messages displayed on the bottom of the screen, along with their durations and whether or not they are set to only appear once. | |||
Note that the duration variable here is scaled according to the [[game speed]]. | Note that the duration variable here is scaled according to the [[game speed]]. | ||
| Line 55: | Line 59: | ||
Note that the Game Over message (a) has a leading space character, and (b) is not displayed if a message is currently displayed onscreen. | Note that the Game Over message (a) has a leading space character, and (b) is not displayed if a message is currently displayed onscreen. | ||
=== Colors | === ZZT-OOP Errors === | ||
Errors thrown is an invalid command is encountered: | |||
{| class="wikitable" | |||
|Bad Direction | |||
|- | |||
|Bad object kind | |||
|- | |||
|Bad #BECOME | |||
|- | |||
|Bad #PUT | |||
|- | |||
|Bad #CHANGE | |||
|- | |||
|Bad command [command] | |||
|} | |||
== Colors == | |||
The list of valid ZZT-OOP colors: | The list of valid ZZT-OOP colors: | ||
| Line 84: | Line 106: | ||
Messages are limited to 58 characters in length. Thus, the messages that use this string end up being truncated. Also, due to an off-by-one error, collecting/using a black key will visually overwrite one tile of the sidebar with a black tile. | Messages are limited to 58 characters in length. Thus, the messages that use this string end up being truncated. Also, due to an off-by-one error, collecting/using a black key will visually overwrite one tile of the sidebar with a black tile. | ||
=== ZZT- | == Text Windows == | ||
There are a handful of built-in messages displayed via text windows. | |||
TODO: There should be a few more window titles, particularly in the editor. | |||
=== World Selector === | |||
When selecting a world or saved game, a text window appears with the title <code>ZZT Worlds</code> or <code>Saved Games</code>. | |||
When loading this window, filenames are checked against a small internal list to provide official worlds with fuller names: | |||
<pre>TOWN The Town of ZZT | |||
DEMO Demo of the ZZT World Editor | |||
CAVES The Caves of ZZT | |||
DUNGEONS The Dungeons of ZZT | |||
CITY Underground City of ZZT | |||
BEST The Best of ZZT | |||
TOUR Guided Tour ZZT's Other Worlds</pre> | |||
"BEST" is notable for being unused, since the final result of the ''Best of ZZT'' contest was released in two parts: BESTZZT1 and BESTZZT2. | |||
The last line of this window is <code>Exit</code>. | |||
=== High Score === | |||
When viewing or entering a high score, a window appears with the title <code>High scores for [World Name]</code> or <code>New high score for [World Name]</code>. | |||
<pre>Score Name | |||
----- ----------------------------------</pre> | |||
Score entries are in the format of <code>[Score] [Name]</code>, with score being five digits padded to be right-aligned. The placeholder name when entering a high score is <code>-- You! --</code>. | |||
=== File Not Found === | |||
If a file IO error is encountered, this error message box may pop up. The title for this message box is <code>Error # [Error Number]</code>. | |||
<pre>$DOS Error: | |||
This may be caused by missing | |||
ZZT files or a bad disk. If | |||
you are trying to save a game | |||
your disk may be full -- try | |||
using a blank, formatted disk | |||
for saving the game!</pre> | |||
Latest revision as of 17:40, 26 December 2025
ZZT has a number of internal strings that it displays for several purposes.
Message Strings
This is a list of internal string messages displayed on the bottom of the screen, along with their durations and whether or not they are set to only appear once.
Note that the duration variable here is scaled according to the game speed.
| Message | Duration | Show Once |
|---|---|---|
| Bomb activated! | 200 | No |
| Energizer - You are invincible | 200 | Yes |
| Gems give you Health! | 200 | Yes |
| Ammunition - 5 shots per container. | 200 | Yes |
| Can't shoot in this place! | 200 | Yes |
| You don't have any ammo! | 200 | Yes |
| You now have the [color] key. | 200 | No |
| You already have a [color] key! | 200 | No |
| The [color] door is now open. | 200 | No |
| The [color] door is locked! | 200 | No |
| Torch - used for lighting in the underground. | 200 | Yes |
| Don't need torch - room is not dark! | 200 | Yes |
| Room is dark - you need to light a torch! | 200 | Yes |
| You don't have any torches! | 200 | Yes |
| You are blocked by an invisible wall. | 100 | No |
| A path is cleared through the forest. | 200 | Yes |
| A fake wall - secret passage! | 150 | Yes |
| Your way is blocked by water. | 100 | No |
| Running out of time! | 200 | No |
| Ouch! | 100 | No |
| Game over - Press ESCAPE | 32000 | No |
| ERR: [error] | 200 | No |
| [object/scroll messages] | 200 | No |
Note that the Game Over message (a) has a leading space character, and (b) is not displayed if a message is currently displayed onscreen.
ZZT-OOP Errors
Errors thrown is an invalid command is encountered:
| Bad Direction |
| Bad object kind |
| Bad #BECOME |
| Bad #PUT |
| Bad #CHANGE |
| Bad command [command] |
Colors
The list of valid ZZT-OOP colors:
| Blue |
| Green |
| Cyan |
| Red |
| Purple |
| Yellow |
| White |
The color black is technically the color 0, which is out of bounds of the color name array. ZZT attempts to read a string that starts 8 characters before the first one, and it's length end up being 46 (corresponding to the character #char 46 . (0x2E) in an unrelated string). The full string for the color black is as follows:
.-♣....\♦Blue ♣Green ♦Cyan ♥Red ♠P
(The clubs and diamonds and such are the length parameters for the other color strings.)
Messages are limited to 58 characters in length. Thus, the messages that use this string end up being truncated. Also, due to an off-by-one error, collecting/using a black key will visually overwrite one tile of the sidebar with a black tile.
Text Windows
There are a handful of built-in messages displayed via text windows.
TODO: There should be a few more window titles, particularly in the editor.
World Selector
When selecting a world or saved game, a text window appears with the title ZZT Worlds or Saved Games.
When loading this window, filenames are checked against a small internal list to provide official worlds with fuller names:
TOWN The Town of ZZT DEMO Demo of the ZZT World Editor CAVES The Caves of ZZT DUNGEONS The Dungeons of ZZT CITY Underground City of ZZT BEST The Best of ZZT TOUR Guided Tour ZZT's Other Worlds
"BEST" is notable for being unused, since the final result of the Best of ZZT contest was released in two parts: BESTZZT1 and BESTZZT2.
The last line of this window is Exit.
High Score
When viewing or entering a high score, a window appears with the title High scores for [World Name] or New high score for [World Name].
Score Name ----- ----------------------------------
Score entries are in the format of [Score] [Name], with score being five digits padded to be right-aligned. The placeholder name when entering a high score is -- You! --.
File Not Found
If a file IO error is encountered, this error message box may pop up. The title for this message box is Error # [Error Number].
$DOS Error: This may be caused by missing ZZT files or a bad disk. If you are trying to save a game your disk may be full -- try using a blank, formatted disk for saving the game!