Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Script:Language Script"

From Roll20 Wiki

Jump to: navigation, search
(redirect to Script Index, API no longer available)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Author: Stephen S. <br>
+
#Redirect[[API:Script Index]]
======
+
<!-- Don't delete redirect, help center links to this page even though API have been removed
This script allows users to convert things they type into gibberish for people who don't speak the language the player is speaking as.
+
[[Category:Discontinued API Scripts]] -->
This version creates the language sheets automatically, and allows you to set your speaking as drop down to the language in order to speak it.
+
script overview
 +
|name=Language Script
 +
|author={{user profile|135636|Stephen S.}}
 +
|version=2.0
 +
|lastmodified=2014-09-11
  
This is the second completed version of the script from Stephen. The original is no longer available. A modified and expanded version using the old interface style is available here [[https://wiki.roll20.net/Script:What_Did_He_Say]] but it requires you to create the language sheets manually and use chat commands or macros to speak specific languages.
+
'''Language Script''' allows users to convert things they type into gibberish for characters who don't speak the language the player is speaking as. Language sheets are created automatically, allowing players to set their Speaking As dropdown to the desired language in order to speak it.
  
===Forum===
+
[[Script:What Did He Say|What Did He Say?]] expands on version 1 of this script. There is significant difference between the usage of the two scripts, enough to list them separately.
https://app.roll20.net/forum/post/1169270/script-what-did-he-say-updated-script-complete-overhaul-dot#post-1197965
+
<br clear="both">
  
===Code===
+
=== Syntax ===
https://gist.github.com/BaldarSilveraxe/d66d4aad2fb6f5baed3e
+
Select a language to speak as, and type a message into chat starting with <code>!</code>. Players with a character that speaks the selected language will receive the actual message, while other players will receive garbage.
 +
 
 +
=== Installation ===
 +
Available languages are defined near the top of the script. Each language is a JavaScript object in the format:
 +
<pre data-language="javascript">{
 +
    Description: "Elvish", 
 +
    Sheet: "Language(Elvish)",   
 +
    languageSeed: 4,
 +
    characters: "Elvish"
 +
}</pre>
 +
 
 +
* '''Description:''' A description of the language, to use in a sentence. For example, "Legolas is speaking Elvish."
 +
* '''Sheet:''' The name of the character to associate with the language. The character will be created if it does not already exist.
 +
** '''CRITICAL: Assign control of this character to all players able to speak it!'''
 +
* '''languageSeed:''' A number to assist int gibberish generation.
 +
* '''characters:''' A key to use for distinguishing languages from one another when generating gibberish. This will allow you to generate ''different'' gibberish for different languages.
 +
 
 +
 
 +
For each unique value of <code>characters</code>, you should create an array of <code>numbers</code>, <code>symbols</code>, <code>lower</code>-case consonants, <code>upper</code>-case consonants, and <code>vowel</code>s.
 +
 
 +
Finally, the value of <code>languageAvatar</code> will be used to set the avatar of the language characters. If you want to change the image, you may only use a URL from your Roll20 image library.
 +
 
 +
=== Changelog ===
 +
{{changelog version|2.0|2014-09-11|* Release}}

Latest revision as of 20:05, 20 September 2021

  1. RedirectAPI:Script Index

script overview |name=Language Script |author=Stephen S. |version=2.0 |lastmodified=2014-09-11

Language Script allows users to convert things they type into gibberish for characters who don't speak the language the player is speaking as. Language sheets are created automatically, allowing players to set their Speaking As dropdown to the desired language in order to speak it.

What Did He Say? expands on version 1 of this script. There is significant difference between the usage of the two scripts, enough to list them separately.

[edit] Syntax

Select a language to speak as, and type a message into chat starting with !. Players with a character that speaks the selected language will receive the actual message, while other players will receive garbage.

[edit] Installation

Available languages are defined near the top of the script. Each language is a JavaScript object in the format:

{
    Description: "Elvish",   
    Sheet: "Language(Elvish)",    
    languageSeed: 4, 
    characters: "Elvish"
}
  • Description: A description of the language, to use in a sentence. For example, "Legolas is speaking Elvish."
  • Sheet: The name of the character to associate with the language. The character will be created if it does not already exist.
    • CRITICAL: Assign control of this character to all players able to speak it!
  • languageSeed: A number to assist int gibberish generation.
  • characters: A key to use for distinguishing languages from one another when generating gibberish. This will allow you to generate different gibberish for different languages.


For each unique value of characters, you should create an array of numbers, symbols, lower-case consonants, upper-case consonants, and vowels.

Finally, the value of languageAvatar will be used to set the avatar of the language characters. If you want to change the image, you may only use a URL from your Roll20 image library.

[edit] Changelog

v2.0 (2014-09-11)

  • Release