External Text v3.3.4 (Write your game in an organized manner! Translate with ease!)

Enelvon

Slumbering Goddess
Veteran
Joined
Nov 29, 2012
Messages
240
Reaction score
134
First Language
English
Primarily Uses
Fixed and updated - sorry, could have sworn I posted a reply, but it looks like I didn't. The problem occurred because it was trying to draw EOL characters, since I was a bit of an idiot and didn't tell it to strip them if you use get_text. Regardless, the problem shouldn't occur if you grab v2.2 from the Pastebin. I'll update the topic name now, since "Now v2.1" is no longer exactly accurate.

In other news, Solistra has convinced me to give this a bit of an overhaul in the near future, so you can look forward to that. Future updates should maintain full compatibility with old text files, of course - they'll simply be more efficient (and perhaps contain a few shiny new features).

I will also be posting a few new (to the internet, anyway) scripts and revising some of my others very soon. Several are just waiting on me to write/update documentation, so you should see a couple of things from me by Sunday or so.

Edit: Glanced back at it and realized I accidentally left in a debug statement. Fairly harmless, but distracting if the console is open. It's gone now.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,033
Reaction score
7,029
First Language
German
Primarily Uses
RMMV

Tarumes

Villager
Member
Joined
Mar 2, 2014
Messages
27
Reaction score
10
First Language
German
Primarily Uses
hi

[Line] wont work

[Key] 123[Face] People1, 6[Name] BelloTest [Line]Test
 

Enelvon

Slumbering Goddess
Veteran
Joined
Nov 29, 2012
Messages
240
Reaction score
134
First Language
English
Primarily Uses
Yes, that's a known issue that occurs because I changed the backend to allow for manual line breaks and forgot to update the documentation. v3.0 is almost complete, so the documentation will be corrected when that is released.
 

Euphoria

Veteran
Veteran
Joined
Jun 27, 2013
Messages
378
Reaction score
92
First Language
English
Primarily Uses
For some reason when I add color to the name box, the name is positioned to the left side automatically.

[key] Test[Face] Actor1, 0[Name] \c[14]RalphBlah Blah BlahShows the name in the window like this:

[Ralph           ]

I also tried manually adding it in to the script with the same results...

Also is it possible to add in other text codes to be used by this script? And if so, where would be the proper place to insert them?
 
Last edited by a moderator:

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
I've been having problems when I have more then 9 entries. Example:

[Key] Intro 1Ola ola[Key] Intro 2Ola ola 2[Key] Intro 3Ola ola 3 [Key] Intro 4Ola ola 4[Key] Intro 5Ola ola 5[Key] Intro 6Ola ola 6[Key] Intro 7Ola ola 7[Key] Intro 8Ola ola 8[Key] Intro 9Ola ola 9[Key] Intro 10Ola ola 10[Key] Intro 11Ola ola 11[Key] Intro 12Ola ola 12[Key] Intro 13Ola ola 13And if I set up and event with a script command doing block_text(/^Intro \d+/)

The result will be:

Ola ola 

Ola ola 10

Ola ola 11

Ola ola 12

Ola ola 13

Ola ola 2

..

Probably because 'Ola ola 10' contains 'Ola ola 1'

Am I doing something wrong or is this a known issue and if so is there a work around? 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,033
Reaction score
7,029
First Language
German
Primarily Uses
RMMV
That is alphanumeric sorting instead of numeric sorting - in alphanumeric sorting, 12 is in front of 2 - that is regular result for this sorting.


And unfortunately this is NOT easily solved, because the alphabet isn't as intuitive for computers as it is for humans. You'll see the same if you have windows sort similiar filenames.


I suggest (as done in thousands of programs with the same problem) to use full alphanumeric numbering, that is 'intro 01' instead of 'intro 1' and so on.
 

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
That is alphanumeric sorting instead of numeric sorting - in alphanumeric sorting, 12 is in front of 2 - that is regular result for this sorting.

And unfortunately this is NOT easily solved, because the alphabet isn't as intuitive for computers as it is for humans. You'll see the same if you have windows sort similiar filenames.

I suggest (as done in thousands of programs with the same problem) to use full alphanumeric numbering, that is 'intro 01' instead of 'intro 1' and so on.
Oh I see. Thanks for the quick reply. I honestly didn't even think of that. Thanks!
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,255
Reaction score
612
First Language
English
Primarily Uses
the best full proof solution is not to use spaces in your keys. Personally, I keep everything separate by sorting all posts into their respective maps and events.

For example, in Map 32 and Event 4, my key for this event is:

032_Ev4_Intro001

It also helps to point you in the right direction when you're looking over your script and you cant find it in the editor.
 
Last edited by a moderator:

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
My problem was that I was writing all the story conversations on a separate doc file in order to avoid spelling mistakes but it's just a whole lot of work to copy and paste it back to VX Ace and also organize it on the message box. Also after changing something to make more sense on the doc I would have to change it again on VX Ace.. So this script will fit a glove once I get it all organized. :D
 

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
I decide to make a quick function for my own needs here and I hope it helps someone else, follows:

def block_text_b_ex(key, start, finish) i = start; $game_text.keys.each do |k| keys = key + " " + i.to_s(); if keys == k text(k) i = i + 1 if i > finish break end end end endWith this you're able to show, say, the first 5 five entries in your "Intro" Key.

block_text_b_ex("Intro", 1, 5) #Will load the text on your text file from Intro 1 to Intro 5 (inclusive)#You can do something here: play audio, and then continue with the story without needing two keysblock_text_b_ex("Intro", 6, 12) Notice I got read of the ".sort" on the "$game_text.keys.each" do while which was what was making the "Intro 10" be put after "Intro 1". This way the order is the order that you have in your file. So if I have:

[Key] Intro 1Ola 1[Key] Intro 2Ola 2[Key] Intro 3Ola 3[Key] Intro 4Ola 4[Key] Intro 5Ola 5[Key] Intro 6Ola 6[Key] Intro 7Ola 7[Key] Intro 8Ola 8[Key] Intro 9Ola 9[Key] Intro 10Ola 10It will work just fine. It wont show "Ola 10" after "Ola 1". Well, hope it helps someone. 

Cheers!
 

Enelvon

Slumbering Goddess
Veteran
Joined
Nov 29, 2012
Messages
240
Reaction score
134
First Language
English
Primarily Uses
Glad you got things resolved! Sorry that I wasn't around earlier--I've been a little busy. This script will *probably* be getting its v3 soon--I meant to release it months ago, but things happened and it never got completed. It actually has something similar to your block_text_b_ex method, though slightly more efficient and without your sort alteration. I'll probably add in alternate block_text methods without the sort since it seems to have been a problem for you, though. Thanks for the heads up!
 

IsFutureBright

Lightning Bolt Action
Veteran
Joined
Dec 26, 2012
Messages
120
Reaction score
11
First Language
Portuguese
Primarily Uses
Glad you got things resolved! Sorry that I wasn't around earlier--I've been a little busy. This script will *probably* be getting its v3 soon--I meant to release it months ago, but things happened and it never got completed. It actually has something similar to your block_text_b_ex method, though slightly more efficient and without your sort alteration. I'll probably add in alternate block_text methods without the sort since it seems to have been a problem for you, though. Thanks for the heads up!
Awesome ;) Thanks for the great script.
 

Enelvon

Slumbering Goddess
Veteran
Joined
Nov 29, 2012
Messages
240
Reaction score
134
First Language
English
Primarily Uses
Not a problem! Glad you like it!
 

sinchross

Villager
Member
Joined
Jun 27, 2012
Messages
23
Reaction score
4
First Language
Portuguese
Primarily Uses
N/A
I'm trying to call the message by script in a Character_Base Class... but I don't figure out how to do it the right way...

How can I call the message inside a method of the RGSS3 editor?

 
 

Ksi

~RTP Princess~
Moderator
Joined
Mar 13, 2012
Messages
2,056
Reaction score
1,582
First Language
English
Hey there, Enelvon! Thanks for this awesome script - it's great~

I know v3.0 should contain a fix for the line issue (that is, being able to force a line break instead of relying on text wrapping) but was there any work-around that anyone can suggest? I've a text-heavy project that needs some line-breaks and while I could input all the lines in manually, I've something of a deadline and there's other bits of the game that also need working on so decided this script was perfect for my needs. But, yeah, line breaks... ^.^;

Someone (Hasvers~<3) on another forum presented a fix for this issue with the line break. It's very, very easy.

- Go to line 367

- Add " before and after / and i, respectively. That is, the code should look like so:

          v.gsub!("/\[Line\]/i", "\n" )

- That is all. It should now work perfectly as it's supposed to.

Yey~
 
Last edited by a moderator:

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,255
Reaction score
612
First Language
English
Primarily Uses
Enelvon seems very busy so I'll go ahead and post the fix for allowing choices, number inputs etc to appear along with the window instead of the message window stopping them from showing:
 
It's a simple copy and paste from the default Game_Interpreter script that this one forgot to implement.
Simply paste the following around line 478, just below  "There is no text for the key #{key}.") and above wait_for_message

Code:
    #====================    case next_event_code    when 102  # Show Choices      @index += 1      setup_choices(@list[@index].parameters)    when 103  # Input Number      @index += 1      setup_num_input(@list[@index].parameters)    when 104  # Select Item      @index += 1      setup_item_choice(@list[@index].parameters)    end    #====================
 
Last edited by a moderator:

Enelvon

Slumbering Goddess
Veteran
Joined
Nov 29, 2012
Messages
240
Reaction score
134
First Language
English
Primarily Uses
The v3.0 update is finally released! MultiLang has also been updated to v2.0.
 

♥SOURCE♥

Too sexy for your party.
Member
Joined
Mar 14, 2012
Messages
693
Reaction score
410
Primarily Uses
Amazing work! This script is absolutely the best in what it does. I highly recommend it to everyone. I can't imagine working on a project without it (and the MultiLang add-on!).

The code is of the highest quality (I didn't expect less from Enelvon) and the features and MultiLang add-on are very useful and convenient. This script is really a gem that everyone should get.

Thank you very much for sharing it <3
 

cabfe

Cool Cat
Veteran
Joined
Jun 13, 2013
Messages
2,335
Reaction score
2,483
First Language
French
Primarily Uses
RMVXA
I tried the new versions (External v3.0.1 and Multilang 2.0) and got two errors (at least).

First one in multilang, line 151:

File.open("Data/Text.txt", "r:BOM|UTF-8") do |file|I fixed it like this:
Code:
 File.open("Data/#{l}.txt", "r:BOM|UTF-8") do |file|
 but now I have another error, at line 311 of External Text 3.0.1: (fixed, see edit below)

External Text v3.0.1:311:in `block in <module:ExternalText>': undefined local variable or method `text' for SES::ExternalText:Module (NameError)

from External text multilang2.0:123:in `call'

from External text multilang2.0:123:in `block (4 levels) in create_text'

from External text multilang2.0:121:in `each_pair'

from External text multilang2.0:121:in `block (3 levels) in create_text'

from External text multilang2.0:119:in `each'

from External text multilang2.0:119:in `each_with_index'

from External text multilang2.0:119:in `block (2 levels) in create_text'

from External text multilang2.0:118:in `open'

from External text multilang2.0:118:in `block in create_text'

from External text multilang2.0:115:in `each'

from External text multilang2.0:115:in `create_text'

from External text multilang2.0:145:in `load_normal_database'

from DataManager:29:in `load_database'

from DataManager:18:in `init'

from SceneManager:20:in `run'
I tried in a blank project, same errors. Am I doing something wrong? Has usage of the new versions changed?

Edit:

Fixed the second error like this:

from this

Code:
          $game_text[@key][0][0], text[key][0][1] = name, index.to_i
to this
Code:
          $game_text[@key][0][0], $game_text[key][0][1] = name, index.to_i
Continuing my testing.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Profile Posts

Here's the graveyard area I'm currently working on for another small project! (This is actually an RPG and not a puzzle game for once)
In the strangest turn of events, my animations now live in the characters folder, and my character images now live in the pictures folder. It's a complicated world, but weirdly a more resource efficient one. :LZSexcite:
Did you know that we use robotic spy animals to learn about how different species behave in the wild? We're only a step away from robotic spy humans, and then Terminator. :p
Not being able to do a commission/request after all and having to give back the money is so heartbreaking.

Sometimes I'm just way too eager to help people out and suddenly find myself in a very deep hole because I'm not gonna be able to finish it. I really hope I don't come across as unprofessional to these people and in general. =n="

Forum statistics

Threads
98,049
Messages
948,866
Members
129,318
Latest member
ultravioleta_s
Top