error I don't understand and am afraid to get near.

Hiya!

I’m trying to get Startend Menupages by Shadowchaser to work.[code]“test” by Wes Lesley

Include Basic Screen Effects by Emily Short.

Include Menus by Emily Short.

Include Glulx Text Effects by Emily Short.

Include Useful Functions by Shadowchaser.

Include Startend Menupages by Shadowchaser.

The game_title is “Ding Dong”.

The start_quotation is “King Kong”.

Use menus.
The intro_menu is the Table of Introductory Information.

Use mature content warning.

test is a room.[/code]This should all work. Aside from the last line and the first line, I hadn’t had a say in this (okay those two values I filled in but those aren’t the issue, I checked) - and it doesn’t work.

Thing is, the clicky goes to extension innards of Emily Short’s stuff, and I’m afraid to touch them. I don’t deal with things I don’t understand. For the same reason I won’t run around outside waving a flagpole when there’s a lightning storm.

I’m not intelligent enough to mess around in other people’s work. Can anyone help me? :c

EDIT:

for the sake of everyone who doesn’t want to waste time:

I’m looking for a way to have selectables like in those games where you enter a menu and have a cursor ability to highlight an option and activate it or go deeper or toggle it or read it or whatever. if this doesn’t do that, let me know and i’ll just close this avenue of investigation right away.

if there’s another way to do such a thing, please let me know.

so, menu, without it being in a menu-menu - for a title screen. Thank you.

Emily Short’s Glulx Text Effects contains a table to track the various text styles. I think at some point the columns of this table got changed, and some of her other extensions that rely on Text Effects didn’t get updated. I’ve encountered the same problem trying to use her Centered Images extension.

I think the only way to fix it (other than wait for an official bug fix release) is to go into the extension that contains the new table and fix the column headings so that they match the old table. If I recollect correctly, a table extension is allowed to NOT use columns from the original, but it can’t add in new columns that don’t exist in the original. So you’d want to change the column headings in the table extension like so:

obliquity --> italic
first-line indentation --> first line indentation
boldness --> font weight

I built it by hand in Scroll Thief, so I know this method works in the latest version: link.

That’s pushing letter buttons (or space) but I meant, like in the menu extension’s menus, using the arrow keys to push a selector up or down and then hitting space or enter or something to activate that selected choice.

[start of edit]
wouldn’t the transcript thing better remove the wait for any key and message and just have the menu itself show “if transcripting is on say ON otherwise say OFF” kind of thing?
[end of edit]

I could try to look into using the button recognizing thing to cheat such a menu on the screen with clear the screens and appearing/disappearing selector characters but …

well i’ll try first to alter the extension but i’m afraid to mess around with it. what if I mess it up?

[edit]

Draconis I’ve been playing around with your code but I can’t get it to recognize the up or down keys, key codes 38 and 40. :c

anyone have any idea how to make inform recognize them?

[addition]

This is freakishly annoying. even checking the menu extension source just shows Table of Menu Commands number effect 78 move down rule 110 move down rule 80 move up rule 112 move up rule 81 quit rule 113 quit rule 13 select rule 32 select rule 130 move down rule 129 move up rule 27 quit rulewhich is no help because up and down aren’t mentioned there and I can’t find how the arrow keys work through that code! D:

HOW DO YOU ARROW KEY?! D:

I don’t usually wield ‘extreme prejudice’ on design issues but… I’m personally trying to eliminate arrow keys for menu navigation from Inform projects, and so are some other folks. The reason is that (a) navigating by arrows is a total pain in the arse on a mobile device, and (b) navigating by arrows is a total pain in the arse for people using screen readers, and © they also fill transcripts with clutter.

Just use keypresses! There’s no great ideological issue at stake (ie no issues of truth in fiction or The Wonders Of Arrow Key Aesthetics, or whatever) and more people will be able to play your game with at least an 80% reduction of piss-offedness. That’s a lot less piss-offedness.

-Wade

FWIW, most in-built menus allow (N)ext and §revious instead of the arrow keys. It doesn’t negate the hurt in the buttocks, but it does lessen it. :slight_smile:

Using the arrow keys is ok, as far as I’m concerned - but using ONLY the arrow keys without giving the user an alternative is a baaaad thing. Then you’d really lose the mobile playing audience.

that would all be well and good and i’d surely take that into account but sadly
[size=200]I CAN’T GET IT TO RESPOND TO THE ARROW KEYS[/size]

[size=85]emily short’s source doesn’t even seem to mention them, [/size]and [size=150]they [/size][size=200]work[/size]!!! [size=50]fucking dark sorcery, that[/size]

it won’t accept 38 and 40 or 37 and 39 (up, down, left, right - respectively)

[size=200]WHAT HAPPEN?![/size]

oh and i’ve tried both [rant]using hyperlink thingies to get around it from [code]Include Unified Glulx Input by Andrew Plotkin.

The Study is a room. “You are in your cluttered study.”

The messy desk is a supporter in the Study. The description is “You found this battered antique in a battered [antique shop] in Chapel Hill. As you recall, it was sitting behind [a microscope].”

A fossil is on the desk. The description is “Some species of [ammonite].”

A copper fulgurite is on the desk. The description is “It’s a chunk of melted copper that you picked up from the base of a telephone pole. It’s not really fulgurite, minerallogically speaking. But it [italic type]was[roman type] formed by [lightning]!”

A memory is a kind of thing.

The ammonite is a memory. The description is “You’ve dreamed of drifting through antediluvian seas, the master of all you survey… Then the bony fishes come. The damned bony fishes.”

The microscope is a memory. The printed name is “defunct electron microscope”. The description is “Yes, you once discovered an electron microsope in [an antique shop]. It was a console device, like a kitchen counter with switches all over the top and vacuum pumps hanging out underneath. You wonder if anyone ever purchased it.”

The antique shop is a memory. The description is “You discovered a mad antique shop on a years-ago trip to North Carolina. The prize of its collection was [a microscope], though you doubt anyone else would think of it that way. You bought [hyperlink desk]an old desk[/hyperlink] instead; the very one in this room.”

The lightning is a memory. The description is “One can never remember lightning properly.”

Rule for printing the name of an object (called O):
say “[hyperlink O][printed name of O][/hyperlink]”;

The standard parser input line request rule does nothing.

Prompt displaying rule for a command input-context:
say “[first time](Touch a link.)[only]”;
rule succeeds.

Setting up input rule:
now the story-window is hyperlink-input-request.

Handling input rule for a command input-context when handling hyperlink-event:
let O be current input event hyperlink object;
if O is nothing:
reject the input event;
if O is a room:
handle the current input event as the action of looking;
else:
handle the current input event as the action of examining O;
rule succeeds.

Before examining something:
say “— [The noun] —[paragraph break]”;[/code]

and the special key codes from[code]“Maze of Keys 2”

Include Unified Glulx Input by Andrew Plotkin.
Include Unicode Character Names by Graham Nelson.

The Kitchen is a room. “You are in a kitchen. An open trap door beckons you downward.”

Aboveground is a region. The Kitchen is in Aboveground.

Maze10 is a room. “You are in a maze of twisty passages, basically all alike.”
Maze20 is a room. “You are in a maze of twisty passages, all pretty much alike.”
Maze01 is a room. “You are in a maze of twisty passages, all basically alike.”
Maze11 is a room. “You are in a maze of twisty passages, all kind of alike.”
Maze21 is a room. “You are in a maze of twisty passages, more or less all alike.”
Maze02 is a room. “You are in a maze of twisty passages, pretty much all alike.”
Maze12 is a room. “You are in a maze of twisty passages, all alike.”
Maze22 is a room. “You are in a maze of twisty passages, all more or less alike.”
Maze32 is a room. “You are in a maze of twisty passages, all sort of alike.”
Maze03 is a room. “You are in a maze of twisty passages, kind of all alike.”
Maze13 is a room. “You are in a maze of twisty passages, all quite alike.”
Maze23 is a room. “You are in a maze of twisty passages, quite all alike.”
Maze33 is a room. “You are in a maze of twisty passages, sort of all alike.”

Maze12 is below the Kitchen.
Maze10 is west of Maze20.
Maze10 is north of Maze11. Maze20 is north of Maze21.
Maze01 is west of Maze11. Maze11 is west of Maze21.
Maze01 is north of Maze02. Maze11 is north of Maze12.
Maze02 is west of Maze12. Maze12 is west of Maze22. Maze22 is west of Maze32.
Maze12 is north of Maze13. Maze22 is north of Maze23. Maze32 is north of Maze33.
Maze03 is west of Maze13. Maze23 is west of Maze33.

Rule for printing the name of a room (called R) when R is not in Aboveground:
say “Maze”.

Check going down from the Kitchen:
say “(Down here, single-keystroke commands rule. Use the arrow keys or NSEW to move around; U or escape to quit.)”;
continue the action.

Check going up when the location is not in Aboveground:
say “You fumble your way back to the light.”;
now the player is in the Kitchen;
stop the action.

Prompt displaying rule when the location is not in Aboveground:
instead say “==>”.

Setting up input rule when the location is not in Aboveground:
now the input-request of the story-window is char-input;
rule succeeds.

Handling input rule when the location is not in Aboveground and handling char-event:
let C be the current input event character;
if C is special keycode left or C is Unicode Latin small letter w or C is Unicode Latin capital letter W:
say “(You try going west…)”;
handle the current input event as the action of going west;
rule succeeds;
if C is special keycode right or C is Unicode Latin small letter e or C is Unicode Latin capital letter E:
say “(You try going east…)”;
handle the current input event as the action of going east;
rule succeeds;
if C is special keycode up or C is Unicode Latin small letter n or C is Unicode Latin capital letter N:
say “(You try going north…)”;
handle the current input event as the action of going north;
rule succeeds;
if C is special keycode down or C is Unicode Latin small letter s or C is Unicode Latin capital letter S:
say “(You try going south…)”;
handle the current input event as the action of going south;
rule succeeds;
if C is special keycode escape or C is Unicode Latin small letter u or C is Unicode Latin capital letter U:
say “(You try going up…)”;
handle the current input event as the action of going up;
rule succeeds;
say “(’[extended C]’ is not a valid key.)”;
reject the input event.[/code][/rant]and neither give me viable solutions (that I can think of).

I’m afraid it’s become a blood-revenge thing now. Must get the fucking things to work. seethes with fury and gummi bears

I’ll include N and P but i MUST get up and down (and left and right, i need those too) to work. Ooh, and the tab key. don’t ask questions. spoilers.

[less on-topic, but i’ve been meaning to ask, … what’s a screen reader?]

The tab key? I sure hope you’re putting an alternative, the iOS keyboard doesn’t have tab keys.

Anyway, a screen reader is software that reads out the contents of the screen. Vital for blind people to play IF.

blind people are gonna hate my new thing anyway, i’m afraid.

and i’m not saying i was aware of the iOS thing not having a TAB thing, I’m just saying I need it for me-reasons which absolutely do not include things that would
either or

  • make it into the final release
  • are for testing purposes
  • screwing over people who bought Apple products
  • science

PS if I have to explain that the above contains a joke then I’ll be very, very sad.

I’m just saying - getting fancy is fine, but warrants keeping an eye on what you’re doing just in case you’re unknowingly shutting off a number of players. 's all.

For Glulx, special keys (i.e. ones that don’t map to characters) are represented by negative numbers. I unfortunately have never found a good list of these, you just need to experiment a bit.

They’re in glk.h: github.com/erkyrath/cheapglk/bl … glk.h#L103

They’re also in infglk.h, but in decimal instead: github.com/erkyrath/glk-dev/blo … fglk.h#L57

Excellent!

Translation if you aren’t familiar with two’s-complement:

Unknown  -1
Left     -2
Right    -3
Up       -4
Down     -5
Return   -6
Delete   -7
Escape   -8
Tab      -9
PageUp   -10
PageDown -11
Home     -12
End      -13
F1       -17
F2       -18
F3       -19
F4       -20
F5       -21
F6       -22
F7       -23
F8       -24
F9       -25
F10      -26
F11      -27
F12      -28

damn. Doesn’t work either. :c

I still need the tab.

and i’ll do the letters for commands BUT i still want the arrow things because it’s most easily explained.

besides, if people are used to using arrow keys to navigate the cursor, who am I to say “you’re pushing N for New and R for Restore”?

Emily Short advised me to use the phrasing from the Basic Screen Effects but … I don’t know how to do the thing. Any help welcome.

thought:
is it possible that the game does recognize me pushing an arrow key but won’t use it as i want it to because it thinks i want it inside the input field?

Show your code?

FWIW, a number of people are used to having the option to push N for next and P for previous, because it’s built-in.

All I’m saying is, give people both choices.

I’m all for putting in N and P. I’m just against leaving out the cursor keys because:
1 - to me they’re obvious choices, they’re frickin’ cursor keys FFS.
2 - they have insulted me with their resistance to do my bidding and must be brought to justice.
3 - science.

[rant][code]“test” by Wes Lesley

Include Basic Screen Effects by Emily Short.

Include Menus by Emily Short.

Include Glulx Text Effects by Emily Short.

test is a room.

[Based on the extensions Title Page by Jon Ingold, Menus by Emily Short, and Menus by Wade Clarke.]

To say spaces to center (n - a number) – running on: (- spaces (((VM_ScreenWidth() - {n})/2)-1); -).

[find out how wide the screen is for artwork! give error screens if the screen is too narrow]

To redraw the/-- status line: (- DrawStatusLine(); -).

To decide what figure name is the/-- cover art: (- 1 -).

To center (saying - text):
let N be the number of characters in the saying;
say spaces to center N;
say the saying.

Definition: a number is intro-relevant if it is -8 or it is -7 or it is -6 or it is at least 32.

funstuff is a truth state that varies.

menucountone is a number that varies. menucountone is initially 1.

First when play begins (this is the show title page rule):
[if the information-gathering flag is false, make no decision;]
while true is true: [Repeat forever until break]
clear the screen;
redraw the status line;
[display the cover art centered;]
say paragraph break;
say fixed letter spacing;
center “[if menucountone is 1]>[otherwise][unicode 32][end if][unicode 32]Press [bracket]SPACE[close bracket] to begin.[line break]”;
center “[if menucountone is 2]>[otherwise][unicode 32][end if][unicode 32]Press R to restore a saved game.[line break]”;
center “[if menucountone is 3]>[otherwise][unicode 32][end if][unicode 32]Press S to skip the introduction.[line break]”;
center “[if menucountone is 4]>[otherwise][unicode 32][end if][unicode 32]Press T to begin a transcript.[line break]”;
center “[if menucountone is 5]>[otherwise][unicode 32][end if][unicode 32][if funstuff is false]Press H to activate HARD mode[else]HARD mode is active[end if].[line break]”;
center “Press Q to quit.[line break]”;
say “w[screen width] - h[screen height]”;
say variable letter spacing;
let the key be zero;
while the key is not intro-relevant:
let the key be the chosen letter;
if the key is 32 [SPACE] or the key is -6 [ENTER]:
clear the screen;
say paragraph break;
make no decision; [Follow the other WHEN PLAY BEGINS rules.]
otherwise if the key is -8 [ESC] or the key is 81 [Q] or the key is 113 [q] or the key is -7 [DEL]:
[stop the game abruptly;]
clear the screen;
otherwise if the key is 72 [H] or the key is 104 [h]:
clear the screen;
say paragraph break;
say "Note: HARD mode is recommended for players who have gone through Scroll Thief at least once before, or those who found the puzzles too easy. It removes a few spells from the game and eliminates the most direct solutions to several of the puzzles. Do you want to turn on HARD mode? ";
if the player consents, now funstuff is true;
otherwise if the key is 82 [R] or the key is 114 [r]:
follow the restore the game rule;
say “[bracket]Press any key to continue.[close bracket]”;
wait for any key;
otherwise if the key is 83 [S] or the key is 115 [s]:
[now the information-gathering flag is false;]
[now the player’s full name is “Anna Anonymous”;
now the player’s forename is “Anna”;
now the player’s surname is “Anonymous”;
set the gender of the player to feminine;]
clear the screen;
say paragraph break;
make no decision;
otherwise if the key is 84 [T] or the key is 116 [t]:
follow the switch the story transcript on rule;
say “[bracket]Press any key to continue.[close bracket]”;
wait for any key;
otherwise if the key is 38 [up arrow]:
clear the screen;
decrease menucountone by one;
if menucountone is less than 1:
now menucountone is 5;
clear the screen;
otherwise if the key is 40 [down arrow]:
clear the screen;
increase menucountone by one;
if menucountone is greater than 5:
now menucountone is 1;
clear the screen;

[

To center (quote - text):
(- CenterPrintComplex({quote}); -).

To center (quote - text) at the/-- row (depth - a number):
(- CenterPrint({quote}, {depth}); -).

Include (-

[ CenterPrint str depth i j len;
font off;
i = VM_ScreenWidth();
len = TEXT_TY_CharacterLength(str);
if (len > 63) len = 63;
j = (i-len)/2 - 1;
VM_MoveCursorInStatusLine(depth, j);
print (I7_string) str;
font on;
];

[ CenterPrintComplex str i j len;
font off;
print “^”;
i = VM_ScreenWidth();
len = TEXT_TY_CharacterLength(str);
if (len > 63) len = 63;
j = (i-len)/2 - 1;
spaces j;
print (I7_string) str;
font on;
];

-).

To decide what number is screen width:
(- VM_ScreenWidth() -).

To decide what number is screen height:
(- I7ScreenHeight() -).

Include (-

[ I7ScreenHeight i screen_height;
i = 0->32;
if (screen_height == 0 or 255) screen_height = 18;
screen_height = screen_height - 7;
return screen_height;
];

-).

]

[

keys

up 38
down 40
left 37
right 39

enter 13 (both on main and numpad)
spacebar 32
tab 9 (enable cheat mode)

backspace 8
shift 16
control 17
caps lock 20
page up 33
page down 34
end 35
home 36

note:
if the key is 32 [SPACE] or the key is -6 [ENTER]:
the original code mentions this, perhaps the -6 is the enter on the numpad and/or the main one

mentions:
otherwise if the key is -8 [ESC] or the key is 81 [Q] or the key is 113 [q] or the key is -7 [DEL]:
stop the game abruptly;

what are the negative keys? // they’re the inform only things

Unknown -1
Left -2
Right -3
Up -4
Down -5
Return -6
Delete -7
Escape -8
Tab -9
PageUp -10
PageDown -11
Home -12
End -13
F1 -17
F2 -18
F3 -19
F4 -20
F5 -21
F6 -22
F7 -23
F8 -24
F9 -25
F10 -26
F11 -27
F12 -28

shit these dont work either
bugger these fucking buttons to death

]

[/code][/rant]

EDIT

[size=200]THEY WORK !!![/size]
i had to add them to being intro relevant!!!

[size=200]NEW QUESTION[/size]
Can I make it so that they are no longer intro relevant when the intro is no longer being shown? i just don’t want them getting in the way of the gameplay - if people press R when they say “three” during the game i don’t want the game to suddenly try to restore a saved game in the middle of their typing

[size=150]also[/size]
TAB works in I7 testing but not in GLULXE :frowning: anyone know why?

The “intro-relevant” check is because of a weird bug a tester found: scrolling down once you were already at the bottom of the screen would be considered a keypress, so the screen would be redrawn, so they’d be snapped back to the top of the screen again. It just makes it so that keys I haven’t accounted for won’t interfere.