PDA

View Full Version : Assign Speaker Language Extension



Minty23185Fresh
January 28th, 2021, 04:29
THIS EXTENSION IS NO LONGER AVAILABLE.

## STOP!! ##
## Before downloading and trying to use this extension READ,
## UNDERSTAND and be willing to COMPLY with the instructions
## and limitations stated in posts #1 - 4 of this thread.
## STOP!! ##

This extension allows the DM to place a "directive" in a Chat Frame paragraph in a Story page that forces the Chat Frame's text to be displayed in the Chat Box in a desired fantasy language. (See post #2 of this thread for more details.)

This extension was implemented in the CoreRPG ruleset, so it should work with all rulesets that use CoreRPG as their base. Though that has not been verified. I developed the extension specifically for use in Fantasy Grounds Unity, 5E, so it has been verified to work in that ruleset, but it has not been thoroughly play tested.

The following posts to this thread contain additional information that you should read, understand, and be willing to comply with:
#2 - What it does, how and why. Plus restrictions and licensing.
#3 - Versioning information.
#4 - (reserved for future use)

Minty23185Fresh
January 28th, 2021, 04:30
Extension Necessity:
At times, the DM may want to display some text to the players in an alternate fantasy language, such as Elvish or Gnomish. By placing the text in a Chat Frame in a Story entry the DM can somewhat automate that. During the game session the DM only need set the desired language in the Chat Box on the Fantasy Grounds desktop and click the Chat Frame on the Story Page.

Most of the time I forget to toggle the Language combo box on the Chat Box and inadvertently display the text in my native tongue instead of the desired fantasy language. To assist me with this problem I have written this extension.

To help elucidate my point here are a few screen shots. In all the screen shots the DM's instance of FG is to the left of the wide vertical green line and a player's instance is to the right. The player character, Tom Slick, speaks Common and Gnomish. The Story page, in the center, and the Chat Frame text itself provides explanations of the steps I performed in obtaining the results show in each screen shot.

First, not using the extension and not using the Assign Speaker option in the radial menu (of the Chat Frame).
43304

Next, using the Chat Frame's radial menu to set the Assign Speaker field, without employing the extension, and then with it.
43305

A couple things to note, which are displayed in the screen shots, but might be easily overlooked. The Assigned Speaker does not have to be a player nor a player character. In the final example the speaker is "Spellbook". Also the "directive" mandated language overrides the setting of the language choice, if any, of the combo box in Chat Box.

Extension Use:
As displayed in the screen shots above, this very simple extension allows DMs to add a "directive" to a Chat Frame's text on a Story page to force the contents to be displayed in the supported, desired, fantasy language. The syntax of the "directive" is this: [Translate to "<fantasy language>"] .
The syntax is exacting and mandatory:

The square brackets are mandatory.
The double stroke quotation marks are mandatory.
Single spaces between the words are mandatory.
The single space between the directive and the rest of the text is mandatory.
The directive must be at the beginning of the text (i.e. the first character in the text block must be the beginning of the directive's square bracket.
<fantasy language> between the quotes must be one of the fantasy languages available in the Chat Box's combo box.
Upper and lower case as it is shown is mandatory, in the directive and in the language.

Any variations and the translation will not be performed.

That said, before contacting me with information that the extension doesn't work, please double check the format of the directive you added. Then triple check it. Review the examples in the screen shots above for additional help.

Extension Interactions:
Many new users of Fantasy Grounds see the huge variety of community developed extensions available to them and they load 'em up. "What could be better than all this additional functionality?" The answer might be none of it! But certainly, less of it. If you are not actively using an extension's functionality, don't load it. Community developers work in a bit of a vacuum. I don't pay attention to what's out there, unless I want or need it. Because the more extensions I have loaded the greater the chances are that those extensions might adversely interact with one another - giving errant results, undesired behaviors or crashing. I make sure my extensions work with the rest of my extensions and with those that I use from other community developers. But not every other extension out there.

This extension, though uncomplicated uses almost no duplicated ruleset code thereby minimizing possible conflicts. However, I cannot guarantee a conflict won't occur. Particularly if another developer's extension interferes with my extension's functionality instead of visa versa.

If you have problems with this extension, it is your responsibility to determine if the fault is extension conflicts. The first thing I will ask you is: "Do you use any other extensions?" If so, "Have you unloaded all the other extensions? Do you still have a problem?" So you might as well figure it out beforehand. If you don't know how to go about it, take a look at post #18 of this thread (https://www.fantasygrounds.com/forums/showthread.php?34099-Extension-interaction-Attn-ext-users-and-ext-developers-(soliciting-comments)/page2).

Extension Copyright:
I am releasing the content of this extension to public domain. I am not retaining copyright. You may do with it as you please. However, I ask that you don’t simply duplicate my code in a "for sale" product.

Minty23185Fresh
January 28th, 2021, 04:30
Versioning Information:
28 Jan 2021 v0.0.1 Initial release

Minty23185Fresh
January 28th, 2021, 04:31
<< reserved for future use >>

Jiminimonka
January 28th, 2021, 21:54
Perfect!

Ludd_G
January 29th, 2021, 00:00
Excellent addition!

madman
January 30th, 2021, 01:26
Great work! I love it. Thanks For Sharing.

Jiminimonka
February 1st, 2021, 01:22
This is probably caused by an extension, but no one in my party can understand the translations. I checked a few times, changed languages to match the players etc., but:

43389

EDIT: Fixed a typo in my module. ;)

Jiminimonka
February 1st, 2021, 01:42
This is probably caused by an extension, but no one in my party can understand the translations. I checked a few times, changed languages to match the players etc., but:

43389

EDIT: Fixed a typo in my module. ;)

Yeah - made a clean 5e campaign and it works.

I disabled 5e - Spell Automation and it worked. I will contact the developer of that extension.

Minty23185Fresh
February 1st, 2021, 16:10
I disabled 5e - Spell Automation and it worked. I will contact the developer of that extension.

What does 5e Spell Automation do? Does it modify text going to the Chat Box too?

I didn't find a 5E Extension with the name "Spell Automation" in the 5E Extensions thread (https://www.fantasygrounds.com/forums/showthread.php?22975-5E-Community-extensions). If you'll point me to the extension we might be able to deal with this with a simple "loadorder" change. (Please provide link to the extension's thread, please don't provide a copy, since extensions change over time.)

Jiminimonka
February 1st, 2021, 17:37
What does 5e Spell Automation do? Does it modify text going to the Chat Box too?

I didn't find a 5E Extension with the name "Spell Automation" in the 5E Extensions thread (https://www.fantasygrounds.com/forums/showthread.php?22975-5E-Community-extensions). If you'll point me to the extension we might be able to deal with this with a simple "loadorder" change. (Please provide link to the extension's thread, please don't provide a copy, since extensions change over time.)

Hi - its here https://www.fantasygrounds.com/forums/showthread.php?62208-5E-Spell-Automation&highlight=spell+automation

Minty23185Fresh
February 2nd, 2021, 16:01
I disabled 5e - Spell Automation and it worked. I will contact the developer of that extension.

I have tried to verify your claim and cannot. Here is a screenshot of what I have done.
43416
1) loaded both extensions, and only these two extensions (blue box on screenshot)
2) set language to Abyssal in chat box (red box on screenshot)
3) had Bruner speak in Dwarvish, my extension, ASLE, translated it, but no one understood (red line in screenshot)
4) had ASLE translate the Spellbook to Gnomish, and Tom Slick understood it (second red line in screenshot)

To my mind, this verifies that the two extensions work fine together, and that you have something else in play.

I added an additional test, which is what I tacked on to the above image with a snippet of a second screenshot.
1) I set the language to Gnomish in the Chat Box, a language Tom Slick understands (orange box in screenshot)
2) I used Baba Yaga to speak, note there is no "Translate to ..." phrase in the Chat Frame, so ASLE is not employed.
3) Baba Yaga's spoken words are translated and understood (the default behavior of Fantasy Grounds) (orange line in screenshot)

So the default behavior of Fantasy Grounds is observed with both extensions loaded.

Something you might try:
1) add an additional language to your test PC, one that comes with the rulesets (i.e. not Ancients)
2) set the Chat Box dropdown to the additional language
3) test using a chat frame with only text, it should not be translated
4) test using a chat frame with an Assigned Speaker (but no "Translate to" phrase)
5) then repeat this with your Ancients language

With a language selected in the dropdown and a Speaker Assigned in the Chat Frame, the Chat Frame text should be translated (which is Fantasy Grounds' default behavior). If the PC understands the selected language, then it should understand the translation (irregardless of ASLE, since it is FG default behavior).

What I am wondering is, maybe the "Ancients", non default language, is playing a role in this, and if so to what degree.

[EDIT] Also, I am doing all this in FGU not Classic.

Jiminimonka
February 2nd, 2021, 16:15
Ancients was used in my final screen shot - it was originally Draconic and Abyssal languages where I noticed the error.

EDIT: I dont use Classic anymore.

Minty23185Fresh
February 4th, 2021, 01:46
@Jiminimonka
Were my suggestions of any help? I can’t fix what I can’t observe, and I was not able to repeat the problem you’ve mentioned. Please keep me apprised.

[EDIT] I tried again this AM (Thursday, Feb 4), ensuring I had the latest versions of FGU, Spell Automation, and ASLE, and saw no odd behavior. ASLE worked as expected.

Jiminimonka
February 5th, 2021, 23:20
@Jiminimonka
Were my suggestions of any help? I can’t fix what I can’t observe, and I was not able to repeat the problem you’ve mentioned. Please keep me apprised.

[EDIT] I tried again this AM (Thursday, Feb 4), ensuring I had the latest versions of FGU, Spell Automation, and ASLE, and saw no odd behavior. ASLE worked as expected.

I have been busy making a map - starting to this now - will report back tomorrow.

Jiminimonka
February 6th, 2021, 00:09
43495

Tried with no extension except Automatic Spells and ASLE - no joy.

Gonna make a new campaign and try again.

Jiminimonka
February 6th, 2021, 00:09
43495

Tried with no extension except Automatic Spells and ASLE - no joy.

Gonna make a new campaign and try again.

P.S. the reason it's called food.jpg is because on my Discord everyone is talking about food.... making me hungry at midnight!

Jiminimonka
February 6th, 2021, 00:19
43497

Absolutely new campaign - nothing but these 2 extensions.

Jiminimonka
February 6th, 2021, 00:25
43497

Absolutely new campaign - nothing but these 2 extensions.

OK - so here is the problem - I am an Id10T - it only shows when someone is connected to your table.... LOL - sorry about this - nothing to see here, move along, move along... ironic considering the message being translated.

lamorric
February 6th, 2021, 01:09
Pretty sweet! Nice Job.

Minty23185Fresh
February 6th, 2021, 15:02
.... it only shows when someone is connected to your table.... LOL - sorry about this - nothing to see here, move along, move along... ironic considering the message being translated.
Aargh. I'm partially at fault. I should have mentioned that somewhere. Just having a PC in the party sheet, combat tracker, etc. isn't sufficient. You must have at least one other instance connected to the campaign. I'll endeavor to remember that when I'm assisting others with problems. Thanks for your perseverance.

Jiminimonka
February 6th, 2021, 15:28
No problem - at least now we know its just an error between the chair and keyboard.

LordEntrails
February 7th, 2021, 03:33
No problem - at least now we know its just an error between the chair and keyboard.
PEBKAC, my favorite type of issue!

Jiminimonka
February 7th, 2021, 10:57
PEBKAC, my favorite type of issue!

Yeah, happens a lot on here and other forums. I used to moderate Kunena.org ... fun times