Day.png);">
Apprendre


Vous êtes
nouveau sur
Oniromancie?

Visite guidée
du site


Découvrir
RPG Maker

RM 95
RM 2000/2003
RM XP
RM VX/VX Ace
RM MV/MZ

Apprendre
RPG Maker

Tutoriels
Guides
Making-of

Dans le
Forum

Section Entraide

Sorties: Star Trek: Glorious Wolf - (...) / Sorties: Dread Mac Farlane - episode 3 / News: Plein d'images cools créées par (...) / Sorties: Star Trek: Glorious Wolf - (...) / Jeux: Final Fantasy 2.0 / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

475 connectés actuellement

29190385 visiteurs
depuis l'ouverture

5436 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Le Temple de Valor

ConsoleFun

Kingdom Ultimate

Lumen

Zarok

Tous nos partenaires

Devenir
partenaire



Options de volume BGM/BGS/ME/SE

Ajoute un menu Options qui intègre la possibilité d'ajuster les différents volumes pendant votre partie.

Script pour RPG Maker XP
Ecrit par Ayene, Ejlol & Voximilien
Publié par Voximilien (lui envoyer un message privé)
Signaler un script cassé

❤ 0

Auteur : Ayene, Ejlol & Voximilien
Logiciel : RPG Maker XP
Nombre de scripts : 1

image



image
Ce script permet d'ajouter un menu Options qui intègre la possibilité d'ajuster les différents volumes de votre jeu.
Pendant votre partie, vous pouvez choisir de diminuer le BGS, ME et le SE et ne garder que les BGM par exemple.

Il possède également sa sauvegarde à chaque fois que vous manipulez les options. Si jamais vous avez déjà fait une partie et que vous avez déjà ajusté le volume, si vous refaites une nouvelle partie, les options auront conservés vos derniers changements.

Le script ne possède que l'ajustement de volume, car contrairement à tous les scripts d'options existant, le fait de régler le volume est parfois suffisant pour certains projets. Et puis ça fait joli d'avoir un menu Option. %D
Libre à vous d'ajouter des fonctions en plus si vous le désirez.

Les instructions sont indiquées dans le script. Et en français. image" />

Petite précision :
J'ai pris 2 scripts et j'ai bricolé dessus, je n'ai rien vraiment codé moi-même. Je suis pas un ouf de la programmation, donc si il y a un bug ou un conflit avec un autre script je ne saurais pas trop gérer le problème. :/
C'est le tout premier script que je modifie vraiment en trifouillant le code, soyez indulgent, svp. x)


image

imageimage



image

Lien de la démo : XP - Options (Archive Mega.nz)

image

Portion de code : Tout sélectionner

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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
#==============================================================================
# ■ [XP] Options
#==============================================================================
# » Modifié par : Voximilien
# » Version :     1.0
#
# » Scripts d'origine : 
#   - Game Options par Ayene : http://www.ultimateam.pl/tagteam/rgss/game-options-xp.html
#   - Audio Settings par EJlol : http://save-point.org/thread-2439.html
#==============================================================================
#
# » Description :
#     Le script ajoute un menu Options.
#     Vous pourrez ajuster le volume du BGM, BGS, ME, et SE.
#
#
# » Installation :
#
#     - Mettre ce script au dessus de Main.
#
#     - Modifiez Scene_Menu en y ajoutant (vers la ligne 24)
#           s6 = "Options"
#
#     - Modifiez Scene_Menu en changeant cette ligne (vers la ligne 26)
#           s7 = "Quitter le jeu"
#       Il faut juste changer le s6 en s7 comme ci-dessus.
#
#     - Modifiez Scene_Menu en y ajoutant s7 dans la liste entre crochets. (vers la ligne 27)
#           @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
#
#     - Modifiez Scene_Menu en y ajoutant (vers les lignes 160)
#           when 5 # Options
#            $game_system.se_play($data_system.decision_se)
#            $scene = Scene_Option.new
#
#     - Modifiez Scene_Menu en changeant cette ligne (vers la ligne 165)
#           when 6 # End game
#       Il faut juste changer le when 5 en when 6 comme ci-dessus.
#
#==============================================================================
#
# Si vous désirez faire apparaître les Options avec la commande
# "Insérer un script", utilisez la commande suivante :
#
#                           $scene = Scene_Option.new
#
#==============================================================================
 
module AYENE
 
  # Nom du fichier avec les options de jeu qui seront sauvegardé (créé un fichier supplémentaire)
  FILENAME = "Options"
 
  # Principales options de jeu
  OPTION_COMMANDS = [
    "Volume BGM",
    "Volume BGS",
    "Volume ME",
    "Volume SE"
  ]
 
  # Texte qui va décrire chaque commande ci-dessus.
  OPTION_HELP = [
    "Ajuste le volume de la musique.",
    "Ajuste le volume des sons d'ambiances.",
    "Ajuste le volume des ME.",
    "Ajuste le volume des SE."
  ]
end
 
#==============================================================================
# ** Game_Option
#==============================================================================
class Game_Option
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor   :bgm_volume
  attr_accessor   :bgs_volume
  attr_accessor   :me_volume
  attr_accessor   :se_volume
  #------------------------------------------------------------------------
  # * Alias Listings
  #------------------------------------------------------------------------
  unless self.method_defined?(:ejlol_as_gsystem_initialize)
    alias_method :ejlol_as_gsystem_initialize, :initialize
  end
  #--------------------------------------------------------------------------
  # * Initialisation de l'objet
  #--------------------------------------------------------------------------
  def initialize
    ejlol_as_gsystem_initialize
    # Volume par défaut
    @bgm_volume = 30       # 0 ~ 100
    @bgs_volume = 30       # 0 ~ 100
    @me_volume  = 30       # 0 ~ 100
    @se_volume  = 35       # 0 ~ 100
    @filename = AYENE::FILENAME + ".rxdata"
  end
  #--------------------------------------------------------------------------
  # * Sauvegarde des Options
  #--------------------------------------------------------------------------
  def save
    file = File.open(@filename, "wb")
    Marshal.dump($game_option, file)
    file.close
  end
  #--------------------------------------------------------------------------
  # * Chargement des Options
  #--------------------------------------------------------------------------
  def load
    if FileTest.exist?(@filename)
      file = File.open(@filename, "rb")
      $game_option = Marshal.load(file)
      file.close
    end
  end
end
 
#==============================================================================
# ** Game_System
#==============================================================================
class Game_System
  #--------------------------------------------------------------------------
  # * Change backgroundmusic volume
  #     volume : the volume
  #--------------------------------------------------------------------------
  def bgm_volume=(volume)
    @bgm_volume = [[volume, 100].min, 0].max
    bgm_play(@playing_bgm)
  end
  #--------------------------------------------------------------------------
  # * Change backgroundsound volume
  #     volume : the volume
  #--------------------------------------------------------------------------
  def bgs_volume=(volume)
    @bgs_volume = [[volume, 100].min, 0].max
    bgs_play(@playing_bgs)
  end
  #--------------------------------------------------------------------------
  # * Change ME volume
  #     volume : the volume
  #--------------------------------------------------------------------------
  def me_volume=(volume)
    @me_volume = [[volume, 100].min, 0].max
    me_play(@playing_me)
  end
  #--------------------------------------------------------------------------
  # * Change SE volume
  #     volume : the volume
  #--------------------------------------------------------------------------
  def se_volume=(volume)
    @se_volume = [[volume, 100].min, 0].max
    se_play(@playing_se)
  end
end
 
#==============================================================================
# ** Audio
#==============================================================================
 
module Audio
  class << self
    #------------------------------------------------------------------------
    # * Alias Listings
    #------------------------------------------------------------------------
    unless self.method_defined?(:ejlol_as_audio_bgmplay)
      alias_method :ejlol_as_audio_bgmplay, :bgm_play
      alias_method :ejlol_as_audio_bgsplay, :bgs_play
      alias_method :ejlol_as_audio_meplay,  :me_play
      alias_method :ejlol_as_audio_seplay,  :se_play
    end
    #------------------------------------------------------------------------
    # * BGM Play
    #------------------------------------------------------------------------
    def bgm_play(filename, volume = 100, pitch = 100)
      volume = Integer(volume * $game_option.bgm_volume / 100.0)
      # Original BGM Play Method
      ejlol_as_audio_bgmplay(filename, volume, pitch)
    end
    #------------------------------------------------------------------------
    # * BGS Play
    #------------------------------------------------------------------------
    def bgs_play(filename, volume = 80, pitch = 100)
      volume = Integer(volume * $game_option.bgs_volume / 100.0)
      # Original BGS Play Method
      ejlol_as_audio_bgsplay(filename, volume, pitch)
    end
    #------------------------------------------------------------------------
    # * ME Play
    #------------------------------------------------------------------------
    def me_play(filename, volume = 100, pitch = 100)
      volume = Integer(volume * $game_option.me_volume / 100.0)
      # Original ME Play Method
      ejlol_as_audio_meplay(filename, volume, pitch)
    end
    #------------------------------------------------------------------------
    # * SE Play
    #------------------------------------------------------------------------
    def se_play(filename, volume = 80, pitch = 100)
      volume = Integer(volume * $game_option.se_volume / 100.0)
      # Original SE Play Method
      ejlol_as_audio_seplay(filename, volume, pitch)
    end
  end
end
 
#==============================================================================
# ** Window_VolCommand
#==============================================================================
class Window_VolCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     width    : window width
  #     commands : command text string array
  #--------------------------------------------------------------------------
  def initialize(y, type)
    super(200, y, 640, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    @type = type
    refresh
    self.index = -1
    self.opacity = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    case @type
    when 0
      vol = $game_option.bgm_volume
    when 1
      vol = $game_option.bgs_volume
    when 2
      vol = $game_option.me_volume
    when 3
      vol = $game_option.se_volume
    end
    w = 150
    max = 100
    rate = (vol < max ? vol * w / max : w) * (w/100)
    color1 = Color.new(24, 184, 70, 192)
    color2 = Color.new(0, 0, 80, 192)
    self.contents.gradient_bar_volume(4, 8, w, color1, color2, rate)
    text = sprintf("%d%%", vol)
    self.contents.draw_text(w+20, 0, 76, 32, text, 0)
  end
end
 
 
#==============================================================================
# ** Scene_Title
#==============================================================================
class Scene_Title
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  alias aye_sctitle_main main
  def main
    filename = AYENE::FILENAME + ".rxdata"
    if FileTest.exist?(filename)
      file = File.open(filename, "rb")
      $game_option = Marshal.load(file)
      file.close
      $game_option.load
    else
      $game_option = Game_Option.new
      $game_option.save
    end
    aye_sctitle_main
  end
end
 
 
#==============================================================================
# ** Scene_Option
#==============================================================================
 
class Scene_Option
  include AYENE
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    @dummy_window = Window_Base.new(0, 64, 640, 416)
    
    # Command Window
    @command_window = Window_Command.new(640, OPTION_COMMANDS) # Le 640 est la largeur de la séléction
    @command_window.x = 0
    @command_window.y = 64
    @command_window.opacity = 0
    
    # Volume
    @bgs = $game_option.bgs_volume
    @bgm = $game_option.bgm_volume
    @me = $game_option.me_volume
    @se = $game_option.se_volume
    
    # Help Window
    @help_window = Window_Help.new
    @help_window.set_text(OPTION_HELP[@command_window.index])
    @help_window.x = 0
    @help_window.y = 0
    
    @sub_command_window = []
    y = 64
    4.times {|i|
      @sub_command_window.push(Window_VolCommand.new(y, i))
      y += 32
    }
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    @help_window.dispose
    @dummy_window.dispose
    for i in @sub_command_window
      i.dispose
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    @command_window.update
    if @command_window.active
      update_command
    end
    @help_window.set_text(OPTION_HELP[@command_window.index])
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # Si bouton B est pressé
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(5) # <- Sur quel menu vous allez revenir après avoir quitté les Options.
      @command_window.active = true
      @sub_command_window[@command_window.index].active = false
      @sub_command_window[@command_window.index].index = -1
      return
    end
    # Si bouton C est pressé
      case @command_window.index
      when 0 # Volume BGM
        @bgm = $game_option.bgm_volume
        $game_option.save
        if Input.press?(Input::RIGHT) and $game_option.bgm_volume < 100
          $game_option.bgm_volume += 1
          $game_system.bgm_play($game_system.bgm_memorize)
          @sub_command_window[@command_window.index].refresh
        elsif Input.press?(Input::LEFT) and $game_option.bgm_volume > 0
          $game_option.bgm_volume -= 1
          $game_system.bgm_play($game_system.bgm_memorize)
          @sub_command_window[@command_window.index].refresh
        end
# -------------------------------------------------------------------------
      when 1 # Volume BGS
        @bgs = $game_option.bgs_volume
        $game_option.save
        if Input.press?(Input::RIGHT) and $game_option.bgs_volume < 100
          $game_option.bgs_volume += 1
          $game_system.bgs_play($game_system.bgs_memorize)
          @sub_command_window[@command_window.index].refresh
        elsif Input.press?(Input::LEFT) and $game_option.bgs_volume > 0
          $game_option.bgs_volume -= 1
          $game_system.bgs_play($game_system.bgs_memorize)
          @sub_command_window[@command_window.index].refresh
        end
# -------------------------------------------------------------------------
      when 2 # Volume ME
        @me = $game_option.me_volume
        $game_option.save
        if Input.press?(Input::RIGHT) and $game_option.me_volume < 100
          $game_option.me_volume += 1
          @sub_command_window[@command_window.index].refresh
        elsif Input.press?(Input::LEFT) and $game_option.me_volume > 0
          $game_option.me_volume -= 1
          @sub_command_window[@command_window.index].refresh
        end
# -------------------------------------------------------------------------
      when 3 # Volume SE
        @se = $game_option.se_volume
        $game_option.save
        if Input.press?(Input::RIGHT) and $game_option.se_volume < 100
          $game_option.se_volume += 1
          @sub_command_window[@command_window.index].refresh
        elsif Input.press?(Input::LEFT) and $game_option.se_volume > 0
          $game_option.se_volume -= 1
          @sub_command_window[@command_window.index].refresh
        end
      end
    end
 
  #--------------------------------------------------------------------------
  # * Window Refresh
  #--------------------------------------------------------------------------
  def subwindow_refresh
    for i in @sub_command_window
      i.refresh
    end
  end
end
 
#==============================================================================
# ** Bitmap
#==============================================================================
class Bitmap
  #--------------------------------------------------------------------------
  # * Draw Gradient Fill Rectangle (Volume Bar)
  #--------------------------------------------------------------------------
  def gradient_bar_volume(x, y, w, color1, color2, rate)
    fill_rect(x, y+1, w+2, 14, Color.new(0, 0, 0, 150))
    (1..4).each {|i|
      color = Color.new(color2.red*i/4, color2.green*i/4, color2.blue*i/4, 255)
      fill_rect(x + 2, (y + i * 2)-1, w-2, 18 - i * 4, color)
      color = Color.new(color1.red*i/4, color1.green*i/4, color1.blue*i/4, 255)
      fill_rect(x + 2, (y + i * 2)-1, rate-2, 18 - i * 4, color)}
  end
end




Mis à jour le 24 octobre 2020.






Nemau - posté le 10/01/2018 à 15:53:01 (52129 messages postés) - honor -

❤ 0

The Inconstant Gardener

Tous les scripts devraient être aussi bien présentés. :sriden



Quel RPG Maker choisir ?Ocarina of Time PCPolaris 03 • Le matérialisme c'est quand tu as du matériel.


Voximilien - posté le 11/01/2018 à 12:15:29 (128 messages postés)

❤ 0

Merci :D
C'est toujours important de bien présenter les choses ! Ça m'fait penser que j'ai oublié de lui mettre le titre que j'avais fait...

image




Ah, et pendant que j'y suis, dans les instructions il y a marqué

Portion de code : Tout sélectionner

1
2
3
#     - Modifiez Scene_Menu en changeant cette ligne (vers la ligne 125)
#           when 6 # End game
#       Il faut juste changer le when 5 en when 6 comme ci-dessus.


C'est la ligne 165 et pas 125, une petite faute d'inattention. ^^'

Et si vous cherchez les scripts d'origine que j'ai utilisé, c'est :

Portion de code : Tout sélectionner

1
2
3
# » Scripts d'origine : 
#   - Par Ayene : http://www.ultimateam.pl/tagteam/rgss/game-options-xp.html
#   - Par EJlol : http://save-point.org/thread-2439.html

(C'est mieux sans les balises HTML wtf o/ )

» Liste de scripts | » XP - Options


Nemau - posté le 11/01/2018 à 18:59:42 (52129 messages postés) - honor -

❤ 0

The Inconstant Gardener

Oilà.



Quel RPG Maker choisir ?Ocarina of Time PCPolaris 03 • Le matérialisme c'est quand tu as du matériel.


Voximilien - posté le 11/01/2018 à 19:49:47 (128 messages postés)

❤ 0

Merci ! :kawaii

» Liste de scripts | » XP - Options


NanakyTim - posté le 11/01/2018 à 22:40:40 (23817 messages postés)

❤ 0

Leader Bocaliste Floodeur Légendaire

Oui la présentation est très belle, gg :D

Par contre ton menu déborde, c'est dommage :F

Héros ou Fléau ? Devenez le Roi de Quineroy ! ~ Plongez dans l'univers sombre du Darkans ! ~ Dimens Reis... Allez y faire un tour. ~ Rangez votre chambre ! ~ Avez-vous peur du noir ? ~ Sauvez le futur, en allant dans le passé: BOCALATOR...


Voximilien - posté le 12/01/2018 à 02:28:07 (128 messages postés)

❤ 0

C'est qu'un détail ça ! Les gens ont déjà un Custom Menu avec eux de nos jours, j'vois pas le problème. :D

Et si vraiment ça pose problème, il y a aussi ce script qui empêche le débordement de la fenêtre.

Portion de code : Tout sélectionner

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
#==============================================================================
# ■ [XP] Custom Menu Commands
#==============================================================================
# » Auteur: Ayene
# » Traduit par : Voximilien
#
# » Script d'origine : http://www.ultimateam.pl/tagteam/rgss/custom-menu-commands-xp.html
#==============================================================================
#
# » Description : 
#      Le script vous permet d'ajouter vos propres commandes au menu.
#      Vous pouvez également activer/désactiver à loisir les fenêtres de l'or, 
#      des nombres de pas, et du temps de jeu.
#
# » Installation :
#      - Mettre ce script au dessus de Main.
#==============================================================================
 
module Ayene     
  # Liste des commandes dans le menu 
 
  MENU_COMMANDS = [
 
  # ["Nom" , "Scene", Choix de personnage (false - non / true - oui)
 
  ["Inventaire",  'Scene_Item',    false],
  ["Compétences", 'Scene_Skill',   true],
  ["Équipement",  'Scene_Equip',   true],
  ["Status",      'Scene_Status',  true],
  ["Sauvegarder", 'Scene_Save',    false],
  ["Options",     'Scene_Option',  false],
  ["Quitter",     'Scene_End',     false],
 
  ]
  # "Choix de personnage" est une option pour cibler un personnage en particulier 
  # par le biais de la séléction, comme si vous choisissez Compétences ou Équipement. 
   
  # Nombre maximum de lignes
  ROW_MAX = 6
 
  # L'index de la commande (commande dans MENU_COMMANDS) est inactif,   
  # quand il n'y a pas de héros dans l'équipe.
  DISABLE_COMMANDS = [0, 1, 2, 3, 4]
 
  # Afficher la fenêtre de l'or 
  # true  - oui 
  # false - non
  GOLD_WINDOW = true
 
  # Afficher la fenêtre du temps de jeu
  # true  - oui 
  # false - non
  PLAY_TIME_WINDOW = true
 
  # Afficher la fenêtre du nombre de pas
  # true  - oui 
  # false - non
  STEP_WINDOW = true     
end
 
#==============================================================================
# ** Game_Temp
#==============================================================================
class Game_Temp
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :menu_command_index
  #--------------------------------------------------------------------------
  # * Object Initialization (alias)
  #--------------------------------------------------------------------------
  alias aye_gametemp_ini initialize
  def initialize
    aye_gametemp_ini
    @menu_command_index = 0
  end
end
 
#==============================================================================
# ** Scene_Map
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  alias aye_scmap_main main
  def main
    $game_temp.menu_command_index = 0
    aye_scmap_main
  end
end
 
#==============================================================================
# ** Scene_Menu
#==============================================================================
class Scene_Menu
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------   
  def main   
    @command_window = Window_Command.new(160, commands[0])
    @command_window.height = [@command_window.height, Ayene::ROW_MAX * 32 + 32].min
    @command_window.index = $game_temp.menu_command_index   
    Ayene::DISABLE_COMMANDS.each{|i| @command_window.disable_item(i) if $game_party.actors.size == 0}
    @windows = []   
    @windows.push(Window_PlayTime.new) if Ayene::PLAY_TIME_WINDOW
    @windows.push(Window_Steps.new) if Ayene::STEP_WINDOW
    @windows.push(Window_Gold.new) if Ayene::GOLD_WINDOW
    y = @command_window.height
    for window in @windows
      window.x = 0
      window.y = y
      y += window.height
    end
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @command_window.dispose
    for window in @windows
      window.dispose
    end
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    @command_window.update
    @status_window.update
    for window in @windows
      window.update
    end
    if @command_window.active
      update_command
      return
    end
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end           
    if Input.trigger?(Input::C)
      unless command_enabled?(@command_window.index)
        $game_system.se_play($data_system.buzzer_se)
        return
      end   
      $game_temp.menu_command_index = @command_window.index
      $game_system.se_play($data_system.decision_se)     
      if commands[2][@command_window.index]
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      else
        $scene = eval("#{commands[1][@command_window.index]}.new")
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    if Input.trigger?(Input::C)     
      $game_system.se_play($data_system.decision_se)
      $scene = eval("#{commands[1][@command_window.index]}.new(@status_window.index)")
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Check Commands
  #--------------------------------------------------------------------------
  def commands
    commands = []
    next_scene = []
    select_window = []
    for command in Ayene::MENU_COMMANDS
      commands.push(command[0])
      next_scene.push(command[1])
      select_window.push(command[2])
    end   
    return commands, next_scene, select_window
  end
  #--------------------------------------------------------------------------
  # * Check Command Enabled
  #--------------------------------------------------------------------------
  def command_enabled?(index)
    if Ayene::DISABLE_COMMANDS.include?(index) and $game_party.actors.size == 0
      return false
    end
    return true
  end
end



» Liste de scripts | » XP - Options

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe - Mentions légales

Plan du site

Communauté: Accueil | Forum | Chat | Commentaires | News | Flash-news | Screen de la semaine | Sorties | Tests | Gaming-Live | Interviews | Galerie | OST | Blogs | Recherche
Apprendre: Visite guidée | RPG Maker 95 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker MV | Tutoriels | Guides | Making-of
Télécharger: Programmes | Scripts/Plugins | Ressources graphiques / sonores | Packs de ressources | Midis | Eléments séparés | Sprites
Jeux: Au hasard | Notre sélection | Sélection des membres | Tous les jeux | Jeux complets | Le cimetière | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Proposer
Ressources RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
Ressources RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
Ressources RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
Ressources RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis
Archives: Palmarès | L'Annuaire | Livre d'or | Le Wiki | Divers