Language Character Record Sheets are added by the API based on the languages created in the API. Use "Speak As" with no commands needed (just start the sentence with a "!".) GM sees all languages on("ready", function() { checkForSheets(); The on("ready", function() checks for the Character Record Sheets and adds them as needed, based on the languages in the script. roll20API.languageData = [ { Description: "Dwarven", Sheet: "Language(Dwarven)", languageSeed: 2, characters: "Dwarven"}, { Description: "Elvish", Sheet: "Language(Elvish)", languageSeed: 4, characters: "Elvish"} ]; Similar langues can use the same "characters" but would have a different "languageseed" . Or you could add more characters: numbers = []; numbers["Standard"] = ["1","2","3","4","5","6","7","8","9","0"]; numbers["Dwarven"] = ["",":","∴","+","◊","◊","◊:","◊∴","◊+","°"]; numbers["Elvish"] = ["",":","∴","+","¤","¤","¤:","¤∴","¤+","°"]; numbers["Minor"] = ["",":","∴","+","×","×","×:","×∴","×+","°"]; numbers["Evil"] = ["",":","∴","+","∏","∏","∏:","∏∴","∏+","°"]; Language Character Record Sheets have a common avatar and are named to be grouped together: Who can speak the language is controlled by the sheet: The process for on("chat:message", function (msg) requires very little code: on("chat:message", function (msg) { // Exit if not an api command if (msg.type != "api") return;
//****Check For Language checkForLanguage(msg);
// Get the API Chat Command msg.who = msg.who.replace(" (GM)", ""); msg.content = msg.content.replace("(GM) ", ""); var command = msg.content.split(" ", 1); }); To use a language just use the chat "As:" drop down: Just use an "!" at the start of whatever you want to say. <-THIS IS VERY IMPORTANT. For example... Wes who speaks dwarven, would choose "As:" Langue(Dwarven) and enters: "!Who sees my Dwarven?" Wes will see: GM will see: Players that speak Dwarven see: Players that DO NOT speak Dwarven see: GIST below: <a href="https://gist.github.com/BaldarSilveraxe/d66d4aad2f" rel="nofollow">https://gist.github.com/BaldarSilveraxe/d66d4aad2f</a>...