How do I add cr/lf to a string?

How do I add cr/lf to a string? Does NWScript support escape codes or is there another method maybe using the hex equivalents of the ASCII codes for [carriage return] and [line feed]? Otherwise when I use SetDescription() everything is just going to be bunched up. Tried the lexicon (both on and off line) and it is no help for this.



Thanks. So it does support escape characters then.


Lexicon? Are you asking about in nwn1 or nwn2?

i think the escapes to choose from are limited - in fact right now the only one i can think of is newline.

i recall trying \t (tab) but it didn’t work fer me

btw, if you’re searching/manipulating a string for/with an escape… its length is only 1 char (the escape, not the string…)

1 Like


I am trying to manipulate journal entries through scripts and custom tokens. I would like to place a couple of line breaks between entries, so I am putting two consecutive \n\n at the start of each string. For example: “\n\n This is my second entry”. But the \n\n prints in front of the text instead of converting to new lines. So I get something like

This is my first entry.\n\n This is my second entry.

Any help is appreciated!

I see you have posted this under both NWN1 and NWN2. So which game are you working with?