Creating a pseudo-blank row or avoiding the need for one

In a scene, the player will get some new text every turn, with a possible “game effect” activity on that same turn that may change, for example, a description to acknowledge the recent new information from the text. Here is the setup of the system:

Every turn when (scene) is happening: repeat through Table of (scene) Events: if there is a statement entry: say "[statement entry][line break]"; if there is a game effect entry: carry out the game effect entry activity; blank out the whole row; break.

And the Table of (scene) Events will have a “statement” column for text, and a “game effect” column for activities.

The problem for me is that I need for there to be a gap in the events where nothing happens, neither statement nor game effect. However, if I make an actual blank row, the above code will not acknowledge the gap and go on to the next row for that turn.

My solution is to create a “null” activity which does nothing, but can be put into the game effect column as a placeholder like this:

Table of (scene) Events statement game effect "(statement 1)" effect1 "(statement 2)" -- -- null "(statement 3)" effect2

However, this leaves the question of how I would accomplish a gap in a coding situation where there was no game effect column, like the “Day One” Documentation Example. Since a statement of “” still causes an odd extra empty line in the game, I can’t use it as a placeholder. Instead, I could make a new “placeholder” row which has values irrelevant to the game in its column, like this:

Table of (scene) Events statement placeholder "(statement 1)" -- "(statement 2)" -- -- true "(statement 3)" --

The “true” is merely a random value so the row isn’t blank.

Are these the ideal ways of handling these issues? They work, but seem awkward.

I would just use a [one of]…[stopping] substitution in that case, which respects blank “entries”. (I believe it’s also more memory-efficient, as it creates a static routine instead of a malleable table.)

One other thing to note: it may not be necessary to use activities in a case like this. You can also put rules or even phrases into tables.

Do you mean something like this?

Every turn when (scene) is happening: say "[one of](statement 1)[effect1][or](statement 2)[or][or](statement 3)[effect2][or][stopping]"

And have the game effects be defined by “To say” instead? The problem is, at least my naive attempt here keeps the odd extra line in the game. How can that issue be handled?

Also, thanks for the tip about activities. I thought phrases didn’t work because awhile back I tried putting one into a table but got an error message that I guess I must have misinterpreted as saying that you can only put activities into tables like that.

You need to specify the kind of phrase in the column header (what parameters it takes, what it returns), and the syntax for that is a little weird if you aren’t used to it, but it’s simpler than it seems to get it working.

Well, it seems to me like the underlying issue here is that you’ve got the line break hard-coded after you print the statement entry. One way to take care of that would be to move the line breaks into the non-blank statement entries (you’d want to define something like “lb” as an abbreviation for line break to save you going mad from typing), but that could easily lead to bugs (from forgetting to type “[lb]” at the end if every single actual statement entry ends in a line break.

Another thing would be to check if the statement entry is “” and only try to print it and the line break if it isn’t. That might even work with the “one of…” solution depending on which version you’re using and how bug 1370 got resolved.