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
47 48 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 47 def initialize(game_state = PFM.game_state) end |
Instance Attribute Details
#badges ⇒ Array<Boolean>
The badges this trainer object has collected
32 33 34 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 32 def badges @badges end |
#current_version ⇒ Integer
The current version de PSDK (update management). It’s saved like game_version
41 42 43 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 41 def current_version @current_version end |
#game_state ⇒ PFM::GameState
Get the game state responsive of the whole game state
44 45 46 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 44 def game_state @game_state end |
#game_version ⇒ Integer
The game version in which this object has been saved or created
38 39 40 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 38 def game_version @game_version end |
#id_boy ⇒ Integer
The internal ID of the trainer as a boy
20 21 22 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 20 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
23 24 25 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 23 def id_girl @id_girl end |
#name_boy ⇒ String
Name of the trainer as a boy (Default to Palbolsky)
11 12 13 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 11 def name_boy @name_boy end |
#name_girl ⇒ String
Name of the trainer as a girl (Default to Yuri)
14 15 16 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 14 def name_girl @name_girl end |
#play_time ⇒ Integer
The time the player has played as this Trainer object
29 30 31 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 29 def play_time @play_time end |
#playing_girl ⇒ Boolean
If the player is playing the girl trainer
17 18 19 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 17 def @playing_girl end |
#region ⇒ Integer
The ID of the current region in which the trainer is
35 36 37 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 35 def region @region end |
#start_time ⇒ Integer
The time in second when the Trainer object has been created (computer time)
26 27 28 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 26 def start_time @start_time end |
Instance Method Details
#badge_counter ⇒ Integer
Return the number of badges the trainer got
77 78 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 77 def badge_counter end |
#badge_obtained?(badge_num, region = 1) ⇒ Boolean Also known as: has_badge?
Has the player got the badge ?
89 90 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 89 def badge_obtained?(badge_num, region = 1) end |
#define_gender(playing_girl) Also known as: set_gender
Set the gender of the trainer
94 95 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 94 def define_gender() end |
#id ⇒ Integer
Return the id of the trainer
59 60 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 59 def id end |
#load_time
Load the time counter with the current time
65 66 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 65 def load_time end |
#name ⇒ String
Return the name of the trainer
51 52 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 51 def name end |
#name=(value)
Change the name of the trainer
55 56 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 55 def name=(value) end |
#play_time_text ⇒ String
Return the play time text (without updating it)
99 100 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 99 def play_time_text end |
#redefine_var
Redefine some variable RMXP uses with the right values
62 63 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 62 def redefine_var end |
#set_badge(badge_num, region = 1, value = true)
Set the got state of a badge
83 84 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 83 def set_badge(badge_num, region = 1, value = true) end |
#time_counter ⇒ Integer
Return the time counter (current time - time counter)
69 70 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 69 def time_counter end |
#update_play_time ⇒ Integer
Update the play time and reload the time counter
73 74 |
# File 'docs/01450_Systems_00104_Trainer.rb', line 73 def update_play_time end |