Command to replace letters in query to "translate" into Al Bhed

The game Final Fantasy X has a fictional language called “Al Bhed” which is just a letter-swapped version of the english language. I think it would be fun if there was a command that could “translate” a user’s input text into Al Bhed by replacing each letter of the query, and maybe another command to translate text from Al Bhed into English as well.

I thought that that this might have been something that somebody has done before, because Final Fantasy is pretty popular, but I can’t find any such thing done using Nightbot. I did find some source code for a fancy program that translates both directions using JavaScript, but I’m not sure if it’s possible to make this work with Nightbot. Has anybody ever done something like this?

ooo, that sounds fun… it could go something like this…

$(eval let input=`$(query)`.split(``),e=` AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz`,a=` YyPpLlTtAaVvKkRrEeZzGgMmSsHhUuBbXxNnCcDdIiJjQqFfOoWw`,output=``;input.forEach(x=>{output+=a[e.indexOf(x)]});output)

for english to al bhed… and to go the other way…

$(eval let input=`$(query)`.split(``),e=` AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz`,a=` YyPpLlTtAaVvKkRrEeZzGgMmSsHhUuBbXxNnCcDdIiJjQqFfOoWw`,output=``;input.forEach(x=>{output+=e[a.indexOf(x)]});output)
1 Like

This is absolutely perfect!!! Thank you so much this is gonna be super fun!!! :yellow_heart:

um, actually… i found a bug in it with my own testing… here’s a fixed version…

$(eval let input=`$(query)`.split(``),e=`AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz`,a=`YyPpLlTtAaVvKkRrEeZzGgMmSsHhUuBbXxNnCcDdIiJjQqFfOoWw`,output=``;input.forEach(x=>{output+=a[e.indexOf(x)]?a[e.indexOf(x)]:x});output)

for english to al bhed… and the other way…

$(eval let input=`$(query)`.split(``),e=`AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz`,a=`YyPpLlTtAaVvKkRrEeZzGgMmSsHhUuBbXxNnCcDdIiJjQqFfOoWw`,output=``;input.forEach(x=>{output+=e[a.indexOf(x)]?e[a.indexOf(x)]:x});output)

the original ones would only work for letters and spaces… if u added any symbols, like commas, questionmarks or exclamations it would replace them with “undefined”… this new version puts the symbols in place as they were

1 Like

awesome this is so great!! My Final Fantasy X playthrough is gonna be lit lol thank you!

1 Like

Small addendum in case any future travelers come across this thread:

A couple of (relatively unimportant) letters were swapped in the Al Bhed alphabet. Here is the corrected code:

English to Al Bhed:

$(eval let input=`$(query)`.split(``),e=` AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz`,a=` YyPpLlTtAaVvKkRrEeZzGgMmSsHhUuBbXxNnCcDdIiJjFfQqOoWw`,output=``;input.forEach(x=>{output+=a[e.indexOf(x)]});output)

Al Bhed to English:

$(eval let input=`$(query)`.split(``),e=` AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz`,a=` YyPpLlTtAaVvKkRrEeZzGgMmSsHhUuBbXxNnCcDdIiJjFfQqOoWw`,output=``;input.forEach(x=>{output+=e[a.indexOf(x)]});output)

Nulg uh :metal:

i copied the letter order directly from the github u linked… but that version u posted there doesn’t have the fix for the symbols/numbers

1 Like

True!!! Whoops. I adjusted your original one on accident, I’ll sort that out today! Yeah i think that github had it wrong. It was just “W” and “X” (in English) that were swapped

Here we go:

English to Al Bhed:

$(eval let input=`$(query)`.split(``),e=`AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz`,a=`YyPpLlTtAaVvKkRrEeZzGgMmSsHhUuBbXxNnCcDdIiJjFfQqOoWw`,output=``;input.forEach(x=>{output+=a[e.indexOf(x)]?a[e.indexOf(x)]:x});output)

Al Bhed to English:

$(eval let input=`$(query)`.split(``),e=`AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz`,a=`YyPpLlTtAaVvKkRrEeZzGgMmSsHhUuBbXxNnCcDdIiJjFfQqOoWw`,output=``;input.forEach(x=>{output+=e[a.indexOf(x)]?e[a.indexOf(x)]:x});output)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.