PDA

View Full Version : Colorful Language



MeAndUnique
June 9th, 2021, 22:33
Current Version: 1.0.1

Colorful Language is an extension for any CoreRPG-based ruleset that adds the ability to configure chat fonts, both for general messages as well as individually for each character and NPC. General font configuration may be accessed by the GM from the chat window radial menu. Character fonts may be configured from the radial menu of the chat icon on the character/NPC sheet. Pairs nicely with Sir Motte's Magnificent Darkness Theme (https://www.fantasygrounds.com/forums/showthread.php?58034-Theme-5E-SirMottes-Magnificent-Darkness) (support presently included in the theme's dev version).

Check it out on The Forge (https://forge.fantasygrounds.com/shop/items/21/view) or at GitHub (https://github.com/MeAndUnique/ColorfulLanguage) and please let me know if you have any comments or concerns.
Hope it helps!

bayne7400
June 9th, 2021, 23:49
Very nice!

nephranka
June 10th, 2021, 23:19
I like the options. Not sure I am seeing much difference in brown and black but it is most like on my side. It would be nice to have a black, bold as well as the black, bold, italic but otherwise easy yo use. Thanks!

MeAndUnique
June 11th, 2021, 17:13
The provided font selection is from the ones that are built in to Fantasy Grounds for chat use. E.g. the "Black, Bold Italic" option is the one defined as "chatgmfont" in CoreRPG. However, it is relatively easy to add new fonts for selection. The following, added as an extension, will make "Black, Bold" available:

<?xml version="1.0" encoding="UTF-8"?>
<root release="3.0" version="3">
<properties>
<name>Extra Font Example</name>
<loadorder>200</loadorder>
</properties>

<base>
<!-- New font definition, note the name.
It is also fine to use a font already defined in the ruleset (or other extensions), skip this and use the font name below. -->
<font name="blackboldfont">
<fgffile name="graphics/fonts/bold-10.fgf" />
<ttf file="graphics/fonts/Noto_Sans/NotoSans-Bold.ttf" name="Noto Sans Bold" size="16" />
<color value="#000000" />
</font>

<!-- This text is what you wish to see in the font selection drop down. -->
<string name="blackboldfontname">Black, Bold</string>

<script name="ExtraFonts">
function onInit()
if ChatManagerCL then
-- This adds a new option in the drop down for Colorful Language's font selection.
-- Interface.getString("blackboldfontname") grabs the text defined in the above string.
-- = "blackboldfont" associates the defined text with the desired font.
ChatManagerCL.availableFontNames[Interface.getString("blackboldfontname")] = "blackboldfont";
end
end
</script>
</base>
</root>

nephranka
June 11th, 2021, 18:24
The provided font selection is from the ones that are built in to Fantasy Grounds for chat use. E.g. the "Black, Bold Italic" option is the one defined as "chatgmfont" in CoreRPG. However, it is relatively easy to add new fonts for selection. The following, added as an extension, will make "Black, Bold" available:

<?xml version="1.0" encoding="UTF-8"?>
<root release="3.0" version="3">
<properties>
<name>Extra Font Example</name>
<loadorder>200</loadorder>
</properties>

<base>
<!-- New font definition, note the name.
It is also fine to use a font already defined in the ruleset (or other extensions), skip this and use the font name below. -->
<font name="blackboldfont">
<fgffile name="graphics/fonts/bold-10.fgf" />
<ttf file="graphics/fonts/Noto_Sans/NotoSans-Bold.ttf" name="Noto Sans Bold" size="16" />
<color value="#000000" />
</font>

<!-- This text is what you wish to see in the font selection drop down. -->
<string name="blackboldfontname">Black, Bold</string>

<script name="ExtraFonts">
function onInit()
if ChatManagerCL then
-- This adds a new option in the drop down for Colorful Language's font selection.
-- Interface.getString("blackboldfontname") grabs the text defined in the above string.
-- = "blackboldfont" associates the defined text with the desired font.
ChatManagerCL.availableFontNames[Interface.getString("blackboldfontname")] = "blackboldfont";
end
end
</script>
</base>
</root>

I will give it a try. Thanks!

SirMotte
June 11th, 2021, 20:04
And as usual my theme fully supports this extension :) (see signature).
47492

Grab the Dev Version in the Download section if you're interested. The stable release does not yet feature the tweaks added.

daggerfortysix
June 12th, 2021, 17:33
I am currently in the process of finding out what extension is conflicting when Colorful Language is enabled. I am getting [ERROR] Script execution [ERROR] Script execution error: [string "desktop/scripts/chat_entry_SW.lua"]:8: attempt to index global 'ChatManagerSW' (a nil value) which fires on load up and [ERROR] Script execution error: [string "desktop/scripts/chat_entry_SW.lua"]:77: attempt to call field 'resetAutocompleteMode' (a nil value) which fires anytime an entry is made win the chat bar. If anyone recognizes this conflict, please let me know. I will continue to test to narrow down where the conflict lies.

47532

MeAndUnique
June 12th, 2021, 17:50
I am currently in the process of finding out what extension is conflicting when Colorful Language is enabled. I am getting [ERROR] Script execution [ERROR] Script execution error: [string "desktop/scripts/chat_entry_SW.lua"]:8: attempt to index global 'ChatManagerSW' (a nil value) which fires on load up and [ERROR] Script execution error: [string "desktop/scripts/chat_entry_SW.lua"]:77: attempt to call field 'resetAutocompleteMode' (a nil value) which fires anytime an entry is made win the chat bar. If anyone recognizes this conflict, please let me know. I will continue to test to narrow down where the conflict lies.

The "SW" part is the biggest clue to my eye. That and the part about AutocompleteMode. So possibly an extension with a name or author with the initialis SW that adds chat features? Also, what ruleset are you using? That may help narrow down the pool of possibilities.

daggerfortysix
June 12th, 2021, 18:05
Ruleset - D&D5e

I narrowed down the conflict to Colorful Language and Syrinscape Sounds FGU. Clearly they both interact with the chat window and do not work with each other. With only those two extensions loaded the following errors trigger:
- [ERROR] Script execution [ERROR] Script execution error: [string "desktop/scripts/chat_entry_SW.lua"]:8: attempt to index global 'ChatManagerSW' (a nil value) - which fires on load up
- [ERROR] Script execution error: [string "desktop/scripts/chat_entry_SW.lua"]:77: attempt to call field 'resetAutocompleteMode' (a nil value) which fires anytime an entry is made win the chat bar.

47534

Link for Syrinscape Sounds: https://www.dmsguild.com/product/301496/Fantasy-Grounds-Syrinscape-Sound-Links

MeAndUnique
June 12th, 2021, 18:27
Ruleset - D&D5e

I narrowed down the conflict to Colorful Language and Syrinscape Sounds FGU. Clearly they both interact with the chat window and do not work with each other. With only those two extensions loaded the following errors trigger:
- [ERROR] Script execution [ERROR] Script execution error: [string "desktop/scripts/chat_entry_SW.lua"]:8: attempt to index global 'ChatManagerSW' (a nil value) - which fires on load up
- [ERROR] Script execution error: [string "desktop/scripts/chat_entry_SW.lua"]:77: attempt to call field 'resetAutocompleteMode' (a nil value) which fires anytime an entry is made win the chat bar.

47534

Link for Syrinscape Sounds: https://www.dmsguild.com/product/301496/Fantasy-Grounds-Syrinscape-Sound-Links

Alright, thanks for tracking down the conflict :) I'll take a look and hopefully have a fix soon.

MeAndUnique
June 12th, 2021, 22:43
Progress update: my initial investigation shows that its a weird interaction with how Fantasy Grounds itself handles layering of extensions and rulesets. Basically when both are loaded, it is trying to use Syrinscape's Savage Worlds code, regardless of current ruleset. I found one possible solution that would require changes in Syrinscape code and have reached out to the developer. He has agreed to take a look and should have more info in the next couple of days.

daggerfortysix
June 13th, 2021, 12:57
Interesting; that is weird. The SW was definitely throwing me off for a while. Thank you for looking into this and reaching out to the other author.

mattekure
June 13th, 2021, 15:45
Appreciate the heads up. I think I have a fix ready that allows both extensions to coexist. I've sent it to meandunique for validation, it all works on my testing.

MeAndUnique
June 13th, 2021, 16:48
Huge thank you for getting this fixed so quickly!

mattekure
June 13th, 2021, 17:01
Appreciate your help. The new Syrin ext should be available a little later today with the fix.

daggerfortysix
June 13th, 2021, 19:27
Great job and thank you both for fixing this. Everything looks to be working nicely together now. Thanks!!

nephranka
June 14th, 2021, 00:57
Tonight I found a conflict between both Rob2e Next level automation and nomad's coin manager. Both try to send output to chat and error out on the client side (attachments below) but otherwise complete the action.

MeAndUnique
June 14th, 2021, 01:33
Tonight I found a conflict between both Rob2e Next level automation and nomad's coin manager. Both try to send output to chat and error out on the client side (attachments below) but otherwise complete the action.

Just pushed version 1.0.1 that should correct that error.

nephranka
June 14th, 2021, 02:03
Just pushed version 1.0.1 that should correct that error.

Nice work. That seems to have fixed it. Thanks! There was also an issue with the new weather generator ext but this fixed it as well. Thank you.

MeAndUnique
June 14th, 2021, 02:09
Nice work. That seems to have fixed it. Thanks! There was also an issue with the new weather generator ext but this fixed it as well. Thank you.

Great, I'm glad it's working :)

MeAndUnique
August 11th, 2021, 18:04
For anyone who hasn't found it already and would like to use The Forge, I added a link in the first post.

nsaldiv1
September 1st, 2021, 22:12
I love this but I can't seem to locate the "radial menu of the chat icon". As a DM and Player, I tried to right-click the icon that lets you speak as the character to no avail. I downloaded your extension on The Forge.

MeAndUnique
September 2nd, 2021, 19:44
I love this but I can't seem to locate the "radial menu of the chat icon". As a DM and Player, I tried to right-click the icon that lets you speak as the character to no avail. I downloaded your extension on The Forge.

That sounds like it may be a conflict with another extension then. Are you using anything else that interacts with the chat system?