Common Commands Sidebar extension

I agree that a single column table is simpler. I couldn’t get a test action column to work (except as stored action).
Table amendment can only change a second column, not the first. But it could be convenient to use an auxiliary table for amendments.

In the quote,

I mean that, from the perspective of the author, if I add an extension e.g. Inform ATTACK (which defines an important action e.g. CONCENTRATE), do I need to do something to make CONCENTRATE appear in the sidebar or will Inform ATTACK do that (add CONCENTRATE etc. to the table) automatically - and likewise for removing an extension and removing its action.

Thank you for answering my questions.

Here’s a minimal demo using the sidebar that you can play online in Quixe or download and run in an interpreter:

textadventures.co.uk/games/view/ … ple-game-1

I’m still working on the hyperlinks, so this sample doesn’t currently show any.

Also, I’ve now tried Parchment and it does not display the sidebar. (But it doesn’t display the status bar either, so perhaps that’s to be expected.)

Seeking opinions: what would be a good typed command to use for toggling the sidebar on and off, and a good one for printing/listing the commands in the main window? Or toggling could also be two separate actions, “sidebar off” and “sidebar on” for instance.

At the moment it’s “commands” for toggling the sidebar and “list commands” for listing them in the main window but I’m not sure if that’s what players would think to type.

I like “sidebar on” and “sidebar off” and just plain “sidebar” to toggle (as in “actions/actions on/actions off”). And why not put that in the sidebar itself?

Seconded.

Took a look at your sidebar demo, and this is really fantastic. I think a lot of people would find this helpful - not just new players, but authors who are working on games that rely heavily on nonstandard commands.

(Thinking of a couple of my games here - CONCENTRATE from One Eye Open and SHOUT from Ollie Ollie Oxen Free. They’re cued in the text, but a reminder would not have hurt.)

Sidebar on/sidebar off/sidebar it is. And I’m thinking about “commands” for listing the commands in the main window. Thanks for the suggestions, matt w and Peter Piers!

And thanks, Carolyn!

I really like the look of this! Can’t wait to have it in my game!

What about just “C” as a shortcut? I suppose an author could set that as a synonym in the source.

Also people have mentioned extensions altering the list.

Could an extension author include their own code “Section 20 - for use with Common Commands Sidebar/Table of Common Commands (amended) [table continues]”

Thanks! There are still some issues to work out, and things that are subject to change, but if you don’t mind that I can send you a beta version if you’d like.

I like the idea of C as a shortcut. I wonder, though, if it’d be safer to leave that to the author, as you said. Just to reduce the possibility of clashes with some other command. Opinions welcome.

That’s certainly possible. I haven’t worked out the best way of handling it, because I don’t see a straightforward way to rearrange the order of the commands (for instance, if you want to keep all meta commands together, all action commands together, etc.) when there are continuations in different extensions. What would you think of extension-specific commands being added at the end of the default commands?

I’d say just document that extensions could take advantage of the sidebar with an example, and specify that they would come after the common commands. Don’t bother with rearranging stuff.

Maybe you could also possibly document how to provide a flag to not include extension commands if the source author doesn’t want them in there.

A beta version of this is now on Github.

I’ve tried to make it as low-friction as possible for authors. If you just want the default settings, you can simply include the extension and not put in any additional code.

Congrats on the beta!

It’s not easy to read in github because the display is a narrow column and things like the description and comments have no linebreaks and are not wrapped, so you need to scroll to see them. Some sentences are long.

Can you make a HTML version? You could copy the text of the extension into an Inform 7 story and use the “release along with source code.” option. You can upload the produced HTML files to github and link to them.

Just install the extension in Inform… that will display it normally.

This works really well! I’m just wondering, though, is there a way to highlight viable directions each turn?

I’d worked on a feature that would let you change individual commands each turn, but I’ve set it aside for now because it requires refreshing each turn. Flexible Windows or one of the extensions it depends on tends to add an extra line break in the main window when you refresh, and I haven’t been able to figure out a workaround.

If you wanted to try this anyway without having to change much, you could write an every turn rule that would determine viable directions and then refresh the sidebar. In the text of the sidebar, you could add conditions like “[if north is a viable direction]N[end if]”.

Another option would be to put the viable directions in the status bar. I think there may be a status bar extension that does this, though I don’t know how compatible it may be with the Flexible Windows extension.

I believe that it’s Inform’s basic rules for line breaks that adds the extra break. You should be able to do a “run paragraph on” at the end of the text to be printed with each refresh to prevent it.

These bonus line breaks are very complicated. When I tried using run paragraph on it had side effects like removing a line break from the look command.

Sorry for letting this sit so long without a fix! (It was first reported in Jan :frowning:) I will try to get a fix out ASAP.

[Edit] The fix turned out to be very easy, and I’ve pushed an update of FW to Github!

Thanks Dannii!

Skylark, if you are using a compass rose, using “if” conditions in the string may be the best way to go. I’m not sure when CCS will be updated to allow other ways of changing the commands. I’ll need to do some testing and such.

If you refresh often, you may want to check the minimum height of the window to make sure it’s tall enough to fit all your commands. Some interpreters will show “More” at the bottom of the sidebar if the commands don’t all fit, and then the player has to press enter to get rid of the “More” every turn (or however often it refreshes.)

I have now updated CCS to require the newer version of Flexible Windows, and to delete the “run paragraph on” line that ran after printing the sidebar text.