PDA

View Full Version : make a new line / break in the "announcement text"



Dragon_of_old
September 11th, 2016, 05:07
I'm trying a write a ruleset for a game I want to run, where the chat window is section starts it has the name of the RPG and who build it and other informants.

so this is how I want it to look:

GAME NAME the RPG, by random
Ruleset by: John Doe


but what I am getting is this:

GAME NAME the RPG, by random <br /> Ruleset
by: John Doe

Oberoten
September 11th, 2016, 05:26
Use /r instead. :)

- Obe

damned
September 11th, 2016, 06:18
I use /r/n but possibly just /r will work too...

Dragon_of_old
September 12th, 2016, 00:04
Thank you for help,

I tried both of your's suggestions, but they still didn't work, but it did help me to find what I needed.

word\rword <- I discovered that \r with no space in between the words give me a new line.

Thanks again for your help.

Talyn
September 12th, 2016, 15:05
The NAME and DESCRIPTION tags both (usually) use the 'string' format so HTML tags are not executed. I've had zero success getting the /r or \r (whichever it is) to work but maybe I just need to try with no spaces. I usually use the ASCII &#_13; (no _ because sigh forum parsing software) element in my text, and it also works in the AUTHOR string so I'd imagine it works in the others.

Zacchaeus
September 12th, 2016, 15:20
The \r only works in areas which don't accept formatted text. So if you use \r in a story entry for example it will simply print out a \r in the text rather than doing anything. The \r is really only useful in the front page of an NPC where you must separate the different lines of the spellcasting action in 5e. It can also be used to insert paragraphs into long text blocks in the same section.
I can't think of any other particular area where it might be helpful and I'm not sure about CORE. As Talyn says editing the XML directly by forcing a line break is useful - provided you don't expect to ever have to reparse that particular bit again. :)

Trenloe
September 12th, 2016, 15:31
Note: the original question was in regards to the extension/ruleset announcement text sent to the chat window when FG loads. I've used \r extensively in this respect to do a new line in the chat window text. The same can be said for the "text" entry when constructing message data to send to the chat window: https://www.fantasygrounds.com/refdoc/Comm.xcp

Zacchaeus
September 12th, 2016, 15:42
In view of Trenloe's ever vigilance; please ignore my post above :)

Trenloe
September 12th, 2016, 16:49
In view of Trenloe's ever vigilance; please ignore my post above :)

It was good info. Just wanted to ensure that the OP was clear that \r was the way to go for their question.

Dragon_of_old
September 12th, 2016, 21:19
I will keep that mind thank you all for you.

damned
September 13th, 2016, 13:40
Hers an example someone prepared earlier...

<announcement text="Individual PC XP Drag extension by Trenloe.\rAllows GM to assign XP to an individual PC in the Party Sheet\rCopyright 2016 Smiteworks USA, LLC." font="emotefont" />

Dragon_of_old
September 13th, 2016, 18:18
Thank you.