*Line_break vs [n/]

So, I was looking through the startup.txt code for an official CoG game, and I noticed that for the unordered list that’s on the first page of the game, they used [n/] after each line rather than inserting a *line_break under each line.

Example (from Blood Money):

• Play as male, female, or non-binary; gay, straight, bi, or ace.[n/]
• Embrace your unearthly gifts and build connections with the dead, or banish ghosts to the underworld to protect the living[n/]
• Look for love, or manipulate your friends and allies; Betray those who trust you, or maintain family loyalty no matter the cost[n/]
• Fight a gang war for your family, defect to your rivals, or reject a life of crime[n/]
• Negotiate volatile family relations: resolve squabbles, fall in line as a loyal lieutenant, or sharpen your knife for backstabbing[n/]
• Influence citywide politics: exploit the Mayor’s office for your own ends, or use your connections for a greater cause

This intrigued me, so I tried it out in CSIDE with one of my open files. It works. It doesn’t need to be between lines or part of an unordered (or ordered) list, and it can be used several times in a row, like *line_break can.

I’m wondering, what are the limits of [n/]? Can you forego *line_break entirely in favor of the shorter [n/]? Does anyone else use [n/]?

Sorry if this has been asked about already. I tried searching the forums, but apparently the search function only looked for the letter “n” rather than [n/].


[n/] all the way.
AFAIK, there’s no disadvantage of [n/] over the *line_break except it might be harder to spot in your code.


Why do you think [n/] isn’t included in the ChoiceScript documentation on the COG website or (as far as I can tell) the Wiki? It seems like it’s far better than *line_break, so I’m curious as to why it’s not officially mentioned.

1 Like

I was not aware of this.

I’ll have to try that in my WIP, and thanks for the heads up!


Rachel is still working on the documentation of all the new features implemented thus far, which will also include the multireplace and *implicit_control_flow.

As for the wiki, well…
:kissing: :notes:


I guess being curious is a good thing at times :slight_smile:


To be honest, although [n/] is technically shorter, *line_break seems easier and quicker to type, at least for me.


[n/] is an undocumented feature (ala the purchase code and save code). It’s not actually intended for use by authors (although yea, it’s just a <br/> same as *line_break, they’re effectively duplicate commands, do whatever, it doesn’t matter which one you use).

When it comes to documentation, and general expected use though, ChoiceScript usually prioritizes being human readable and easy to learn over being highly efficient, and a *line_break is (for I believe most people) readily readable and easy to learn, while I doubt many people will know how to read \n on sight.

(Or to put it another way, I’d speculate that Dan got annoyed with writing *line_break a bunch in between bullet points in the game descriptions and made [n/] to just make things simpler.)


He made a forum post about it a while back. IIRC the primary reason for [n/] was to allow for string values to contain line breaks (which is impossible with the line_break command).


Ah, makes sense. Sounds like one of the things I’d argue with Dan about.


Ooh. That means it could also be used inside @{multireplace}.