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

J_C

Veteran
Veteran
Joined
Jan 21, 2015
Messages
192
Reaction score
45
First Language
Hungarian
Primarily Uses
N/A
Hm, I don't see anything bad about this. Could you show me a screenshot about your event page so I can see how did you setup the choice?
 

Erkallys

Newbie to be great some day
Member
Joined
Aug 8, 2016
Messages
23
Reaction score
2
First Language
French
Primarily Uses
My bad, I used text instead of show_choices in the script call. Now everything is fine. Thank you for your help @J_C
 
Last edited by a moderator:

The007who

Call me double 0s
Veteran
Joined
Oct 11, 2015
Messages
119
Reaction score
80
First Language
Italian
Primarily Uses
RMVXA
Hi!
Very nice script indeed!
Btw, how would translate stuff from the Terms tab in the Database?
Stuff like: Start, Load, Quit, To the title, etc...
Hope you reply.
The007who
 

CodeHunterEx

Hunter of the Perfect Code
Veteran
Joined
Nov 26, 2016
Messages
133
Reaction score
63
First Language
English
Primarily Uses
RMVXA
I could be blind, but I cannot find the script to view it. Is it no longer available?
 

dragon_slayer

Warper
Member
Joined
Jan 3, 2018
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Keep getting error:

Script 'Game Interpreter' line 1411: NoMethodError occured.
undefined method `< <' for nil:NilClass

Please help!
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,005
Reaction score
11,331
First Language
English
Primarily Uses
RMVXA
@dragon_slayer Did you use an existing save file to test this? That is the most usual reason for getting a NoMethodError. When you install a new script you almost always have to start your play test again from 'New Game'. That is because the script is calling for data which does not exist in your old save file.
 

dragon_slayer

Warper
Member
Joined
Jan 3, 2018
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMVXA
@Kes
No...
Even though I am using JV Master's Skip Title Screen :|
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,263
Reaction score
7,142
First Language
German
Primarily Uses
RMMV
"Game interpreter" in that error message means that this error is happening in an event, not in the scripts themselves. And the Rest of the message looks as if this is either inside a script command or inside a script line of a conditional branch or control variable.
Both indicate that the error might not even come from this script, unless you were trying to access one of its few script functions.

Can you give us a Screenshot of the event that is supposed to run when the message pops up?
 

dragon_slayer

Warper
Member
Joined
Jan 3, 2018
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMVXA
The main event:
Screenshot (54).png

I noticed that the error occurs in the common event Language Select
Screenshot (56).png

Thanks for the help
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,263
Reaction score
7,142
First Language
German
Primarily Uses
RMMV
You're using the multilanguage addon for this.
Unfortunately I can't even find that add-on on the ses page anymore, can you give a link to it as well?
 

dragon_slayer

Warper
Member
Joined
Jan 3, 2018
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Here:
#--
# External Text: MultiLang v2.1.0 by Enelvon
# =============================================================================
#
# Summary
# -----------------------------------------------------------------------------
# This script allows you to have multiple languages in your game. The user
# can swap between them, and the game will remember which language was last
# selected in between gaming sessions.
#
# Compatibility Information
# -----------------------------------------------------------------------------
# **Required Scripts:**
# SES - External Text v3.1.0 or higher
#
# **Known Incompatibilities:**
# None.
#
# Usage
# -----------------------------------------------------------------------------
# Create a directory named Text in the Data folder for your project. Inside of
# this directory, create a new directory with the name of each language that you
# intend to include in your project -- make sure to add the names of these
# directories to the Languages array in SES::ExternalText. Any text files that
# you place in these language directories will be read into the project, so feel
# free to organize them however you'd like! You can even add subfolders to the
# language folders. The only thing that you *need* to do is use the same keys
# in each language -- if you don't, the game won't know where to look for text
# in alternate languages!
#
# Note that each language can (and probably should) have different text for
# the language select screen. The default is in English, obviously. To change
# it, create a key in the language's file called
#
# `Language Select`
#
# Make sure it's spelled exactly the same way, space and capitalization
# included. The text you use for this key will be displayed when selecting
# languages with that language as the current game language.
#
# Script Calls
# -----------------------------------------------------------------------------
# To call the language selection scene, use this:
#
# `SceneManager.call(Scene_LanguageSelect)`
#
# You can use it on the map, or add it to a menu of some kind. Your choice.
#
# New Methods
# -----------------------------------------------------------------------------
# * `module DataManager`
# - `self.check_language`
# - `self.set_language`
#
#
# DataManager.set_language("English")
#
#
#
#DataManager.check_language == "English" # Returns true if the current language is set to English
#DataManager.check_language != "Italian" # Returns true if the current language is not set to Italian.
#
#
#
# License
# -----------------------------------------------------------------------------
# This script is made available under the terms of the MIT Expat license.
# View [this page](http://sesvxace.wordpress.com/license/) for more detailed
# information.
#
# Installation
# -----------------------------------------------------------------------------
# Put this script below Materials and above Main. It must also be below
# SES - External Text v3.1.0 or higher.
#
#++




module SES
# ExternalText
# ===========================================================================
# Module containing configuration information for the External Text script.
module ExternalText

# Array of languages present in the game.
Languages = ["English", "French", "German", "Spanish", "Italian", "Polish", "Russian", "Japanese"]

end
end

$imported ||= {}
if !$imported["SES - External Text"] ||
$imported["SES - External Text"] < '3.1.0'
raise("You need SES - External Text v3.1.0 or higher to use SES - MultiLang.")
end
$imported["SES - MultiLang"] = '2.1.0'

# DataManager
# =============================================================================
# The singleton class of the default RPG Maker module for handling data.
class << DataManager

# Checks what language the game should launch with.
#
# @return [String] the name of the default language
def check_language
language = SES::ExternalText::Languages[0]
File.open("Game.ini", "r:BOM|UTF-8") do |f|
f.readlines.each do |line|
begin
if line =~ /Language=(\w+)/
language = $1 if SES::ExternalText::Languages.include?($1)
end
rescue
end
end
end
language
end

# Serializes all languages txt files to rvdata2 files, allowing them to be
# read from inside an encrypted archive.
#
# @return [void]
def create_text
$game_text = {}
text = {}
key = ""
SES::ExternalText::Languages.each do |l|
$game_text.clear
SES::ExternalText.each_file("Data/Text/#{l}") do |f|
File.open(f, "r:BOM|UTF-8") do |file|
file.readlines.each_with_index do |v,i|
next if v =~ /(^\s*(#|\/\/).*|^\s*$)/
SES::ExternalText::Tags.each_pair do |k,p|
if v =~ k
p.call(*$~[1..-1])
v.clear
end
end
if SES::ExternalText.key && !v.empty?
v = "\n#{v}" unless $game_text[SES::ExternalText.key][1].empty?
$game_text[SES::ExternalText.key][1] << v
end
end
end
end
File.open("Data/#{l}.rvdata2", "w") do |file|
Marshal.dump($game_text, file)
end
end
end

# Loads the game's databases.
#
# @return [void]
def load_normal_database
en_et_dm_lnd
if FileTest.directory?("Data/Text/#{SES::ExternalText::Languages[0]}")
create_text
end
$game_text = load_data("Data/#{check_language}.rvdata2")
end

# Loads the game's databases for a battle test.
#
# @return [void]
def load_battle_test_database
en_et_dm_lbd
if FileTest.directory?("Data/Text/#{SES::ExternalText::Languages[0]}")
create_text
end
$game_text = load_data("Data/#{check_language}.rvdata2")
end

# Changes the default language.
#
# @return [void]
def set_language(language)
lines = File.read("Game.ini")
lines.gsub!(/Language=(\w+)/) { "Language=#{language}" }
lines << "Language=#{language}\n" if !lines.include?("Language=#{language}")
File.open("Game.ini", "w") { |f| f.write(lines) }
$game_text = load_data("Data/#{language}.rvdata2")
end
end

# Window_LanguageSelect
# =============================================================================
# The main window for the bare-bones language selection scene.
class Window_LanguageSelect < Window_Command

# Creates a new instance of Window_LanguageSelect.
#
# @return [Window_LanguageSelect] a new instance of Window_LanguageSelect
def initialize
super((Graphics.width - window_width) / 2,
(Graphics.height - window_height) / 2)
end

# The number of lines to display at once in the window.
#
# @return [Integer] the number of lines to display ato nce
def visible_line_number
[SES::ExternalText::Languages.size, 8].min
end

# The name of the language at the given index
#
# @return [String] the name of the language at the given index
def command_name(index)
@list[index]
end

# Whether or not the currently selected language is enabled.
#
# @return [TrueClass] always true
def current_item_enabled?
true
end

# Whether or not the currently selected language is enabled.
#
# @return [TrueClass] always true
def command_enabled?(index)
true
end

# Whether or not the user can select a language.
#
# @return [TrueClass] always true
def ok_enabled?
true
end

# Processing for when the user selects a language.
#
# @return [void]
def call_ok_handler
DataManager.set_language(command_name(@index))
activate
end

# Gets the list of languages to display.
#
# @return [void]
def make_command_list
@list = SES::ExternalText::Languages
end
end

# Scene_LanguageSelect
# =============================================================================
# A bare-bones language selection scene.
class Scene_LanguageSelect < Scene_Base

# Initial processing for the scene.
#
# @return [void]
def start
super
create_background
@text_window = Window_Help.new(1)
set_help_text
@select_window = Window_LanguageSelect.new
end

# Creates the background for the scene.
#
# @return [void]
def create_background
@background = Sprite.new
@background.bitmap = SceneManager.background_bitmap
end

# Sets the help text for the current language.
#
# @return [void]
def set_help_text
@text_window.set_text(SES::ExternalText.get_text("Language Select") ||
"Select a language from the list.")
end

# Updates the scene.
#
# @return [void]
def update
super
set_help_text
SceneManager.return if Input.trigger?:)B)
end

# Clears the scene.
#
# @return [void]
def terminate
Graphics.freeze
dispose_all_windows
end
end
 
Joined
Apr 17, 2020
Messages
3
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Sorry for necroposting, but I'm having some trouble with this.

When using the External Database, the long texts like the Actor or Item descriptions appear on a single line.

I've done line breaks on the .txt file, but that won´t work either.

With the regular text, both auto-wrapping and manual line breaks work.

In case it was a problem with another script, I created a New Project with only SES, Core, External Text and External Database scripts and the problem is still there.

Has anyone else this problem or knows a way to fix it?
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,263
Reaction score
7,142
First Language
German
Primarily Uses
RMMV
Sorry for necroposting,
there is no necroposting here, that rule only counts for support topics and not forpresentation topics like this one.

Which way did you use for creating linebreaks? And please give a link to the external database script as well as the order you placed all scripts in your script editor.
The behaviour depends on how the external database script handles the lines...
 
Joined
Apr 17, 2020
Messages
3
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
The External Database is that.
I've placed the Scripts from top to bottom in this order: Core, External Text and External Database.
And for line break I just hit Enter.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,263
Reaction score
7,142
First Language
German
Primarily Uses
RMMV
I'm just guessing here, but have you tried to use the line code for the new line? It is from an older version but should still work, and that might be all it needs for this case
 
Joined
Apr 17, 2020
Messages
3
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Yep, already tried that and it doesn't work.
 
Joined
Feb 24, 2020
Messages
1
Reaction score
0
First Language
english
Primarily Uses
RMVXA
Yep, already tried that and it doesn't work.
Set a variable at the start of the game to equal a script: "\n", then refer to the variable in your text keys.

example:
Code:
[Key] Item_73_description
A magnificent elixir. \v[99]Revives an ally!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Kitchen counters! I am on my second version of counters. It is slow going and I always see little details that could be done better. Have to force myself to say that's good enough for now and continue on.
I always thought I was just really, really bad at communication, then the internet proceeds to say "lol no".
Almost 100,000 Threads! We should make a celebration. Make a 100K logo? :p
Cursed problem: Multiple language switches. Say, you want to switch to EN language from JP but you have no idea where the language switch in JP menu language.
Tonight I'm finally going to start putting the dungeons my team has made on grid paper into the engine. That's the final step of making the game world.

Forum statistics

Threads
99,435
Messages
965,256
Members
131,052
Latest member
norem
Top