
Introduction:
This script is a re-work of "WhatSaywithUnknown.js" by derekkoehl which is an enhancement on "What Did He Say?" by Stephen S.It replaces the character sheet method for picking a language with a command line interface. It also includes features for creating languages, deleting languages, and, setting the character sheet language attribute name that the script uses for compatibility with all character sheets
Setup:
If the character sheets in your campaign do not use "prolanguages" as the attribute name for langauges then you must use the !setLanguageTag command as described below in order to set this script up for your campaign.Additionally, you can manually change the language tag identifier in the script itself by editing line 24 of the script like this:
ex)
Line 24 languageTag = "languages",
You can also add languages by adding to the pushLanguage function calls near line 83 of the script like this:
ex)
Line 83 pushLanguage("English",4,"Common");
Manually changing the scrip will prevent you from having to re-set and re-add the language tag, and your custom languages.
Users will be notified, in game, if the language attribute is not set up properly.
Source Code:
https://github.com/Roll20/roll20-api-scripts/tree/...Command 1:
!theLanguage {theText}
Example:
!Draconic hello there dragonbornResult:
- If the player who enters this is speaking as a character that has Draconic, under the languages on their character sheet, they will say "hello there dragonborn" in Draconic. Any player who is currently online and is speaking as a character that also has Draconic on their character sheet will be whispered "hello there dragonborn". Others will be whispered symbols representing the language.
- If the player who enters this is speaking as a character that does not have Draconic(under languages on their character sheet), they will "pretend to speak" Draconic.
- If the player who enters this is speaking as a player, they will be notified that players cannot speak character languages.
- GMs can speak any language with any player or character
Command 2:
!setLanguageTag {attribute name}
Example:
!setLanguageTag playerlanguagesResult:
- If the player who enters this is a GM and playerlanguages is the name of a character sheet attribute in the campaign, the script will use "playerlanguages" when it searches character sheet attributes for player's languages (instead of the default "prolanguages")
Command 3:
!deleteLanguage {language name}
Example:
!deleteLanguage DwarvenResult:
- If the player is a GM, Dwarven will be deleted as a language
Command 4:
!createLanguage {language name} {seed number} {parent language}
Example:
!createLanguage English 5 CommonResult:
- If the player is a GM, English will be created as a seed 5 language of Common