Module: Studio::Text

Defined in:
docs/3_Studio.rb

Overview

Module that helps the game to get text in various langages

Author:

  • Nuri Yuri

Constant Summary collapse

Available_Langs =

List of lang id available in the game

['en', 'fr', 'it', 'de', 'es', 'ko', 'kana']
CSV_BASE =

Base index of pokemon text in csv files

100_000
VD_TEXT_FILENAME =

Name of the file containing all the dialogs

'Data/2.dat'

Class Method Summary collapse

Class Method Details

.build_dialog_from_csv_rows(rows, lang_index) ⇒ Array<String>

Build the text array from the csv rows

Parameters:

  • rows (Array)
  • lang_index (Integer)

Returns:



202
203
# File 'docs/3_Studio.rb', line 202

def build_dialog_from_csv_rows(rows, lang_index)
end

.compile

Marshalize the dialogs



205
206
# File 'docs/3_Studio.rb', line 205

def compile
end

.compile_csv(filename)

Compile a single csv file

Parameters:

  • filename (String)

    name of the csv file



209
210
# File 'docs/3_Studio.rb', line 209

def compile_csv(filename)
end

.default_langString

Return the default game lang

Returns:



162
163
# File 'docs/3_Studio.rb', line 162

def default_lang
end

.get(file_id, text_id) ⇒ String

Get a text front the text database

Parameters:

  • file_id (Integer)

    ID of the text file

  • text_id (Integer)

    ID of the text in the file

Returns:



168
169
# File 'docs/3_Studio.rb', line 168

def get(file_id, text_id)
end

.get_dialog_message(file_id, text_id) ⇒ String Also known as: get_external

Get a dialog message

Parameters:

  • file_id (Integer)

    id of the dialog file

  • text_id (Integer)

    id of the dialog message in the file (0 = 2nd line of csv, 1 = 3rd line of csv)

Returns:



179
180
# File 'docs/3_Studio.rb', line 179

def get_dialog_message(file_id, text_id)
end

.get_file(file_id) ⇒ Array<String>

Get a list of text from the text database

Parameters:

  • file_id (Integer)

    ID of the text file

Returns:

  • (Array<String>)

    the list of text contained in the file.



173
174
# File 'docs/3_Studio.rb', line 173

def get_file(file_id)
end

.load

load text in the correct lang ($options.language or LANG in game.ini)



158
159
# File 'docs/3_Studio.rb', line 158

def load
end

.marshalized_text_file_exist?(filename) ⇒ Boolean

Test if a marshalized text file exist

Parameters:

  • filename (String)

    name of the file in Data/text/Dialogs

Returns:

  • (Boolean)


191
192
# File 'docs/3_Studio.rb', line 191

def marshalized_text_file_exist?(filename)
end

.reload_rh_texts

Reload texts from Ruby Host



212
213
# File 'docs/3_Studio.rb', line 212

def reload_rh_texts
end

.try2get_csv_dialog(file_id) ⇒ Boolean

Try to load a csv dialog file

Parameters:

  • file_id (Integer)

    id of the dialog file

Returns:

  • (Boolean)

    if the operation was a success



196
197
# File 'docs/3_Studio.rb', line 196

def try2get_csv_dialog(file_id)
end

.try2get_marshalized_dialog(file_id) ⇒ Boolean

Try to load a preprocessed dialog file (Marshal)

Parameters:

  • file_id (Integer)

    id of the dialog file

Returns:

  • (Boolean)

    if the operation was a success



186
187
# File 'docs/3_Studio.rb', line 186

def try2get_marshalized_dialog(file_id)
end