0 votes
by (160 points)

Hello all,

I use twine 1 and Sugarcube v2.19. The <display>> macro  is deprecated and instead I use  <<include>> as written in the online documentation.

I have a small question: I previously used the shorthand form <<string [value …]>> of display. Is it something deprecated too or has it been "ported" in the new <<include>> macro?

Regards,

 

 

1 Answer

+1 vote
by (63.1k points)
selected by
 
Best answer

That's a shorthand form of <<print>>, not <<display>>, and it only exists in the Twine 1 vanilla story formats.  SugarCube never offered it, so you're probably confusing it with Sugarcane.

Instead, SugarCube has its own shorthand <<print>> variant <<=>> and the naked variable markup, which allows you to dispense with <<print>> altogether in most cases.

by (160 points)

Thanks for the quick answer, but I was really referring about <<display>> and not about <<print>>. More precisely, I was talking about this section of the wiki: https://twinery.org/wiki/display#shorthand_form, so really a shorthand to include passage.

Shorthand form

The «display» macro is special among Twine macros because it has a shorthand form. Instead of writing «display “passage”», you can simply write «passage», as if it was another macro.

However, to avoid conflicts with other aspects of Twine syntax, you can only use the shorthand to display passages whose names adhere to these rules:

 

Indeed in vanilla story format but it seems to work like a charm with Sugarcube, Thing is I can't see link in the visual editor when I use <<include>> instead of <<display>>, I read that there would no more evolution to twine 1 so I wondered how to see the links while using an up to date macro.

 

Regards

by (63.1k points)

Your opening post linked to the Expressions page of the wiki—not <<display>>'s pseudo-macro syntax—and a "shorthand" in this context usually refers to the <<print>> shorthand, thus my confusion.

Pseudo-macros, which is what that feature of <<display>> is actually called (unsure why the wiki calls it a shorthand), only exists within the Twine 1.4 vanilla story formats.

SugarCube supported a similar feature, widget macros, quite a while before the pseudo-macro syntax for <<display>> was added to the vanilla formats.  Widgets were already in use by SugarCube users so I couldn't drop them, even if I'd wanted to, and I saw no reason to support essentially the same feature twice—especially since widgets are, arguably, superior.

TL;DR: Neither SugarCube's <<include>>, nor its deprecated <<display>>—the latter being simply an alias of the former now—support pseudo-macros because SugarCube has widget macros instead.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...