Fomar0153 121 Posted February 14, 2012 (edited) Albhed Translator Version 1.1 by Fomar0153 Introduction Allows you to insert a new language into your game in the style of FFX's Albhed. Features + Switch controlled, you turn the language on and off with it. + Can collect items which translate the language. + Translated text appears in a different colour + Can leave some text untranslated by using { } Screenshot I wonder what he said? How to Use Instructions are in the script. Script The most update version of this script can always be found on my blog. Direct Link. F.A.Q. No questions asked. Credits and Thanks Fomar0153 Edited February 21, 2012 by Fomar0153 3 inqui, Darkanine and Fabi Stein reacted to this Share this post Link to post Share on other sites
Wendell 81 Posted February 14, 2012 (edited) Whoa, thats supercool man! EDIT: I tested here, and its really SUPERCOOL! Just a question: There is a way to turn the translated letters into a different color? Example: I got the item that translates A into B. Then, in the message that before was "CAC" became "CBC"? Edited February 14, 2012 by Wendell Share this post Link to post Share on other sites
Allan Rodrigo 8 Posted February 14, 2012 Oh my, here's something really nice...at least in theory, so let me test it by myself now xD. And seeing the code I am already planning to add other languages by myself for my own use xD Thanks man :3 Share this post Link to post Share on other sites
Balthier99 24 Posted February 15, 2012 Imagine the sidequests I can do with this... Very interesting, Fomar, a good script indeed. Share this post Link to post Share on other sites
Non ya 1 Posted February 21, 2012 Is it possible to add more language? Share this post Link to post Share on other sites
Fomar0153 121 Posted February 21, 2012 Whoa, thats supercool man! EDIT: I tested here, and its really SUPERCOOL! Just a question: There is a way to turn the translated letters into a different color? Example: I got the item that translates A into B. Then, in the message that before was "CAC" became "CBC"? I'll look into it. Sorry I didn't see your edit before. Is it possible to add more language? Er, not by default but it's not hard to slightly edit it for more. I'll do an example later. Share this post Link to post Share on other sites
Non ya 1 Posted February 21, 2012 That would be really awesome thank you Share this post Link to post Share on other sites
Wendell 81 Posted February 21, 2012 thanks man, I really apreciate that. Share this post Link to post Share on other sites
Fomar0153 121 Posted February 21, 2012 Updated to 1.1: I added the alternate color and the ability to not translate anything between {} Also an example of how you could go about having two of these languages (honestly I quite like knowing what NPCs have to say): =begin Albhed Translator by Fomar0153 Version 1.1 ---------------------- Notes ---------------------- Adds an Albhed style language to your game. ---------------------- Instructions ---------------------- Follow the instructions in the Albhed module turn your chosen switch on to have people speak Albhed. ---------------------- Change Log ---------------------- 1.0 -> 1.1 Added the ability to not translate sections of a message. Use { and } to keep part of the message untranslated. Added the ability to have the translated text appear in another colour. ---------------------- Known bugs ---------------------- None =end module Albhed # Id of the switch to translate the text to Albhed ALBHED_SWITCH = 5 ALBHED_COLOR = 16 # system color ALBHED_CHARS = {} # ALBHED_CHARS['letter'] = ['replacementletter', itemid to translate] ALBHED_CHARS['a'] = ['b', 1] ALBHED_CHARS['b'] = ['c', 1] ALBHED_CHARS['c'] = ['d', 1] ALBHED_CHARS['d'] = ['e', 1] ALBHED_CHARS['e'] = ['f', 1] ALBHED_CHARS['f'] = ['g', 1] ALBHED_CHARS['g'] = ['h', 1] ALBHED_CHARS['h'] = ['i', 1] ALBHED_CHARS['i'] = ['j', 1] ALBHED_CHARS['j'] = ['k', 1] ALBHED_CHARS['k'] = ['l', 1] ALBHED_CHARS['l'] = ['m', 1] ALBHED_CHARS['m'] = ['n', 1] ALBHED_CHARS['n'] = ['o', 1] ALBHED_CHARS['o'] = ['p', 1] ALBHED_CHARS['p'] = ['q', 1] ALBHED_CHARS['q'] = ['r', 1] ALBHED_CHARS['r'] = ['s', 1] ALBHED_CHARS['s'] = ['t', 1] ALBHED_CHARS['t'] = ['u', 1] ALBHED_CHARS['u'] = ['v', 1] ALBHED_CHARS['v'] = ['w', 1] ALBHED_CHARS['w'] = ['x', 1] ALBHED_CHARS['x'] = ['y', 1] ALBHED_CHARS['y'] = ['z', 1] ALBHED_CHARS['z'] = ['a', 1] # Id of the switch to translate the text to OTHER OTHER_SWITCH = 5 OTHER_COLOR = 16 # system color OTHER_CHARS = {} # OTHER_CHARS['letter'] = ['replacementletter', itemid to translate] OTHER_CHARS['a'] = ['b', 1] OTHER_CHARS['b'] = ['c', 1] OTHER_CHARS['c'] = ['d', 1] OTHER_CHARS['d'] = ['e', 1] OTHER_CHARS['e'] = ['f', 1] OTHER_CHARS['f'] = ['g', 1] OTHER_CHARS['g'] = ['h', 1] OTHER_CHARS['h'] = ['i', 1] OTHER_CHARS['i'] = ['j', 1] OTHER_CHARS['j'] = ['k', 1] OTHER_CHARS['k'] = ['l', 1] OTHER_CHARS['l'] = ['m', 1] OTHER_CHARS['m'] = ['n', 1] OTHER_CHARS['n'] = ['o', 1] OTHER_CHARS['o'] = ['p', 1] OTHER_CHARS['p'] = ['q', 1] OTHER_CHARS['q'] = ['r', 1] OTHER_CHARS['r'] = ['s', 1] OTHER_CHARS['s'] = ['t', 1] OTHER_CHARS['t'] = ['u', 1] OTHER_CHARS['u'] = ['v', 1] OTHER_CHARS['v'] = ['w', 1] OTHER_CHARS['w'] = ['x', 1] OTHER_CHARS['x'] = ['y', 1] OTHER_CHARS['y'] = ['z', 1] OTHER_CHARS['z'] = ['a', 1] def self.translate(c) return c if ALBHED_CHARS[c.downcase].nil? return c if $game_party.has_item?($data_items[ALBHED_CHARS[c.downcase][1]]) return ALBHED_CHARS[c.downcase][0].downcase if c.downcase!.nil? return ALBHED_CHARS[c.downcase][0].upcase end def self.othertranslate(c) return c if OTHER_CHARS[c.downcase].nil? return c if $game_party.has_item?($data_items[OTHER_CHARS[c.downcase][1]]) return OTHER_CHARS[c.downcase][0].downcase if c.downcase!.nil? return OTHER_CHARS[c.downcase][0].upcase end end class Window_Base < Window #-------------------------------------------------------------------------- # ◠通常文å—ã®å‡¦ç† #-------------------------------------------------------------------------- alias albhed_process_normal_character process_normal_character def process_normal_character(c, pos) if @trans.nil? @trans = true end return albhed_process_normal_character(c, pos) unless $game_switches[Albhed::ALBHED_SWITCH] or $game_switches[Albhed::OTHER_SWITCH] if c == "{" @trans = false return end if c == "}" @trans = true return end c = Albhed.translate(c) if @trans and $game_switches[Albhed::ALBHED_SWITCH] c = Albhed.othertranslate(c) if @trans and $game_switches[Albhed::OTHER_SWITCH] change_color(text_color(Albhed::ALBHED_COLOR)) if @trans and $game_switches[Albhed::ALBHED_SWITCH] change_color(text_color(Albhed::OTHER_COLOR)) if @trans and $game_switches[Albhed::OTHER_SWITCH] text_width = text_size(c).width draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c) change_color(normal_color) pos[:x] += text_width end end 1 Rosenblack reacted to this Share this post Link to post Share on other sites
Wendell 81 Posted February 22, 2012 Fomar, thats REALLY AMAZING! Thank you so much! Share this post Link to post Share on other sites
Non ya 1 Posted February 22, 2012 This is really great! THanks once again fomor =) PS: I was trying to add one more language on there so i attempted... ya thats the word... LoL i attempted to add another on the script and heres what i got but didnt work? please make the correction =) =begin Albhed Translator by Fomar0153 Version 1.1 ---------------------- Notes ---------------------- Adds an Albhed style language to your game. ---------------------- Instructions ---------------------- Follow the instructions in the Albhed module turn your chosen switch on to have people speak Albhed. ---------------------- Change Log ---------------------- 1.0 -> 1.1 Added the ability to not translate sections of a message. Use { and } to keep part of the message untranslated. Added the ability to have the translated text appear in another colour. ---------------------- Known bugs ---------------------- None =end module Albhed # Id of the switch to translate the text to Albhed ALBHED_SWITCH = 5 ALBHED_COLOR = 16 # system color ALBHED_CHARS = {} # ALBHED_CHARS['letter'] = ['replacementletter', itemid to translate] ALBHED_CHARS['a'] = ['b', 1] ALBHED_CHARS['b'] = ['c', 1] ALBHED_CHARS['c'] = ['d', 1] ALBHED_CHARS['d'] = ['e', 1] ALBHED_CHARS['e'] = ['f', 1] ALBHED_CHARS['f'] = ['g', 1] ALBHED_CHARS['g'] = ['h', 1] ALBHED_CHARS['h'] = ['i', 1] ALBHED_CHARS['i'] = ['j', 1] ALBHED_CHARS['j'] = ['k', 1] ALBHED_CHARS['k'] = ['l', 1] ALBHED_CHARS['l'] = ['m', 1] ALBHED_CHARS['m'] = ['n', 1] ALBHED_CHARS['n'] = ['o', 1] ALBHED_CHARS['o'] = ['p', 1] ALBHED_CHARS['p'] = ['q', 1] ALBHED_CHARS['q'] = ['r', 1] ALBHED_CHARS['r'] = ['s', 1] ALBHED_CHARS['s'] = ['t', 1] ALBHED_CHARS['t'] = ['u', 1] ALBHED_CHARS['u'] = ['v', 1] ALBHED_CHARS['v'] = ['w', 1] ALBHED_CHARS['w'] = ['x', 1] ALBHED_CHARS['x'] = ['y', 1] ALBHED_CHARS['y'] = ['z', 1] ALBHED_CHARS['z'] = ['a', 1] # Id of the switch to translate the text to OTHER OTHER_SWITCH = 6 OTHER_COLOR = 11 # system color OTHER_CHARS = {} # OTHER_CHARS['letter'] = ['replacementletter', itemid to translate] OTHER_CHARS['a'] = ['ba', 1] OTHER_CHARS['b'] = ['ca', 1] OTHER_CHARS['c'] = ['da', 1] OTHER_CHARS['d'] = ['ea', 1] OTHER_CHARS['e'] = ['fa', 1] OTHER_CHARS['f'] = ['ga', 1] OTHER_CHARS['g'] = ['ha', 1] OTHER_CHARS['h'] = ['i', 1] OTHER_CHARS['i'] = ['j', 1] OTHER_CHARS['j'] = ['k', 1] OTHER_CHARS['k'] = ['l', 1] OTHER_CHARS['l'] = ['m', 1] OTHER_CHARS['m'] = ['n', 1] OTHER_CHARS['n'] = ['o', 1] OTHER_CHARS['o'] = ['p', 1] OTHER_CHARS['p'] = ['q', 1] OTHER_CHARS['q'] = ['r', 1] OTHER_CHARS['r'] = ['s', 1] OTHER_CHARS['s'] = ['t', 1] OTHER_CHARS['t'] = ['u', 1] OTHER_CHARS['u'] = ['v', 1] OTHER_CHARS['v'] = ['w', 1] OTHER_CHARS['w'] = ['x', 1] OTHER_CHARS['x'] = ['y', 1] OTHER_CHARS['y'] = ['z', 1] OTHER_CHARS['z'] = ['a', 1] # Id of the switch to translate the text to OTHER ANOTHER_SWITCH = 7 ANOTHER_COLOR = 14 # system color ANOTHER_CHARS = {} # OTHER_CHARS['letter'] = ['replacementletter', itemid to translate] ANOTHER_CHARS['a'] = ['baA', 1] ANOTHER_CHARS['b'] = ['caA', 1] ANOTHER_CHARS['c'] = ['daA', 1] ANOTHER_CHARS['d'] = ['eaA', 1] ANOTHER_CHARS['e'] = ['faA', 1] ANOTHER_CHARS['f'] = ['ga', 1] ANOTHER_CHARS['g'] = ['ha', 1] ANOTHER_CHARS['h'] = ['i', 1] ANOTHER_CHARS['i'] = ['j', 1] ANOTHER_CHARS['j'] = ['k', 1] ANOTHER_CHARS['k'] = ['l', 1] ANOTHER_CHARS['l'] = ['m', 1] ANOTHER_CHARS['m'] = ['n', 1] ANOTHER_CHARS['n'] = ['o', 1] ANOTHER_CHARS['o'] = ['p', 1] ANOTHER_CHARS['p'] = ['q', 1] ANOTHER_CHARS['q'] = ['r', 1] ANOTHER_CHARS['r'] = ['s', 1] ANOTHER_CHARS['s'] = ['t', 1] ANOTHER_CHARS['t'] = ['u', 1] ANOTHER_CHARS['u'] = ['v', 1] ANOTHER_CHARS['v'] = ['w', 1] ANOTHER_CHARS['w'] = ['x', 1] ANOTHER_CHARS['x'] = ['y', 1] ANOTHER_CHARS['y'] = ['z', 1] ANOTHER_CHARS['z'] = ['a', 1] def self.translate(c) return c if ALBHED_CHARS[c.downcase].nil? return c if $game_party.has_item?($data_items[ALBHED_CHARS[c.downcase][1]]) return ALBHED_CHARS[c.downcase][0].downcase if c.downcase!.nil? return ALBHED_CHARS[c.downcase][0].upcase end def self.othertranslate(c) return c if OTHER_CHARS[c.downcase].nil? return c if $game_party.has_item?($data_items[OTHER_CHARS[c.downcase][1]]) return OTHER_CHARS[c.downcase][0].downcase if c.downcase!.nil? return OTHER_CHARS[c.downcase][0].upcase end def self.anothertranslate(c) return c if ANOTHER_CHARS[c.downcase].nil? return c if $game_party.has_item?($data_items[ANOTHER_CHARS[c.downcase][1]]) return ANOTHER_CHARS[c.downcase][0].downcase if c.downcase!.nil? return ANOTHER_CHARS[c.downcase][0].upcase end end class Window_Base < Window #-------------------------------------------------------------------------- # ◠通常文å—ã®å‡¦ç† #-------------------------------------------------------------------------- alias albhed_process_normal_character process_normal_character def process_normal_character(c, pos) if @trans.nil? @trans = true end return albhed_process_normal_character(c, pos) unless $game_switches[Albhed::ALBHED_SWITCH] or $game_switches[Albhed::OTHER_SWITCH] if c == "{" @trans = false return end if c == "}" @trans = true return end return albhed_process_normal_character(c, pos) unless $game_switches[Albhed::ALBHED_SWITCH] or $game_switches[Albhed::ANOTHER_SWITCH] if c == "{" @trans = false return end if c == "}" @trans = true return end c = Albhed.translate(c) if @trans and $game_switches[Albhed::ALBHED_SWITCH] c = Albhed.othertranslate(c) if @trans and $game_switches[Albhed::OTHER_SWITCH] c = Albhed.anothertranslate(c) if @trans and $game_switches[Albhed::ANOTHER_SWITCH] change_color(text_color(Albhed::ALBHED_COLOR)) if @trans and $game_switches[Albhed::ALBHED_SWITCH] change_color(text_color(Albhed::OTHER_COLOR)) if @trans and $game_switches[Albhed::OTHER_SWITCH] change_color(text_color(Albhed::ANOTHER_COLOR)) if @trans and $game_switches[Albhed::ANOTHER_SWITCH] text_width = text_size(c).width draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c) change_color(normal_color) pos[:x] += text_width end end Share this post Link to post Share on other sites
Greensburg the 4th 9 Posted February 22, 2012 (edited) Though I'm no scripter, I recommend trying this: def process_normal_character(c, pos) if @trans.nil? @trans = true end return albhed_process_normal_character(c, pos) unless $game_switches[Albhed::ALBHED_SWITCH] or $game_switches[Albhed::OTHER_SWITCH] or $game_switches[Albhed::ANOTHER_SWITCH] if c == "{" @trans = false return end if c == "}" @trans = true return end ...etc Edited February 22, 2012 by Greensburg Share this post Link to post Share on other sites
Non ya 1 Posted February 22, 2012 Lovely!!! it worked thank you Greensburg =) Share this post Link to post Share on other sites
MysteryMan23 2 Posted February 23, 2012 (edited) I get it! It says, "Happy Birthday, Fomar!" Nice script. I might use this. Edited February 23, 2012 by MysteryMan23 1 Fomar0153 reacted to this Share this post Link to post Share on other sites
Fomar0153 121 Posted February 23, 2012 I get it! It says, "Happy Birthday, Fomar!" Nice script. I might use this. Thanks pity no one got it 9 days ago. Share this post Link to post Share on other sites
Non ya 1 Posted February 23, 2012 (edited) LoL! I didnt even translate it LoL! happy belate b-day fomar Edited February 23, 2012 by Non ya Share this post Link to post Share on other sites
SirCumferance 28 Posted March 9, 2012 (edited) Ok, maybe this was already covered elsewhere. Can you change the font between translations, so if I had Celtic Runes as a font and its all gibberish, it becomes Normal on translation. This would be pretty cool, if so. Edit: By the way, very awesome script. I re-read my post and realized I didnt once say thanks for making it. So, thanks and glad to see something new out there. Edited March 9, 2012 by SirCumferance 1 Rosenblack reacted to this Share this post Link to post Share on other sites
Rosenblack 79 Posted March 9, 2012 (edited) Ok, maybe this was already covered elsewhere. Can you change the font between translations, so if I had Celtic Runes as a font and its all gibberish, it becomes Normal on translation. This would be pretty cool, if so. I second this, I love Celtic Runes and wanted to use them. Can you please, please hehe Edited March 9, 2012 by Rosenblack Share this post Link to post Share on other sites
Fomar0153 121 Posted March 13, 2012 Replace the Window_Base section of the default script with: class Window_Base < Window #-------------------------------------------------------------------------- # ◠通常文å—ã®å‡¦ç† #-------------------------------------------------------------------------- alias albhed_process_normal_character process_normal_character def process_normal_character(c, pos) if @trans.nil? @trans = true end return albhed_process_normal_character(c, pos) unless $game_switches[Albhed::ALBHED_SWITCH] if c == "{" @trans = false return end if c == "}" @trans = true return end c = Albhed.translate(c) if @trans change_color(text_color(Albhed::ALBHED_COLOR)) if @trans font_name = Font.default_name Font.default_name = "Comic Sans MS" if @trans # edit the font name here text_width = text_size(c).width draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c) change_color(normal_color) Font.default_name = font_name pos[:x] += text_width end end 3 inqui, SirCumferance and Rosenblack reacted to this Share this post Link to post Share on other sites
Janek 0 Posted March 18, 2012 How can i create book that translate single letter like in ffx?? Share this post Link to post Share on other sites
Fomar0153 121 Posted March 18, 2012 How can i create book that translate single letter like in ffx?? You read the instructions, specifically: # ALBHED_CHARS['letter'] = ['replacementletter', itemid to translate] Share this post Link to post Share on other sites
Caveras 39 Posted June 22, 2012 Fun script! Thanks fomar =) One question: Is there a way to do something like ALBHED_CHARS['shi'] = ['ã—', 1] ALBHED_CHARS['SHI'] = ['ã‚·', 1] You know, so that it checks for a string instead of a letter? I'd love to implement some Japanese translation there, as you can see. The Japanese characters already work in my variant of your script and I've already added a upcase/downcase check, so all I'd need would be a string check. Share this post Link to post Share on other sites
Coolie 147 Posted June 23, 2012 The script still changes the color of the ENTIRE message when a special color is used, rather than only changing the color of translated letters. Bummer. Also, with Yanfly's Message System, name windows are impossible to translate, even when the name code is wrapped in { and }. Share this post Link to post Share on other sites
pinka 7 Posted July 10, 2012 Would it be possible to set another colour of translated text when using items to translate? For example, without the item the letter is red, with the item that translates it, it becomes green or whatever. Share this post Link to post Share on other sites
Ariel Schnee 7 Posted August 7, 2012 Would it be possible to set another colour of translated text when using items to translate? For example, without the item the letter is red, with the item that translates it, it becomes green or whatever. I personally think that untranslated should be color = 16 and translated should be color = 27. Share this post Link to post Share on other sites