PDA

View Full Version : Multiple Paragraphs in one text box?



WansumBeats
August 3rd, 2015, 17:46
Havent seen it done, is it possible cause i cant seem to get it to work?

multiple paragraphs just seem to create multiple chat windows

Zacchaeus
August 3rd, 2015, 17:52
You can sort of do it by entering multiple spaces but a carriage return starts a new paragraph and the various paragraph options work on paragraphs, so the limit is one per chat frame.

Nickademus
August 3rd, 2015, 18:23
Try either Shift+Carriage Return to see if it keeps the same paragraph entry, use '\n' to force a carriage return when the text is added to the chat window, or open the module/campaign db.xml and manually add the '\n' to the text saved in the 'encounter' entry that matches the story entry (stories are called encounters in the database).

I don't think any of these will work, and if not I don't think it can be done, but it's worth a try.

kylania
August 3rd, 2015, 18:31
With 5E ruleset at least you can work around that via Par5e using #zfs;, #zft; and #zfe;.

https://i.imgur.com/qsluOns.png

I imagine that you can do the same by editing the XML of the story as well.

Nickademus
August 3rd, 2015, 21:27
Hmm, so the FG story frame recognizes a line break. Good. Now to just see how to get it into the text. What does the db.xml have for that story entries when PAR5E is done with it?

kylania
August 3rd, 2015, 21:39
<encounter>
<category name="My Category" baseicon="2" decalicon="1">
<enc_overview>
<locked type="number">1</locked>
<name type="string">Overview</name>
<text type="formattedtext"><h>This is my header.</h><p>An Adventure for Character Levels 1-3.</p><p>This is some story text to read to the players:</p><frame>This is a long paragraph setting the scene of the first part of your adventure. You'll describe things to the players here and they'll ooh and ahh in wonderment at your great imagination. Things will still seem happy at this point.&#xD;&#xD;Then, however, they'll get to this paragraph and things won't be as safe as they'd hoped. Here you'll drop hints about the danger to come. Tensions will rise.&#xD;&#xD;Now, with this third paragraph within a single chat frame, it will become obvious you are a wizard, Harry.</frame><h>This is a header</h><p>And this is just text.</p></text>
</enc_overview>
</category>
</encounter>

damned
August 4th, 2015, 05:09
So its just <p> and </p> tags.... if you are happy to post edit the XML files that should be easy.

Trenloe
August 4th, 2015, 05:31
It's the &#xD; entries within the chat <frame> tags, not the <p> tags, which only work outside of the chat frame.

damned
August 4th, 2015, 05:32
It's the
entries within the chat <frame> tags, not the <p> tags, which only work outside of the chat frame.

Right you are... didnt read it very thoroughly.

Nickademus
August 4th, 2015, 17:44
Very good! &#xD; it is!
+1 and added to my (small) list of tricks.

Edit: I believe & #13; works as well, as per this list (https://la.remifa.so/unicode/latin1.html). (Had to separate the & as it turned into a carriage return upon editing, lol.)

viresanimi
August 4th, 2015, 18:44
This ought to be doable inside FG by using shift-return or something. Personally I am not a fan of any solution that says: "Well... if you don't mind to change the code...".

Vires Animi

damned
November 2nd, 2015, 10:12
Im trying to get this carriage return working using Par5e for CoreRPG without much success...

Zacchaeus
November 2nd, 2015, 11:56
Im trying to get this carriage return working using Par5e for CoreRPG without much success...

I don't think the public version of Par5e handles this kind of thing (If I understand what you are trying to do that is).

damned
November 2nd, 2015, 12:00
I don't think the public version of Par5e handles this kind of thing (If I understand what you are trying to do that is).

yerp... thats ok... working on another option - thanks Z.

Trenloe
November 2nd, 2015, 14:45
I don't think the public version of Par5e handles this kind of thing (If I understand what you are trying to do that is).
Kylania's info in post #4 suggests you can - at least in the 5E ruleset portion of PAR5E. Perhaps the CoreRPG ruleset module generation code within PAR5E doesn't have it. Or damned's doing it wrong... ;)

damned
November 3rd, 2015, 02:54
Kylania's info in post #4 suggests you can - at least in the 5E ruleset portion of PAR5E. Perhaps the CoreRPG ruleset module generation code within PAR5E doesn't have it. Or damned's doing it wrong... ;)

I do believe Ive been trying it right... there are actually a number of things that dont work in the CoreRPG output - it wont work at all without additional include files in the ruleset...

ravenshroud
July 4th, 2017, 15:22
Could you explain the solution to those that don't read programmer geek?

Zacchaeus
July 4th, 2017, 18:17
Could you explain the solution to those that don't read programmer geek?

What is it you don't understand?

LordEntrails
July 5th, 2017, 05:50
Could you explain the solution to those that don't read programmer geek?
I'm short you can't do this using the regular FG user interface. If you want to edit the xml files then the above info helps you do that, but if not them you just have to make multiple paragraphs.

Erin Righ
July 6th, 2017, 01:00
I'm short ...

Freudian slip there, Midget?

Nalfien
March 1st, 2018, 01:16
The lack of this ability in the program is just silly. Embarrassing.

Trenloe
March 1st, 2018, 01:37
The lack of this ability in the program is just silly. Embarrassing.
Silly? Embarrassing? To whom?

There's a technical reason that it's not easy to change this functionality, and it is such a low level priority it is not being allowed to divert valuable development resource from more important requirements. Especially as there is a work around for those who really feel the need for this - detailed here: https://www.fantasygrounds.com/forums/showthread.php?25455-Multiple-Paragraphs-in-one-text-box&p=224831&viewfull=1#post224831

You can help show the devs how important you feel this is by voting in the wishlist here: https://fg2app.idea.informer.com/proj/?ia=62869

Three of Swords
March 1st, 2018, 17:49
Voted. It does seem odd that a simple Shift-Return doesn't create a line-break.

Minty23185Fresh
June 30th, 2018, 18:15
Insane! I found this thread on my first search attempt. That's never happened before. Just got lucky with my search string, I guess. Anyway...

Using the techniques related in the above posts I can get paragraph separations in my chat frame. A couple observations:
1) when I put &#xD;, as suggested by kylania in the db.xml I get my desired paragraph breaks (entered back-to-back, I get a blank line in between)
2) if I close FG down (it might take a couple times) &#xD; is translated by FG's xml reader/writer to & #13; as suggested by Nickademus.

Now. Is there a series of keystrokes that one might attempt that would allow inserting the magical string sequence using the FG interface? I.e. are there escape characters that one can use when entering text into the Story dialog that would prevent FG's xml writer from translating this &#xD; to this & 38 &#xD;? Maybe backslashes? Maybe a double ampersands? I've tried a variety of incantations, without success.
(sorry about the extra spaces in some of the strings - the internet page parser strips stuff out.)

Zacchaeus
June 30th, 2018, 21:14
Nope you need to do it in the XML.

Minty23185Fresh
July 1st, 2018, 01:23
Aargh. Thanks Zacchaeus.

(Looks like a tiny extension is calling my name. If I only had the time.)

Minty23185Fresh
July 2nd, 2018, 21:32
&#xD; is pretty darned handy!

I was entering copyright/publishing information into the adventure I am migrating. Splitting addresses up using carriage return (i.e. new paragraphs) makes them look silly, almost ugly. So I took the lesson learned above for chat frames (<frame>…</frame> in the db.xml) and applied it to the paragraphs (<p>…</p> in the xml).

One can use the &#xD; and not have the blank line in between broken lines of text.
So now the address information looks much more palatable, in my mind at least.
23873

LordEntrails
July 2nd, 2018, 21:35
&#xD; is pretty darned handy!

I was entering copyright/publishing information into the adventure I am migrating. Splitting addresses up using carriage return (i.e. new paragraphs) makes them look silly, almost ugly. So I took the lesson learned above for chat frames (<frame>…</frame> in the db.xml) and applied it to the paragraphs (<p>…</p> in the xml).

One can use the &#xD; and not have the blank line in between broken lines of text.
So now the address information looks much more palatable, in my mind at least.
23873
I always assumed I used shift-enter to keep the lines from breaking in FG. Not sure now that it works... (hmm, going to have to go look!)

Minty23185Fresh
July 2nd, 2018, 21:56
Shift Enter..
I wasn’t aware of that. It might be true for paragraphs and I’m just late to the table.

I hope it’s true for the paragraphs. Maybe I can springboard off that in the code to make it work the same way in chat frames.

Zacchaeus
July 2nd, 2018, 22:06
To make a paragraph of text without lines between then add "& #10;" at the end of each sentence that you want to output (this is in the XML). If you want multiple paragraphs in a speech bubble include "& #13;& #13;" where you want the break to be.


<p><b>Fantasy Grounds Module& #10;Original Module:</b> October 2015 Zeph Ponos<b>& #10;Update:</b> October 2017 Zacchaeus<i>& #10;©2016 Smiteworks USA, LLC.</i></p>


He then set out ahead of you on horse, along with a warrior escort named Sildar Hallwinter, claiming he needed to arrive early to "take care of business.& #13;& #13;You've spent the last few days following the High Road south from Neverwinter, and you've just recently veered east along the Triboar Trail.& #13;& #13;You've encountered

Note: No spaces between the & and the #

LordEntrails
July 2nd, 2018, 23:58
Shift Enter..
I wasn’t aware of that. It might be true for paragraphs and I’m just late to the table.

I hope it’s true for the paragraphs. Maybe I can springboard off that in the code to make it work the same way in chat frames.
shift-enter is a line feed. It works in other programs like Word etc.

Just tested, does not work in FG though. The xml shows all <p> & </p>

Minty23185Fresh
July 3rd, 2018, 02:13
shift-enter... Just tested, does not work in FG...

Now that I think about this, it was a win-win or no-win-no-win situation...

If it had worked, I could springboard an extension off of the functionality. But it doesn’t work, so there’s even more need for the extension. :)

(EDIT: oops. And btw, LordEntrails thanks for checking!)

Minty23185Fresh
May 2nd, 2019, 02:45
… so there’s even more need for the extension ...
I have become really tired of closing down Fantasy Grounds so that I can hand enter the & #13; as necessary to get the line breaks in the chat paragraph text, so I started looking at writing "the small extension".

It is my opinion that this can not be done. The <formattedtextcontrol> has almost all of its code embedded as builtin, unexposed properties and functions.

Minty23185Fresh
May 3rd, 2019, 17:33
I have become really tired of closing down Fantasy Grounds so that I can hand enter the & #13; as necessary to get the line breaks in the chat paragraph text, so I started looking at writing "the small extension"... It is my opinion that this can not be done...
So I have come up with a work-around of sorts. As I am copying text from the source document (.pdf file) and pasting it into Story windows in Fantasy Grounds, I also paste extended ASCII symbols for "new paragraph" into the chat frames, as desired. Then when it is convenient (and there are several "new paragraph"s embedded in the Story) I simply do one global replace in the db.xml file.

Here's a screen shot:
The left panel is the .pdf. The center panel is a Story dialog with the copy-and-pasted text, in a chat frame, and the inserted "new paragraph" ASCII code. The right panel shows the results after the global substitution.
27258

[EDIT] Oops. The really astute reader will recognize that I actually put the ASCII code in the wrong place. Aargh!

paulyhedral
April 21st, 2020, 21:16
For the record (in case anyone else stumbles upon this as I did), entering a backslash ("\") followed by "n" will create a paragraph break in the text display without actually starting what FG thinks of as a paragraph, so a chat text box will continue as intended.

Dax Doomslayer
April 23rd, 2020, 19:06
For the record (in case anyone else stumbles upon this as I did), entering a backslash ("\") followed by "n" will create a paragraph break in the text display without actually starting what FG thinks of as a paragraph, so a chat text box will continue as intended.

Thanks pualyhedral! This is good to know and it drove me crazy if I had to do multiple chat bubbles!!

Minty23185Fresh
April 24th, 2020, 22:08
For the record (in case anyone else stumbles upon this as I did), entering a backslash ("\") followed by "n" will create a paragraph break in the text display without actually starting what FG thinks of as a paragraph, so a chat text box will continue as intended.
Entering it where? In the Story dialog? When editing the db.xml file? I tried both without success.
34321

Trenloe
April 24th, 2020, 22:41
Entering it where? In the Story dialog? When editing the db.xml file? I tried both without success.
34321
Yeah, the only way I know to do the break in a chat frame is using &#xD; in the XML - as previously discussed.

\n is a line break in the XML for a string control, not within a formatted text control.

Klandare
April 24th, 2020, 22:54
Yeah, the only way I know to do the break in a chat frame is using
in the XML - as previously discussed.

\n is a line break in the XML for a string control, not within a formatted text control.

I am currently doing this right now in some modules I am inputting into the system. I found that using & # 1 3 ; (remove all of the spaces in there)
is the way that make it work. I do that as I am doing the input itself (so instead of a carriage return in the chat box for the next paragraph, I put & # 1 3 ; (remove all of the spaces in there)
and then make it all a chat box). When I save the module, exit FG and reopen the module in FG; now that chat box is 1 and show the carriage return there.

editing because the coding changing to carraige returns :)

Minty23185Fresh
April 25th, 2020, 00:58
You can also use the & # x D; or & # 13 ; sequence with & # 149 ; to get a bullet point list in the Chat paragraphs.

34329

Klandare
April 25th, 2020, 01:09
You can also use the & # x D; or & # 13 ; sequence with & # 149 ; to get a bullet point list in the Chat paragraphs.

34329

Oh so nice! that is one I had been trying to get done.

Any easy way using codes like this to make bold/italic/etc inside the chat window?

Minty23185Fresh
April 25th, 2020, 01:14
Any easy way using codes like this to make bold/italic/etc inside the chat window?
I can’t recall. I’ll look. (On iPhone right now.)
But I think you can just Select and ctrl-I, crtl-U or ctrl-B. But maybe not....

Minty23185Fresh
April 25th, 2020, 01:17
I can’t recall. I’ll look. (On iPhone right now.)
But I think you can just Select and ctrl-I, crtl-U or ctrl-B. But maybe not....

Nope! Wrong.... I guess not

Klandare
April 25th, 2020, 03:10
Nope! Wrong.... I guess not

Yeah, they don't work INSIDE the chat box. Work great outside it.

Trenloe
April 25th, 2020, 09:37
You can also use the & # x D; or & # 13 ; sequence with & # 149 ; to get a bullet point list in the Chat paragraphs.

34329
Cool.

What does a spoken bullet point sound like? ;-)

LordEntrails
April 26th, 2020, 00:08
You can also use the & # x D; or & # 13 ; sequence with & # 149 ; to get a bullet point list in the Chat paragraphs.

34329

Do these work in FGU or just FGC?

Minty23185Fresh
April 26th, 2020, 00:36
Do these work in FGU or just FGC?

Haven’t a clue about their use in FGU. I’m not into it yet. Bought my license, but at this point just to try to make my extensions compatible.

paulyhedral
April 29th, 2020, 16:27
Entering it where? In the Story dialog? When editing the db.xml file? I tried both without success.
34321

I was entering it in the text entry field. It gets a little wonky if you enter more than one of them and then try to move the cursor around, because it's actually two characters, but it gets interpreted as one when displayed, so the cursor positioning after it looks like it's in the wrong place when it actually isn't! Did you enter the backslash twice, perhaps?

Minty23185Fresh
April 29th, 2020, 18:16
I was entering it in the text entry field. It gets a little wonky if you enter more than one of them and then try to move the cursor around, because it's actually two characters, but it gets interpreted as one when displayed, so the cursor positioning after it looks like it's in the wrong place when it actually isn't! Did you enter the backslash twice, perhaps?
Nope. Only once.
If you wouldn’t mind, many of us would love some pictures so that we can see how to duplicate what you’re saying you can do.

paulyhedral
April 29th, 2020, 21:32
Nope. Only once.
If you wouldn’t mind, many of us would love some pictures so that we can see how to duplicate what you’re saying you can do.

I took a short video of entering text into the chat box using the "\n" sequence to break lines:
https://youtu.be/iEEI2e8oZ6A
You can't see the "n" being entered because it gets immediately converted to the line break. Hope this helps.

Three of Swords
April 30th, 2020, 00:45
I took a short video of entering text into the chat box using the "\n" sequence to break lines:
https://youtu.be/iEEI2e8oZ6A
You can't see the "n" being entered because it gets immediately converted to the line break. Hope this helps.

I'm with Minty. I've tried this numerous times and it does not work for me. Thank you for posting the video, because I was beginning to doubt my ability to read or type or something. But now I see that I'm doing exactly what you are and it does not create a line break for some reason.

Moon Wizard
April 30th, 2020, 01:15
Just an FYI, this is not a supported behavior. The formatted text value uses line breaks internally to denote text sections; and trying to "insert" line breaks like this may cause your modules to work in unexpected ways.

Regards,
JPG

Klandare
April 30th, 2020, 01:34
Just an FYI, this is not a supported behavior. The formatted text value uses line breaks internally to denote text sections; and trying to "insert" line breaks like this may cause your modules to work in unexpected ways.

Regards,
JPG

Is it supported to utilize the & # 13; (without the 2 spaces) then? Since that also works well for getting multiple paragraphs inside a chat box.

Moon Wizard
April 30th, 2020, 01:56
Line breaks within chat boxes are not officially supported; and have a good chance not to work correctly in all cases. You are using at your own risk.

The expected way to do this is to make multiple chat box paragraphs that the GM can click each one.

Regards,
JPG

Trenloe
April 30th, 2020, 07:18
I took a short video of entering text into the chat box using the "\n" sequence to break lines:
https://youtu.be/iEEI2e8oZ6A
You can't see the "n" being entered because it gets immediately converted to the line break. Hope this helps.
Thanks for the video. That’s not standard behavior. What ruleset and extensions are you running?

paulyhedral
April 30th, 2020, 16:28
Thanks for the video. That’s not standard behavior. What ruleset and extensions are you running?

I'm using the Genesys ruleset (https://www.fantasygrounds.com/forums/showthread.php?53302-Genesys-(FFG-RPG)-work-in-progress) with the "Font - Montserrat", "Moon Tracker", "Set Currencies", and "Window Saver X" extensions. In case it matters, I'm also running the Test channel build. This also works with the D&D 5e ruleset with the same extensions plus a couple others.