Ah, changed the wrong spot in the code. Ooops. Should be fixed now. If 3.3.2 doesn't seem to be working, try moving the Special Message Codes script above External Text.
External Text v3.3.4 (Write your game in an organized manner! Translate with ease!)
RGSS3 Scripts (RMVX Ace)Hi Enelvon,
Still no luck.. tried to move the ET script after or before several scripts, but always get this error when I start a new game (the game runs, then it fails on New Game)
Here's the backtrace from when I put ET as the last script before main:
Enelvon External Text:974:in `convert_escape_characters': undefined local variable or method `text' for #<Window_Gab:0xa300b10>, NameError
from Window_Base:211:in `draw_text_ex'
from Yanfly Gab Window:259:in `refresh'
from Yanfly Gab Window:212:in `setup'
from Yanfly Gab Window:312:in `setup_gab_window'
from Yanfly Gab Window:143:in `gab'
from Script Call Traceback:59:in `eval'
from Script Call Traceback:59:in `eval'
from Script Call Traceback:59:in `eval'
from Tsuki Large Script Call:45:in `command_355'
from Game_Interpreter:197:in `execute_command'
from Paralel Process Fix:14:in `run'
from Tsuki Effect Manager:907:in `run'
from Game_Interpreter:500:in `command_117'
from Tsuki Common Event Arguments:104:in `command_117'
from Game_Interpreter:197:in `execute_command'
from Paralel Process Fix:14:in `run'
from Tsuki Effect Manager:907:in `run'
from Game_Interpreter:60:in `block in create_fiber'
from Window_Base:211:in `draw_text_ex'
from Yanfly Gab Window:259:in `refresh'
from Yanfly Gab Window:212:in `setup'
from Yanfly Gab Window:312:in `setup_gab_window'
from Yanfly Gab Window:143:in `gab'
from Script Call Traceback:59:in `eval'
from Script Call Traceback:59:in `eval'
from Script Call Traceback:59:in `eval'
from Tsuki Large Script Call:45:in `command_355'
from Game_Interpreter:197:in `execute_command'
from Paralel Process Fix:14:in `run'
from Tsuki Effect Manager:907:in `run'
from Game_Interpreter:500:in `command_117'
from Tsuki Common Event Arguments:104:in `command_117'
from Game_Interpreter:197:in `execute_command'
from Paralel Process Fix:14:in `run'
from Tsuki Effect Manager:907:in `run'
from Game_Interpreter:60:in `block in create_fiber'
The error itself is 'Script Enelvon External Text' line 974:NameError ocurred
Thanks!
This time I changed the right spot, but only part of it. Sigh. It still says 3.3.2, but that should be fixed. I haven't had access to Ace today, so these fixes have been untested -- sorry for all of the problems, but this one will hopefully do the job!
It's great you are taking the time to make ET and ATS work together!
In this latest version the \t text code doesn't seem to be interpreted..
For example: Some words \t[key1] just prints Some words [key1]
Thanks again!
Had access to Ace again today and tracked down the problem. The script is now v3.3.3, which worked with \t for every test project I tossed it in!
Indeed, no problems found! Thanks a lot!!
v3.3.4 is now up! This is a rather important update, as it includes a fix for errors with saving that was provided by Source.
Hi Enelvon! Your script looks super-useful, so I'm trying it out. But I'm running into 2 issues. I don't know if these are bugs, or if I'm doing something wrong.
First, here is my text file:
Second, I made a couple of minor edits to your script, but I don't know if that has any bearing on my problems or not. One of the changes I had to make because I'm using your script in conjunction with Fomar's Faces to Busts script.
Finally, here is my event:
So the first screen that comes up looks great. The text wraps nicely, the bust is present, and everything looks good:
On the second screen, I'm using the text code "\n[2]" to retrieve the actor's name from the database. As you can see, it isn't centered and is cut off on the right. I'm guessing it's trying to center it based on the width of "\n[2]" instead of the actor's name in the database, "Scarlet Fletcher":
On the third screen, I present my first set of choices. Unfortunately, the bust doesn't appear. If I remove the call to show_choices(), the bust appears. So it seems that the show_choices() call doesn't support faces? I tried putting the face on both the text and the choices, as you can see from my text file. Neither worked.
Are these bugs, or am I missing something?
First, here is my text file:
[Key] MrsFairchild01
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Position] Top
Ithran! I'm so glad you're here! My daughter did not come home last night, and I can't find her! My husband, Jarvis, is away in the city of Garrett, and I can't leave my baby to look for my daughter!
[Key] MrsFairchild02
[Face] !Scarlet_sad, 5
[Name] \n[2]
[Position] Top
Oh no! Can we help her, Ithran? I'm sure your dad wouldn't mind. This is important, after all!
[Key] MrsFairchild03
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Position] Top
Please, can you help me?
[Key] MrsFairchild04
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Default Choice] 1
Yes, I can help look for her!
I'm sorry, I can't right now.
[Key] MrsFairchild05
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Position] Top
Oh, thank you! The last time I saw her, she was chasing butterflies in the meadow across the river!
[Key] MrsFairchild06
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Position] Top
I understand. I'll see if I can find someone else to help. Please come back as soon as you can, just in case we haven't found her yet. I may still need your help!
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Position] Top
Ithran! I'm so glad you're here! My daughter did not come home last night, and I can't find her! My husband, Jarvis, is away in the city of Garrett, and I can't leave my baby to look for my daughter!
[Key] MrsFairchild02
[Face] !Scarlet_sad, 5
[Name] \n[2]
[Position] Top
Oh no! Can we help her, Ithran? I'm sure your dad wouldn't mind. This is important, after all!
[Key] MrsFairchild03
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Position] Top
Please, can you help me?
[Key] MrsFairchild04
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Default Choice] 1
Yes, I can help look for her!
I'm sorry, I can't right now.
[Key] MrsFairchild05
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Position] Top
Oh, thank you! The last time I saw her, she was chasing butterflies in the meadow across the river!
[Key] MrsFairchild06
[Face] !mrs_fairchild_sad, 5
[Name] Mrs. Fairchild
[Position] Top
I understand. I'll see if I can find someone else to help. Please come back as soon as you can, just in case we haven't found her yet. I may still need your help!
First, I changed the width of the name box to 250 because the default width was too small for me. It was causing the names to be cut off:
class Window_NameBox < Window_Base # Creates a new instance of Window_NameBox. # # @return [Window_NameBox] a new instance of Window_NameBox def initialize super(0, Graphics.height - 168, 0, 0) @position = 2 self.visible = false; close self.height = 48 self.width = 250Second, I commented out this line so that the text wouldn't wrap too early. Per an earlier post, I saw that this could cause problems with Fomar's script, because it seems to be expecting an actual faceset and leaves room for it:
def too_wide?(text, type) @message_width ||= SES::ExternalText.message_window.contents_width width = @message_width width -= 8 if type == :choices # Removed since I'm using Fomar's Faces to Bust script. # But this means that I need to use a Bust for every character. #width -= 112 unless @face_name.empty? SES::ExternalText.message_window. text_size(slice_escape_characters(text)).width > width end
class Window_NameBox < Window_Base # Creates a new instance of Window_NameBox. # # @return [Window_NameBox] a new instance of Window_NameBox def initialize super(0, Graphics.height - 168, 0, 0) @position = 2 self.visible = false; close self.height = 48 self.width = 250Second, I commented out this line so that the text wouldn't wrap too early. Per an earlier post, I saw that this could cause problems with Fomar's script, because it seems to be expecting an actual faceset and leaves room for it:
def too_wide?(text, type) @message_width ||= SES::ExternalText.message_window.contents_width width = @message_width width -= 8 if type == :choices # Removed since I'm using Fomar's Faces to Bust script. # But this means that I need to use a Bust for every character. #width -= 112 unless @face_name.empty? SES::ExternalText.message_window. text_size(slice_escape_characters(text)).width > width end
Hello GolfHacker! I made some changes to make the name display consistent when using message codes and to prevent the face (or busts graphics, in your case) removal when using choices. You can find the edited version here.
I also added an option to fit the width of the name box to the width of the name text:
# Whether or not to fit the width of the name box window to the name text. FitNameBoxWidth = trueIf you want to use the same width for every name, set the above constant to false and repeat the changes you made in Window_NameBox.
Try it and let me know if you encounter anything else.
I also added an option to fit the width of the name box to the width of the name text:
# Whether or not to fit the width of the name box window to the name text. FitNameBoxWidth = trueIf you want to use the same width for every name, set the above constant to false and repeat the changes you made in Window_NameBox.
Try it and let me know if you encounter anything else.
That helped tremendously, thanks!!
I still need my second edit to fix the issue with Fomar's script (where the text wraps too early), but that's ok with me. The other two issues are solved. Thank you for the amazingly quick fix, Source!
One more minor request: I'm using Yanfly's Ace Message System, and I really like the "\>" code to make the text on each line show instantly, instead of one character at a time (which really bugs me as a player who reads very fast). Obviously, since this external text script does the text wrapping for me, it doesn't automatically put the "\>" on subsequent lines - so I can put this code at the start of the first line, but only the first line displays immediately. I'm wondering if the script could be modified to detect this "\>" code at the start of the text, and if it does, to then prepend this code at the start of each line when it wraps. It would need to ignore the auto-prepended "\>" when computing the length of each subsequent line, so subsequent lines wrap properly. But this would be a really nice feature, if it could be done.
I still need my second edit to fix the issue with Fomar's script (where the text wraps too early), but that's ok with me. The other two issues are solved. Thank you for the amazingly quick fix, Source!
One more minor request: I'm using Yanfly's Ace Message System, and I really like the "\>" code to make the text on each line show instantly, instead of one character at a time (which really bugs me as a player who reads very fast). Obviously, since this external text script does the text wrapping for me, it doesn't automatically put the "\>" on subsequent lines - so I can put this code at the start of the first line, but only the first line displays immediately. I'm wondering if the script could be modified to detect this "\>" code at the start of the text, and if it does, to then prepend this code at the start of each line when it wraps. It would need to ignore the auto-prepended "\>" when computing the length of each subsequent line, so subsequent lines wrap properly. But this would be a really nice feature, if it could be done.
Hey guys,
Can someone help me with the Multi Lang Script?
I really want to add this scripts into my game but I can't really work with them. I tried so many diffent things to make a selection for my RPG Users but I can't figure it out. Please. How can I change the language? I mean I don t want to add it like this.
SceneManager.call(Scene_LanguageSelect)I know there must be something like this.
SceneManager.call(Scene_LanguageSelect(English))Or even something similar to this. But I can't figure it out. I didn't really got it. T_T
I hope someone here can help me with the whole thing. Currently it works but I also use a variable to check the language for some other stuff.
So is there a way I can just set the language on English or German without making the player to choose two times?
Can someone help me with the Multi Lang Script?
I really want to add this scripts into my game but I can't really work with them. I tried so many diffent things to make a selection for my RPG Users but I can't figure it out. Please. How can I change the language? I mean I don t want to add it like this.
SceneManager.call(Scene_LanguageSelect)I know there must be something like this.
SceneManager.call(Scene_LanguageSelect(English))Or even something similar to this. But I can't figure it out. I didn't really got it. T_T
I hope someone here can help me with the whole thing. Currently it works but I also use a variable to check the language for some other stuff.
So is there a way I can just set the language on English or German without making the player to choose two times?
Thank you for your suggestion -- the ability to prepend escape characters to the start of each line will be included in the next release.
It appears to be undocumented, which I'll fix when I have a little more time, but you can use this script call to set the language:
DataManager.set_language(!Language!)
where !Language! is the name of the language as a string. If you wanted to set the language to German, you'd use
DataManager.set_language('German')
and English would be
Code:
DataManager.set_language('English')
OH A SUPER THANK YOU for that. Now I can go to the next step of translating my game. 😀
That was the thing I needed to know 😀
Normally I only need an example to understand it but sometimes there is no. But that you very much. If you have something I maybe could help you with just ask. Maybe I can help you then. 😀
Is this one compatible with YEA Meassage system codes? E.g. for when I want to add a namebox? Or change textstyle?
You can add a name box without the YEA Message system codes. This script provides tags for that in your data file.
Haven't tried changing the text style yet...
Haven't tried changing the text style yet...
I've never tested it, but it should be. It reads all message codes, just like the default system would. ET has its own built-in name box that works alongside its tagging system, though, which I'd recommend over Yanfly's for the sake of knowing whose text it is at a glance.
Hey,
It s me again. I m struggle to get the "external-text-database.rb" to work. But I got a BIG problem.
I added the script as told to the scripts list. Then I added this example and only changed the number so I can see if something changed.
[Key] Skill_59_message1I added it in both external files and changed it to this.
[Key] Skill_59_message2But nothing changed. Then I noticed I put the wrong class to the charakters so I decided to start a new game but then the next problem came up. You type in a name for the Hero but it get streight replaced by something like this
#<SES::ExternalText::TextWrapper:0xc693c80>Then I also ask the player to select a nation and a genre but the charakter didn't get a skin so he is invisible for everyone.
I don't know why but I can't really understand and work with these scripts. T_T
Please help me with this because I really need to just translate the skills, items etc in two diffrent languages.
It s me again. I m struggle to get the "external-text-database.rb" to work. But I got a BIG problem.
I added the script as told to the scripts list. Then I added this example and only changed the number so I can see if something changed.
[Key] Skill_59_message1I added it in both external files and changed it to this.
[Key] Skill_59_message2But nothing changed. Then I noticed I put the wrong class to the charakters so I decided to start a new game but then the next problem came up. You type in a name for the Hero but it get streight replaced by something like this
#<SES::ExternalText::TextWrapper:0xc693c80>Then I also ask the player to select a nation and a genre but the charakter didn't get a skin so he is invisible for everyone.
I don't know why but I can't really understand and work with these scripts. T_T
Please help me with this because I really need to just translate the skills, items etc in two diffrent languages.
I just want to say thank you for this amazing script 🙂
great script!
I'm experimenting with this script, and I have a question. Is there a way to start a new line in a text?
EDIT: Nevermind, I figured it out.
And I must say, now that I have figured this script out, it is absolutely amazing, and essential for anyone who has many text in his game. Thank you so much! 😀
EDIT: Nevermind, I figured it out.
And I must say, now that I have figured this script out, it is absolutely amazing, and essential for anyone who has many text in his game. Thank you so much! 😀
Original thread: https://forums.rpgmakerweb.com/threads/external-text-v3-3-4-write-your-game-in-an-organized-manner-translate-with-ease.6608/