best practices for line spacing?

My ParserComp entry has a ton of different rules that print things every turn, some of which might or might not print every turn–and the amount of space between them is very variable. Sometimes there’s a nice single space, sometimes two or three, sometimes none. And it’s a bit hard to figure out exactly where the spaces are coming from, because if I turn on rule tracing it prints stuff… and also some of the blank lines seem to be coming after rules that I didn’t think print anything.

Anyway, I was wondering if anyone has some ideas for the best way to get line spacing under control? Should I try replacing my line breaks with conditional paragraph breaks?

Have a look through this topic:

https://intfiction.org/t/rules-and-line-breaks/4450/1

The reason I say ‘have a look’ is that they discuss the mechanism (broadly, printing messages from different rulebooks can add line breaks). One solution you’ll see I took from it is from climbingstars’s code to ‘process’ a rulebook without getting the usual extra linebreak in the process.

-Wade

OK, but the problem is that I’m not entirely sure where the extra line breaks come from. To give an example, here’s some sample output:

which makes it seem as though the “Before reading a command” rules are producing a line break. But the only Before reading a command rule I have is this:

Before reading a command: now the disambiguation status is standard.

which doesn’t seem like it should produce a line break. But that makes me think that one of the things that happens without showing up on rule tracing is making the line break happen, and that in turn makes me think that if there were some tip like “change your line breaks to conditional paragraph breaks” that would be easier than trying to figure out how to apply the things in that thread.

…oh, if you’re wondering why the “First every turn” rule applies on an out of world action, due to some behavior of an extension I’m using I tied the every turn rules to printing the command prompt, with a condition that stops them from running if we just performed an action out of world or had a command which was nothing but parser errors. Which is the sort of thing that might make it hard for me to tell where the line breaks are coming from.

Following any rules in a foreign rulebook can cause a linebreak. (It doesn’t always; it depends on a bunch of I6 variables and flags.) This is built into the rulebook system, it’s not dependent on what the rule does.

Ugh. Well, maybe I’ll see if I can wrap some stuff in that “process rulebook” business.

Would it be enough to push/pull say__p and say__pc?

…dunno? I don’t really speak I6.