Night.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: "Dread Mac Farlane", (...) / Tutos: Checklist de la composition (...) / Sorties: Dread Mac Farlane - episode 8 / Sorties: Dread Mac Farlane - episode 7 / Jeux: Ce qui vit Dessous / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

422 connectés actuellement

29426901 visiteurs
depuis l'ouverture

1277 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

Zarok

Guelnika & E-magination

RPG Maker VX

Tashiroworld

Hellsoft

Tous nos partenaires

Devenir
partenaire



forums

Index du forum > Entraide > [VX] Recherche d'un script pour reprendre une musique après un combat.


LittleGamer - posté le 09/07/2014 à 00:35:45 (414 messages postés)

❤ 0

Domaine concerné: Script
Logiciel utilisé: VX
Bonjour/soir.

Avec le compositeur de mon projet, on cherche un script qui permettrait de faire reprendre le BGM de la map là où il s'était arrêté avant un combat. Si il s'arrête à 1:38, il reprend à 1:38 au retour sur la map quoi.

Sauf qu'on trouve pas. On voudrait savoir si l'un de vous connaissait un script qui fasse ça.
D'après Coma8 (le compositeur), KGC en avait fait un vers 2008 mais qui empêchait d'utiliser un ME de victoire, et un autre scripteur, Bulletxt aurait fait un script semblable qui permettait aussi d'autres options comme un BGM de combat aléatoire ou une musique de combat comme la map.
Le problème c'est que ce dernier script ne marche pas, et l'auteur lui même le qualifie de dépassé.

Le script de Bulletxt : http://sourceforge.net/p/lodestone2d/code/HEAD/tree/Scripts-Dev/continue_bgm_after_battle.rb
et son topic : http://www.rpgmakervx.net/index.php?showtopic=16333&st=0&p=141783&#entry141783
Un autre plus d'actualité : http://forums.rpgmakerweb.com/index.php?%2Ftopic%2F3511-fmodex-audio-library%2F

Aussi, on vous demande si vous connaissez un script capable de faire ça. On commence à désespérer là. Si vous connaissez un jeu RM qui a fait ça, on veut bien savoir aussi, pour voir si l'auteur peut nous communiquer son secret sur la façon de faire reprendre les musiques...


Voilà, merci d'avance.


EDIT :
On a continuer un peu les recherches.
Donc on a trouvé le script FmodEx pour RM XP qui permettait de faire ce qu'on veut (plus d'autres trucs pour la musique). Mais évidemment il ne fonctionne pas sur VX.
Pour installer ce script, il faut mettre d'abord une DLL, puis trois scripts correctement placés dans la la base de donnée du jeu.
Je les ai placés comme dans la démo sur XP. Mais comme je m'y attendais un peu, ça n'a pas fonctionné sur VX.
Un message d'erreur m'affiche
" Script 'Game System*' line 30: NameError occured
undefined method `bgm_memorize' for class `Game_System' "

La limite de caractère dans les messages sur ce forum et l'impossibilité de poster deux messages d'affilé m'oblige à vous rediriger vers la démo du script qui contient les différents scripts via la démo... La voilà : http://www.hbgames.org/forums/viewtopic.php?t=55486


Voilà.
Je sais qu'on vous met ça un peu en vrac mais là on trouve vraiment plus ce qu'on peut faire.
On sait qu'il faut placer les scripts dans un certain ordre (FmodEx au dessus des Game_xxx), qu'il faut la DLL, qu'une erreur est provoquée ligne 30 du game system * et que c\'est à la base pour XP et non pour VX comme l'indique ce site : http://pastebin.com/ichhXdG0# en parlant de RGSS 2 (C'est boien le RGSS de VX non ?).

Bref.

Si quelqu'un sait utiliser ce script, sait si il y a possibilité de le faire fonctionner sur VX ou peut nous aider d'une quelconque façon, nous implorons son aide.
Merci d'avance.


Estheone - posté le 10/07/2014 à 06:11:36 (312 messages postés)

❤ 0

Vous pouvez envisager d'utiliser l'Audio+ de zeus :
http://www.rpg-maker.fr/scripts-204-audio-.html

Il date pas d'hier mais il fonctionne sur VX, j'ai fait quelques tests.

Il vous faudra faire quelques efforts de prog pour intégrer ce script à votre jeu mais il est tout à fait possible de mettre une musique en pause et la reprendre plus tard au même endroit. Par contre il est préférable de l'utiliser avec des musiques en mp3 ou ogg et pas en midi.

Wandering Souls : Jeu complet / Topic sur Oniro


LittleGamer - posté le 10/07/2014 à 12:12:00 (414 messages postés)

❤ 0

On avait pensé à celui la mais il va falloir mettre des events pour les musiques sur chaque map non ?

Pour le format ce n'est pas un problème : Coma8 à justement eu la merveilleuse idée de n'utiliser que du OGG pour pouvoir faire des intros.

Bon, si on ne trouve vraiment rien d'autre, on prendra celui la. Un grand merci Estheone, c'est pas la première fois que tu réponds à un de mes topics de demande d'aide. C'est très gentil de répondre à chaque fois :)


Estheone - posté le 10/07/2014 à 13:48:38 (312 messages postés)

❤ 0

Je sais ce que c'est de bloquer sur des problèmes de script qui semblent insurmontables donc si je peux aider - et que ça me prend pas trois plombes - c'est avec plaisir.

Tiens je t'ai bricolé un script pour aller avec l'Audio+ qui devrait faire ce dont t'as besoin sans casser le reste.
Si vous utilisez les scripts de base il n'y aura rien à faire de spécial, ça devrait marcher juste en l'ajoutant à votre jeu. Dans le cas contraire, il faudra adapter là où il faut (j'ai mis les lignes importantes des grosses fonctions entre les lignes de commentaire).
Note aussi que ça ne fonctionne qu'avec des musiques en ogg.

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
class Game_Map
  attr_reader   :map_bgm
  
  def autoplay
    map_bgm_play(@map.bgm) if @map.autoplay_bgm
    @map.bgs.play if @map.autoplay_bgs
  end
  
  def map_bgm_play(bgm)
    if Advanced_Audio["Map_BGM"] && bgm == @map_bgm
      Advanced_Audio["Map_BGM"].resume
    else
      Advanced_Audio.new("Map_BGM", "Audio/BGM/#{bgm.name}.ogg")
      Advanced_Audio["Map_BGM"].play
      Advanced_Audio["Map_BGM"].volume_change(bgm.volume)
      Advanced_Audio["Map_BGM"].pitch(bgm.pitch)
    end
    @map_bgm = bgm
  end
end
 
class Scene_Map
  def call_battle
    @spriteset.update
    Graphics.update
    $game_player.make_encounter_count
    $game_player.straighten
    $game_temp.map_bgs = RPG::BGS.last
    RPG::BGS.stop
    #---------------------------------------------------------------------#
    Advanced_Audio["Map_BGM"].pause if Advanced_Audio["Map_BGM"]
    #---------------------------------------------------------------------#
    Sound.play_battle_start
    $game_system.battle_bgm.play
    $game_temp.next_scene = nil
    $scene = Scene_Battle.new
  end
end
 
class Scene_Battle
  def battle_end(result)
    if result == 2 and not $game_troop.can_lose
      call_gameover
    else
      $game_party.clear_actions
      $game_party.remove_states_battle
      $game_troop.clear
      if $game_temp.battle_proc != nil
        $game_temp.battle_proc.call(result)
        $game_temp.battle_proc = nil
      end
      unless $BTEST
        #---------------------------------------------------------------------#
        RPG::BGM.stop
        #---------------------------------------------------------------------#
        $game_temp.map_bgs.play
      end
      $scene = Scene_Map.new
      @message_window.clear
      Graphics.fadeout(30)
      #---------------------------------------------------------------------#
        Advanced_Audio["Map_BGM"].resume if Advanced_Audio["Map_BGM"]
      #---------------------------------------------------------------------#
    end
    $game_temp.in_battle = false
  end
end
 
class Scene_File
  def do_load
    file = File.open(@savefile_windows[@index].filename, "rb")
    read_save_data(file)
    file.close
    $scene = Scene_Map.new
    RPG::BGM.fade(1500)
    Graphics.fadeout(60)
    Graphics.wait(40)
    #---------------------------------------------------------------------#
    $game_map.map_bgm_play($game_map.map_bgm) if $game_map.map_bgm
    #---------------------------------------------------------------------#
    @last_bgs.play
  end
end
 
class Game_Interpreter
  def command_241
    $game_map.map_bgm_play(@params[0])
    return true
  end
  
  def command_242
    Advanced_Audio["Map_BGM"].volume_change(0, @params[0] * 60)
    return true
  end
end



Wandering Souls : Jeu complet / Topic sur Oniro


LittleGamer - posté le 10/07/2014 à 14:26:49 (414 messages postés)

❤ 0

Anh ! Merci, je teste tout de suite !

EDIT : Alors ça marche pas exactement comme prévu : La musique de la map ne se coupe pas, et du coup les musiques de la map et de combat sont jouées simultanément pendant les combats.

Il faut que je fasse quand même la pause et la reprise de l'audio + sur les maps ou c'était censé me dispenser d'ajouter un event par map ?
Avec ce script, serait-il possible d'ajouter quelques lignes au script qui démarre et finit les combats pour marquer la pause du BGM de la map et la reprise ?


Estheone - posté le 10/07/2014 à 14:57:54 (312 messages postés)

❤ 0

La pause était déjà gérée automatiquement avec le script que je t'ai passé (ligne 31 pour la pause, ligne 62 pour la reprise).

Normalement tu n'as strictement rien à faire, tout est fait en interne. J'ai testé tout ça sur un projet vierge et ça fonctionne nickel.
Je suppose que tu utilises des scripts supplémentaires ?

Wandering Souls : Jeu complet / Topic sur Oniro


LittleGamer - posté le 10/07/2014 à 15:08:58 (414 messages postés)

❤ 0

Oui, mais à la base rien sur l'audio...
Le fait que j'utilise le SBS peut-être ? Je présume que c'est soit un script sur les combats, soit sur les musiques...

Alors si c'est ça, j'ai :

-Le SBS
-Un script qui stoppe le ME de victoire après le combat :

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
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/    ◆      Forced Victory ME Stop - KGC_ForceStopVictoryME      ◆ VX ◆
#_/    ◇                Last update : 2008/03/02                        ◇
#_/    ◆               Translated by Mr. Anonymous                      ◆
#_/-----------------------------------------------------------------------------
#_/  Forces Battle Victory ME (Musical Effect) to stop when the scene returns
#_/  to the map.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#==============================================================================#
#                            ★ Customization ★                                 #
#==============================================================================#
module KGC
module ForceStopVictoryME
  # ◆ Fade out time (milli-second)
  #  If set to 0, the ME stops instantly upon scene change to map.
  FADE_TIME = 1500
end
end
#------------------------------------------------------------------------------#
$imported = {} if $imported == nil
$imported["ForceStopVictoryME"] = true
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # ● End Battle
  #     result : 結果 (0:Victory 1:Escape 2:Defeat)
  #--------------------------------------------------------------------------
  alias battle_end_KGC_ForceStopVictoryME battle_end
  def battle_end(result)
    battle_end_KGC_ForceStopVictoryME(result)
    return if result != 0
    @@_victory_me_thread = Thread.new {
      time = KGC::ForceStopVictoryME::FADE_TIME
       RPG::ME.fade(time)                         # Start ME Fade
       sleep(time / 1000.0)                       # Wait until the fade is done.
       RPG::ME.stop                               # Stop ME                       
    }
  end
end
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_



- Un script qui permet demettre la même musique de combat que la map si un interrupteur est enclenché :


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
##################################
#Musique Battle-Map sur Rpg Maker Vx
#par Monos
#
#Version 1.1 du 8 fevrier 2012
##################################
 
=begin
Permet d'avoir dans les combats la musique
de la carte et pas de musique de victoire.
=end
 
 
##############Configuration#########
=begin
Configuration : Changez le nombre par celui que vous voulez. 
Quand l'interrupteur portant cette id est activé, la musique de combat est la même que celui de la map.
Et il n'y pas de musique de victoire.
=end
Id_switch_battle_me= 100
 
##########Script####################
class Scene_Map < Scene_Base
  alias ancien_call_battle call_battle
    
  def call_battle
    @spriteset.update
    Graphics.update
    $game_player.make_encounter_count
    $game_player.straighten
    $game_temp.map_bgm = RPG::BGM.last
    $game_temp.map_bgs = RPG::BGS.last
  if   $game_switches[Id_switch_battle_me]==false # Condition
   RPG::BGM.stop
    RPG::BGS.stop
     Sound.play_battle_start
    $game_system.battle_bgm.play
  else
     Sound.play_battle_start
    end 
    $game_temp.next_scene = nil
    $scene = Scene_Battle.new
  end
end 
  
class Scene_Battle < Scene_Base
  alias ancien_process_victory  process_victory
  
  def process_victory
    @info_viewport.visible = false
    @message_window.visible = true
     
    if   $game_switches[Id_switch_battle_me]==false # Condition
    RPG::BGM.stop
    $game_system.battle_end_me.play
    unless $BTEST
      $game_temp.map_bgm.play
      $game_temp.map_bgs.play
    end
    end
    display_exp_and_gold
    display_drop_items
    display_level_up
    battle_end(0)
  end
  
  end



- Un menu de fin de combat :

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
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
#===============================================================
# ● [VX] ◦ Rapport de combat V3
#--------------------------------------------------------------
# ◦ Par  Blockade
# ◦ http://rpg-maker-vx.bbactif.com/forum.htm
# ◦ Crée le 06/04/2009
# ◦ Version 3.7
# ◦ Remerciment à Woratana, Moghunter
#--------------------------------------------------------------
#===============================================================
#===============================================================
# Notes de version :
#---------------------------------------------------------------
# ~ Version 1.0 :
#   - Création du script
# ~ Version 2.0 :
#   - Interface revue
#   - Regroupement et classement des objets gagnés
#   - Ajouts d'options de personalisations
# ~ Version 3.0 :
#   - Le script distibue l'argent gagné correctement. 
#   - Module de configuration entiérement revu 
#   - Compatibilité améliorée 
#   - Pop-up lors d'un level up qui affiche les caractéristiques 
#   - Affiche les sorts gagnés 
# ~ Version 3.5
#   - Meilleur affichage des caractéristiques quand le héros gagne un niveau
#   - Affichage du temps de combat
# ~ Version 3.6
#   - Mise à la norme de mes scripts
#   - Compatible avec 3 systèmes de combat : Combat VX, SBS, SBS avec ATB 
#   - Détecte automatiquement le SBS
# ~ Version 3.7
#   - Correction d'un bug avec le SBS avec ATB, le rapport d'affichais deux fois
#===============================================================
#===============================================================
# Utilisation : 
#  Plug & Play, inserez le au dessus de Main ! 
#  Jettez un coup d'oeil au module de configuration !
#===============================================================
module Blockade
  module Config_Report
#===============================================================
#  Blockade::Config_Report Début du Module de configuration
#===============================================================
#------------------------------------------- 
# >> Configuration du texte
#--------------------------------------------
# > Texte contenu dans l'help_window
 Text_help_window = "Rapport de Combat"  
 
# > Alignement du texte (0:Gauche, 1:Milieu, 2: Droite)
Alignement_texte = 0
 
# > Texte pour le temps de combat :
Texte_temps_combat = "Temps : "
 
# > Alignement du Texte_temps_combat (0:Gauche, 1:Milieu, 2: Droite)
Alignement_texte_temps_combat = 2
 
# > Expérience (abrégée)
Exp = "Exp : " 
 
# > Monnaie (abrégée)
Gold = "Gils : "
 
#  > Niveau (abrégé)
Lvl = "Niv. "
 
#  > Dans la fenêtre de drop 
Drop_nil = "Aucun objet trouvé."             # Si pas d'objet à la fin du combat 
Drop_objets = "Objets trouvés :"            #  Si des objets sont trouvées 
Drop_armures = "Armures trouvées :"  #  Si des armures sont trouvées 
Drop_armes = "Armes trouvées :"         # Si des armes sont trouvées   
 
# > Dans la fenêtre de changement de niveau
Texte_hp   = "HP "                  # Texte pour les Hp
Texte_mp  = "MP "                  # Texte pour les Mp
Texte_atk   = "Attaque  "         # Texte pour l'attaque
Texte_def   = "Défense  "      # Texte pour la défense
Texte_int    = "Intelligence "   # Texte pour l'intelligence
Texte_agi   = "Agilité "            # Texte pour l'agilité
 
# > Couleur des noms de caracteristiques
Couleur_nom_carac = 4
 
# > Dans la fenêtre des nouveaux sorts
Couleur_new_skill = 4  # Couleur de Texte_new_skill
Texte_new_skill = "Nouveaux sorts : " # Texte pour introduire les nouveaux sorts
 #------------------------------------------- 
 
 #------------------------------------------- 
# >> Configuration des icones
#--------------------------------------------
# > Dans la fenêtre de changement de niveau
Icone_hp  = 99     # Id de l'icone pour les PV 
Icone_mp = 100  # Id de l'icone pour les PM
Icone_atk  = 2              # Id de l'icone pour l'attaque
Icone_def   = 52          # Id de l'icone pour la défense
Icone_int   = 21           # Id de l'icone pour l'intelligence
Icone_agi   = 48          # Id de l'icone pour l'agilité
 
# > Dans la fenêtre des sorts
Icone_new_skill = 130
#------------------------------------------- 
 
#------------------------------------------- 
# >> Configuration des sons
#--------------------------------------------
# > Quand un héros gagne un niveau
Lvl_up_sound = "Recovery" # Nom du SE
Lvl_up_volume = 80 # Volume entre 50-150
Lvl_up_tempo = 100 # Tempo entre 50-150
#===============================================================
#  Blockade::Config_Report Fin du Module de configuration
#===============================================================
  end
end
 
$imported = {} if $imported == nil
$imported["Rapport_CombatV3"] = true
 
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  Scene qui gère les combats
#==============================================================================
class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Prend le temps au début du combat
  #--------------------------------------------------------------------------
  alias start_battle_block start
  def start
    start_battle_block
    @temps = Time.now
  end
  
  #--------------------------------------------------------------------------
  # * Enpêche le rapport de s'afficher 2 fois (ATB fix)
  #--------------------------------------------------------------------------
  alias judge_win_loss_block judge_win_loss unless $@
  def judge_win_loss
    if defined?(::N02)
     return unless @fin_combat.nil?
    end
     judge_win_loss_block
  end
  #--------------------------------------------------------------------------
  # * Processus de victoire
  #--------------------------------------------------------------------------
  def process_victory
     if defined?(::N01)
          @status_window.visible = true
          @message_window.visible = false
          # ボスコラプスはウエイトを長く挟む
          for enemy in $game_troop.members
            break boss_wait = true if enemy.collapse_type == 3
          end
          wait(440) if boss_wait
          wait(N01::WIN_WAIT) unless boss_wait
          # 動けないアクターを除いて勝利アクション
          for actor in $game_party.members
            unless actor.restriction >= 4
            @spriteset.set_action(true, actor.index,actor.win)
          end
        end
      end
    @info_viewport.visible = false
    @message_window.visible = false
    RPG::BGM.stop
    $game_system.battle_end_me.play
    unless $BTEST
      $game_temp.map_bgm.play
      $game_temp.map_bgs.play
    end
    new_temps = Time.now
    temps = new_temps- @temps
    if temps >= 60
      @temps_combat = (temps / 60).truncate
      @suffixe = @temps_combat > 1 ?  "minutes" : "minute"
    else
      @temps_combat = temps.truncate
      @suffixe = "secondes"
    end
    @exp =$game_troop.exp_total
    @gold = $game_troop.gold_total
    @drop = $game_troop.make_drop_items
    $game_party.gain_gold(@gold)
    ini_variable     
    Graphics.fadeout(30)
    afficher_rapport
    Graphics.fadein(20)
end
 
  #--------------------------------------------------------------------------
  # * Initialise les variables
  #-------------------------------------------------------------------------- 
  def ini_variable
      @fin_combat = true
      @actors_lvl_up = []
      @num_passage= 0
    end
    
  #--------------------------------------------------------------------------
  # * Afficher le rapport de combat
  #--------------------------------------------------------------------------
def afficher_rapport
    @help_window = Window_Help_Combat.new
    @heros_window = []
      y=55 ; i=0
    for actor in $game_party.members
     @heros_window[i] = Heros_Window.new(actor,y,@exp)
     @actors_lvl_up.push([actor,@heros_window[i].get_old_carac,@heros_window[i].get_new_carac,@heros_window[i].get_new_skills]) if @heros_window[i].level_up 
     y +=74; i += 1
    end
    @gold_exp_window = Gold_Exp_Window.new(@gold,@exp)
    @butin_window = Drop_Window.new(@drop)
    @help_window.set_text(Blockade::Config_Report::Text_help_window,Blockade::Config_Report::Alignement_texte,Blockade::Config_Report::Texte_temps_combat + "#{@temps_combat} #{@suffixe} ",Blockade::Config_Report::Alignement_texte_temps_combat)
    if @actors_lvl_up != []
      RPG::SE.new(Blockade::Config_Report::Lvl_up_sound, Blockade::Config_Report::Lvl_up_volume, Blockade::Config_Report::Lvl_up_tempo).play
      @actor_window = Carac_Window.new(@actors_lvl_up[@num_passage])
      new_skill = @actors_lvl_up[@num_passage]
      @actor_window2 = Skills_Window.new(@actors_lvl_up[@num_passage]) if @actors_lvl_up[@num_passage][3].size > 0
    end
  end
  
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  alias update_block update unless $@
  def update
    if @fin_combat != true
      update_block
    else
#  Si c'est la fin du combat
      @help_window.update
      @message_window.update
      for i in 0...@heros_window.size
        @heros_window[i].update
      end
      if @actors_lvl_up != []
      @actor_window.update
      @actor_window2.update  if @actors_lvl_up[@num_passage][3].size > 0 # if @heros_window[@num_passage].get_new_skills.size > 0
      if Input.trigger?(Input::C) 
        @num_passage += 1
        @actor_window.dispose
        @actor_window2.visible = false if @actor_window2 != nil
        if @num_passage + 1  > @actors_lvl_up.size
          Input.update
          @actors_lvl_up = []
        end # fin @num_passage
        if @actors_lvl_up != []
          RPG::SE.new(Blockade::Config_Report::Lvl_up_sound, Blockade::Config_Report::Lvl_up_volume, Blockade::Config_Report::Lvl_up_tempo).play
          @actor_window = Carac_Window.new(@actors_lvl_up[@num_passage]) 
          @actor_window2 = Skills_Window.new(@actors_lvl_up[@num_passage])  if @actors_lvl_up[@num_passage][3].size >0     # if @heros_window[@num_passage].get_new_skills.size > 0
      end # fin @actors_lvl_up
    end # fin input
  else # si pas de lvl up
  end
# Si on appuye sur Entrée
  if Input.trigger?(Input::C) and @actors_lvl_up == []
    @help_window.dispose
    for i in 0...@heros_window.size
      @heros_window[i].dispose
    end
    @gold_exp_window.dispose 
    @butin_window.dispose
    if $BTEST
      $scene = nil
    else
    Graphics.fadeout(30)
    battle_end(0)
   suppr_variables
   end
 end
end
end
  
#--------------------------------------------------------------------------
# * Reinitialise les variables
#--------------------------------------------------------------------------
def suppr_variables
    @fin_combat = false
    @actors_lvl_up = []
  end
end
  
#==============================================================================
# ** Window_Help_Combat
#------------------------------------------------------------------------------
#  This window shows skill and item explanations along with actor status.
#==============================================================================
class Window_Help_Combat < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 544, WLH + 32)
  end
  #--------------------------------------------------------------------------
  # * Set Text
  #  text  : character string displayed in window
  #  align : alignment (0..flush left, 1..center, 2..flush right)
  #--------------------------------------------------------------------------
  def set_text(text1, align1,text2,align2)
    if text1 != @text1 or align1 != @align1 or text2 != @text2 or align2 != @align2
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, WLH, text1, align1)
      self.contents.draw_text(4, 0, self.width - 40, WLH, text2, align2)
      @text1 = text1 ; @align = align2
      @text2 = text2 ; @align2 = align2
    end  
  end
end
 
 #==============================================================================
# ** Skills_Window
#------------------------------------------------------------------------------
#  Affiche les sorts
#============================================================================== 
class Skills_Window < Window_Base
  def initialize(actor_info)
    @new_skills = actor_info[3]
    super(300,58,244,230)
    afficher_sorts
  end
  
  #--------------------------------------------------------------------------
  # * Affiche les nouveaux sorts
  #--------------------------------------------------------------------------
  def afficher_sorts
    self.contents.font.color = text_color(Blockade::Config_Report::Couleur_new_skill)
    self.contents.draw_text(25,0, 200, WLH, Blockade::Config_Report::Texte_new_skill)
    draw_icon(Blockade::Config_Report::Icone_new_skill,0,0)
    y = 25
    for skills in @new_skills
     draw_item_name(skills,0,y)
     y += 25
    end
  end
end
 
 #==============================================================================
# ** Carac_Window
#------------------------------------------------------------------------------
#  Affiche les caractérisqtiques
#============================================================================== 
class Carac_Window < Window_Base
  def initialize(actor)
    @actor = actor[0]
    @old_carac = actor[1]
    @new_carac = actor[2]
    @new_skills = actor[3]
    x = 100
    x = 0 if @new_skills.size > 0 
    super(x,58,300,230)
   afficher_info_actor
   afficher_icone
   afficher_carac
 end
 
  #--------------------------------------------------------------------------
  # * Affiche le nom et le niveau du héros
  #--------------------------------------------------------------------------
def afficher_info_actor
  draw_character(@actor.character_name, @actor.character_index, 20, 40)
  self.contents.draw_text(40,0, 200, WLH, @actor.name) 
  self.contents.draw_text(40,20,200,WLH,Blockade::Config_Report::Lvl + @old_carac[0].to_s + " > " + 
  Blockade::Config_Report::Lvl + @new_carac[0].to_s)
end
 
  #--------------------------------------------------------------------------
  # * Affiche les icones
  #--------------------------------------------------------------------------
def afficher_icone
  draw_icon(Blockade::Config_Report::Icone_hp,0,50)
  draw_icon(Blockade::Config_Report::Icone_mp ,0,75)
  draw_icon(Blockade::Config_Report::Icone_atk ,0,100)
  draw_icon(Blockade::Config_Report::Icone_def,0,125)
  draw_icon(Blockade::Config_Report::Icone_int,0,150)
  draw_icon(Blockade::Config_Report::Icone_agi,0,175)
end
 
  #--------------------------------------------------------------------------
  # * Affiche les caractéristiques
  #--------------------------------------------------------------------------
  def afficher_carac
    self.contents.font.color = text_color(Blockade::Config_Report::Couleur_nom_carac)
    self.contents.draw_text(25,50, 150, WLH,  Blockade::Config_Report::Texte_hp)
    self.contents.draw_text(25,75, 150, WLH,  Blockade::Config_Report::Texte_mp) 
    self.contents.draw_text(25,100, 150, WLH,  Blockade::Config_Report::Texte_atk) 
    self.contents.draw_text(25,125, 150, WLH,  Blockade::Config_Report::Texte_def) 
    self.contents.draw_text(25,150, 150, WLH,  Blockade::Config_Report::Texte_int) 
    self.contents.draw_text(25,175, 150, WLH,  Blockade::Config_Report::Texte_agi) 
    self.contents.font.color = normal_color
    y = 50
    for i in 1...@new_carac.size
      self.contents.draw_text(150,y, 105, WLH, @old_carac[i],0)
      self.contents.draw_text(150,y, 110, WLH, "> ",1)
      self.contents.font.color =  power_up_color if @old_carac[i] < @new_carac[i]
      self.contents.font.color.alpha = 128 if @old_carac[i] == @new_carac[i]
      self.contents.draw_text(150,y, 105, WLH, @new_carac[i],2)
      self.contents.font.color.alpha = 255
      self.contents.font.color = normal_color
      y +=25
    end
  end
end
 
 #==============================================================================
# ** Gold_Exp_Window
#------------------------------------------------------------------------------
#  Affiche l'argent et l'exp obtenus
#============================================================================== 
class Gold_Exp_Window < Window_Base
  def initialize(gold,exp)
    super(0,350,200,65)
    self.contents.draw_text(0,-6,200,WLH,Blockade::Config_Report::Exp + exp.to_s) 
    self.contents.draw_text(0,14,200,WLH,Blockade::Config_Report::Gold + gold.to_s)
  end
end
 
#==============================================================================
# ** Heros_Window
#------------------------------------------------------------------------------
#  Affiche les informations d'exp sur les héros
#==============================================================================
class Heros_Window < Window_Base
  def initialize(actor,y,exp)
    super(0,y,200,75)
    @actor = actor
    @exp = exp
    afficher_info
  end
  
#--------------------------------------------------------------------------
# * Affiche les informations
#--------------------------------------------------------------------------
  def afficher_info
    @level_up = false
    last_lvl  = @actor.level
    last_hp =  @actor.maxhp
    last_mp = @actor.maxmp
    last_atk =  @actor.atk
    last_def = @actor.def
    last_spi = @actor.spi
    last_agi = @actor.agi
    last_skill = @actor.skills
    @actor.gain_exp(@exp,false)
    if @actor.level > last_lvl
       @level_up = true
       @old_carac = [last_lvl,last_hp,last_mp, last_atk, last_def, last_spi, last_agi]
       @new_carac =[@actor.level, @actor.maxhp,@actor.maxmp,@actor.atk,@actor.def,@actor.spi,@actor.agi]
       @new_skills = @actor.skills - last_skill
    end
    draw_character(@actor.character_name, @actor.character_index, 20, 40)
    draw_actor_exp_meter(@actor,40,20)
    self.contents.draw_text(40,0, 60, WLH, @actor.name) 
    self.contents.draw_text(110,0,60,WLH,Blockade::Config_Report::Lvl + @actor.level.to_s)
  end
  
 #--------------------------------------------------------------------------
# * Renvoie les anciennes caractérisques
#--------------------------------------------------------------------------    
  def get_old_carac
    return @old_carac
  end
  
#--------------------------------------------------------------------------
# * Renvoie les nouvelles caractérisques
#-------------------------------------------------------------------------- 
  def get_new_carac
    return @new_carac
  end
  
#--------------------------------------------------------------------------
# * Renvoie les nouveaux sorts
#-------------------------------------------------------------------------- 
  def get_new_skills
    if @new_skills.size > 0
     return @new_skills
   else
     return []
     end
  end
 #--------------------------------------------------------------------------
# * Determine si le heros a pris un ou plusieurs niveaux
#-------------------------------------------------------------------------- 
  def level_up
    return @level_up
  end
#--------------------------------------------------------------------------
# * Couleur 1 de la barre
#--------------------------------------------------------------------------
  def exp_gauge_color1
    return text_color(30)
  end
      
#--------------------------------------------------------------------------
# * Couleur 1 de la barre
#--------------------------------------------------------------------------
  def exp_gauge_color2
    return text_color(31)
  end
  
#--------------------------------------------------------------------------
# * Dessine la barre d'exp
#-------------------------------------------------------------------------
  def draw_actor_exp_meter(actor, x, y, width = 100)
    if actor.next_exp != 0
      exp = actor.now_exp
    else
      exp = 1
    end
      gw = width * exp / [actor.next_exp, 1].max
      gc1 = exp_gauge_color1
      gc2 = exp_gauge_color2
      self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
      self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
      self.contents.font.color = system_color
      self.contents.draw_text(x, y, 30, WLH, "Exp") 
      self.contents.font.color = normal_color
      xr = x + width
      self.contents.draw_text(xr - 60, y, 60, WLH,  actor.next_rest_exp_s, 2) 
    end
  end
 
#==============================================================================
# ** Drop_Window
#------------------------------------------------------------------------------
#  Affiche les objets obtenus
#============================================================================== 
class Drop_Window < Window_Base
  def initialize(drop)
      super(200,55,344,360)
      @drop = drop
      if @drop != []
        trier_drop 
        regrouper
        afficher_drop
        donner_drop
      else
        afficher_mess
      end
    end
    
#--------------------------------------------------------------------------
# * Trie le drop en fonction du type d'objet
#------------------------------------------------------------------------- 
  def trier_drop
    @armes = []
    @armures =  []
    @items = []
    for item in @drop
      if item.is_a?(RPG::Item)
        @items.push(item)
      end
      if item.is_a?(RPG::Armor)
        @armures.push(item)
      end
      if item.is_a?(RPG::Weapon)
        @armes.push(item)
      end
    end
  end
     
#--------------------------------------------------------------------------
# * Regroupe les objets par nombre  
#------------------------------------------------------------------------- 
  def regrouper
#-------------------------------------------------------
#  Pour les objets  
#------------------------------------------------------
    if @items != []
      @items_unique = @items.uniq
      @regroupement_item = {}
      for item in @items_unique
        @regroupement_item[item] = 0
      end
      for item in @items
        if @regroupement_item.include?(item)
          @regroupement_item[item] += 1
        end
      end
    end
    
#-------------------------------------------------------
#  Pour les armures
#------------------------------------------------------
    if @armures != []
      @armure_unique = @armures.uniq
      @regroupement_armures = {}
      for armure in @armure_unique
        @regroupement_armures[armure] = 0
      end
      for armure in @armures
        if @regroupement_armures.include?(armure)
          @regroupement_armures[armure] += 1
        end
      end
    end
    
#-------------------------------------------------------
#  Pour les armes
#------------------------------------------------------
    if @armes != []
      @armes_unique = @armes.uniq
      @regroupement_armes = {}
      for arme in @armes_unique
        @regroupement_armes[arme] = 0
      end
      for arme in @armes
        if @regroupement_armes.include?(arme)
          @regroupement_armes[arme] += 1
        end
      end
    end
  end
 
#--------------------------------------------------------------------------
# * Affiche les objets
#------------------------------------------------------------------------- 
  def afficher_drop
    y=0 # Initialisation de la coordonée y
#-------------------------------------------------------
#  Pour les objets  
#------------------------------------------------------
    if @items != []
      self.contents.draw_text(0,y,200,WLH,Blockade::Config_Report::Drop_objets)
      y += 25
      for item in @regroupement_item
        draw_icon(item[0].icon_index, 0, y)
        if item[1] > 1 
         quantite = "  x" + item[1].to_s
        else
          quantite = ""
        end
        self.contents.draw_text(24, y, 172, WLH, item[0].name + quantite)
       y+=25
     end
   end
   
   y += 5 if @items.nil? == false # Si les objets on été affiché augmenter y de 5
   
#-------------------------------------------------------
#  Pour les armures
#------------------------------------------------------
   if @armures != []
      self.contents.draw_text(0,y,200,WLH,Blockade::Config_Report::Drop_armures)
      y += 25
     for armure in @regroupement_armures
      draw_icon(armure[0].icon_index, 0, y)
        if armure[1] > 1 
         quantite = "  x" + armure[1].to_s
        else
          quantite = ""
        end
        self.contents.draw_text(24, y, 172, WLH, armure[0].name + quantite)
      y +=25
    end
  end
  
  y += 5 if @armures.nil? == false # Si les armures on été affichées augmenter y de 5
  
#-------------------------------------------------------
#  Pour les armes
#------------------------------------------------------
  if @armes != []
      self.contents.draw_text(0,y,200,WLH,Blockade::Config_Report::Drop_armes)
      y += 25
     for arme in @regroupement_armes
     draw_icon(arme[0].icon_index, 0, y)
        if arme[1] > 1 
         quantite = "  x" + arme[1].to_s
        else
          quantite = ""
        end
        self.contents.draw_text(24, y, 172, WLH, arme[0].name + quantite)
      y +=25
    end
  end   
end
 
#-------------------------------------------------------
#  Afficher un message si pas de drop
#------------------------------------------------------
  def afficher_mess
    self.contents.draw_text(0,0,360,WLH,Blockade::Config_Report::Drop_nil) 
  end
  
#-------------------------------------------------------
#  Donne le drop à l'équipe
#------------------------------------------------------
  def donner_drop
    for item in @drop
      $game_party.gain_item(item, 1)
    end
  end
end
 
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  Gére les données système sur les héros.
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Calcul de l'exp accumulée
  #--------------------------------------------------------------------------
    def now_exp
        return @exp - @exp_list[@level]
      end
    
  #--------------------------------------------------------------------------
  # * Calcul de l'exp a avoir pour gagner un niveau
  #--------------------------------------------------------------------------  
    def next_exp
      #      return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
return @exp_list[@level+1] > 0 ? (@exp_list[@level+1] - @exp_list[@level]).to_i : 0
end
  end



Je vais tester en passant les plus petits en commentaires. Si c'est le SBS par contre ça va être plus chiant à tester...



EDIT : Il semblerait que ce soit celui sur la musique de combat comme la map. En le désactivant, la musique de map n'était plus jouée pendant le combat, seulement, à la fin, une erreur avec le script de menu de fin de combat est survenue.
L'erreur dit : Script 'Menu fin de combat' line 173: NoMethodError occurred. undefind method `play' for nil:NilClass

En revanche, si on fuit le combat, ton script fonctionne et la musique reprend !


Estheone - posté le 10/07/2014 à 15:24:26 (312 messages postés)

❤ 0

Quel bordel la vache. :oO
C'est un miracle que ton jeu fonctionne, crois-moi.

Tiens une nouvelle version de mon script qui essaie de tenir compte des autres scripts. Tu dois le placer après eux :

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
class Game_Map
  attr_reader   :map_bgm
  
  def autoplay
    map_bgm_play(@map.bgm) if @map.autoplay_bgm
    @map.bgs.play if @map.autoplay_bgs
  end
  
  def map_bgm_play(bgm)
    if Advanced_Audio["Map_BGM"] && bgm == @map_bgm
      Advanced_Audio["Map_BGM"].resume
    else
      Advanced_Audio.new("Map_BGM", "Audio/BGM/#{bgm.name}.ogg")
      Advanced_Audio["Map_BGM"].play
      Advanced_Audio["Map_BGM"].volume_change(bgm.volume)
      Advanced_Audio["Map_BGM"].pitch(bgm.pitch)
    end
    @map_bgm = bgm
  end
end
 
class Scene_Map
  def call_battle
    @spriteset.update
    Graphics.update
    $game_player.make_encounter_count
    $game_player.straighten
    $game_temp.map_bgm = RPG::BGM.last
    $game_temp.map_bgs = RPG::BGS.last
    if $game_switches[Id_switch_battle_me]==false # Condition
      #---------------------------------------------------------------------#
      Advanced_Audio["Map_BGM"].pause if Advanced_Audio["Map_BGM"]
      #---------------------------------------------------------------------#
      RPG::BGS.stop
      Sound.play_battle_start
      $game_system.battle_bgm.play
    else
      Sound.play_battle_start
    end 
    $game_temp.next_scene = nil
    $scene = Scene_Battle.new
  end
end
 
class Scene_Battle < Scene_Base
  def process_victory
    if defined?(::N01)
      @status_window.visible = true
      @message_window.visible = false
      for enemy in $game_troop.members
        break boss_wait = true if enemy.collapse_type == 3
      end
      wait(440) if boss_wait
      wait(N01::WIN_WAIT) unless boss_wait
      for actor in $game_party.members
        unless actor.restriction >= 4
          @spriteset.set_action(true, actor.index,actor.win)
        end
      end
    end
    @info_viewport.visible = false
    @message_window.visible = false
    RPG::BGM.stop
    $game_system.battle_end_me.play
    unless $BTEST
    #---------------------------------------------------------------------#
      Advanced_Audio["Map_BGM"].resume if Advanced_Audio["Map_BGM"]
    #---------------------------------------------------------------------#
      $game_temp.map_bgs.play
    end
    new_temps = Time.now
    temps = new_temps- @temps
    if temps >= 60
      @temps_combat = (temps / 60).truncate
      @suffixe = @temps_combat > 1 ?  "minutes" : "minute"
    else
      @temps_combat = temps.truncate
      @suffixe = "secondes"
    end
    @exp =$game_troop.exp_total
    @gold = $game_troop.gold_total
    @drop = $game_troop.make_drop_items
    $game_party.gain_gold(@gold)
    ini_variable     
    Graphics.fadeout(30)
    afficher_rapport
    Graphics.fadein(20)
  end
end
 
class Scene_File
  def do_load
    file = File.open(@savefile_windows[@index].filename, "rb")
    read_save_data(file)
    file.close
    $scene = Scene_Map.new
    RPG::BGM.fade(1500)
    Graphics.fadeout(60)
    Graphics.wait(40)
    #---------------------------------------------------------------------#
    $game_map.map_bgm_play($game_map.map_bgm) if $game_map.map_bgm
    #---------------------------------------------------------------------#
    @last_bgs.play
  end
end
 
class Game_Interpreter
  def command_241
    $game_map.map_bgm_play(@params[0])
    return true
  end
  
  def command_242
    Advanced_Audio["Map_BGM"].volume_change(0, @params[0] * 60)
    return true
  end
end



Wandering Souls : Jeu complet / Topic sur Oniro


LittleGamer - posté le 10/07/2014 à 15:29:11 (414 messages postés)

❤ 0

Y a encore plus de scripts d'ajoutés en fait ^^" ils sont sur des points assez variés. ça bug pas vraiment, le seul qui pose parfois problème c'est le menu de fin de combat qui reste affiché sur la map dans quelques cas rares. Apparemment c'est un problème propre au script, pas de comptabilité.

Je test avec ça :)


EDIT : ça fonctionne quasiment ! Le problème là, c'est que la musique de la map reprend en même temps que le ME de victoire, et les deux sont joués simultanément du coup. Il y a moyen de régler ça ?


Estheone - posté le 10/07/2014 à 15:42:55 (312 messages postés)

❤ 0

Ouais, déplace la ligne 67 de mon script :

Portion de code : Tout sélectionner

1
Advanced_Audio["Map_BGM"].resume if Advanced_Audio["Map_BGM"]

à la fin de la fonction, juste après le Graphics.fadein.

Un dernier truc encore : essaie de sauvegarder puis de recharger la partie pour voir si ça plante pas et si la musique se lance correctement.

Wandering Souls : Jeu complet / Topic sur Oniro


LittleGamer - posté le 10/07/2014 à 15:48:18 (414 messages postés)

❤ 0

Je fais tout ça.


Estheone - posté le 10/07/2014 à 15:49:26 (312 messages postés)

❤ 0

Si la musique se relance toujours trop tôt essaie de virer le morceau de mon script sur la fonction process_victory et remets le morceau sur battle_end :

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
class Scene_Battle < Scene_Base
  def battle_end(result)
    if result == 2 and not $game_troop.can_lose
      call_gameover
    else
      $game_party.clear_actions
      $game_party.remove_states_battle
      $game_troop.clear
      if $game_temp.battle_proc != nil
        $game_temp.battle_proc.call(result)
        $game_temp.battle_proc = nil
      end
      unless $BTEST
        #---------------------------------------------------------------------#
        RPG::BGM.stop
        #---------------------------------------------------------------------#
        $game_temp.map_bgs.play
      end
      $scene = Scene_Map.new
      @message_window.clear
      Graphics.fadeout(30)
      #---------------------------------------------------------------------#
        Advanced_Audio["Map_BGM"].resume if Advanced_Audio["Map_BGM"]
      #---------------------------------------------------------------------#
    end
    $game_temp.in_battle = false
  end
end



Wandering Souls : Jeu complet / Topic sur Oniro


zeus81 - posté le 10/07/2014 à 15:57:32 (11071 messages postés)

❤ 0

Hum, le problème avec ce script c'est qu'il utilise les codecs de windows.
Y'aura sûrement des gens qui n'auront pas de son, faudra leur faire installer un codec ogg. :(


LittleGamer - posté le 10/07/2014 à 15:59:47 (414 messages postés)

❤ 0

Je reteste ça alors, ça faisait ce problème.

Par contre recharger la partie ne fonctionne pas : ça crash au moment de lancer le jeu avec le message Script Estheone ajout musique' line 95: NoMethodError occurred. undefined method `[]' for nil:NilClass

C'est peut-être parce que j'ai un script de sauvegarde ?

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
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
#==========================================================================
# â— [VX] â—¦ Neo Save System V â—¦ â–¡
#---------------------------------------------------------------------------
# â—¦ Author: Woratana [woratana@hotmail.com]
# â—¦ Thaiware RPG Maker Community
# â—¦ Last Updated:
# â—¦ Version: 3.0 -> 5.0
# â—¦ Continued support by Helladen
# â—¦ (Screen Shot credit Wortana, Andreas21, and Cybersam)
#---------------------------------------------------------------------------
# â—¦ Log V:
# - Screenshot support for those who want tone/weather/sprites and
#   unlike NSS 1.0 the screen is now centered.
# - Added an option to stay in save screen after you save the game
#---------------------------------------------------------------------------
# â—¦ Log IV:
# - New addition for hiding map names. You can control the switch to
#   allow MAP_NO_NAME_LIST to work or not.
# - Revised some of the settings and script organization.
# - Added an option to disable the vocab::Gold text right of the number.
# - Added an option to use default opacity or not.
# - Swap tile compatibility support.
#---------------------------------------------------------------------------
# â—¦ Log III:
# - Change back to draw tile map as screenshot. Don't need any image.
# - For drawing tile map, the characters won't show on the tile map.
#---------------------------------------------------------------------------
# â—¦ Log II:
# - Screenshot DLL is not work with Vista Aero, so I remove it
#   and use image for each map instead of screenshot.
# - Actor's level in last version (V.1) is incorrect.
#---------------------------------------------------------------------------
# â—¦ Features:
# - Unlimited save slots, you can choose max save slot
# - Many configuration options
# - Swap tile support
# - You can use image for scene's background
# - Choose your save file's name, and folder to store save files
# - Choose to show only information you want
# - Editable text for information's title
# - Draw tile map for map that player is currently on.
# - Remove text you don't want from map's name (e.g. tags for special script)
# - Choose map that you don't want to show the name on
# - Include save confirmation window before overwrite old save
#===========================================================================
 
module Wora_NSS Wora_NSS
  #==========================================================================
  # * START NEO SAVE SYSTEM - SETUP
  #--------------------------------------------------------------------------
  OPACITY_DEFAULT = true # This will use the default opacity for windows
                   # Please note that this will affect both opacitys below
  NSS_WINDOW_OPACITY = 255 # All windows' opacity (Lowest 0 - 255 Highest)
  # You can change this to 0 in case you want to use image for background
  NSS_IMAGE_BG = '' # Background image file name, it must be in folder Picture
  #               use '' for no background
  NSS_IMAGE_BG_OPACITY = 255 # Opacity for background image
 
  # If you use the screen shot method this does not matter
  SWAP_TILE = false # Make this false if you don't use the swap_tile script
  SWAP_TILE_SWITCH = 84 # The switch needs to be the same as your swap tile
  #                  switch, but if SWAP_TILE is false it does not matter
 
  # If this is true it will screen shot the map, if false it will draw it
  SCREENSHOT_IMAGE = true # Drawing the map is good because it doesn't require
  # a .DLL or images for the screen shot, but it has sprites, tone, and
  # weather. You need to turn on swap tile if you have this as false.
 
  IMAGE_FILETYPE = '.png' # Image type for screenshot
  # '.bmp', or '.jpg', or '.png'
 
  # If this is true then the scene will not change when you save the game
  SCENE_CHANGE = true  # Changes Scene to map if true
 
  MAX_SAVE_SLOT = 20 # Max save slots
  SLOT_NAME = 'SLOT {id}'
  # Name of the slot (show in save slots list), use {id} for slot ID
  SAVE_FILE_NAME = 'Save {id}.rvdata'
  # Save file name, you can also change its file type from .rvdata to other
 
  # Use {id} for save slot ID
  SAVE_PATH = '' # Path to store save file, e.g. 'Save/' or '' (for game folder)
  SAVED_SLOT_ICON = 133 # Icon Index for saved slot
 
  EMPTY_SLOT_ICON = 141 # Icon Index for empty slot
  EMPTY_SLOT_TEXT = 'Vide' # Text to show for empty slot's data
 
  DRAW_GOLD = true # Draw Gold
  DRAW_PLAYTIME = true # Draw Playtime
  DRAW_LOCATION = true # Draw location
  DRAW_FACE = true # Draw Actor's face
  DRAW_LEVEL = true # Draw Actor's level
  DRAW_NAME = true # Draw Actor's name
  DRAW_TEXT_GOLD = false # Draw the vocab::Gold text to the right of the number
 
  PLAYTIME_TEXT = 'Temps de jeu: '
  GOLD_TEXT = '            '
  LOCATION_TEXT = 'Localisation: '
  LV_TEXT = 'Lv. '
 
  MAP_NAME_TEXT_SUB = %w{}
  # Text that you want to remove from map name,
  # e.g. %w{[LN] [DA]} will remove text '[LN]' and '[DA]' from map name
  MAP_NO_NAME_LIST = [2] # ID of Map that will not show map name, e.g. [1,2,3]
  MAP_NO_NAME = '???' # What you will use to call the map in the no name list
 
  # This is a switch that can activate or deactivate maps from being displayed as
  # MAP_NO_NAME. If it is off then maps will return back to normal.
  MAP_NO_NAME_SWITCH = 95 # This switch has to be on for MAP_NO_NAME_LIST to work
 
  MAP_BORDER = Color.new(0,0,0,200) # Map image border color (R,G,B,Opacity)
  FACE_BORDER = Color.new(0,0,0,200) # Face border color
 
  # Save confirmation window
  SFC_Text_Confirm = 'Confirmer' # Text to confirm to save file
  SFC_Text_Cancel = 'Annuler' # Text to cancel to save
  SFC_Window_Width = 200 # Width of Confirmation Window
  SFC_Window_X_Offset = 0 # Move Confirmation Window horizontally
  SFC_Window_Y_Offset = 0 # Move Confirmation Window vertically
 
  #-------------------------------------------------------------------------
  # END NEO SAVE SYSTEM - SETUP (Edit below at your own risk)
  #=========================================================================
 
  #-------------------------------------------------------------
  # Screenshot V2 by Andreas21 and Cybersam
  #-------------------------------------------------------------
  @screen = Win32API.new 'screenshot', 'Screenshot', %w(l l l l p l l), ''
  @readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
  @findwindow = Win32API.new 'user32', 'FindWindowA', %w(p p), 'l'
  module_function
  def self.shot(file_name)
   case IMAGE_FILETYPE
   when '.bmp'; typid = 0
   when '.jpg'; typid = 1
   when '.png'; typid = 2
   end
   # Get Screenshot
   filename = file_name + IMAGE_FILETYPE
   @screen.call(0, 0, Graphics.width, Graphics.height, filename, self.handel,
   typid)
  end
  def self.handel
   game_name = "\0" * 256
   @readini.call('Game','Title','',game_name,255,".\\Game.ini")
   game_name.delete!("\0")
   return @findwindow.call('RGSS Player',game_name)
  end
 
end
 
class Scene_File < Scene_Base
  include Wora_NSS
  attr_reader :window_slotdetail
  #-------------------------------------------------------------------------
  # * Start processing
  #-------------------------------------------------------------------------
  def start
   super
   create_menu_background
   if NSS_IMAGE_BG != ''
     @bg = Sprite.new
     @bg.bitmap = Cache.picture(NSS_IMAGE_BG)
     @bg.opacity = NSS_IMAGE_BG_OPACITY
   end
   @help_window = Window_Help.new
   command = []
   (1..MAX_SAVE_SLOT).each do |i|
     command << SLOT_NAME.clone.gsub!(/\{ID\}/i) { i.to_s }
   end
   @window_slotdetail = Window_NSS_SlotDetail.new
   @window_slotlist = Window_SlotList.new(160, command)
   @window_slotlist.y = @help_window.height
   @window_slotlist.height = Graphics.height - @help_window.height
   if OPACITY_DEFAULT == false
   @help_window.opacity = NSS_WINDOW_OPACITY
   @window_slotdetail.opacity = @window_slotlist.opacity = NSS_WINDOW_OPACITY
   end
 
  # Create Folder for Save file
  if SAVE_PATH != ''
   Dir.mkdir(SAVE_PATH) if !FileTest.directory?(SAVE_PATH)
  end
   if @saving
     @index = $game_temp.last_file_index
     @help_window.set_text(Vocab::SaveMessage)
   else
     @index = self.latest_file_index
     @help_window.set_text(Vocab::LoadMessage)
     (1..MAX_SAVE_SLOT).each do |i|
      @window_slotlist.draw_item(i-1, false) if !@window_slotdetail.file_exist?(i)
    end
   end
   @window_slotlist.index = @index
   # Draw Information
   @last_slot_index = @window_slotlist.index
   @window_slotdetail.draw_data(@last_slot_index + 1)
  end
  #-------------------------------------------------------------------------- 
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
   super
   dispose_menu_background
   unless @bg.nil?
     @bg.bitmap.dispose
     @bg.dispose
   end
   @window_slotlist.dispose
   @window_slotdetail.dispose
   @help_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
   super
   if !@confirm_window.nil?
     @confirm_window.update
     if Input.trigger?(Input::C)
      if @confirm_window.index == 0
        determine_savefile
        @confirm_window.dispose
        @confirm_window = nil
      else
        Sound.play_cancel
        @confirm_window.dispose
        @confirm_window = nil
      end
     elsif Input.trigger?(Input::B)
     Sound.play_cancel
     @confirm_window.dispose
     @confirm_window = nil
     end
   else
     update_menu_background
     @window_slotlist.update
     if @window_slotlist.index != @last_slot_index
      @last_slot_index = @window_slotlist.index
      @window_slotdetail.draw_data(@last_slot_index + 1)
     end
     @help_window.update
     update_savefile_selection
   end
  end
  #--------------------------------------------------------------------------
  # * Update Save File Selection
  #--------------------------------------------------------------------------
  def update_savefile_selection
   if Input.trigger?(Input::C)
     if @saving and @window_slotdetail.file_exist?(@last_slot_index + 1)
      Sound.play_decision
      text1 = SFC_Text_Confirm
      text2 = SFC_Text_Cancel
      @confirm_window = Window_Command.new(SFC_Window_Width,[text1,text2])
      @confirm_window.x = ((544 - @confirm_window.width) / 2) + SFC_Window_X_Offset
      @confirm_window.y = ((416 - @confirm_window.height) / 2) + SFC_Window_Y_Offset
     else
      determine_savefile
     end
   elsif Input.trigger?(Input::B)
     Sound.play_cancel
     return_scene
   end
  end
 
  #--------------------------------------------------------------------------
  # * Execute Save
  #--------------------------------------------------------------------------
  def do_save
   if SCREENSHOT_IMAGE
   File.rename(SAVE_PATH + 'temp' + IMAGE_FILETYPE,
   make_filename(@last_slot_index).gsub(/\..*$/){ '_ss' } + IMAGE_FILETYPE) 
   end 
   file = File.open(make_filename(@last_slot_index), "wb")
   write_save_data(file)
   file.close   
   if SCENE_CHANGE
   $scene = Scene_Map.new
   else
   $scene = Scene_File.new(true, false, false)
   end
  end
  #--------------------------------------------------------------------------
  # * Execute Load
  #--------------------------------------------------------------------------
  def do_load
   file = File.open(make_filename(@last_slot_index), "rb")
   read_save_data(file)
   file.close
   $scene = Scene_Map.new
   RPG::BGM.fade(1500)
   Graphics.fadeout(60)
   Graphics.wait(40)
   @last_bgm.play
   @last_bgs.play
  end
  #--------------------------------------------------------------------------
  # * Confirm Save File
  #--------------------------------------------------------------------------
  def determine_savefile
   if @saving
     Sound.play_save
     do_save
   else
     if @window_slotdetail.file_exist?(@last_slot_index + 1)
      Sound.play_load
      do_load
     else
      Sound.play_buzzer
      return
     end
   end
   $game_temp.last_file_index = @last_slot_index
  end
  #--------------------------------------------------------------------------
  # * Create Filename
  #    file_index : save file index (0-3)
  #--------------------------------------------------------------------------
  def make_filename(file_index)
   return SAVE_PATH + SAVE_FILE_NAME.gsub(/\{ID\}/i) { (file_index + 1).to_s }
  end
  #--------------------------------------------------------------------------
  # * Select File With Newest Timestamp
  #--------------------------------------------------------------------------
  def latest_file_index
   latest_index = 0
   latest_time = Time.at(0)
   (1..MAX_SAVE_SLOT).each do |i|
     file_name = make_filename(i - 1)
     next if !@window_slotdetail.file_exist?(i)
     file_time = File.mtime(file_name)
     if file_time > latest_time
      latest_time = file_time
      latest_index = i - 1
     end
   end
   return latest_index
  end
 
class Window_SlotList < Window_Command
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
   rect = item_rect(index)
   rect.x += 4
   rect.width -= 8
   icon_index = 0
   self.contents.clear_rect(rect)
   if $scene.window_slotdetail.file_exist?(index + 1)
     icon_index = Wora_NSS::SAVED_SLOT_ICON
   else
     icon_index = Wora_NSS::EMPTY_SLOT_ICON
   end
   if !icon_index.nil?
     rect.x -= 4
     draw_icon(icon_index, rect.x, rect.y, enabled) # Draw Icon
     rect.x += 26
     rect.width -= 20
   end
   self.contents.clear_rect(rect)
   self.contents.font.color = normal_color
   self.contents.font.color.alpha = enabled ? 255 : 128
   self.contents.draw_text(rect, @commands[index])
  end
 
  def cursor_down(wrap = false)
   if @index < @item_max - 1 or wrap
     @index = (@index + 1) % @item_max
   end
  end
 
  def cursor_up(wrap = false)
   if @index > 0 or wrap
     @index = (@index - 1 + @item_max) % @item_max
   end
  end
end
 
class Window_NSS_SlotDetail < Window_Base
  include Wora_NSS
  def initialize
   super(160, 56, 384, 360)
   @data = []
   @exist_list = []
   @bitmap_list = {}
   @map_name = []
  end
 
  def dispose
   dispose_tilemap
   super
  end
 
  def draw_data(slot_id)
   contents.clear # 352, 328
   dispose_tilemap
   load_save_data(slot_id) if @data[slot_id].nil?
   if @exist_list[slot_id]
     save_data = @data[slot_id]
     # DRAW SCREENSHOT
    contents.fill_rect(0,30,352,160, MAP_BORDER)
    if SCREENSHOT_IMAGE
     if save_data['ss']
      bitmap = get_bitmap(save_data['ss_path'])
      rect = Rect.new((Graphics.width-348)/2,(Graphics.height-156)/2,348,156)
      contents.blt(2,32,bitmap,rect)
     end
    else
     if SWAP_TILE and $game_switches[SWAP_TILE_SWITCH]
     create_swaptilemap(save_data['gamemap'].data, save_data['gamemap'].display_x,
     save_data['gamemap'].display_y)
     else
     create_tilemap(save_data['gamemap'].data, save_data['gamemap'].display_x,
     save_data['gamemap'].display_y)
     end
    end
     if DRAW_GOLD
      # DRAW GOLD
      gold_textsize = contents.text_size(save_data['gamepar'].gold).width
      goldt_textsize = contents.text_size(GOLD_TEXT).width 
      contents.font.color = system_color
      contents.draw_text(0, 0, goldt_textsize, WLH, GOLD_TEXT)
      contents.font.color = normal_color
      contents.draw_text(goldt_textsize, 0, gold_textsize, WLH, save_data['gamepar'].gold) 
      if DRAW_TEXT_GOLD == false
      gold_textsize = 0
      goldt_textsize = 0   
      else
      contents.draw_text(goldt_textsize + gold_textsize, 0, 200, WLH, Vocab::gold)
      end
     end
     if DRAW_PLAYTIME
      # DRAW PLAYTIME
      hour = save_data['total_sec'] / 60 / 60
      min = save_data['total_sec'] / 60 % 60
      sec = save_data['total_sec'] % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      pt_textsize = contents.text_size(PLAYTIME_TEXT).width
      ts_textsize = contents.text_size(time_string).width
      contents.font.color = system_color
      contents.draw_text(contents.width - ts_textsize - pt_textsize, 0,
      pt_textsize, WLH, PLAYTIME_TEXT)
      contents.draw_text(goldt_textsize + gold_textsize,0,200,WLH, Vocab::gold)
      contents.font.color = normal_color
      contents.draw_text(0, 0, contents.width, WLH, time_string, 2)
     end
     if DRAW_LOCATION
      # DRAW LOCATION
      lc_textsize = contents.text_size(LOCATION_TEXT).width
      mn_textsize = contents.text_size(save_data['map_name']).width
      contents.font.color = system_color
      contents.draw_text(0, 190, contents.width, WLH, LOCATION_TEXT)
      contents.font.color = normal_color
      contents.draw_text(lc_textsize, 190, contents.width, WLH, save_data['map_name'])
     end
      # DRAW FACE & Level & Name
      save_data['gamepar'].members.each_index do |i|
        actor = save_data['gameactor'][save_data['gamepar'].members[i].id]
        face_x_base = (i*80) + (i*8)
        face_y_base = 216
        lvn_y_plus = 10
        lv_textsize = contents.text_size(actor.level).width
        lvt_textsize = contents.text_size(LV_TEXT).width
      if DRAW_FACE
        # Draw Face
        contents.fill_rect(face_x_base, face_y_base, 84, 84, FACE_BORDER)
        draw_face(actor.face_name, actor.face_index, face_x_base + 2,
        face_y_base + 2, 80)
      end
      if DRAW_LEVEL
        # Draw Level
        contents.font.color = system_color
        contents.draw_text(face_x_base + 2 + 80 - lv_textsize - lvt_textsize,
        face_y_base + 2 + 80 - WLH + lvn_y_plus, lvt_textsize, WLH, LV_TEXT)
        contents.font.color = normal_color
        contents.draw_text(face_x_base + 2 + 80 - lv_textsize,
        face_y_base + 2 + 80 - WLH + lvn_y_plus, lv_textsize, WLH, actor.level)
      end
      if DRAW_NAME
        # Draw Name
        contents.draw_text(face_x_base, face_y_base + 2 + 80 + lvn_y_plus - 6, 84,
        WLH, actor.name, 1)
      end
     end
   else
     contents.draw_text(0,0, contents.width, contents.height - WLH, EMPTY_SLOT_TEXT, 1)
   end
  end
 
  def load_save_data(slot_id)
   file_name = make_filename(slot_id)
   if file_exist?(slot_id) or FileTest.exist?(file_name)
     @exist_list[slot_id] = true
     @data[slot_id] = {}
     # Start load data
     file = File.open(file_name, "r")
     @data[slot_id]['time'] = file.mtime
     @data[slot_id]['char'] = Marshal.load(file)
     @data[slot_id]['frame'] = Marshal.load(file)
     @data[slot_id]['last_bgm'] = Marshal.load(file)
     @data[slot_id]['last_bgs'] = Marshal.load(file)
     @data[slot_id]['gamesys'] = Marshal.load(file)
     @data[slot_id]['gamemes'] = Marshal.load(file)
     @data[slot_id]['gameswi'] = Marshal.load(file)
     @data[slot_id]['gamevar'] = Marshal.load(file)
     @data[slot_id]['gameselfvar'] = Marshal.load(file)
     @data[slot_id]['gameactor'] = Marshal.load(file)
     @data[slot_id]['gamepar'] = Marshal.load(file)
     @data[slot_id]['gametro'] = Marshal.load(file)
     @data[slot_id]['gamemap'] = Marshal.load(file)
     @data[slot_id]['total_sec'] = @data[slot_id]['frame'] / Graphics.frame_rate
     if SCREENSHOT_IMAGE
     @data[slot_id]['ss_path'] = file_name.gsub(/\..*$/){'_ss'} + IMAGE_FILETYPE
     @data[slot_id]['ss'] = FileTest.exist?(@data[slot_id]['ss_path'])
     end
     @data[slot_id]['map_name'] = get_mapname(@data[slot_id]['gamemap'].map_id)
     file.close
   else
     @exist_list[slot_id] = false
     @data[slot_id] = -1
   end
  end
 
  def make_filename(file_index)
   return SAVE_PATH + SAVE_FILE_NAME.gsub(/\{ID\}/i) { (file_index).to_s }
  end
 
  def file_exist?(slot_id)
   return @exist_list[slot_id] if !@exist_list[slot_id].nil?
   @exist_list[slot_id] = FileTest.exist?(make_filename(slot_id))
   return @exist_list[slot_id]
  end
 
  def get_bitmap(path)
   if !@bitmap_list.include?(path)
     @bitmap_list[path] = Bitmap.new(path)
   end
  return @bitmap_list[path]
  end
 
 def get_mapname(map_id)
   if @map_data.nil?
     @map_data = load_data("Data/MapInfos.rvdata")
   end
   if @map_name[map_id].nil?
    if MAP_NO_NAME_LIST.include?(map_id) and $game_switches[MAP_NO_NAME_SWITCH]
      @map_name[map_id] = MAP_NO_NAME
    else
      @map_name[map_id] = @map_data[map_id].name
    end 
      MAP_NAME_TEXT_SUB.each_index do |i|
      @map_name[map_id].sub!(MAP_NAME_TEXT_SUB[i], '')
      @mapname = @map_name[map_id]
    end
   end
   return @map_name[map_id]
 end 
 
  def create_tilemap(map_data, ox, oy)
   @viewport = Viewport.new(self.x + 2 + 16, self.y + 32 + 16, 348,156)
   @viewport.z = self.z
   @tilemap = Tilemap.new(@viewport)
   @tilemap.bitmaps[0] = Cache.system("TileA1")
   @tilemap.bitmaps[1] = Cache.system("TileA2")
   @tilemap.bitmaps[2] = Cache.system("TileA3")
   @tilemap.bitmaps[3] = Cache.system("TileA4")
   @tilemap.bitmaps[4] = Cache.system("TileA5")
   @tilemap.bitmaps[5] = Cache.system("TileB")
   @tilemap.bitmaps[6] = Cache.system("TileC")
   @tilemap.bitmaps[7] = Cache.system("TileD")
   @tilemap.bitmaps[8] = Cache.system("TileE")
   @tilemap.map_data = map_data
   @tilemap.ox = ox / 8 + 99
   @tilemap.oy = oy / 8 + 90
  end
 
   def create_swaptilemap(map_data, ox, oy)
   @viewport = Viewport.new(self.x + 2 + 16, self.y + 32 + 16, 348,156)
   @viewport.z = self.z
   @tilemap = Tilemap.new(@viewport)
   
   tile1 = Cache_Swap_Tiles.swap($tileA1 + ".png") rescue nil
   tile2 = Cache_Swap_Tiles.swap($tileA2 + ".png") rescue nil
   tile3 = Cache_Swap_Tiles.swap($tileA3 + ".png") rescue nil
   tile4 = Cache_Swap_Tiles.swap($tileA4 + ".png") rescue nil
   tile5 = Cache_Swap_Tiles.swap($tileA5 + ".png") rescue nil
   tile6 = Cache_Swap_Tiles.swap($tileB + ".png") rescue nil
   tile7 = Cache_Swap_Tiles.swap($tileC + ".png") rescue nil
   tile8 = Cache_Swap_Tiles.swap($tileD + ".png") rescue nil
   tile9 = Cache_Swap_Tiles.swap($tileE + ".png") rescue nil
   
if $tileA1 != nil
@tilemap.bitmaps[0] = tile1
else
@tilemap.bitmaps[0] = Cache.system("TileA1")
end
 
if $tileA2 != nil
@tilemap.bitmaps[1] = tile2
else
@tilemap.bitmaps[1] = Cache.system("TileA2")
end
 
if $tileA3 != nil
@tilemap.bitmaps[2] = tile3 
else
@tilemap.bitmaps[2] = Cache.system("TileA3")
end 
 
if $tileA4 != nil
@tilemap.bitmaps[3] = tile4
else
@tilemap.bitmaps[3] = Cache.system("TileA4")
end
 
if $tileA5 != nil
@tilemap.bitmaps[4] = tile5 
else
@tilemap.bitmaps[4] = Cache.system("TileA5")
end
 
if $tileB != nil
@tilemap.bitmaps[5] = tile6
else
@tilemap.bitmaps[5] = Cache.system("TileB") 
end 
 
if $tileC != nil
@tilemap.bitmaps[6] = tile7
else
@tilemap.bitmaps[6] = Cache.system("TileC")
end 
 
if $tileD != nil
@tilemap.bitmaps[7] = tile8
else
@tilemap.bitmaps[7] = Cache.system("TileD") 
end
 
if $tileE != nil
@tilemap.bitmaps[8] = tile9
else
@tilemap.bitmaps[8] = Cache.system("TileE") 
end
 
   @tilemap.map_data = map_data
   @tilemap.ox = ox / 8 + 99
   @tilemap.oy = oy / 8 + 90
end
 
  def dispose_tilemap
   unless @tilemap.nil?
     @tilemap.dispose
     @tilemap = nil
   end
  end
end
end
 
class Scene_Title < Scene_Base
  def check_continue
   file_name = Wora_NSS::SAVE_PATH + Wora_NSS::SAVE_FILE_NAME.gsub(/\{ID\}/i) { '*' }
   @continue_enabled = (Dir.glob(file_name).size > 0)
  end
end
 
class Scene_Map < Scene_Base
  alias wora_nss_scemap_ter terminate
  def terminate
   Wora_NSS.shot(Wora_NSS::SAVE_PATH + 'temp')
   wora_nss_scemap_ter
  end
end
#======================================================================
# END - NEO SAVE SYSTEM by Woratana
#======================================================================
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
# Patch de modification du NeoSaveMachin de Wortanouille
# Par Sasuke (http://funkywork.blogspot.com)
class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # * Execute Save
  #--------------------------------------------------------------------------
  def do_save
    if SCREENSHOT_IMAGE
    File.rename(SAVE_PATH + 'temp' + IMAGE_FILETYPE,
    make_filename(@last_slot_index).gsub(/\..*$/){ '_ss' } + IMAGE_FILETYPE)  
    end  
    file = File.open(make_filename(@last_slot_index), "wb")
    write_save_data(file)
    file.close   
    $scene = Scene_Map.new
  end
end



C'est un script qui permet d'avoir 20 slots et une image du lieu de sauvegarde.


EDIT Zeus : Ah, bah je mettrai de quoi installer les codecs dans les fichiers du jeu alors. Ou j'essaierai de faire un installeur.


Estheone - posté le 10/07/2014 à 16:08:08 (312 messages postés)

❤ 0

Bon. Essaie de remplacer ma fonction do_load par celle-là :

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Scene_File < Scene_Base
  def do_load
   file = File.open(make_filename(@last_slot_index), "rb")
   read_save_data(file)
   file.close
   $scene = Scene_Map.new
   RPG::BGM.fade(1500)
   Graphics.fadeout(60)
   Graphics.wait(40)
   #---------------------------------------------------------------------#
   $game_map.map_bgm_play($game_map.map_bgm) if $game_map.map_bgm
   #---------------------------------------------------------------------#
   @last_bgs.play
  end
end


Le script doit être après celui de sauvegarde aussi.

J'espère que c'est la bonne. :p

Wandering Souls : Jeu complet / Topic sur Oniro


LittleGamer - posté le 10/07/2014 à 16:15:22 (414 messages postés)

❤ 0

Je teste ça ^^
Encore un problème avec le ME : Cette fois il s'arrête plus au retour sur la map, mais le BGM reprend bien sur la map...

Pour être sur, il fallait bien enlever tout ça pour le process victory ? Rien de plus ou de moins ?

image

C'est tordu n'empêche ^^"


EDIT : C'est bon le chargement marche !


Estheone - posté le 10/07/2014 à 16:20:03 (312 messages postés)

❤ 0

Oui c'est ça.
Et place ton script qui force l'arrêt du victory ME après le mien, ça devait suffire pour le "réparer".

Wandering Souls : Jeu complet / Topic sur Oniro


LittleGamer - posté le 10/07/2014 à 16:27:26 (414 messages postés)

❤ 0



ça fonctionne ! Merci de ton aide !

Index du forum > Entraide > [VX] Recherche d'un script pour reprendre une musique après un combat.

repondre up

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