Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.R4
Moderators: dorpond, trevor, Azhrei, Gamerdude
- Lord.Ashes
- Dragon
- Posts: 350
- Joined: Wed Jul 03, 2013 5:58 am
Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.R4
A Foreign Language Plugin for MapTool-1.3.b89.Plugin_Support.R4 (Rev 2) Is Available!
The unofficial MapTool-1.3.b89.Plugin_Support.R4 Mod, which supports limited plugins, can be downloaded from this thread...http://forums.rptools.net/viewtopic.php?f=8&t=24539
The plugin can be downloaded from https://www.mediafire.com/folder/rintir ... 20for%20R4 (Java 6 Compatible)
This plugin allows the GM to set which languages players know and then send messages to some/all players using a language. If the player knows the language the contents are shown normally. However, if the player does not know the language the contents are mutated so the player sees that a conversation is going on, gets approximate length of the conversation but has no idea what the conversation is about.
The whole system is usable from the chat window (i.e. both setting languages, forgetting languages and speaking) but macros for setting and forgetting languages are provided so that they can be more easily integrated into other macros.
Examples of use:
GM Types...
/w George .learnlang Common
/w George .learnlang Elven
/w George .learnlang Goblin
/w Bob .learnlang Common
/w Bob .learnlang Elven
/w Bob .learnlang Drow
.lang Elven Hello
.lang Goblin How Are You?
.lang Drow Die Scum!
George Sees...
Speech Plugin: learned language 'Common'
Speech Plugin: learned language 'Elven'
Speech Plugin: learned language 'Goblin'
Hello
How Are You?
Pui Bgah!
Bob Sees...
Speech Plugin: learned language 'Common'
Speech Plugin: learned language 'Elven'
Speech Plugin: learned language 'Drow'
Hello
Mez Oki Vea?
Die Scum!
Obviously if all players speak a language then one would not need to use this plugin for that language. For example if George and Bob were the only players then it would not be necessary to define Common and Elven because there is no need for secrecy.
Disclaimer:
Before everyone tackles me...Yes! This could be implemented using MT macros by doing a check server side and then using whisper or broadcast to send the messages to the various players. However this would require using a macro to talk. By using the plugin you can use a pseudo chat command for the actual talking instead of a macro.
However, a good accompanying MT macro (not included with this plugin) would be one that reads the client's character's languages (getSpeech) and sets them using the provided learnLanguage() plugin function.
Edit: Changed Text to Rev 2. Rev 2 fixes the issue that all foreign languages looked the same.
The unofficial MapTool-1.3.b89.Plugin_Support.R4 Mod, which supports limited plugins, can be downloaded from this thread...http://forums.rptools.net/viewtopic.php?f=8&t=24539
The plugin can be downloaded from https://www.mediafire.com/folder/rintir ... 20for%20R4 (Java 6 Compatible)
This plugin allows the GM to set which languages players know and then send messages to some/all players using a language. If the player knows the language the contents are shown normally. However, if the player does not know the language the contents are mutated so the player sees that a conversation is going on, gets approximate length of the conversation but has no idea what the conversation is about.
The whole system is usable from the chat window (i.e. both setting languages, forgetting languages and speaking) but macros for setting and forgetting languages are provided so that they can be more easily integrated into other macros.
Examples of use:
GM Types...
/w George .learnlang Common
/w George .learnlang Elven
/w George .learnlang Goblin
/w Bob .learnlang Common
/w Bob .learnlang Elven
/w Bob .learnlang Drow
.lang Elven Hello
.lang Goblin How Are You?
.lang Drow Die Scum!
George Sees...
Speech Plugin: learned language 'Common'
Speech Plugin: learned language 'Elven'
Speech Plugin: learned language 'Goblin'
Hello
How Are You?
Pui Bgah!
Bob Sees...
Speech Plugin: learned language 'Common'
Speech Plugin: learned language 'Elven'
Speech Plugin: learned language 'Drow'
Hello
Mez Oki Vea?
Die Scum!
Obviously if all players speak a language then one would not need to use this plugin for that language. For example if George and Bob were the only players then it would not be necessary to define Common and Elven because there is no need for secrecy.
Disclaimer:
Before everyone tackles me...Yes! This could be implemented using MT macros by doing a check server side and then using whisper or broadcast to send the messages to the various players. However this would require using a macro to talk. By using the plugin you can use a pseudo chat command for the actual talking instead of a macro.
However, a good accompanying MT macro (not included with this plugin) would be one that reads the client's character's languages (getSpeech) and sets them using the provided learnLanguage() plugin function.
Edit: Changed Text to Rev 2. Rev 2 fixes the issue that all foreign languages looked the same.
Last edited by Lord.Ashes on Thu Dec 12, 2013 6:42 am, edited 1 time in total.
"We often compare ourselves to the U.S. and often they come out the best,
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue
Re: Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.
awesomesauce! very cool implementation. And not I will not start the discussion about macro substitutes again, one time is enough.
curious though what kind of routine do you use to scramble the text, some kind of letter offset?
curious though what kind of routine do you use to scramble the text, some kind of letter offset?
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
- Lord.Ashes
- Dragon
- Posts: 350
- Joined: Wed Jul 03, 2013 5:58 am
Re: Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.
At the moment a hard coded letter swap which swaps vowels with other vowels and non-vowels with non-vowels. This why all foreign languages, at this point, look the same.wolph42 wrote:awesomesauce! very cool implementation. And not I will not start the discussion about macro substitutes again, one time is enough.
curious though what kind of routine do you use to scramble the text, some kind of letter offset?
I didn't want to randomize this swapping because I wanted the same foreign word to always look the say (i.e. if I say Hello three times, I should get the same result not different).
However, I am thinking of possibly adjusting the swapping based on the name of the language (i.e. not a hard coded swap per language but something like counting the value of the letters of the language name and using that as an offset. This way each foreign language would be different and players could even start to "recognize" languages.
"We often compare ourselves to the U.S. and often they come out the best,
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue
Re: Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.
what you could try is creating alphabet lists: "a,b,c,d,e,f, etc" but then with a limited set of letter including some repeating and indeed keep vowels seperate e.g.:
c,c,f,f,g,g,g,h,j,p,p,r,etc. and then randomize the list and use a cyclic letter translation (so e.g. 'z' is the 26th letter, assume you have a string list of only 12 vowels then you replace z for the 2nd letter in the string list (which is what you get if you cycle 26 times through a list of 12 items)
adding some vowels to the non-vowel list will also have an interesting impact
and ofcourse because its a list you can also combine letters like 'th, 'ui', 'oe' and add those to list. so you get e.g. c,c,f,f,th,rth,g'th,etc.
to get a feel of which letter to pick i would read some elfish eg Elen Sila Lumenn Omentielvo and pick out the most use letters and common letter combinations. fun stuff!
c,c,f,f,g,g,g,h,j,p,p,r,etc. and then randomize the list and use a cyclic letter translation (so e.g. 'z' is the 26th letter, assume you have a string list of only 12 vowels then you replace z for the 2nd letter in the string list (which is what you get if you cycle 26 times through a list of 12 items)
adding some vowels to the non-vowel list will also have an interesting impact
and ofcourse because its a list you can also combine letters like 'th, 'ui', 'oe' and add those to list. so you get e.g. c,c,f,f,th,rth,g'th,etc.
to get a feel of which letter to pick i would read some elfish eg Elen Sila Lumenn Omentielvo and pick out the most use letters and common letter combinations. fun stuff!
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- Lord.Ashes
- Dragon
- Posts: 350
- Joined: Wed Jul 03, 2013 5:58 am
Re: Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.
Well I don't want to randomize the list because that would mean storing the results (so that the same word in the same language gives the same result).wolph42 wrote:what you could try is creating alphabet lists: "a,b,c,d,e,f, etc" but then with a limited set of letter including some repeating and indeed keep vowels seperate e.g.:
c,c,f,f,g,g,g,h,j,p,p,r,etc. and then randomize the list and use a cyclic letter translation (so e.g. 'z' is the 26th letter, assume you have a string list of only 12 vowels then you replace z for the 2nd letter in the string list (which is what you get if you cycle 26 times through a list of 12 items)
adding some vowels to the non-vowel list will also have an interesting impact
and ofcourse because its a list you can also combine letters like 'th, 'ui', 'oe' and add those to list. so you get e.g. c,c,f,f,th,rth,g'th,etc.
to get a feel of which letter to pick i would read some elfish eg Elen Sila Lumenn Omentielvo and pick out the most use letters and common letter combinations. fun stuff!
Similarly I don't want to use other languages (real or not) as a basis because I want to keep it generic. If someone is playing an space campaign with different planetary languages I want this plugin equally usable.
I am thinking that I will use the letter of the language to provide the offset in the cyclic letter string. This will make it unique for almost all language names but still repeatable.
"We often compare ourselves to the U.S. and often they come out the best,
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue
Re: Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.
i meant randomize once, not on every load (or whatever), so c,c,f,f,f,g,h becomes e.g.: c,g,h,c,f,f and that becomes your base setLord.Ashes wrote: Well I don't want to randomize the list because that would mean storing the results (so that the same word in the same language gives the same result).
i didn't mean that you should actually pick another other languages, but you *could* create a set of characters that *sounds* like a certain language.Similarly I don't want to use other languages (real or not) as a basis because I want to keep it generic. If someone is playing an space campaign with different planetary languages I want this plugin equally usable.
However you have a point on the generic part, so maybe its a thought to allow users (gms) to create their own sets and use the above cyclic transcoding.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.
Maybe use a common hashing algorithm for the word? Like SHA-256?Lord.Ashes wrote: I am thinking that I will use the letter of the language to provide the offset in the cyclic letter string. This will make it unique for almost all language names but still repeatable.
- Lord.Ashes
- Dragon
- Posts: 350
- Joined: Wed Jul 03, 2013 5:58 am
Re: Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.
Rev 2.0 of the Foreign Language Plugin is now available. Use same download link as previous version.
Change Log:
* Different languages now generate different foreign content. However, same words in same language always results in the same foreign word so it is possible for players to "learn" the meaning of foreign words and recognize them later in other conversations.
Details For Those Who Are Interested:
The mutation algorithm has been changed to shifting each letter by index value of the letter of the language. With the language string being reset for each work. Thus the phrase "Hello How Are You?" in "Elven" would be mutated as follows: H by E, e by l, l by v, l by e, H by E (not n since each words restarts the language mutation), o by l, w by v, A by E, r by l, e by v, Y by E, o by l, u by v. Non alphabetic characters are kept as is. Vowels are still only swapped with vowels and non-vowels and still only swapped with non-vowels.
Change Log:
* Different languages now generate different foreign content. However, same words in same language always results in the same foreign word so it is possible for players to "learn" the meaning of foreign words and recognize them later in other conversations.
Details For Those Who Are Interested:
The mutation algorithm has been changed to shifting each letter by index value of the letter of the language. With the language string being reset for each work. Thus the phrase "Hello How Are You?" in "Elven" would be mutated as follows: H by E, e by l, l by v, l by e, H by E (not n since each words restarts the language mutation), o by l, w by v, A by E, r by l, e by v, Y by E, o by l, u by v. Non alphabetic characters are kept as is. Vowels are still only swapped with vowels and non-vowels and still only swapped with non-vowels.
"We often compare ourselves to the U.S. and often they come out the best,
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue
Re: Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.
This is very cool
Maybe the next version could use different character sets for different languages?
Maybe the next version could use different character sets for different languages?
Examples
- Lord.Ashes
- Dragon
- Posts: 350
- Joined: Wed Jul 03, 2013 5:58 am
Re: Foreign Langs Plugin for MapTool-1.3.b89.Plugin_Support.
Very cool idea but there are issues with it. As far as I have been told, not all browsers show extended characters correctly. For example, my sound plugin surrounds sound cues with musical notes to tell the user that a audio cue was requested. They look great on my Windows based machine but someone else told me that his/her browser is rendering them as blank squares.Jagged wrote:This is very cool
Maybe the next version could use different character sets for different languages?
Examples
The other issue, which is not a significant one, is that I would have to swap the code to use lists. Currently I am using just positions in a string to make the swaps (hence why I don't do any dual letter swapping as was suggested earlier). But it should not be too hard to change that to using positions in an array instead.
"We often compare ourselves to the U.S. and often they come out the best,
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue
but they only have the right to bare arms, while we have the right to bare breasts"
The Right To Bare Breasts by Bowser & Blue