Module: PFM::Text
- Included in:
- Battle::Message
- Defined in:
- docs/4_Systems_000_General_1_PFM.rb
Overview
The text parser of PSDK (retrieve text from Studio::Text)
Constant Summary collapse
- PKNICK =
Pokemon Nickname var catcher
Array.new(7) { |i| "[VAR PKNICK(000#{i})]" }
- PKNAME =
Pokemon name var catcher
Array.new(7) { |i| "[VAR PKNAME(000#{i})]" }
- TRNAME =
Trainer name var catcher
Array.new(7) { |i| "[VAR TRNAME(000#{i})]" }
- ITEM2 =
Item var catcher
['[VAR ITEM2(0000)]', '[VAR ITEM2(0001)]', '[VAR ITEM2(0002)]', '[VAR ITEM2(0003)]']
- ITEMPLUR1 =
Definite article catcher
['[VAR ITEMPLUR1]']
- MOVE =
Move var catcher
['[VAR MOVE(0000)]', '[VAR MOVE(0001)]', '[VAR MOVE(0002)]']
- NUMB =
Number var catcher
[nil.to_s, '[VAR NUM1(0000)]', '[VAR NUM1(0001)]']
- NUM3 =
Number 3 var catcher
['[VAR NUM3(0000)]', '[VAR NUM3(0001)]', '[VAR NUM3(0002)]']
- NUM2 =
Number 2 var catcher
['[VAR NUM2(0000)]', '[VAR NUM2(0001)]', '[VAR NUM2(0002)]', '[VAR NUM2(0003)]']
- NUM7R =
Number 7 var catcher regexp
/\[VAR NUM7[^\]]*\]/
- NUMXR =
Number x var catcher regexp
/\[VAR NUM.[^\]]*\]/
- BERRY =
Berry var catcher
[nil.to_s, nil.to_s, nil.to_s, nil.to_s, nil.to_s, nil.to_s, nil.to_s, '[VAR BERRY(0007)]']
- COLOR =
Color var catcher
['[VAR COLOR(0000)]', '[VAR COLOR(0001)]', '[VAR COLOR(0002)]', '[VAR COLOR(0003)]']
- LOCATION =
Location var catcher
['[VAR LOCATION(0000)]', '[VAR LOCATION(0001)]', '[VAR LOCATION(0002)]', '[VAR LOCATION(0003)]', '[VAR LOCATION(0004)]']
- ABILITY =
Ability var catcher
['[VAR ABILITY(0002)]', '[VAR ABILITY(0001)]', '[VAR ABILITY(0002)]']
- KAPHOTICS_Clean =
Kaphotics decoded var clean regexp
/\[VAR [^\]]+\]/
- NUMBRNCH_Reg =
/[VAR .[A-Z,()a-z0-9]+]/ Nummeric branch regexp catcher
/\[VAR NUMBRNCH\(....,....\)\][^\[]+/
- GENDBR_Reg =
Gender branch regexp catcher
/\[VAR GENDBR\(....,....\)\][^\[]+/
- BELL_Reg =
Bell detector
/\[VAR BE05\(([0-9]+)\)\]/
- S_Empty =
TODO! Empty string (remove stuff)
nil.to_s
- NBSP_B =
Non breaking space ‘!’ detector
/ !/
- NBSP_R =
Non breaking space ‘!’ remplacement
' !'
- Dot =
Automatic replacement of … with the correct char
['...', '…']
- Money =
Automatic replacement of the $ with a non breaking space $
[' $', ' $']
- S_000 =
The \ temporary replacement
"\x00"
- GameKeys =
The InGame key name to their key value association
{0 => 'KeyError', 'a' => :A, 'b' => :B, 'x' => :X, 'y' => :Y, 'l' => :L, 'r' => :R, 'l2' => :L2, 'r2' => :R2, 'select' => :SELECT, 'start' => :START, 'l3' => :L3, 'r3' => :R3, 'down' => :DOWN, 'left' => :LEFT, 'right' => :RIGHT, 'up' => :UP, 'home' => :HOME}
Class Method Summary collapse
-
.define_const(obj)
Define generic constants adder to an object (Get var catcher easier).
-
.detect_dialog(text)
Detect a dialog text from message and return it instead of text.
-
.enemy_pokemon?(pokemon) ⇒ Boolean
Detect if a Pokemon is an enemy Pokemon.
-
.get_key_name(name) ⇒ String
Return the real keyboard key name.
-
.parse(file_id, text_id, additionnal_var = nil) ⇒ String
Parse a text from the text database with specific informations.
-
.parse_gendbr(text)
Parse the GENDBR (gender of the player, I didn’t see other case).
-
.parse_numbrnch(text)
Parse the NUMBRNCH (pural).
-
.parse_rest_of_thing(text)
Perform the rest of the automatic parse (factorization).
-
.parse_string_for_messages(text) ⇒ String
Parse a string for a message.
-
.parse_with_2pokemon(file_id, text_id, pokemon1, pokemon2, additionnal_var) ⇒ String
Parse a text from the text database with 2 pokemon & specific information.
-
.parse_with_pokemon(file_id, text_id, pokemon, additionnal_var = nil) ⇒ String
Parse a text from the text database with specific informations and a pokemon.
-
.parse_with_pokemons(file_id, text_id, pokemon, pokemon2, additionnal_var = nil) ⇒ String
Parse a text from the text database with specific informations and two Pokemon.
-
.reset_variables
Remove every automatic var catcher defined.
-
.set_ability_name(value, index = 0)
Set the ability name variable.
-
.set_item_name(value, index = 0)
Set the item name variable.
-
.set_move_name(value, index = 0)
Set the move name variable.
-
.set_num1(value, index = 1)
Set the number1 variable.
-
.set_num2(value, index = 0)
Set the number2 variable.
-
.set_num3(value, index = 0)
Set the number2 variable.
-
.set_pkname(value, index = 0)
Set the Pokemon Name variable.
-
.set_pknick(value, index = 0)
Set the Pokemon Nickname variable.
-
.set_plural(value_or_index = true, value = true)
Set the numbranches to plural state.
-
.set_variable(expr, value)
Define an automatic var catcher with its value.
-
.unset_variable(expr)
Remove an automatic var catcher with its value.
Class Method Details
.define_const(obj)
Define generic constants adder to an object (Get var catcher easier)
60 61 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 60 def define_const(obj) end |
.detect_dialog(text)
Detect a dialog text from message and return it instead of text
140 141 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 140 def detect_dialog(text) end |
.enemy_pokemon?(pokemon) ⇒ Boolean
Detect if a Pokemon is an enemy Pokemon
80 81 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 80 def enemy_pokemon?(pokemon) end |
.get_key_name(name) ⇒ String
Return the real keyboard key name
147 148 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 147 def get_key_name(name) end |
.parse(file_id, text_id, additionnal_var = nil) ⇒ String
Parse a text from the text database with specific informations
67 68 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 67 def parse(file_id, text_id, additionnal_var = nil) end |
.parse_gendbr(text)
Sorry for the code, when I did that I wasn’t in the “clear” period ^^‘
Parse the GENDBR (gender of the player, I didn’t see other case)
108 109 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 108 def parse_gendbr(text) end |
.parse_numbrnch(text)
Sorry for the code, when I did that I wasn’t in the “clear” period ^^‘
Parse the NUMBRNCH (pural)
103 104 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 103 def parse_numbrnch(text) end |
.parse_rest_of_thing(text)
Perform the rest of the automatic parse (factorization)
112 113 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 112 def parse_rest_of_thing(text) end |
.parse_string_for_messages(text) ⇒ String
Parse a string for a message
136 137 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 136 def (text) end |
.parse_with_2pokemon(file_id, text_id, pokemon1, pokemon2, additionnal_var) ⇒ String
Parse a text from the text database with 2 pokemon & specific information
89 90 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 89 def parse_with_2pokemon(file_id, text_id, pokemon1, pokemon2, additionnal_var) end |
.parse_with_pokemon(file_id, text_id, pokemon, additionnal_var = nil) ⇒ String
Parse a text from the text database with specific informations and a pokemon
75 76 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 75 def parse_with_pokemon(file_id, text_id, pokemon, additionnal_var = nil) end |
.parse_with_pokemons(file_id, text_id, pokemon, pokemon2, additionnal_var = nil) ⇒ String
Parse a text from the text database with specific informations and two Pokemon
98 99 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 98 def parse_with_pokemons(file_id, text_id, pokemon, pokemon2, additionnal_var = nil) end |
.reset_variables
Remove every automatic var catcher defined
124 125 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 124 def reset_variables end |
.set_ability_name(value, index = 0)
Set the ability name variable
172 173 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 172 def set_ability_name(value, index = 0) end |
.set_item_name(value, index = 0)
Set the item name variable
162 163 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 162 def set_item_name(value, index = 0) end |
.set_move_name(value, index = 0)
Set the move name variable
167 168 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 167 def set_move_name(value, index = 0) end |
.set_num1(value, index = 1)
Set the number1 variable
177 178 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 177 def set_num1(value, index = 1) end |
.set_num2(value, index = 0)
Set the number2 variable
182 183 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 182 def set_num2(value, index = 0) end |
.set_num3(value, index = 0)
Set the number2 variable
187 188 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 187 def set_num3(value, index = 0) end |
.set_pkname(value, index = 0)
Set the Pokemon Name variable
152 153 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 152 def set_pkname(value, index = 0) end |
.set_pknick(value, index = 0)
Set the Pokemon Nickname variable
157 158 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 157 def set_pknick(value, index = 0) end |
.set_plural(value_or_index = true, value = true)
Set the numbranches to plural state
129 130 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 129 def set_plural(value_or_index = true, value = true) end |
.set_variable(expr, value)
Define an automatic var catcher with its value
117 118 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 117 def set_variable(expr, value) end |
.unset_variable(expr)
Remove an automatic var catcher with its value
121 122 |
# File 'docs/4_Systems_000_General_1_PFM.rb', line 121 def unset_variable(expr) end |