Class: RPG::System

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/system.rb

Overview

Data class for the system.

Defined Under Namespace

Classes: TestBattler, Words

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSystem

Returns a new instance of System.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/rpg/system.rb', line 6

def initialize
  @magic_number = 0
  @party_members = [1]
  @elements = [nil, ""]
  @switches = [nil, ""]
  @variables = [nil, ""]
  @windowskin_name = ""
  @title_name = ""
  @gameover_name = ""
  @battle_transition = ""
  @title_bgm = RPG::AudioFile.new
  @battle_bgm = RPG::AudioFile.new
  @battle_end_me = RPG::AudioFile.new
  @gameover_me = RPG::AudioFile.new
  @cursor_se = RPG::AudioFile.new("", 80)
  @decision_se = RPG::AudioFile.new("", 80)
  @cancel_se = RPG::AudioFile.new("", 80)
  @buzzer_se = RPG::AudioFile.new("", 80)
  @equip_se = RPG::AudioFile.new("", 80)
  @shop_se = RPG::AudioFile.new("", 80)
  @save_se = RPG::AudioFile.new("", 80)
  @load_se = RPG::AudioFile.new("", 80)
  @battle_start_se = RPG::AudioFile.new("", 80)
  @escape_se = RPG::AudioFile.new("", 80)
  @actor_collapse_se = RPG::AudioFile.new("", 80)
  @enemy_collapse_se = RPG::AudioFile.new("", 80)
  @words = RPG::System::Words.new
  @test_battlers = []
  @test_troop_id = 1
  @start_map_id = 1
  @start_x = 0
  @start_y = 0
  @battleback_name = ""
  @battler_name = ""
  @battler_hue = 0
  @edit_map_id = 1
end

Instance Attribute Details

#actor_collapse_seObject

The actor collapse SE (AudioFile).



118
119
120
# File 'lib/rpg/system.rb', line 118

def actor_collapse_se
  @actor_collapse_se
end

#battle_bgmObject

The battle BGM (AudioFile).



79
80
81
# File 'lib/rpg/system.rb', line 79

def battle_bgm
  @battle_bgm
end

#battle_end_meObject

The battle end ME (AudioFile).



82
83
84
# File 'lib/rpg/system.rb', line 82

def battle_end_me
  @battle_end_me
end

#battle_start_seObject

The battle start SE (AudioFile).



112
113
114
# File 'lib/rpg/system.rb', line 112

def battle_start_se
  @battle_start_se
end

#battle_transitionObject

The file name of the transition graphic, displayed when entering battle.



73
74
75
# File 'lib/rpg/system.rb', line 73

def battle_transition
  @battle_transition
end

#battleback_nameObject

The battle background graphic file name, for battle tests and internal use.



143
144
145
# File 'lib/rpg/system.rb', line 143

def battleback_name
  @battleback_name
end

#battler_hueObject

The adjustment value for the battler graphic’s hue (0..360), for internal use.



150
151
152
# File 'lib/rpg/system.rb', line 150

def battler_hue
  @battler_hue
end

#battler_nameObject

The battler graphic file name, for internal use.



146
147
148
# File 'lib/rpg/system.rb', line 146

def battler_name
  @battler_name
end

#buzzer_seObject

The buzzer SE (AudioFile).



97
98
99
# File 'lib/rpg/system.rb', line 97

def buzzer_se
  @buzzer_se
end

#cancel_seObject

The cancel SE (AudioFile).



94
95
96
# File 'lib/rpg/system.rb', line 94

def cancel_se
  @cancel_se
end

#cursor_seObject

The cursor SE (AudioFile).



88
89
90
# File 'lib/rpg/system.rb', line 88

def cursor_se
  @cursor_se
end

#decision_seObject

The decision SE (AudioFile).



91
92
93
# File 'lib/rpg/system.rb', line 91

def decision_se
  @decision_se
end

#edit_map_idObject

The ID of the map currently being edited, for internal use.



153
154
155
# File 'lib/rpg/system.rb', line 153

def edit_map_id
  @edit_map_id
end

#elementsObject

Element list. Text array using element IDs as subscripts, with the element in the 0 position being nil.



53
54
55
# File 'lib/rpg/system.rb', line 53

def elements
  @elements
end

#enemy_collapse_seObject

The enemy collapse SE (AudioFile).



121
122
123
# File 'lib/rpg/system.rb', line 121

def enemy_collapse_se
  @enemy_collapse_se
end

#equip_seObject

The equip SE (AudioFile).



100
101
102
# File 'lib/rpg/system.rb', line 100

def equip_se
  @equip_se
end

#escape_seObject

The escape SE (AudioFile).



115
116
117
# File 'lib/rpg/system.rb', line 115

def escape_se
  @escape_se
end

#gameover_meObject

The gameover ME (AudioFile).



85
86
87
# File 'lib/rpg/system.rb', line 85

def gameover_me
  @gameover_me
end

#gameover_nameObject

The “Game Over” graphic file name.



70
71
72
# File 'lib/rpg/system.rb', line 70

def gameover_name
  @gameover_name
end

#load_seObject

The load SE (AudioFile).



109
110
111
# File 'lib/rpg/system.rb', line 109

def load_se
  @load_se
end

#magic_numberObject

Magic number used for update checks. Updates changed values every time data is saved in RPGXP.



46
47
48
# File 'lib/rpg/system.rb', line 46

def magic_number
  @magic_number
end

#party_membersObject

The initial party. An array of actor IDs.



49
50
51
# File 'lib/rpg/system.rb', line 49

def party_members
  @party_members
end

#save_seObject

The save SE (AudioFile).



106
107
108
# File 'lib/rpg/system.rb', line 106

def save_se
  @save_se
end

#shop_seObject

The shop SE (AudioFile).



103
104
105
# File 'lib/rpg/system.rb', line 103

def shop_se
  @shop_se
end

#start_map_idObject

The map ID of the player’s initial position.



134
135
136
# File 'lib/rpg/system.rb', line 134

def start_map_id
  @start_map_id
end

#start_xObject

The map X-coordinate of the player’s initial position.



137
138
139
# File 'lib/rpg/system.rb', line 137

def start_x
  @start_x
end

#start_yObject

The map Y-coordinate of the player’s initial position.



140
141
142
# File 'lib/rpg/system.rb', line 140

def start_y
  @start_y
end

#switchesObject

Switch list. Text array using switch IDs as subscripts, with the element in the 0 position being nil.



57
58
59
# File 'lib/rpg/system.rb', line 57

def switches
  @switches
end

#test_battlersArray<RPG::System::TestBattler>

Party settings for battle tests. An TestBattler array.

Returns:



128
129
130
# File 'lib/rpg/system.rb', line 128

def test_battlers
  @test_battlers
end

#test_troop_idObject

The troop ID for battle tests.



131
132
133
# File 'lib/rpg/system.rb', line 131

def test_troop_id
  @test_troop_id
end

#title_bgmObject

The title BGM (AudioFile).



76
77
78
# File 'lib/rpg/system.rb', line 76

def title_bgm
  @title_bgm
end

#title_nameObject

The title graphic file name.



67
68
69
# File 'lib/rpg/system.rb', line 67

def title_name
  @title_name
end

#variablesObject

Variable list. Text array using variable IDs as subscripts, with the element in the 0 position being nil.



61
62
63
# File 'lib/rpg/system.rb', line 61

def variables
  @variables
end

#windowskin_nameObject

The window skin (or “windowskin”) graphic file name.



64
65
66
# File 'lib/rpg/system.rb', line 64

def windowskin_name
  @windowskin_name
end

#wordsObject

Terms (Words).



124
125
126
# File 'lib/rpg/system.rb', line 124

def words
  @words
end