Class: PFM::Trainer
Overview
The actor trainer data informations
Main object stored in $trainer and PFM.game_state.trainer
Constant Summary collapse
- TIME_FORMAT =
Time format
'%02d:%02d'
Instance Attribute Summary collapse
-
#badges ⇒ Array<Boolean>
The badges this trainer object has collected.
-
#current_version ⇒ Integer
The current version de PSDK (update management).
-
#game_state ⇒ PFM::GameState
Get the game state responsive of the whole game state.
-
#game_version ⇒ Integer
The game version in which this object has been saved or created.
-
#id_boy ⇒ Integer
The internal ID of the trainer as a boy.
-
#id_girl ⇒ Integer
The internal ID of the trainer as a girl.
-
#name_boy ⇒ String
Name of the trainer as a boy (Default to Palbolsky).
-
#name_girl ⇒ String
Name of the trainer as a girl (Default to Yuri).
-
#play_time ⇒ Integer
The time the player has played as this Trainer object.
-
#playing_girl ⇒ Boolean
If the player is playing the girl trainer.
-
#region ⇒ Integer
The ID of the current region in which the trainer is.
-
#start_time ⇒ Integer
The time in second when the Trainer object has been created (computer time).
Instance Method Summary collapse
-
#badge_counter ⇒ Integer
Return the number of badges the trainer got.
-
#badge_obtained?(badge_num, region = 1) ⇒ Boolean
(also: #has_badge?)
Has the player got the badge ?.
-
#define_gender(playing_girl)
(also: #set_gender)
Set the gender of the trainer.
-
#id ⇒ Integer
Return the id of the trainer.
-
#initialize(game_state = PFM.game_state) ⇒ Trainer
constructor
Create a new Trainer.
-
#load_time
Load the time counter with the current time.
-
#name ⇒ String
Return the name of the trainer.
-
#name=(value)
Change the name of the trainer.
-
#play_time_text ⇒ String
Return the play time text (without updating it).
-
#redefine_var
Redefine some variable RMXP uses with the right values.
-
#set_badge(badge_num, region = 1, value = true)
Set the got state of a badge.
-
#time_counter ⇒ Integer
Return the time counter (current time - time counter).
-
#update_play_time ⇒ Integer
Update the play time and reload the time counter.
Constructor Details
#initialize(game_state = PFM.game_state) ⇒ Trainer
Create a new Trainer
117 118 |
# File 'docs/4_Systems_104_Trainer.rb', line 117 def initialize(game_state = PFM.game_state) end |
Instance Attribute Details
#badges ⇒ Array<Boolean>
The badges this trainer object has collected
102 103 104 |
# File 'docs/4_Systems_104_Trainer.rb', line 102 def badges @badges end |
#current_version ⇒ Integer
The current version de PSDK (update management). It’s saved like game_version
111 112 113 |
# File 'docs/4_Systems_104_Trainer.rb', line 111 def current_version @current_version end |
#game_state ⇒ PFM::GameState
Get the game state responsive of the whole game state
114 115 116 |
# File 'docs/4_Systems_104_Trainer.rb', line 114 def game_state @game_state end |
#game_version ⇒ Integer
The game version in which this object has been saved or created
108 109 110 |
# File 'docs/4_Systems_104_Trainer.rb', line 108 def game_version @game_version end |
#id_boy ⇒ Integer
The internal ID of the trainer as a boy
90 91 92 |
# File 'docs/4_Systems_104_Trainer.rb', line 90 def id_boy @id_boy end |
#id_girl ⇒ Integer
The internal ID of the trainer as a girl. It’s equal to id_boy ^ 0x28F4AB4C
93 94 95 |
# File 'docs/4_Systems_104_Trainer.rb', line 93 def id_girl @id_girl end |
#name_boy ⇒ String
Name of the trainer as a boy (Default to Palbolsky)
81 82 83 |
# File 'docs/4_Systems_104_Trainer.rb', line 81 def name_boy @name_boy end |
#name_girl ⇒ String
Name of the trainer as a girl (Default to Yuri)
84 85 86 |
# File 'docs/4_Systems_104_Trainer.rb', line 84 def name_girl @name_girl end |
#play_time ⇒ Integer
The time the player has played as this Trainer object
99 100 101 |
# File 'docs/4_Systems_104_Trainer.rb', line 99 def play_time @play_time end |
#playing_girl ⇒ Boolean
If the player is playing the girl trainer
87 88 89 |
# File 'docs/4_Systems_104_Trainer.rb', line 87 def @playing_girl end |
#region ⇒ Integer
The ID of the current region in which the trainer is
105 106 107 |
# File 'docs/4_Systems_104_Trainer.rb', line 105 def region @region end |
#start_time ⇒ Integer
The time in second when the Trainer object has been created (computer time)
96 97 98 |
# File 'docs/4_Systems_104_Trainer.rb', line 96 def start_time @start_time end |
Instance Method Details
#badge_counter ⇒ Integer
Return the number of badges the trainer got
147 148 |
# File 'docs/4_Systems_104_Trainer.rb', line 147 def badge_counter end |
#badge_obtained?(badge_num, region = 1) ⇒ Boolean Also known as: has_badge?
Has the player got the badge ?
159 160 |
# File 'docs/4_Systems_104_Trainer.rb', line 159 def badge_obtained?(badge_num, region = 1) end |
#define_gender(playing_girl) Also known as: set_gender
Set the gender of the trainer
164 165 |
# File 'docs/4_Systems_104_Trainer.rb', line 164 def define_gender() end |
#id ⇒ Integer
Return the id of the trainer
129 130 |
# File 'docs/4_Systems_104_Trainer.rb', line 129 def id end |
#load_time
Load the time counter with the current time
135 136 |
# File 'docs/4_Systems_104_Trainer.rb', line 135 def load_time end |
#name ⇒ String
Return the name of the trainer
121 122 |
# File 'docs/4_Systems_104_Trainer.rb', line 121 def name end |
#name=(value)
Change the name of the trainer
125 126 |
# File 'docs/4_Systems_104_Trainer.rb', line 125 def name=(value) end |
#play_time_text ⇒ String
Return the play time text (without updating it)
169 170 |
# File 'docs/4_Systems_104_Trainer.rb', line 169 def play_time_text end |
#redefine_var
Redefine some variable RMXP uses with the right values
132 133 |
# File 'docs/4_Systems_104_Trainer.rb', line 132 def redefine_var end |
#set_badge(badge_num, region = 1, value = true)
Set the got state of a badge
153 154 |
# File 'docs/4_Systems_104_Trainer.rb', line 153 def set_badge(badge_num, region = 1, value = true) end |
#time_counter ⇒ Integer
Return the time counter (current time - time counter)
139 140 |
# File 'docs/4_Systems_104_Trainer.rb', line 139 def time_counter end |
#update_play_time ⇒ Integer
Update the play time and reload the time counter
143 144 |
# File 'docs/4_Systems_104_Trainer.rb', line 143 def update_play_time end |