Thread: Chat output
-
April 30th, 2023, 10:14 #1
Chat output
Is it possible to have output in the chat so that it is more elaborate?
For example if I roll initiative in D&D I get this. I can make the writing more detailed, but it remains
a text message and I would like to be able to have a more graphically controlled output instead
Immagine.png
-
April 30th, 2023, 10:36 #2
The format of the chat message structure is documented in the Comm package in the Wiki here: https://fantasygroundsunity.atlassia...996644567/Comm
The most you can do is change the icon, change the font/colour for the whole text, add links and assign a frame (edge/background graphics).
To change the frame you need to use the "mode" which needs to be defined in the XML - <chatsettings> in CoreRPG gameelements.xml. A good example of using custom frames is damned's "Sharing is Caring" extension: https://forge.fantasygrounds.com/shop/items/549/viewPrivate Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
April 30th, 2023, 12:07 #3
-
April 30th, 2023, 13:48 #4Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
April 30th, 2023, 13:52 #5
Also, there's a "Forum thread" link in the Forge page. Follow that link and the first post of the thread has an example for FGC - whereas it's for FGC, a lot of the code can be used as an example, but make sure you check CoreRPG code for the latest implementations.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
April 30th, 2023, 16:03 #6
Ty Trenloe
I went ahead with my tests on how to format the chat output and built a simple function to display the results of the dice with colors.
Here is the function.
Code:function onButtonPress() local rMessage = { sender = "GM", text = "Final result", secret = false, font = "systemfont", diemodifier = 0, dice = { { result = 10, type = "r10" }, { result = 10, type = "r10" }, { result = 4, type = "d10" }, { result = 10, type = "r10" }, } } Comm.deliverChatMessage(rMessage); end
As you can see I entered 2 red results first, then a normal one, and finally a red result again.
Something is wrong with the writing above the dice, it doesn't group by dice type.
I think I need to sort the table, right?
There is a way to customize that writing. For example putting 4d10, regardless of color?
I then decided to make a new test by changing the type of die to 100.
Also in this case the order is not correct and I think I have to sort the table, but the upper writing is worse than the p
revious one. It seems to me there is a bug. Am I wrong?
This is the 4d100 output Immagine_d100.png
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks