1
2
3
4
5
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
| #==============================================================================
# ▼ Scene_Menu
#------------------------------------------------------------------------------
# Menu FFIII-Like.
# Par Mist'
# Le 25/12/2011
# https://www.rpgmakervx-fr.com/
#==============================================================================
# Interrupteur pour activer/désactiver le temps de jeu dans le menu :
SWITCH_ID = 11
#
#==============================================================================
class Scene_Menu < Scene_MenuBase
alias mist_cms_ffiii_str start
alias mist_cms_ffiii_cr_cwin create_command_window
#--------------------------------------------------------------------------
# ● ALIAS ~
#--------------------------------------------------------------------------
def start
mist_cms_ffiii_str
create_mapname_window
end
#--------------------------------------------------------------------------
# ● ALIAS ~
#--------------------------------------------------------------------------
def create_command_window
mist_cms_ffiii_cr_cwin
@command_window.z = 9999
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def create_gold_window
@gold_window = Window_Gold.new
@gold_window.x = 340 # EDIT
@gold_window.y = Graphics.height - @gold_window.height - 20 # EDIT
@gold_window.z = 9999 # AJOUT
end
#--------------------------------------------------------------------------
# ● AJOUT ~
#--------------------------------------------------------------------------
def create_mapname_window
@mapname_window = Window_NomMap.new
@mapname_window.x = 340
@mapname_window.y = @gold_window.y - @mapname_window.height
@mapname_window.z = 9999
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def create_status_window
@status_window = Window_MenuStatus.new(@command_window.width, 0)
@status_window.x = 20 # EDIT
@status_window.y = Graphics.height - @status_window.height - 20 # EDIT
@status_window.z = 9998 # AJOUT
end
end
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
# Modification /ajout des méthodes d'affichage
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# ● MODIF / "AJOUT" ~
# [draw_currency_value modifié si besoin de réutilisation de l'affichage]
#--------------------------------------------------------------------------
def draw_time_value(value, unit, x, y, width)
cx = text_size(unit).width
change_color(system_color) # EDIT
draw_text(x, y, width - cx - 2, line_height, value, 2)
change_color(normal_color) # EDIT
draw_text(x, y, width, line_height, unit, 2)
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def draw_map_name(x, y, width)
cx = text_size( $game_map.map_name).width
change_color(system_color) # EDIT
draw_text(x, y, width - cx - 2, line_height, $game_map.map_name, 2)
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x, y)
draw_actor_level(actor, x, y + line_height * 1) # EDIT
draw_actor_icons(actor, x, y + line_height * 2)
draw_actor_class(actor, x + 90, y + line_height * 1) # EDIT
new_draw_actor_hp(actor, x, y + line_height * 2) # EDIT
new_draw_actor_mp(actor, x, y + line_height * 3) # EDIT
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def new_draw_actor_hp(actor, x, y, width = 124)
change_color(system_color)
draw_text(x, y, 30, line_height, Vocab::hp_a)
draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
hp_color(actor), normal_color)
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def new_draw_actor_mp(actor, x, y, width = 124)
change_color(system_color)
draw_text(x, y, 30, line_height, Vocab::mp_a)
draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
mp_color(actor), normal_color)
end
end
#==============================================================================
# ■ Window_Gold + Time
#------------------------------------------------------------------------------
# Affichage de la monnaie possédée ainsi que du temps passé sur le jeu
# en temps réel.
#==============================================================================
class Window_Gold < Window_Base
alias mist_cms_ffiii_refr refresh
#--------------------------------------------------------------------------
# ● REDEF ~
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, fitting_height(1) + 20)
refresh
end
#--------------------------------------------------------------------------
# ● ALIAS ~
#--------------------------------------------------------------------------
def refresh
mist_cms_ffiii_refr
draw_time_value(temps, unit2, 4, 16, contents.width - 8) unless not $game_switches[SWITCH_ID]
end
#--------------------------------------------------------------------------
# ● AJOUT ~
#--------------------------------------------------------------------------
def temps
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def unit2
"Temps"
end
#--------------------------------------------------------------------------
# ● AJOUT ~
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# ■ Window_MenuCommand
#------------------------------------------------------------------------------
# Position des commandes du menu
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# ● REDEF ~
#--------------------------------------------------------------------------
def initialize
super(340, 20)
select_last
end
end
#==============================================================================
# ■ Window_NomMap
#------------------------------------------------------------------------------
# Affichage du nom de la carte
#==============================================================================
class Window_NomMap < Window_Base
def initialize
super(0, 0, window_width, fitting_height(1))
refresh
end
def window_width
return 160
end
def refresh
contents.clear
change_color(system_color)
draw_map_name(4, 0, contents.width - 8)
end
def open
refresh
super
end
end
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# Affichage des statuts des héros.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def window_width
Graphics.width - 224
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def window_height
Graphics.height - 40
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def item_height
(height - standard_padding * 2) / 3
end
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def draw_item(index)
actor = $game_party.members[index]
enabled = $game_party.battle_members.include?(actor)
rect = item_rect(index)
draw_item_background(index)
draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)
draw_actor_simple_status(actor, rect.x + 108, rect.y)
end
end
#==============================================================================
# ■ Game_Map
#------------------------------------------------------------------------------
# Modification pour récupérer le nom de la carte
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# ● Variables d'instance
#--------------------------------------------------------------------------
attr_reader :map_name
#--------------------------------------------------------------------------
# ● MODIF ~
#--------------------------------------------------------------------------
def map_name
map = load_data("Data/MapInfos.rvdata2")
map[@map_id].name
end
end |