Just wanted to share with fellow TADS programmers the power of string templates, if you’re not using them already.
When I reacquainted myself with the language a few months ago, I assumed EventLists and other programmatic tricks were necessary to perform such common tasks as random messages or describing a room in an interesting way on first entering, and more matter-of-factly thereafter.
Then I squinted and studied the section of the TADS Language Manual on string templates closer: String Literals
This seriously changed my life. Rather than hand-wiring a lot of special-case code, I could let the compiler do the heavy lifting.
One problem I had is how the documentation listed examples, which embeds the templates in paragraphs of text. I’m using a structured approach and it’s working well:
hallway: Room 'Hallway' """ You stand in an ornate hallway. <<one of>> You're surprised to see so much marble and gild in an ascetic's home. <<or>> Marble and gild surrounds you. <<stopping>> "" ;