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: "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

647 connectés actuellement

29442018 visiteurs
depuis l'ouverture

8096 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

RPG Maker Détente

Le Temple de Valor

Planète Glutko

Leo-Games

Tous nos partenaires

Devenir
partenaire



forums

Index du forum > Entraide > [VX > VXAce] Conversion d'un script RGSS2 en RGSS3


brikou - posté le 30/06/2015 à 10:29:44 (282 messages postés)

❤ 0

Domaine concerné: Script
Logiciel utilisé: VX > VXAce
Salut. J'ai besoin de convertir un script RGSS2 en RGSS3. Étant donné que je n'ai eu VxAce qu'assez récemment, je maîtrise encore assez mal la programmation sur cette nouvelle version.
C'est un script qui modifie le menu principal.

Je créé un topic, car je pense que je vais bloquer plusieurs fois avant d'y arriver. xD

J'arrive pas à placer l'ancien script, parce que y a un nombre de caractères limités pour chaque post, et qu'on peut pas faire deux posts à la suite :X (ce qui est plutôt gênant, surtout que ça marchait très bien dans la prévisualisation)

Du coup, si vous voulez voir le script original, ou télécharger les images nécessaires au fonctionnement du script (pour faire des tests) je vous renvoie vers ce lien : http://www.forum-lepalaisdumaking.com/t4060-menu-parchemin-1-0-menu-principal-personnalise

Voilà le même script que j'ai commencé à modifier pour VXAce :

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
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
#==============================================================================
#                                                      ~   MENU PARCHEMIN ~
#                                                                Version : 1.0
#
#                                                           Script par : Brikou
#                                                         Textures par : Brikou
#                                             Contact : brikoumaker@gmail.com
#
#                                                 Date de Création : 16/ 06/ 2015
#                                           Genre : Système de Menu Custom (CMS)
#                                               Script adapté pour RPG maker VX
#                           Gratuit pour utilisations non commerciales et commerciales
#                                                             Merci de créditer.
#==============================================================================
 
#---------------------------------------------------------------------------------------------
# Features :
# ---
# v 1.0
# Possibilité d'ajouter une nouvelle option au menu.
#---
# v 1.0
# Affichage d'une jauge d'alignement déterminée par 2 variables.
#---
#-------------------------------------------------------------------------------------------
 
#-------------------------------------------------------------------------------------------
# Utilisation :
# Insérer le script au dessus de Main.
# Configurer avec le module de configuration. (voir ci-dessous)
# -----Si utilisation de la jauge d'alignement :
# ----- Augmenter la première variable quand le joueur fait une bonne action.
# ----- Augmenter la seconde variable quand le joueur fait une mauvaise action.
#-------------------------------------------------------------------------------------------
 
      #--------------------------------------------------------------------------
      # * MODULE DE CONFIGURATION
      #--------------------------------------------------------------------------
  module Brikou_MenuPARCH
  #----------------------------------------------------
  # Configuration Nouvelle Option
  #---------------------------------------------------
    # > Afficher oui ou non une 7ème option entre "Statut" et "Sauvegarder".
    #> ("NewOption = true" => Oui  / "NewOption = false" => Non)
  NewOption = true
  
    #> Nom de la Scène vers laquelle la nouvelle option va rediriger.
    #> (Exemple : "Scene_NewOption = Scene_Bounty")
    #> (Si pas de nouvelle option, laisser "Scene_NewOption = nil")
  Scene_NewOption = nil
  
  #----------------------------------------------------
  # Configuration Alignement
  #--------------------------------------------------- 
    #> Afficher oui ou non la jauge d'alignement.
    #> ("Reputation = true" => Oui / "Reputation = false" => Non)
  Reputation = true
  
    #> Choisir un nom pour la jauge d'Alignement (si vous souhaitez changer).
    #> (Exemple : "Reputation_Name = "Mentalité"")
  Reputation_Name = "Alignement"
  
   #> Numéro de la variable à augmenter quand le joueur fait une bonne action.
  GoodAct_Variable = 2
   #> Numéro de la variable à augmenter quand le joueur fait une mauvaise action.
   BadAct_Variable = 3
   
   #-------------------------------------------------------------
   #FIN DU MODULE DE CONFIGURATION
   #-------------------------------------------------------------
 end
 
 #--------------------------------------------------------------------------------------------------------------
 #       RESSOURCES NECESSAIRES AU FONCTIONNEMENT DU SCRIPT :
#
# Toutes les ressources listées ci-dessous doivent se trouver dans le dossier
#                                                   "Graphics/ System".
#
#> Image de Fond du Menu :
#--- MenuBack
#
#> Image de fond du statut des héros dans le Menu :
#--- ActorBox
#
#> Images des noms des options :
#  > Objets
# --- MenuOp1
# > Compétences
# --- MenuOp2
# > Equipement
# --- MenuOp3
# > Statut
# --- MenuOp4
# > Sauvegarder
# --- MenuOp5
# > Quitter
# --- MenuOp6
# > Nouvelle Option (Annexe)
# --- Menu Op7
#
#--------------------------------------------------------------------------------------------------------------
 
 
#============================================================
# DEBUT DU CODE
#============================================================
 
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================
  class Scene_Menu < Scene_MenuBase
      
      #--------------------------------------------------------------------------
      # * Alias
      #--------------------------------------------------------------------------
    alias mod_start start
    alias mod_term terminate
 
      #--------------------------------------------------------------------------
      # * Start processing
      #--------------------------------------------------------------------------
      def start
        mod_start
        @command_window.x = -1000
        @status_window.opacity = 0
        @status_window.y = -10
        @gold_window.x = -10
        @gold_window.y = 370
        @lieu = Window_Lieu.new(165, 370)
        @time_window = Window_Time.new(0, 235)
        @time_window.opacity = 0
        if Brikou_MenuPARCH::Reputation == true
        @rep_window = Window_Reputation.new(0, 290)
        @rep_window.opacity = 0
        end
        create_obox
      end
     
      #--------------------------------------------------------------------------
      # Create Command Window
      #--------------------------------------------------------------------------
      def create_command_window
    s1 = ""
    s2 = ""
    s3 = ""
    s4 = ""
    s5 = ""
    s6 = ""
    if Brikou_MenuPARCH::NewOption == true
    s7 = ""
  end
  if Brikou_MenuPARCH::NewOption == true
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
  else
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    end
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end
  end
  
      #--------------------------------------------------------------------------
      # Create Options Box
      #--------------------------------------------------------------------------
      def create_obox
        @o1 = Obox.new(20,-25)
        @sprite_op1 = Sprite.new
        @sprite_op1.bitmap = Cache.system("MenuOp1")
        @sprite_op1.y = 20
        @sprite_op1.z = 1008
         @o2 = Obox.new(52,-25)
           @sprite_op2 = Sprite.new
        @sprite_op2.bitmap = Cache.system("MenuOp2")
        @sprite_op2.y = 52
        @sprite_op2.z = 1008
          @o3 = Obox.new(84,-25)
                     @sprite_op3 = Sprite.new
        @sprite_op3.bitmap = Cache.system("MenuOp3")
        @sprite_op3.y = 84
        @sprite_op3.z = 1008
          @o4 = Obox.new(116,-25)
          @sprite_op4 = Sprite.new
        @sprite_op4.bitmap = Cache.system("MenuOp4")
        @sprite_op4.y = 116
        @sprite_op4.z = 1008
          @o5 = Obox.new(148,-25)
    if Brikou_MenuPARCH::NewOption == true
          @sprite_op5 = Sprite.new
        @sprite_op5.bitmap = Cache.system("MenuOp7")
        @sprite_op5.y = 148
        @sprite_op5.z = 1008
          @o6 = Obox.new(180,-25)
          @sprite_op6 = Sprite.new
        @sprite_op6.bitmap = Cache.system("MenuOp5")
        @sprite_op6.y = 180
        @sprite_op6.z = 1008
          @o7 = Obox.new(212,-25)
          @sprite_op7 = Sprite.new
        @sprite_op7.bitmap = Cache.system("MenuOp6")
        @sprite_op7.y = 212
        @sprite_op7.z = 1008
      else
        @sprite_op5 = Sprite.new
        @sprite_op5.bitmap = Cache.system("MenuOp5")
        @sprite_op5.y = 148
        @sprite_op5.z = 1008
          @o6 = Obox.new(180,-25)
          @sprite_op6 = Sprite.new
        @sprite_op6.bitmap = Cache.system("MenuOp6")
        @sprite_op6.y = 180
        @sprite_op6.z = 1008
        end
        @o1.back_opacity = 255
        @o2.back_opacity = 255
        @o3.back_opacity = 255
        @o4.back_opacity = 255
        @o5.back_opacity = 255
        @o6.back_opacity = 255
        if Brikou_MenuPARCH::NewOption == true
        @o7.back_opacity = 255
        end
        @o1.z = 1001
        @o2.z = 1002
        @o3.z = 1003
        @o4.z = 1004
        @o5.z = 1005
        @o6.z = 1006
        if Brikou_MenuPARCH::NewOption == true
        @o7.z = 1007
        end
      end
     
      #--------------------------------------------------------------------------
      # * Termination Processing
      #--------------------------------------------------------------------------
      def terminate
    mod_term
    @o1.dispose
    @sprite_op1.dispose
    @o2.dispose
    @sprite_op2.dispose
    @o3.dispose
    @sprite_op3.dispose
    @o4.dispose
    @sprite_op4.dispose
    @o5.dispose
    @sprite_op5.dispose
    @o6.dispose
    @sprite_op6.dispose
    if Brikou_MenuPARCH::NewOption == true
    @o7.dispose
    @sprite_op7.dispose
    end
    @lieu.dispose
    @status_window.terminate
    @time_window.dispose
    if Brikou_MenuPARCH::Reputation == true
    @rep_window.dispose
    end
    end
 
    
      #--------------------------------------------------------------------------
      # Update Scene Menu
      #-------------------------------------------------------------------------- 
      def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    if Brikou_MenuPARCH::Reputation == true
    @rep_window.update
    end
    @time_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
    @sprite_op1.update
    @sprite_op2.update
    @sprite_op3.update
    @sprite_op4.update
    @sprite_op5.update
    @sprite_op6.update
    if Brikou_MenuPARCH::NewOption == true
    @sprite_op7.update
    end
  end
  
  
  
      #--------------------------------------------------------------------------
      # * Update Command Selection
      #--------------------------------------------------------------------------
      def update_command_selection
 
            if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0
        $scene = Scene_Item.new
      when 1,2,3
        start_actor_selection
      when 4
      if Brikou_MenuPARCH::NewOption == true
        $scene = Brikou_MenuPARCH::Scene_NewOption.new
      else
        $scene = Scene_File.new(true, false, false)
        end
        when 5
          if Brikou_MenuPARCH::NewOption == true
          $scene = Scene_File.new(true, false, false)
        else
          $scene = Scene_End.new
          end
      when 6
        if Brikou_MenuPARCH::NewOption == true
        $scene = Scene_End.new
      end
      end
      end
     case @command_window.index
          when 0   
            @o1.x = -10
            @sprite_op1.x = 15
            @o2.x = -25
            @sprite_op2.x = 0
            if Brikou_MenuPARCH::NewOption == true
            @o7.x= -25
            @sprite_op7.x = 0
          else
            @o6.x= -25
            @sprite_op6.x = 0
            end
          when 1
            @o2.x = -10
            @sprite_op2.x = 15
            @o3.x = -25
            @sprite_op3.x = 0
            @o1.x= -25
            @sprite_op1.x = 0
          when 2
            @o3.x = -10
            @sprite_op3.x = 15
            @o4.x = -25
            @sprite_op4.x = 0
            @o2.x= -25
            @sprite_op2.x = 0
          when 3
            @o4.x = -10
            @sprite_op4.x = 15
            @o5.x = -25
            @sprite_op5.x = 0
            @o3.x= -25
            @sprite_op3.x = 0
          when 4 
            @o5.x = -10
            @sprite_op5.x = 15
            @o6.x = -25
            @sprite_op6.x = 0
            @o4.x= -25
            @sprite_op4.x = 0
          when 5
            @o6.x = -10
            @sprite_op6.x = 15
            if Brikou_MenuPARCH::NewOption == true
            @o7.x = -25
            @sprite_op7.x = 0
            end
            @o5.x= -25
            @sprite_op5.x = 0
             when 6
                if Brikou_MenuPARCH::NewOption == true
            @o7.x = -10
            @sprite_op7.x = 15
            @o1.x = -25
            @sprite_op1.x = 0
            @o6.x= -25
            @sprite_op6.x = 0
            end
          end
        end
        
      #--------------------------------------------------------------------------
      # * Start Actor Selection
      #--------------------------------------------------------------------------
          def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $scene = Scene_Status.new(@status_window.index)
      end
      end
  end
end
 
 
    #==============================================================================
    # ** Scene_Base
    #==============================================================================
 
    class Scene_Base
      
      #--------------------------------------------------------------------------
      # Cancel the classic snapshot
      #--------------------------------------------------------------------------
      def snapshot_for_background
        $game_temp.background_bitmap.dispose
        $game_temp.background_bitmap = Graphics.snap_to_bitmap
      end
     
      #--------------------------------------------------------------------------
      #  Create menu background
      #--------------------------------------------------------------------------
      def create_menu_background
        @menuback_sprite = Sprite.new
        @menuback_sprite.bitmap = Cache.system("MenuBack")
        update_menu_background
      end
    end
 
     
    
  #--------------------------------------------------------------------------
  # * Window Options Box
  #--------------------------------------------------------------------------
     class Obox < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
      def initialize(y, x)
        super(x, y, 217, WLH + 6)
        self.contents.clear
      end
    end
 
    
    
  #--------------------------------------------------------------------------
  # * Window Lieu
  #--------------------------------------------------------------------------
 class Window_Lieu < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
      def initialize(x, y)
        super(x, y, 450, WLH+32)
        self.contents = Bitmap.new(width - 32, height - 32)
        refresh
      end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
      def refresh
        self.contents.clear
        $maps = load_data("Data/MapInfos.rvdata")
        @map_id = $game_map.map_id
        @map_name = $maps[@map_id].name
        self.contents.font.color = normal_color
        self.contents.draw_text(55, -8, 300, 32, @map_name, 0)
    self.contents.font.color = system_color
    self.contents.draw_text(0, -8, 270, 32, "Lieu :")
      end
    end
 
    
    
  #--------------------------------------------------------------------------
  # * Window menu Status
  #--------------------------------------------------------------------------
    
    class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
        def initialize(x, y)
    super(x, y, 384, 426)
    refresh
     for actor in $game_party.members
      x = 100
      y = actor.index * 88 + WLH / 2 
       if actor.index == 0
        @sprite_actorbox1 = Sprite.new
        @sprite_actorbox1.bitmap = Cache.system("ActorBox")  
        @sprite_actorbox1.x = 222
        @sprite_actorbox1.y =  y + WLH * 1 - 26
        @sprite_actorbox1.z = 98
      elsif actor.index == 1
        @sprite_actorbox2 = Sprite.new
        @sprite_actorbox2.bitmap = Cache.system("ActorBox")  
        @sprite_actorbox2.x = 222
        @sprite_actorbox2.y =  y + WLH * 1 - 26
        @sprite_actorbox2.z = 98
        elsif actor.index == 2
        @sprite_actorbox3 = Sprite.new
        @sprite_actorbox3.bitmap = Cache.system("ActorBox")  
        @sprite_actorbox3.x = 222
        @sprite_actorbox3.y =  y + WLH * 1 - 26
        @sprite_actorbox3.z = 98
        elsif actor.index == 3
        @sprite_actorbox4 = Sprite.new
        @sprite_actorbox4.bitmap = Cache.system("ActorBox")  
        @sprite_actorbox4.x = 222
        @sprite_actorbox4.y =  y + WLH * 1 - 26
        @sprite_actorbox4.z = 98
      end
      end
    self.active = false
    self.index = -1
  end
  
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
      def refresh
    self.contents.clear
        @item_max = $game_party.members.size
    for actor in $game_party.members
      x = 100
      y = actor.index * 88 + WLH / 2 
      draw_actor_name(actor, x + 18, y + WLH * 1 - 22)
    draw_actor_level(actor, x + 18, y + WLH * 1 - 4)
      draw_actor_hp_menu(actor, x + 120, y + WLH * 1 -12)
      draw_actor_mp_menu(actor, x + 120, y + WLH * 1 + 18)
      draw_actor_graphic(actor, x - 18, y + WLH * 1 + 24)
        draw_actor_class(actor,x + 18, y + WLH * 1 + 14)
        end
   end
  
  #--------------------------------------------------------------------------
  # Terminate
  #--------------------------------------------------------------------------
  def terminate
    if $game_party.members.size >=1
        @sprite_actorbox1.dispose
      end
      if $game_party.members.size >=2
    @sprite_actorbox2.dispose
  end
  if $game_party.members.size >=3
    @sprite_actorbox3.dispose
  end
  if $game_party.members.size >=4
    @sprite_actorbox4.dispose
    end
  end
  
  #--------------------------------------------------------------------------
  # Show
  #--------------------------------------------------------------------------
      def show
    if $game_party.members.size >=1
        @sprite_actorbox1.opacity = 255
      end
      if $game_party.members.size >=2
    @sprite_actorbox2.opacity = 255
  end
  if $game_party.members.size >=3
    @sprite_actorbox3.opacity = 255
  end
  if $game_party.members.size >=4
    @sprite_actorbox4.opacity = 255
    end
  end
  
  #--------------------------------------------------------------------------
  # Hide
  #--------------------------------------------------------------------------
    def hide
    if $game_party.members.size >=1
        @sprite_actorbox1.opacity = 0
      end
      if $game_party.members.size >=2
    @sprite_actorbox2.opacity = 0
  end
  if $game_party.members.size >=3
    @sprite_actorbox3.opacity = 0
  end
  if $game_party.members.size >=4
    @sprite_actorbox4.opacity = 0
    end
  end
  
  #--------------------------------------------------------------------------
  # Update Cursor
  #--------------------------------------------------------------------------
    def update_cursor
    if @index < 0               # No cursor
      self.cursor_rect.empty
    elsif @index < @item_max    # Normal
      self.cursor_rect.set(47, @index * 88 + 3, 290, 82)
    elsif @index >= 100         # Self
      self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
    else                        # All
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
  
end
 
 
 
#--------------------------------------------------------------------------
# * Window base
#--------------------------------------------------------------------------
 
class Window_MenuBase < Window_Base
 
  #--------------------------------------------------------------------------
  # Draw Actor HP
  #--------------------------------------------------------------------------
def draw_actor_hp_menu(actor, x, y, width = 120)
self.contents.font.color = hp_color(actor)
    last_font_size = self.contents.font.size
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 44, y, 36, WLH, actor.hp, 2)
    else
      self.contents.draw_text(xr - 99, y, 36, WLH, actor.hp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 62, y, 11, WLH, "/", 2)
      self.contents.draw_text(xr - 50, y, 36, WLH, actor.maxhp, 2)
    end
  end
 
  #--------------------------------------------------------------------------
  # Draw Actor MP
  #--------------------------------------------------------------------------
  def draw_actor_mp_menu(actor, x, y, width = 120)
    self.contents.font.color = mp_color(actor)
    last_font_size = self.contents.font.size
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 44, y, 36, WLH, actor.mp, 2)
    else
      self.contents.draw_text(xr - 99, y, 36, WLH, actor.mp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr -62, y, 11, WLH, "/", 2)
      self.contents.draw_text(xr - 50, y, 36, WLH, actor.maxmp, 2)
    end
  end
  
  #--------------------------------------------------------------------------
  # Draw Actor Class
  #--------------------------------------------------------------------------
    def draw_actor_class(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 110, WLH, actor.class.name)
  end
  
 
end
 
 
 
#--------------------------------------------------------------------------
  # * Window Reputation
  #--------------------------------------------------------------------------
 
class Window_Reputation < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     x : window X coordinate
  #     y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 221, 85)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 120, 32, Brikou_MenuPARCH::Reputation_Name)
    @mauvais = $game_variables[Brikou_MenuPARCH::BadAct_Variable] + 0.0
    @bon = $game_variables[Brikou_MenuPARCH::GoodAct_Variable] + 0.0
    if @bon == 0
      if @mauvais == 0
        #équilibré
    self.contents.fill_rect(0, 28, 190, 24, text_color(15))
    self.contents.gradient_fill_rect(2, 30, 186, 20, text_color(18), text_color(19))
    self.contents.gradient_fill_rect(2, 30, 93, 20, text_color(11), text_color(29))
      else
        #tout mauvais
    self.contents.fill_rect(0, 28, 190, 24, text_color(15))
    self.contents.gradient_fill_rect(2, 30, 186, 20, text_color(18), text_color(19))
      end
    elsif  @bon >= 0
      #jauge
    @total = @mauvais + @bon
    @pour = (@bon / @total) * 186
    self.contents.fill_rect(0, 28, 190, 24, text_color(15))
    self.contents.gradient_fill_rect(2, 30, 186, 20, text_color(18), text_color(19))
    self.contents.gradient_fill_rect(2, 30, @pour, 20, text_color(11), text_color(29))
  end
      self.contents.font.color = normal_color
      self.contents.draw_text(2, 23, 220, 32, "Bon         /   Mauvais")
  end
end
  
 
 
#--------------------------------------------------------------------------
  # * Window Time
  #--------------------------------------------------------------------------
 
class Window_Time < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 160, 85)
    refresh
  end
  #--------------------------------------------------------------------------
  # Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Temps de Jeu")
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 22, 120, 32, text, 2)
  end
  #--------------------------------------------------------------------------
  # Update
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
 
 
 
#==============================================================================
# ** Window_Gold
#------------------------------------------------------------------------------
#  This window displays the amount of gold.
#==============================================================================
 
class Window_Gold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     x : window X coordinate
  #     y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 56)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_currency_value($game_party.gold, currency_unit, 4, -4, 120)
  end
end
 
 
#--------------------------------------------------------------------------
# * Scene Item
#--------------------------------------------------------------------------
class Scene_Item < Scene_ItemBase
 
  #--------------------------------------------------------------------------
  # Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @viewport = Viewport.new(0, 0, 544, 416)
    @help_window = Window_Help.new
    @help_window.viewport = @viewport
    @item_window = Window_Item.new(0, 56, 544, 416)
    @item_window.viewport = @viewport
    @item_window.help_window = @help_window
    @item_window.active = false
    @target_window = Window_MenuStatus.new(0, -10)
    @target_window.back_opacity = 0
    hide_target_window
  end
  
  #--------------------------------------------------------------------------
  # Show Target Window
  #--------------------------------------------------------------------------
    def show_target_window(right)
    @target_window.show
    @item_window.active = false
    width_remain = 544 - @target_window.width
    @target_window.x = width_remain
    @target_window.visible = true
    @target_window.active = true
    @viewport.rect.set(0, 0, width_remain, 416)
      @viewport.ox = 0
  end
  
  #--------------------------------------------------------------------------
  # Hide Target Window
  #--------------------------------------------------------------------------
    def hide_target_window
    @item_window.active = true
    @target_window.visible = false
    @target_window.active = false
    @viewport.rect.set(0, 0, 544, 416)
    @viewport.ox = 0
    @target_window.hide
  end
  end
 
 
#--------------------------------------------------------------------------
  # * Scene Skill
  #--------------------------------------------------------------------------
class Scene_Skill < Scene_ItemBase
    
  #--------------------------------------------------------------------------
  # Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @actor = $game_party.members[@actor_index]
    @viewport = Viewport.new(0, 0, 544, 416)
    @help_window = Window_Help.new
    @help_window.viewport = @viewport
    @status_window = Window_SkillStatus.new(0, 56, @actor)
    @status_window.viewport = @viewport
    @skill_window = Window_Skill.new(0, 112, 544, 304, @actor)
    @skill_window.viewport = @viewport
    @skill_window.help_window = @help_window
    @target_window = Window_MenuStatus.new(0, -10)
    @target_window.back_opacity = 0
    hide_target_window
  end
  
  #--------------------------------------------------------------------------
  # Show Target Window
  #--------------------------------------------------------------------------
  def show_target_window(right)
    @target_window.show
    @skill_window.active = false
    width_remain = 544 - @target_window.width
    @target_window.x = width_remain
    @target_window.visible = true
    @target_window.active = true
      @viewport.rect.set(0, 0, width_remain, 416)
      @viewport.ox = 0
  end
  
  #--------------------------------------------------------------------------
  # Hide Target Window
  #--------------------------------------------------------------------------
    def hide_target_window
    @skill_window.active = true
    @target_window.visible = false
    @target_window.active = false
    @viewport.rect.set(0, 0, 544, 416)
    @viewport.ox = 0
    @target_window.hide
  end
 
end
 
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  This class performs the save and load screen processing.
#==============================================================================
 
class Scene_File < Scene_MenuBase
    
  #--------------------------------------------------------------------------
  # Return Scene
  #--------------------------------------------------------------------------
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      if Brikou_MenuPARCH::NewOption == true
        $scene = Scene_Menu.new(5)
        else
      $scene = Scene_Menu.new(4)
      end
    end
  end
  
end
 
#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
#  This class performs game end screen processing.
#==============================================================================
 
class Scene_End < Scene_MenuBase
  
  #--------------------------------------------------------------------------
  # Return Scene
  #--------------------------------------------------------------------------
    def return_scene
      if Brikou_MenuPARCH::NewOption == true
        $scene = Scene_Menu.new(6)
        else
    $scene = Scene_Menu.new(5)
    end
  end
  
end
 
#=====================================================================
#                                                                 FIN DU CODE
#
#          Merci d'avoir choisi MENU PARCHEMIN V1.0 par Brikou pour votre projet !
#=====================================================================



Premier bloquage : Quand je lance le menu en appuyant sur la touche correspondante une erreur "can't convert Array into Integer" me renvoie à la ligne 12 de Window_Base :

Portion de code : Tout sélectionner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This is a super class of all windows within the game.
#==============================================================================
 
class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
    self.windowskin = Cache.system("Window")
    update_padding
    update_tone
    create_contents
    @opening = @closing = false
  end



Chromochimi (Arcade / Terminé) ||| La Question (Mini-jeu narratif / Terminé !) ||| Blade Converter (A-RPG ~ Beat them all / En cours !) ||| Des mini-projets Unity !


Nukidoudi - posté le 30/06/2015 à 13:53:42 (733 messages postés) -

❤ 0

yo

C'est chaud tellement le script est mal fait

https://xvw.lol


brikou - posté le 30/06/2015 à 20:36:33 (282 messages postés)

❤ 0

Ah ? Qu'est-ce qui est mal fait ? Etant donné que c'est le mien, je peux l'améliorer.

Chromochimi (Arcade / Terminé) ||| La Question (Mini-jeu narratif / Terminé !) ||| Blade Converter (A-RPG ~ Beat them all / En cours !) ||| Des mini-projets Unity !


Crystal - posté le 01/07/2015 à 12:34:42 (2097 messages postés) -

❤ 0

Il faudrait voir la fonction initialize de Window_Command.

Index du forum > Entraide > [VX > VXAce] Conversion d'un script RGSS2 en RGSS3

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