In-Game Language Learning

Hey all, so this is post should probably be in the Plugin Request forums, but since I'm not requesting anything, this will be more of a discussion on this mechanic, how it can be implemented (plugins, eventing), and how it can affect our RPG Maker Games.

So late last night, I had this idea for a cool plugin - I'll describe it below:
 


Player can learn new words from different languages. Add new word with a script call "Add Word X". Remove it with "Remove Word X".



Text is displayed in the unknown language, and the words replace themselves with the English word once it's learned. For example, if the sentence is "I love using this program!", it will display in the new language "Kav tuin elsa ji reeto". If you learned the words "love" and "program", the game will automatically change these words like such "Kav love elsa ji program!"


In the plugin settings, you can define the English word that matches your new language.
 


I don't think something like this is impossible, since there is this plugin, but while that plugin translates the language all at once, this plugin would allow you to dynamically learn the language.


A great example of how this would work is from the game No Man's Sky. Note the language changing in the text box.


Best-Way-To-Learn-Alien-Languages-Fast-In-No-Mans-Sky-Option-1-900x506.jpg


Would you use a plugin like this? How would you utilize a game mechanic like this in your project? Any thoughts or ideas will be great! Thanks for your time!


                                      
I'm not a programmer, but I think for a plugin like this to work in a typical RM game, (I.e. story driven and not too long) key words would have to have been learnt already, so only adjectives, some nouns, etc. were left unlearned and ready for the player to decipher. Another thing you would need to give the player is a motivation to learn the language. Are they an academic who wants to learn all about the lost kingdom they can? A medium's apprentice trying to figure out how to commune with ghosts? Or maybe if you learn the language, certain items or skills will be unlocked, as you can talk with the native speakers better.
This is sort of a Al-Bhed Language System from FFX?


I´ve seen this system before, in other RPG Maker... i think is RPG Maker VX Ace...


it would be amazing if you could implement this in your game 🙂
This is way easier to implement than you might expect.  A lot of patience and a bit of talent for making the system interesting are all you really need.


After all, at a crude level, you can do it without any scripts/plugins at all.  Since Variables can hold a string value (such as "tuin"), you can place the variable's value in a message box (using an escape code like \V[14] for Variable #14) to print the word stored in the variable into the message box.  When the player learns the word "tuin" means "love", simply change the value of variable 14 to "love" instead of "tuin".


This approach will take a while to implement, and is limited to a few thousand words (since you're limited to about 5000 variables in most versions of RPG Maker).  I think its major weakness is Word Wrap - you will either need to be careful to make sure that you are ending your message lines early enough to prevent overflow in a worst-case translation scenario (only translations that make the words longer are known), or get a script that dynamically adds line breaks into messages (probably your best option - it's not that hard).


Scripts/plugins could be made to make the process somewhat easier, allowing you to enter word/translation pairs and possibly automatically "learn" words that are shown to you in a specific context (such as a classroom/translation book in-game) marked with a "learning ON" flag.  Alternatively, if you have any ability whatsoever in RGSS3 coding, you could add an array (or hash) property to $game_party that does a lot of this for you, and then make use of Hime's Convert Code Eval script to make things a bit easier.
Okay, anything is possible, but... without an actual database the implementation would be too limited. A good question would be: Can a script be made which can inject text from an external file into the game at runtime? If this question is yes, then it's more than do-able. Using a finite state machine would be the simplest implementation to begin to replace words from an external dictionary... but you see, that's the problem. We're talking about several scripts here. My opinion, and being new take it with a grain of salt, would be to use a very limited pictographic language - kind of like hieroglyphics. That way you're replacing keywords and phrases instead of all permutations into an english word equivalent. Just my $0.02. 🙂
In MV, this can be evented using hidden items and checking in conditional branches. All the conditional branches would be tedious, though. I did a similar thing when created my keyword system.
In MV, this can be evented using hidden items and checking in conditional branches. All the conditional branches would be tedious, though. I did a similar thing when created my keyword system.



Wouldn't this become impossible when you have, for example, a 20-word message box?  You'd need 2^20 = about 1.1 million different message boxes branched for that one message.  I'd much sooner recommend just handling it with variables that hold string values, as I mentioned above.
Wouldn't this become impossible when you have, for example, a 20-word message box?  You'd need 2^20 = about 1.1 million different message boxes branched for that one message.  I'd much sooner recommend just handling it with variables that hold string values, as I mentioned above.

I haven't actually done the math. I guess one way around it would be to learn phrases instead of word by word. There's certainly drawbacks to any solution without creating a plugin.
As to whether or not a language learning system is something people want in a game, well only you can answer that. Does it add to the core gameplay experience? Does it fit in your designs pillars? If you answer no to either or both of these then the mechanic just because tacked on because cool language learning system is cool. I personally would argue that it being present in No Mans Sky was not exactly the greatest example as it didn't really have much to do with the core experience apart from adding a pseudo collectable that could arguably not be included. 
Could be used brilliantly, especially if you made a game that taught people how to really speak a new language, a real one, that they could use in real life. 
Could be used brilliantly, especially if you made a game that taught people how to really speak a new language, a real one, that they could use in real life. 



It's a shame I'm not bi-lingual!
Same. :/

Original thread: https://forums.rpgmakerweb.com/threads/in-game-language-learning.67996/