Is there a limit on text substitutions in one sentence?

I think I may have found a bug, which first manifested in FAIR but I couldn’t pin down why.

Usually there’s an automatic LOOK when the game starts, but I noticed that under certain circumstances, the game would start with just a command prompt.

I was creating a personal extension, and noticed that the same behavior exhibited itself when the first room description had (I think) 43 substitutions: the game starts with a bare command prompt, but typing LOOK then works as normal.

If I use cycling text, where the first iteration is a simpler sentence ("[one of]Type LOOK.[or][giant sentence with multiple substitutions].[stopping] - it works as normal.

I’m pasting the extension code in case anyone can replicate it.

[rant=Collapsed for space][code]Text Abbreviations by Hanon Ondricek begins here.

“Provides shorter text formatting substitutions.”

To say i: say “[italic type]”.
To say b: say “[bold type]”.
to say f: say “[fixed letter spacing]”.
to say v: say “[variable letter spacing]”.
to say p: say “[paragraph break]”.
to say l: say “[line break]”.
to say /: say “[roman type]”.
to say lb: say “[bracket]”.
to say rb: say “[close bracket]”.

Text Abbreviations ends here.

---- DOCUMENTATION ----

This tiny bit of code adds shortcuts for common text formatting to save typing out common formatting such as [bracket]paragraph break[close bracket] hundreds of times. The code goes within brackets inside quotation marks as a text substitution.

i is italic type.
b is bold type.
f is fixed letter spacing. (usually will display as Courier, or the preferred monospace font in an interpreter)
v is variable letter spacing. (normal variable with font, the default)
p is paragraph break.
l is line break.
/ is roman type (cancel formatting - standard text display
lb is left bracket (bracket)- “[bracket]”
rb is right bracket (close bracket) - “[close bracket]”

*: “Formatting Test”

Include Text Abbreviations by Hanon Ondricek

Test Room is a room. "You are in the [b]Test Room[/]. It is [i]quite[/] deserted in here except for a screen reading [f]THIS ROOM IS UNIMPLEMENTED[l]-Do not even try to examine this screen-[/].[p][lb]You feel as if you are being [i]watched[/][rb]...[p]Here are your literal formatting codes, because I was too lazy to type 'bracket/close bracket' nine times in a row (yes, I know, [i]copy/paste[/]):[p][lb]i[rb][l][lb]b[rb][l][lb]f[rb][l][lb]v[rb][l][lb]p[rb][l][lb]l[rb][l][lb]/[rb][l][lb]lb[rb][l][lb]rb[rb][l]"

Test me with "look". 

[/code][/rant]

After installing the test extension (attached) in the Inform 7 IDE for Windows, I could reproduce the symptom of no room description being printed at the start by partly duplicating the room description - increasing the number of substitutions.

[spoiler][code]“Text Abbrev test”

include Text Abbreviations by Hanon Ondricek.

Test Room is a room. "You are in the [b]Test Room[/]. It is [i]quite[/] deserted in here except for a screen reading [f]THIS ROOM IS UNIMPLEMENTED[l]-Do not even try to examine this screen-[/].[p][lb]You feel as if you are being [i]watched[/][rb]...[p]Here are your literal formatting codes, because I was too lazy to type 'bracket/close bracket' nine times in a row (yes, I know, [i]copy/paste[/]):[p][lb]i[rb][l][lb]b[rb][l][lb]f[rb][l][lb]v[rb][l][lb]p[rb][l][lb]l[rb][l][lb]/[rb][l][lb]lb[rb][l][lb]rb[rb][l]

You are in the [b]Test Room[/]. It is [i]quite[/] deserted in here except for a screen reading [f]THIS ROOM IS UNIMPLEMENTED[l]-Do not even try to examine this screen-[/].[p][lb]You feel as if you are being [i]watched[/][rb]…[p]Here are your literal formatting codes, because I was too lazy to type ‘bracket/close bracket’ nine times in a row (yes, I know, [i]copy/paste[/]):[p][lb]i[rb][l][lb]b[rb][l][lb]f[rb][l][lb]v[rb][l][lb]p"

Test me with "look". [/code][/spoiler]

I used Inform 7 version 6M62.

>version Text Abbrev test An Interactive Fiction Release 1 / Serial number 161224 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD Identification number: //37D0F631-14FC-46D2-9A5D-44A2FE58BD76// Standard interpreter 1.1 (6F) / Library serial number 080126 Standard Rules version 3/120430 by Graham Nelson Text Abbreviations by Hanon Ondricek
Text Abbreviations.i7x (1.72 KB)

I’m not seeing the problem. Tested Mac IDE, Mac Gargoyle, Lectrote.

Hmn. I wonder if it has to do with one of the settings within Inform that can be increased when it’s exceeded and normally gives a notification, but is not showing up since the game didn’t crash.

The fact that HZ reproduced it and Zarf couldn’t seems to suggest it’s machine spec based, perhaps?

Doesn’t look like that to me. The generated I6 code is not unusual.

Looks more like a Windows display bug. Can you test the same game file in Gargoyle?

And strangely enough, I tried this on a Mac and it had no problem. I managed to copy the text seven times inside quotes before Inform stopped and said I had too many characters inside the quotes.

And it worked fine in Gargoyle.

I’ll have to go back to the PC later and see if I can still reproduce it.

I checked out HZ’s code in the IDE on my (Windows) machine, and at first I thought I wasn’t getting a room description. But appearances can be deceptive. I noticed the vertical scroll bar was active: it turned out the IDE had printed a room description, but I had to scroll up to see it.

This happened because HZ’s longer room description is more than a screen’s worth of text, and the IDE interpreter apparently handles that poorly for the start of play “look”. (I can achieve the same effect with a wall of text with no substitutions at all.)

:astonished: Oeeehhhhhherrrrr.

Perhaps it’s then due to my font-size being cranked up in the IDE!

And I’m picturing Zarf’s mission control room probably has a house sized screen!

Again, I think this is a Windows-specific problem.