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

Tutos: Checklist de la composition (...) / Sorties: Dread Mac Farlane - episode 8 / Sorties: Dread Mac Farlane - episode 7 / Jeux: Ce qui vit Dessous / News: Quoi de neuf sur Oniromancie (...) / Chat

Bienvenue
visiteur !




publicité RPG Maker!

Statistiques

Liste des
membres


Contact

Mentions légales

382 connectés actuellement

29375878 visiteurs
depuis l'ouverture

5245 visiteurs
aujourd'hui



Barre de séparation

Partenaires

Indiexpo

Akademiya RPG Maker

Blog Alioune Fall

Fairy Tail Constellations

RPG Maker Détente

Lumen

Hellsoft

Planète Glutko

Tous nos partenaires

Devenir
partenaire



Messages postés par Ryukko
Nombre de messages référencés sur Oniromancie (non supprimés): 29

Aller à la page: 1

Posté dans Forum - [RPG Maker VX Ace] Recherche de script pour afficher le nom du personnage

Ryukko - posté le 28/02/2015 à 15:20:54. (30 messages postés)

Slt!

Je peux t'aider pour cela,

et voici, je crois de mémoire que c'est celui-là

http://pastebin.com/5iBEcjsb

En espérant t'avoir aidé comme il se doigt! :lol

Ryukko

Posté dans Forum - [VX ACE] Chimère remplace équipe en ATB

Ryukko - posté le 27/02/2015 à 19:05:01. (30 messages postés)

Domaine concerné: script
Logiciel utilisé: VX ACE
Bonjour, j'utilise ce script afin de donner la possibilité au joueur de faire appel en combat à une chimère style FF :

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
 
#==============================================================================
# 
# ¥ Yami Engine Ace - Guardian Series
# -- Script: Guardian Summon
# -- Last Updated: 2012.05.23
# -- Level: Easy
# -- Requires: n/a
# 
#==============================================================================
 
$imported = {} if $imported.nil?
$imported["YSE-GuardianSummon"] = true
 
#==============================================================================
# ¥ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.05.23 - Added Devil Survivor Summoning Style.
# 2012.05.17 - Fixed a glitch with skills window.
# 2012.04.05 - Fixed Crashed bug when a guardian die.
# 2012.04.02 - Finished Script.
# 2012.03.29 - Started Script.
# 
#==============================================================================
# ¥ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Permet d'invoquer un gardien en combat. Il prend alors la place du héros en
# combat, ou remplace le groupe ( comme dans les FF). Aussi compatible avec
# la caractéristique paired (association) mais nécessite le script de YAMI
#  Yami Engine - Guardian Pairing.
#==============================================================================
# ¥ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Materials
#
# -----------------------------------------------------------------------------
# Notes compétences - Base de données
# -----------------------------------------------------------------------------
# <summon guardian> - Marque comme compétence de gardien invoqué
# <return guardian> - Marque comme compétence retour gardien (part)
#
# -----------------------------------------------------------------------------
# Notes héros - Base de données
# -----------------------------------------------------------------------------
# <summon animation: x> - Lance l'animation x aux ennemis quand le gardien est invoqué
# <return animation: x> - Lance l'animation x aux ennemis quand le gardien part
#
#==============================================================================
# ¥ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# VX Ace
# 
#==============================================================================
 
module YSE
  module GUARDIAN_SUMMON
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Réglages invoquation -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    SUMMON_CONFIGURATION = { # Début.
      :summon_paired    =>  false,  # Requière YSE - Guardian Pairing
      :aeon_party       =>  false,  # Quand le gardien est invoqué il prend 
                                    # la place de tout le groupe jusqu'à son
                                    # départ.                               
      :ds_summon        =>  true,   # L'invoquation ne remplace pas l'invocateur
      :default_summon_ani =>  0, # 0 pour désactiver
      :default_return_ani =>  0, # 0 pour désactiver
      :summon_text      =>  "%s invoque %s!",
      :return_text      =>  "%s se retire!",
      :fail_text        =>  "%s échoue son invoquation.",
    } # Fin
    
  end
end  
 
#==============================================================================
# ¥ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk. LOL
#==============================================================================
 
#==============================================================================
# ¡ Regular Expression
#==============================================================================
 
module YSE
  module REGEXP
  module USABLEITEM
    
    SUMMON_GUARDIAN = /<(?:SUMMON_GUARDIAN|summon guardian)>/i
    RETURN_GUARDIAN = /<(?:RETURN_GUARDIAN|return guardian)>/i
    
  end # USABLEITEM
  module ACTOR
    
    SUMMON_ANIMATION = /<(?:SUMMON_ANIMATION|summon animation):[ ](\d+)>/i
    RETURN_ANIMATION = /<(?:RETURN_ANIMATION|return animation):[ ](\d+)>/i
    
  end # ACTOR
  end # REGEXP
end # YSE
 
#==============================================================================
# ¡ Module YSE
#==============================================================================
 
module YSE
  module GUARDIAN
    
    #--------------------------------------------------------------------------
    # summon_paired?
    #--------------------------------------------------------------------------
    def self.summon_paired?
      $imported["YSE-GuardianPairing"] ? YSE::GUARDIAN_SUMMON::SUMMON_CONFIGURATION[:summon_paired] : false
    end
    
    #--------------------------------------------------------------------------
    # aeon_party?
    #--------------------------------------------------------------------------
    def self.aeon_party?
      YSE::GUARDIAN_SUMMON::SUMMON_CONFIGURATION[:aeon_party] && !YSE::GUARDIAN_SUMMON::SUMMON_CONFIGURATION[:ds_summon]
    end
    
    #--------------------------------------------------------------------------
    # ds_summon?
    #--------------------------------------------------------------------------
    def self.ds_summon?
      YSE::GUARDIAN_SUMMON::SUMMON_CONFIGURATION[:ds_summon]
    end
    
  end # GUARDIAN
end # YSE
 
#==============================================================================
# ¡ BattleManager
#==============================================================================
 
module BattleManager
  
  #--------------------------------------------------------------------------
  # alias method: 
  #   - process_abort
  #   - process_defeat
  #   - process_victory
  #--------------------------------------------------------------------------
  class<< self
    alias yse_process_abort_gsummon process_abort
    alias yse_process_defeat_gsummon process_defeat
    alias yse_process_victory_gsummon process_victory
  end
  
  #--------------------------------------------------------------------------
  # process_abort
  #--------------------------------------------------------------------------
  def self.process_abort
    SceneManager.scene.greturn_battle_end
    yse_process_abort_gsummon
  end
  
  #--------------------------------------------------------------------------
  # process_defeat
  #--------------------------------------------------------------------------
  def self.process_defeat
    if $game_party.aeons.size > 0
      SceneManager.scene.greturn_battle_end
      return
    end
    yse_process_defeat_gsummon
  end
  
  #--------------------------------------------------------------------------
  # process_victory
  #--------------------------------------------------------------------------
  def self.process_victory
    SceneManager.scene.greturn_battle_end
    yse_process_victory_gsummon
  end
  
end # BattleManager
 
#==============================================================================
# ¡ DataManager
#==============================================================================
 
module DataManager
  
  #--------------------------------------------------------------------------
  # alias method: load_database
  #--------------------------------------------------------------------------
  class <<self; alias load_database_gsummon load_database; end
  def self.load_database
    load_database_gsummon
    load_notetags_gsummon
  end
  
  #--------------------------------------------------------------------------
  # new method: load_notetags_gsummon
  #--------------------------------------------------------------------------
  def self.load_notetags_gsummon
    groups = [$data_skills, $data_items]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.load_notetags_gsummon
      end
    end
    #---
    for obj in $data_actors
      next if obj.nil?
      obj.load_notetags_gsummon
    end
  end
  
end # DataManager
 
#==============================================================================
# ¡ RPG::Actor
#==============================================================================
 
class RPG::Actor < RPG::BaseItem
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :summon_ani
  attr_accessor :return_ani
 
  #--------------------------------------------------------------------------
  # new method: load_notetags_gsummon
  #--------------------------------------------------------------------------
  def load_notetags_gsummon
    @summon_ani = YSE::GUARDIAN_SUMMON::SUMMON_CONFIGURATION[:default_summon_ani]
    @return_ani = YSE::GUARDIAN_SUMMON::SUMMON_CONFIGURATION[:default_return_ani]
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YSE::REGEXP::ACTOR::SUMMON_ANIMATION
        @summon_ani = $1.to_i
      when YSE::REGEXP::ACTOR::RETURN_ANIMATION
        @return_ani = $1.to_i
      end
    } # self.note.split
    #---
  end
  
end # RPG::Actor
 
#==============================================================================
# ¡ RPG::UsableItem
#==============================================================================
 
class RPG::UsableItem < RPG::BaseItem
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :is_summon
  attr_accessor :is_greturn
  
  #--------------------------------------------------------------------------
  # common cache: load_notetags_gsummon
  #--------------------------------------------------------------------------
  def load_notetags_gsummon
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YSE::REGEXP::USABLEITEM::SUMMON_GUARDIAN
        @is_summon = true
      when YSE::REGEXP::USABLEITEM::RETURN_GUARDIAN
        @is_greturn = true
      end
    } # self.note.split
    #---
  end
  
end # RPG::UsableItem
 
#==============================================================================
# ¡ Game_Actor
#==============================================================================
 
class Game_Action
  
  #--------------------------------------------------------------------------
  # alias method: clear
  #--------------------------------------------------------------------------
  alias yse_clear_gsummon clear
  def clear
    yse_clear_gsummon
    @summon_id = nil
  end
  
  #--------------------------------------------------------------------------
  # new method: summon_id
  #--------------------------------------------------------------------------
  def summon_id
    $game_actors[@summon_id]
  end
  
  #--------------------------------------------------------------------------
  # new method: summon_id=
  #--------------------------------------------------------------------------
  def summon_id=(actor)
    @summon_id = actor.nil? ? nil : actor.id
  end
  
end # Game_Action
 
#==============================================================================
# ¡ Game_Actor
#==============================================================================
 
class Game_Actor < Game_Battler
  
  #--------------------------------------------------------------------------
  # new method: aeon
  #--------------------------------------------------------------------------
  def aeon
    return self if guardian?
    return self if @aeon.nil?
    return $game_actors[@aeon]
  end
  
  #--------------------------------------------------------------------------
  # new method: summoner
  #--------------------------------------------------------------------------
  def summoner
    return nil if @summoner.nil?
    $game_actors[@summoner]
  end
  
  #--------------------------------------------------------------------------
  # new method: summoner=
  #--------------------------------------------------------------------------
  def summoner=(actor)
    @summoner = actor.nil? ? nil : actor.id
  end
  
  #--------------------------------------------------------------------------
  # new method: aeon=
  #--------------------------------------------------------------------------
  def aeon=(actor)
    @aeon = actor.nil? ? nil : actor.id
    return if actor.nil?
    actor.summoner = self
  end
  
  #--------------------------------------------------------------------------
  # new method: greturn
  #--------------------------------------------------------------------------
  def greturn
    return unless summoner
    summoner.aeon = nil
    summoner = nil
  end
  
  #--------------------------------------------------------------------------
  # alias method: skill_conditions_met?
  #--------------------------------------------------------------------------
  alias yse_skill_conditions_met_gsummon skill_conditions_met?
  def skill_conditions_met?(skill)
    if skill.is_summon
      summon_conditions_met?
    else
      yse_skill_conditions_met_gsummon(skill)
    end
  end
  
  #--------------------------------------------------------------------------
  # new method: summon_conditions_met?
  #--------------------------------------------------------------------------
  def summon_conditions_met?
    if YSE::GUARDIAN.summon_paired?
      return false if guardians.size <= 0
    else
      return false if $game_party.guardians.size <= 0
    end
    return true
  end
  
end # Game_Actor
 
#==============================================================================
# ¡ Game_Party
#==============================================================================
 
class Game_Party < Game_Unit
  
  #--------------------------------------------------------------------------
  # alias method: initialize
  #--------------------------------------------------------------------------
  alias yse_initialize_gsummon initialize
  def initialize
    yse_initialize_gsummon
    init_aeons
  end
  
  #--------------------------------------------------------------------------
  # alias method: battle_members
  #--------------------------------------------------------------------------
  alias yse_battle_members_gsummon battle_members
  def battle_members
    if YSE::GUARDIAN.aeon_party?
      @aeons.size > 0 ? aeons : yse_battle_members_gsummon
    elsif YSE::GUARDIAN.ds_summon?
      yse_battle_members_gsummon + aeons
    else
      yse_battle_members_gsummon.collect { |battler| battler.aeon }
    end
  end
  
  #--------------------------------------------------------------------------
  # new method: init_aeons
  #--------------------------------------------------------------------------
  def init_aeons
    @aeons = []
  end
  
  #--------------------------------------------------------------------------
  # new method: summon_aeon
  #--------------------------------------------------------------------------
  def summon_aeon(actor)
    @aeons.push(actor.id)
  end
  
  #--------------------------------------------------------------------------
  # new method: aeons
  #--------------------------------------------------------------------------
  def aeons
    @aeons.collect {|id| $game_actors[id] }
  end
  
  #--------------------------------------------------------------------------
  # new method: return_aeon
  #--------------------------------------------------------------------------
  def return_aeon(actor)
    @aeons.delete(actor.id)
  end
  
  #--------------------------------------------------------------------------
  # new method: clear_aeons
  #--------------------------------------------------------------------------
  def clear_aeons
    aeons.each { |aeon| aeon.greturn; aeon.summoner = nil }
    @aeons.clear
  end
  
end # Game_Party
 
#==============================================================================
# ¡ Window_BattleSummon
#==============================================================================
 
class Window_BattleSummon < Window_MenuGuardian
  
  #--------------------------------------------------------------------------
  # window_height
  #--------------------------------------------------------------------------
  def initialize(help_window)
    y = help_window.height
    super(0, y)
    self.visible = false
    @help_window = help_window
  end
  
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width
    Graphics.width
  end
  
  #--------------------------------------------------------------------------
  # window_height
  #--------------------------------------------------------------------------
  def window_height
    Graphics.height - 64 - 128
  end
  
  #--------------------------------------------------------------------------
  # line_height
  #--------------------------------------------------------------------------
  def item_height
    line_height * 2
  end
  
  #--------------------------------------------------------------------------
  # col_max
  #--------------------------------------------------------------------------
  def col_max
    window_width > 544 ? 2 : 1
  end
  
  #--------------------------------------------------------------------------
  # draw_item
  #--------------------------------------------------------------------------
  def draw_item(index)
    guardian = $game_party.guardians[index]
    rect = item_rect(index)
    face_rect = Rect.new(rect.x + 1, rect.y + 1, item_height - 2, item_height - 2)
    draw_guardian_name(guardian, rect.x, rect.y, rect.width / 2)
    draw_guardian_level(guardian, rect.x, rect.y + line_height, rect.width / 2)
    draw_guardian_hp(guardian, rect.x + rect.width / 2 + 2, rect.y, rect.width / 2 - 2)
    draw_guardian_mp(guardian, rect.x + rect.width / 2 + 2, rect.y + line_height, rect.width / 2 - 2)
    draw_thumb_face(guardian, face_rect)
  end
  
  #--------------------------------------------------------------------------
  # draw_guardian_level
  #--------------------------------------------------------------------------
  def draw_guardian_level(actor, dx, dy, dw)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color, enable?(actor))
    draw_text(dx + item_height + 2, dy, dw, line_height, Vocab.level)
    change_color(normal_color, enable?(actor))
    draw_text(dx+4, dy, dw-8, line_height, actor.level.to_s, 2)
  end
  
  #--------------------------------------------------------------------------
  # draw_guardian_hp
  #--------------------------------------------------------------------------
  def draw_guardian_hp(actor, dx, dy, dw)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color, enable?(actor))
    draw_text(dx + 2, dy, dw, line_height, Vocab.hp)
    change_color(normal_color, enable?(actor))
    draw_text(dx+4, dy, dw-8, line_height, "#{actor.hp}/#{actor.mhp}", 2)
  end
  
  #--------------------------------------------------------------------------
  # draw_guardian_mp
  #--------------------------------------------------------------------------
  def draw_guardian_mp(actor, dx, dy, dw)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color, enable?(actor))
    draw_text(dx + 2, dy, dw, line_height, Vocab.mp)
    change_color(normal_color, enable?(actor))
    draw_text(dx+4, dy, dw-8, line_height, "#{actor.mp}/#{actor.mmp}", 2)
  end
  
  #--------------------------------------------------------------------------
  # enable?
  #--------------------------------------------------------------------------
  def enable?(actor = nil)
    return false if actor.nil?
    return false if actor.summoner
    return actor.alive?
  end
  
  #--------------------------------------------------------------------------
  # current_item_enabled?
  #--------------------------------------------------------------------------
  def current_item_enabled?
    enable?($game_party.guardians[index])
  end
  
  #--------------------------------------------------------------------------
  # guardian
  #--------------------------------------------------------------------------
  def guardian
    $game_party.guardians[index]
  end
  
  #--------------------------------------------------------------------------
  # show
  #--------------------------------------------------------------------------
  def show
    @help_window.show
    super
    activate
  end
  
  #--------------------------------------------------------------------------
  # hide
  #--------------------------------------------------------------------------
  def hide
    @help_window.hide
    super
    deactivate
  end
  
  #--------------------------------------------------------------------------
  # activate
  #--------------------------------------------------------------------------
  def activate
    select(0)
    super
  end
  
end # Window_BattleSummon
 
#==============================================================================
# ¡ Window_BattleLog
#==============================================================================
 
class Window_BattleLog < Window_Selectable
  
  #--------------------------------------------------------------------------
  # new method: display_summon
  #--------------------------------------------------------------------------
  def display_summon(subject, guardian)
    text = YSE::GUARDIAN_SUMMON::SUMMON_CONFIGURATION[:summon_text]
    text = sprintf(text, subject.name, guardian.name)
    add_text(text)
  end
  
  #--------------------------------------------------------------------------
  # new method: display_summon_fail
  #--------------------------------------------------------------------------
  def display_summon_fail(subject)
    text = YSE::GUARDIAN_SUMMON::SUMMON_CONFIGURATION[:fail_text]
    text = sprintf(text, subject.name)
    add_text(text)
  end
  
  #--------------------------------------------------------------------------
  # new method: display_return
  #--------------------------------------------------------------------------
  def display_return(guardian)
    text = YSE::GUARDIAN_SUMMON::SUMMON_CONFIGURATION[:return_text]
    text = sprintf(text, guardian.name)
    add_text(text)
  end
  
end # Window_BattleLog
 
#==============================================================================
# ¡ Scene_Battle
#==============================================================================
 
class Scene_Battle < Scene_Base
  
  #--------------------------------------------------------------------------
  # alias method: create_all_windows
  #--------------------------------------------------------------------------
  alias yse_create_all_windows_gsummon create_all_windows
  def create_all_windows
    yse_create_all_windows_gsummon
    create_summon_window
  end
  
  #--------------------------------------------------------------------------
  # alias method: create_summon_window
  #--------------------------------------------------------------------------
  def create_summon_window
    @summon_window = Window_BattleSummon.new(@help_window)
    @summon_window.set_handler(:ok,     method(:on_summon_ok))
    @summon_window.set_handler(:cancel, method(:on_summon_cancel))
  end
  
  #--------------------------------------------------------------------------
  # alias method: on_skill_ok
  #--------------------------------------------------------------------------
  alias yse_on_skill_ok_gsummon on_skill_ok
  def on_skill_ok
    @skill = @skill_window.item
    @skill.is_summon ? command_summon : yse_on_skill_ok_gsummon
  end
  
  #--------------------------------------------------------------------------
  # alias method: command_use_skill
  # Compatible with: Yanfly Engine Ace - Battle Command List
  #--------------------------------------------------------------------------
  if $imported["YEA-BattleCommandList"]
  alias yse_command_use_skill_gsummon command_use_skill
  def command_use_skill
    @skill = $data_skills[@actor_command_window.current_ext]
    @skill.is_summon ? command_summon : yse_command_use_skill_gsummon
  end
  end
  
  #--------------------------------------------------------------------------
  # new method: command_summon
  #--------------------------------------------------------------------------
  def command_summon
    if YSE::GUARDIAN.summon_paired?
      BattleManager.actor.input.set_skill(@skill.id)
      BattleManager.actor.last_skill.object = @skill
      BattleManager.actor.input.summon_id = BattleManager.actor.first_guardian
      @skill_window.hide
      next_command
    else
      BattleManager.actor.input.set_skill(@skill.id)
      BattleManager.actor.last_skill.object = @skill
      @skill_window.hide unless $imported["YEA-BattleEngine"]
      @summon_window.show
    end
  end
  
  #--------------------------------------------------------------------------
  # new method: on_summon_ok
  #--------------------------------------------------------------------------
  def on_summon_ok
    @summon_window.hide
    BattleManager.actor.input.summon_id = @summon_window.guardian
    @skill_window.hide if $imported["YEA-BattleEngine"]
    next_command
  end
  
  #--------------------------------------------------------------------------
  # new method: command_summon
  #--------------------------------------------------------------------------
  def on_summon_cancel
    @summon_window.hide
    if @actor_command_window.close? || !@actor_command_window.visible
      @skill_window.show
      @skill_window.activate
    else
      @actor_command_window.activate
    end
  end
  
  #--------------------------------------------------------------------------
  # new method: command_summon
  #--------------------------------------------------------------------------
  alias yse_use_item_gsummon use_item
  def use_item
    if @subject.current_action.item.is_summon
      use_summon
    elsif @subject.current_action.item.is_greturn
      use_greturn
    else
      yse_use_item_gsummon
    end
  end
  
  #--------------------------------------------------------------------------
  # new method: use_summon
  #--------------------------------------------------------------------------
  def use_summon
    summon = @subject.current_action.summon_id
    if $game_party.battle_members.include?(summon)
      @log_window.display_summon_fail(@subject)
      return
    end
    if $game_party.battle_members.size >= $game_party.max_battle_members
      if YSE::GUARDIAN.ds_summon?
        @log_window.display_summon_fail(@subject)
        return
      end
    end
    @log_window.display_summon(@subject, summon)
    #---
    $game_party.summon_aeon(summon)
    unless YSE::GUARDIAN.aeon_party?
      @subject.aeon = summon
    end
    #---
    $imported["YEA-BattleEngine"] ? @status_window.refresh : refresh_status
    @summon_window.redraw_item(summon.guardian_index)
    targets = $game_troop.alive_members
    return battle_log_wait(4) if summon.actor.summon_ani <= 0
    show_animation(targets, summon.actor.summon_ani)
  end
  
  #--------------------------------------------------------------------------
  # new method: use_greturn
  #--------------------------------------------------------------------------
  def use_greturn
    @log_window.display_return(@subject)
    #---
    $game_party.return_aeon(@subject)
    unless YSE::GUARDIAN.aeon_party?
      @subject.greturn
      @subject.summoner = nil
    end
    #---
    $imported["YEA-BattleEngine"] ? @status_window.refresh : refresh_status
    @summon_window.redraw_item(@subject.guardian_index)
    targets = $game_troop.alive_members
    return battle_log_wait(4) if @subject.actor.return_ani <= 0
    show_animation(targets, @subject.actor.return_ani)
  end
  
  #--------------------------------------------------------------------------
  # new method: greturn_battle_end
  #--------------------------------------------------------------------------
  def greturn_battle_end
    $game_party.clear_aeons
    @status_window.refresh
    @summon_window.refresh
  end
  
  #--------------------------------------------------------------------------
  # new method: battle_log_wait
  #--------------------------------------------------------------------------
  def battle_log_wait(abs)
    abs.times do @log_window.wait end
  end
  
end # Scene_Battle
 
#==============================================================================
# 
# ¥ End of File
# 
#==============================================================================
 




Mon système de combat est de l'ATB, pas le système de combat de base de RPG Maker VX Ace. Or le script ne fonctionne pas pour que la chimère remplace un membre ou l'équipe entière. D'où vient l'incompatibilité, Est-ce modifiable par quelqu'un comme moi qui ne sais juste mettre =begin / =end pour rendre invalide un script?

Merci les amis!

Posté dans Forum - [VX Ace] Curseur et aire d'attaque

Ryukko - posté le 15/04/2013 à 13:29:01. (30 messages postés)

Domaine concerné: Script
Logiciel utilisé: VX Ace
Salut les amis!

Il y a quelques temps Sorine avait parlé du script de MOG Battle cursor que je remets ici (pas retrouvé le topic)


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
#==============================================================================
# +++ MOG - Battle Cursor (1.0) +++
#==============================================================================
# By Moghunter 
# http://www.atelier-rgss.com/
# traduit par Ryukko le 29-03-2013
#==============================================================================
# Sistema de cursor animado de batalha nos sprites dos battlers.
#==============================================================================
# Images nécessaires à placer dans Graphics/System dans les dossiers projets :
# 
# Battle_Cursor.png
#==============================================================================
 
#==============================================================================
# ■ REGLAGES CURSEUR
#==============================================================================
module MOG_BATTLE_CURSOR
  # Paramètre de la position du curseur par rapport à la cible
  CURSOR_POSITION = [-45, -16]
  # Paramètre la position du nom de la cible
  CURSOR_NAME_POSITION = [-10, 35]
  # Active l'effet de glisse
  CURSOR_SLIDE_EFFECT = true
  # Active l'effet de lévitation
  CURSOR_FLOAT_EFFECT = true
  # Priorité d'affichage du curseur
  CURSOR_Z = 0
end
 
#==============================================================================
# ■ Game Temp
#==============================================================================
class Game_Temp 
  
  attr_accessor :battle_cursor
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------  
  alias mog_battle_cursor_initialize initialize
  def initialize
      @battle_cursor = [0,0,false,""]
      mog_battle_cursor_initialize
  end  
  
end
 
#==============================================================================
# ■ Spriteset Battle Cursor
#==============================================================================
class Sprite_Battle_Cursor < Sprite
  include MOG_BATTLE_CURSOR
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------        
  def initialize(viewport = nil)
      super(viewport) 
      $game_temp.battle_cursor = [0,0,false,""] 
      self.bitmap = Cache.system("Battle_Cursor")
      self.visible = $game_temp.battle_cursor[2]
      self.z = CURSOR_Z
      self.z = 10 if $mog_rgss3_battle_hud != nil
      @cursor_name = Sprite.new
      @cursor_name.bitmap = Bitmap.new(120,32)
      @cursor_name.z = self.z + 1
      @cursor_name.bitmap.font.size = 16
      @cursor_name_enemy = $game_temp.battle_cursor[3]
      @cursor_name_position = [CURSOR_NAME_POSITION[0] ,CURSOR_NAME_POSITION[1]]
      @cursor_float = [0,0]
      refresh_cursor_name
  end
  
  #--------------------------------------------------------------------------
  # ● Dispose Sprite
  #--------------------------------------------------------------------------          
  def dispose
      super
      dispose_sprite_cursor
  end
  
  #--------------------------------------------------------------------------
  # ● Dispose Sprite Cursor
  #--------------------------------------------------------------------------            
  def dispose_sprite_cursor
      if @cursor_name != nil
         @cursor_name.bitmap.dispose
         @cursor_name.dispose
      end
      self.bitmap.dispose
  end
 
  #--------------------------------------------------------------------------
  # ● Refresh Cursor Name
  #--------------------------------------------------------------------------              
  def refresh_cursor_name
      @cursor_name_enemy = $game_temp.battle_cursor[3]
      @cursor_name.bitmap.clear
      @cursor_name.bitmap.draw_text(0,0,120,32,@cursor_name_enemy.to_s,1)
  end 
 
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------            
  def update
      super
      update_sprite_cursor
  end
 
  #--------------------------------------------------------------------------
  # ● Update Sprite Cursor
  #--------------------------------------------------------------------------              
  def update_sprite_cursor
      update_visible
      update_cursor_float_effect
      execute_move(0,self.x,$game_temp.battle_cursor[0])
      execute_move(1,self.y,$game_temp.battle_cursor[1] + @cursor_float[1])
      update_sprite_name
  end
 
  #--------------------------------------------------------------------------
  # ● Update Visible
  #--------------------------------------------------------------------------                
  def update_visible
      self.visible = $game_temp.battle_cursor[2]
      if !self.visible
         self.x = -64
         self.y = -64
      end  
  end  
  
  #--------------------------------------------------------------------------
  # ● Update Sprite Name
  #--------------------------------------------------------------------------                
  def update_sprite_name
      return if @cursor_name == nil
      refresh_cursor_name  if @cursor_name_enemy != $game_temp.battle_cursor[3]
      @cursor_name.x = self.x + @cursor_name_position[0]
      @cursor_name.y = self.y + @cursor_name_position[1]
      @cursor_name.opacity = self.opacity
      @cursor_name.visible = self.visible
  end  
  
  #--------------------------------------------------------------------------
  # ● Update Cursor Float Effect
  #--------------------------------------------------------------------------              
  def update_cursor_float_effect
      return if !CURSOR_FLOAT_EFFECT
      @cursor_float[0] += 1
      case @cursor_float[0]
        when 0..20
          @cursor_float[1] += 1
        when 21..40
          @cursor_float[1]  -= 1
        else
          @cursor_float[0] = 0
          @cursor_float[1] = 0
      end        
  end  
  
  #--------------------------------------------------------------------------
  # ● Execute Move
  #--------------------------------------------------------------------------      
  def execute_move(type,cp,np)
      sp = 5 + ((cp - np).abs / 5)
      if cp > np 
         cp -= sp
         cp = np if cp < np
      elsif cp < np 
         cp += sp
         cp = np if cp > np
      end     
      self.x = cp if type == 0
      self.y = cp if type == 1
  end      
  
end
 
#==============================================================================
# ■ Spriteset Battle
#==============================================================================
class Spriteset_Battle
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------      
  alias mog_battle_cursor_initialize initialize
  def initialize
      mog_battle_cursor_initialize
      create_cursor
  end
  
  #--------------------------------------------------------------------------
  # ● Dispose
  #--------------------------------------------------------------------------      
  alias mog_battle_cursor_dispose dispose
  def dispose
      mog_battle_cursor_dispose
      dispose_cursor
  end 
  
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------          
  alias mog_battle_cursor_update update
  def update
      mog_battle_cursor_update
      update_battle_cursor
  end  
  
  #--------------------------------------------------------------------------
  # ● Create_Cursor
  #--------------------------------------------------------------------------        
  def create_cursor
      return if @battle_cursor != nil
      @battle_cursor = Sprite_Battle_Cursor.new      
  end 
  
  #--------------------------------------------------------------------------
  # ● Dispose Cursor
  #--------------------------------------------------------------------------        
  def dispose_cursor
      return if @battle_cursor == nil
      @battle_cursor.dispose
  end  
  
  #--------------------------------------------------------------------------
  # ● Update Battle Cursor
  #--------------------------------------------------------------------------          
  def update_battle_cursor
      return if @battle_cursor == nil
      @battle_cursor.update      
  end
  
end
 
#==============================================================================
# ■ Battle Cursor Index
#==============================================================================
module Battle_Cursor_index
  include MOG_BATTLE_CURSOR
  #--------------------------------------------------------------------------
  # ● Check Index Limit
  #--------------------------------------------------------------------------      
  def check_index_limit
      self.index = 0 if self.index >= item_max
      self.index = (item_max - 1) if self.index < 0
  end      
  
  #--------------------------------------------------------------------------
  # ● Set Cursor Position Enemy
  #--------------------------------------------------------------------------    
  def set_cursor_position_enemy
      return if !self.active
      $game_temp.battle_cursor[0] = $game_troop.alive_members[self.index].screen_x + CURSOR_POSITION[0] rescue nil
      $game_temp.battle_cursor[1] = $game_troop.alive_members[self.index].screen_y + CURSOR_POSITION[1] rescue nil
      $game_temp.battle_cursor[3] = $game_troop.alive_members[self.index].name rescue nil
      $game_temp.battle_cursor = [0,0,false,0] if $game_temp.battle_cursor[0] == nil
  end
  
  #--------------------------------------------------------------------------
  # ● Set Cursor Position Actor
  #--------------------------------------------------------------------------    
  def set_cursor_position_actor
      return if !self.active
      $game_temp.battle_cursor[0] = $game_party.members[self.index].screen_x + CURSOR_POSITION[0] rescue nil
      $game_temp.battle_cursor[1] = $game_party.members[self.index].screen_y + CURSOR_POSITION[1] rescue nil
      $game_temp.battle_cursor[3] = $game_party.members[self.index].name rescue nil
      $game_temp.battle_cursor = [0,0,false,0] if $game_temp.battle_cursor[0] == nil
  end  
  
  #--------------------------------------------------------------------------
  # ● Process Cursor Move
  #--------------------------------------------------------------------------
  def process_cursor_move
      return unless cursor_movable?
      last_index = @index
      cursor_move_index(+1) if Input.repeat?(:DOWN)
      cursor_move_index(-1) if Input.repeat?(:UP)
      cursor_move_index(+1) if Input.repeat?(:RIGHT)
      cursor_move_index(-1) if Input.repeat?(:LEFT)
      if @index != last_index
         Sound.play_cursor
      end
  end
 
  #--------------------------------------------------------------------------
  # ● Process Cursor Move Index
  #--------------------------------------------------------------------------  
  def cursor_move_index(value = 0)
      self.index += value
      check_index_limit
  end
 
end
 
#==============================================================================
# ■ Window_BattleActor
#==============================================================================
class Window_BattleActor < Window_BattleStatus
  include Battle_Cursor_index
  
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------  
  def update
      super
      set_cursor_position_actor
  end  
 
  #--------------------------------------------------------------------------
  # ● Show
  #--------------------------------------------------------------------------
  alias mog_battle_cursor_show show
  def show
      if @info_viewport
         set_cursor_position_actor
         $game_temp.battle_cursor[2] = true
      end
      mog_battle_cursor_show
  end
 
  #--------------------------------------------------------------------------
  # ● Hide
  #--------------------------------------------------------------------------
  alias mog_battle_cursor_hide hide
  def hide
      if @info_viewport
          $game_temp.battle_cursor[2] = false
      end
      mog_battle_cursor_hide
  end  
  
end
 
#==============================================================================
# ■ Window_BattleEnemy
#==============================================================================
class Window_BattleEnemy < Window_Selectable
  include Battle_Cursor_index
  
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------  
  def update
      super
      set_cursor_position_enemy
  end
 
  #--------------------------------------------------------------------------
  # ● Show
  #--------------------------------------------------------------------------
  alias mog_battle_cursor_show show
  def show
      if @info_viewport
         set_cursor_position_enemy
         $game_temp.battle_cursor[2] = true
      end
      mog_battle_cursor_show
  end
 
  #--------------------------------------------------------------------------
  # ● Hide
  #--------------------------------------------------------------------------
  alias mog_battle_cursor_hide hide
  def hide
      if @info_viewport
          $game_temp.battle_cursor[2] = false
      end
      mog_battle_cursor_hide
  end  
  
end
 
$mog_rgss3_battle_cursor = true



J'aimerai l'utiliser aussi mais j'utilise dans mon projet pour certaines compétences le script de YANFLY, Area of effect qui crée une aire d'attaque pour cibler les ennemis.

http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/target-manager/area-of-effect/

Le problème c'est que l'affichage de ces aires d'attaque ne se fait plus avec le script de MOG, et je ne comprend pas pourquoi... La retouche d'un des deux scripts peut-elle permettre la cohabitation des deux scripts, et ainsi permettre la disparition du curseur lorsqu'une compétence comporte un TAG d'area of effect pour céder sa place aux aires d'attaque???

Merci pour l'aide comme toujours, vous m'êtes précieux!! :help
(en espérant que cela soit possible)

Posté dans Forum - [VX Ace] Compatibilité de script

Ryukko - posté le 12/04/2013 à 09:49:34. (30 messages postés)

Salut!

Hyper rapide
Hyper précis
Hyper simpa

T'auras un hyper merci à la fin de mon jeu ^^ (dans une ou deux décennies)

Posté dans Forum - [VX Ace] Compatibilité de script

Ryukko - posté le 11/04/2013 à 23:47:12. (30 messages postés)

Voici le script du bestiaire que j'ai choisi (MOG)

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
#==============================================================================
# +++ MOG - MONSTER BOOK  (v1.4) +++
#==============================================================================
# By Moghunter 
# http://www.atelier-rgss.com/
#==============================================================================
# Sistema que permite verificar os parâmetros dos inimigos derrotados,
# o que inclui o battleback e a música de batalha. 
# 
#==============================================================================
# Para chamar o script use o comando abaixo.
#
# SceneManager.call(Monster_Book)
#
#==============================================================================
 
#==============================================================================
# ● Histórico (Version History)
#==============================================================================
# v 1.4 - Correção do Crash quando não há definição de música de batalha.
# v 1.3 - Correção do Crash aleatório.
# v 1.2 - Melhoria no sistema de dispose.
# v 1.1 - Correção na atualização do battleback em imagens repetidas.
#       - Correção na execução da música quando o pitch ou volume é diferente.
#       - Correção no espaço entre os números de parametros.
#==============================================================================
 
module MOG_MONSTER_BOOK
   #Ocultar inimigos especificos da lista de inimigos. 
   HIDE_ENEMIES_ID = [9,10]
   #Ativar a música de batalha.
   PLAY_MUSIC = true
   #Definição da palavra Completado.
   COMPLETED_WORD =  "Completed"
   #Ativar o Monster Book no Menu.
   MENU_COMMAND = true
   #Nome do comando apresentado no menu.
   MENU_COMMAND_NAME = "Bestiary"
end
 
#==============================================================================
# ■ Game_Temp
#==============================================================================
class Game_Temp
   attr_accessor :bestiary_battleback1_name
   attr_accessor :bestiary_battleback2_name
   
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------       
   alias mog_bestiary_initialize initialize
   def initialize
       @bestiary_battleback1_name = ""
       @bestiary_battleback1_name = ""
       mog_bestiary_initialize
   end
end
 
#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
  
  attr_accessor :bestiary_defeated
  attr_accessor :bestiary_battleback
  attr_accessor :bestiary_music
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------    
  alias mog_monster_book_initialize initialize
  def initialize
      @bestiary_defeated = []
      @bestiary_battleback = []
      @bestiary_music = []
      mog_monster_book_initialize 
  end
  
end  
 
#==============================================================================
# ■ Spriteset_Battle
#==============================================================================
class Spriteset_Battle
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  alias mog_bestiary_initialize initialize
  def initialize
      mog_bestiary_initialize
      $game_temp.bestiary_battleback1_name = battleback1_name
      $game_temp.bestiary_battleback2_name = battleback2_name
  end
  
end
 
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
  attr_accessor :enemy_id
  
  #--------------------------------------------------------------------------
  # ● Die
  #--------------------------------------------------------------------------
  alias mog_monster_book_die die
  def die
      mog_monster_book_die
      check_monster_book
  end
    
  #--------------------------------------------------------------------------
  # ● Check Monster Book
  #--------------------------------------------------------------------------  
  def check_monster_book
      if $game_system.bestiary_defeated[@enemy_id] == nil
         $game_system.bestiary_defeated[@enemy_id] = 0
         $game_system.bestiary_battleback[@enemy_id] = [$game_temp.bestiary_battleback1_name,$game_temp.bestiary_battleback2_name]
         $game_system.bestiary_music[@enemy_id] = $game_system.battle_bgm
      end   
      $game_system.bestiary_defeated[@enemy_id] += 1      
  end  
end  
 
#==============================================================================
# ■ Window_Monster_Status
#==============================================================================
 
class Window_Monster_Status < Window_Selectable
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  def initialize(enemy)
    super(0, 288, 544, 128)
    self.opacity = 255
    self.z = 300
    refresh(enemy)
    activate
  end
 
  #--------------------------------------------------------------------------
  # ● Refresh
  #--------------------------------------------------------------------------  
  def refresh(enemy)
      self.contents.clear
      if $game_system.bestiary_defeated[enemy.id] == nil
         self.contents.draw_text(0,0 , 180, 24, "No Data",0)    
       else
         change_color(system_color)
         w_max = 50
         ex = 16
         self.contents.draw_text(0,0 , w_max, 24, Vocab::param(0),0)    
         self.contents.draw_text(0,24 * 1 , w_max, 24, Vocab::param(1),0)
         self.contents.draw_text(0,24 * 2 , w_max, 24, Vocab::param(2),0)
         self.contents.draw_text(0,24 * 3 , w_max, 24, Vocab::param(3),0)
         self.contents.draw_text(128,24 * 0 , w_max, 24, Vocab::param(4),0)
         self.contents.draw_text(128,24 * 1 , w_max, 24, Vocab::param(5),0)
         self.contents.draw_text(128,24 * 2 , w_max, 24, Vocab::param(6),0)         
         self.contents.draw_text(128,24 * 3 , w_max, 24, Vocab::param(7),0)         
         self.contents.draw_text(256,24 * 0 , w_max, 24, "Exp",0)
         self.contents.draw_text(384,24 * 0 , w_max, 24, Vocab::currency_unit,0)
         self.contents.draw_text(256,24 * 1 , w_max, 24, "Treasure",0)         
         change_color(normal_color,true)
         w_max2 = 64         
         #HP
         self.contents.draw_text(32 + ex,0 , w_max2, 24, enemy.params[0],2)
         #MP
         self.contents.draw_text(32 + ex,24 * 1 , w_max2, 24, enemy.params[1],2)
         #ATK
         self.contents.draw_text(32 + ex,24 * 2 ,w_max2 , 24, enemy.params[2],2)         
         #Def
         self.contents.draw_text(32 + ex,24 * 3 , w_max2, 24, enemy.params[3],2)         
         #Mag Power
         self.contents.draw_text(160 + ex,24 * 0 , w_max2, 24, enemy.params[4],2)
         #Mag Def
         self.contents.draw_text(160 + ex,24 * 1 , w_max2, 24, enemy.params[5],2)  
         #Agility
         self.contents.draw_text(160 + ex,24 * 2 , w_max2, 24, enemy.params[6],2)
         #Luck
         self.contents.draw_text(160 + ex,24 * 3 , w_max2, 24, enemy.params[7],2)
         #EXP
         self.contents.draw_text(280,24 * 0 , 96, 24, enemy.exp,2)
         #Gold
         self.contents.draw_text(400,24 * 0 , 96, 24, enemy.gold,2)
         #Drop Items
         tr = 0
         for i in enemy.drop_items
            next if i.kind == 0
            tr += 1 
            tr_name = $data_items[i.data_id] if i.kind == 1
            tr_name = $data_weapons[i.data_id] if i.kind == 2
            tr_name = $data_armors [i.data_id] if i.kind == 3
            draw_icon(tr_name.icon_index, 336, 24 * tr)
            self.contents.draw_text(368,24 * tr , 160, 24, tr_name.name.to_s,0)
         end       
      end
  end
end
 
#==============================================================================
# ■ Window_Monster_List
#==============================================================================
class Window_Monster_List < Window_Selectable
  
 #------------------------------------------------------------------------------
 # ● Initialize
 #------------------------------------------------------------------------------   
  def initialize(data)
      super(312, 64, 232, 224)
      self.opacity = 255
      self.z = 301
      @index = -1
      @data = data
      @item_max = @data.size
      refresh(data)
      select(0)
      activate
  end
 
 #------------------------------------------------------------------------------
 # ● Refresh
 #------------------------------------------------------------------------------   
  def refresh(data)
      self.contents.clear
      if @item_max > 0
         self.contents = Bitmap.new(width - 32, @item_max * 24)
         for i in 0...@item_max
            draw_item(i)
         end
      end
  end
  
 #------------------------------------------------------------------------------
 # ● draw_item MAX
 #------------------------------------------------------------------------------     
 def check_item_max
     @data_max = 0
     for i in $data_enemies
         next if i == nil or  MOG_MONSTER_BOOK::HIDE_ENEMIES_ID.include?(i.id)
         @data_max += 1
     end
 end
      
 #------------------------------------------------------------------------------
 # ● draw_item
 #------------------------------------------------------------------------------   
  def draw_item(index)
      x = 0
      y = index / col_max  * 24
      n_index = index + 1
      if $game_system.bestiary_defeated[@data[index].id] == nil
         monster_name = "No Data"
         defeated = " ---- "
         change_color(normal_color,false)
      else  
        monster_name = @data[index].name
        change_color(normal_color,true)
      end
      check_item_max
      d = @data_max > 99 ? "%03d" : @data_max > 9 ? "%02d" : "%01d"  
      text = sprintf(d, n_index).to_s  + " - "
      self.contents.draw_text(x,y , 56, 24, text,0) 
      self.contents.draw_text(x + 56,y , 140, 24, monster_name,0) 
  end
 
 #------------------------------------------------------------------------------
 # ● Item Max
 #------------------------------------------------------------------------------         
  def item_max
      return @item_max == nil ? 0 : @item_max 
  end  
  
end
 
#==============================================================================
# ■ Window_Monster_Comp
#==============================================================================
class Window_Monster_Comp < Window_Selectable
  include  MOG_MONSTER_BOOK
  
  #--------------------------------------------------------------------------
  # ● Initialize
  #--------------------------------------------------------------------------
  def initialize
      super(312,0, 232, 64)
      self.opacity = 255
      self.z = 300
      refresh
      activate
  end
  
  #--------------------------------------------------------------------------
  # ● Check Completition
  #--------------------------------------------------------------------------  
  def check_completion
      data_max = 0
      for i in $data_enemies
          next if i == nil or  MOG_MONSTER_BOOK::HIDE_ENEMIES_ID.include?(i.id)
          data_max += 1
      end
      comp = 0  
      for i in 0...$game_system.bestiary_defeated.size    
          comp += 1 if $game_system.bestiary_defeated[i] != nil
      end  
      @completed = COMPLETED_WORD + " " + comp.to_s + "/" + data_max.to_s
  end
  
  #--------------------------------------------------------------------------
  # ● Refresh
  #--------------------------------------------------------------------------  
  def refresh
      self.contents.clear 
      check_completion
      self.contents.draw_text(0,0, 160, 24, @completed.to_s,0)
  end
end
 
#==============================================================================
# ■ Monster_Book
#==============================================================================
class Monster_Book
  
 #--------------------------------------------------------------------------
 # ● Main
 #--------------------------------------------------------------------------          
 def main
     Graphics.transition
     execute_loop
     execute_dispose
 end   
 
 #--------------------------------------------------------------------------
 # ● Execute Loop
 #--------------------------------------------------------------------------           
 def execute_loop
     loop do
        Graphics.update
        Input.update
        update
        break if SceneManager.scene != self
     end
 end   
 
 #--------------------------------------------------------------------------
 # ● Initialize
 #--------------------------------------------------------------------------          
 def initialize
     load_data
     execute_dispose
     create_window_guide
     create_enemy_sprite
     create_battleback
     @music = [nil,nil,nil]
     refresh_bgm
 end   
 
 #------------------------------------------------------------------------------
 # ● Initialize
 #------------------------------------------------------------------------------     
 def load_data
     BattleManager.save_bgm_and_bgs
     @data = []
     for i in $data_enemies
         next if i == nil or  MOG_MONSTER_BOOK::HIDE_ENEMIES_ID.include?(i.id)
         @data.push(i)
     end  
 end
 
 #--------------------------------------------------------------------------
 # ● Execute Dispose
 #--------------------------------------------------------------------------           
 def execute_dispose
     return if @windows_guide == nil
     Graphics.freeze
     @windows_guide.dispose
     @windows_guide = nil
     @windows_status.dispose
     if @enemy_sprite.bitmap != nil 
        @enemy_sprite.bitmap.dispose
     end
     @enemy_sprite.dispose 
     dispose_battleback           
     @battleback1.dispose
     @battleback2.dispose
     @window_comp.dispose
     BattleManager.replay_bgm_and_bgs
 end
 
 #--------------------------------------------------------------------------
 # ● Dispose_battleback 
 #--------------------------------------------------------------------------             
 def dispose_battleback 
     if @battleback1.bitmap != nil
        @battleback1.bitmap.dispose
        @battleback1.bitmap = nil
     end
     if @battleback2.bitmap != nil
        @battleback2.bitmap.dispose
        @battleback2.bitmap = nil
     end   
 end
      
 #--------------------------------------------------------------------------
 # ● Create Window Guide
 #--------------------------------------------------------------------------            
 def create_window_guide
     @windows_guide = Window_Monster_List.new(@data)
     @enemy = @data[@windows_guide.index]
     @windows_status = Window_Monster_Status.new(@enemy)
     @window_comp = Window_Monster_Comp.new
     @old_index = @windows_guide.index
     @org_pos = [@windows_guide.x,@windows_guide.y]
     @fade_time = 60
 end
   
 #--------------------------------------------------------------------------
 # ● Create Enemy Sprite
 #--------------------------------------------------------------------------             
 def create_enemy_sprite
     @enemy_sprite = Sprite.new
     @enemy_sprite.z = 100
     @enemy_sprite_org =  @enemy_sprite.x
     refresh_enemy_sprite
 end
 
 #--------------------------------------------------------------------------
 # ● Create_Battleback
 #--------------------------------------------------------------------------             
 def create_battleback
     @battleback1 = Sprite.new
     @battleback1.z = 1
     @battleback1.opacity = 0
     @battleback2 = Sprite.new
     @battleback2.z = 2
     @battleback2.opacity = 0
     @old_battleback = [nil,nil]
     refresh_batteback
 end
 
 #--------------------------------------------------------------------------
 # ● Update
 #--------------------------------------------------------------------------            
 def update
     @windows_guide.update
     update_command
     update_animation
     refresh if @old_index != @windows_guide.index
 end
 
 #--------------------------------------------------------------------------
 # ● Update Animation
 #--------------------------------------------------------------------------             
 def update_animation
     update_window_fade_animation
     update_battleback_animation
     update_enemy_sprite_animation
 end  
 
 #--------------------------------------------------------------------------
 # ● Update Enemy Sprite Animation
 #--------------------------------------------------------------------------              
 def update_enemy_sprite_animation
     @enemy_sprite.opacity += 15
     if @enemy_sprite.x < @enemy_sprite_org
        @enemy_sprite.x += 15 
        if @enemy_sprite.x >= @enemy_sprite_org
           @enemy_sprite.x = @enemy_sprite_org 
        end
    end
 end
   
 #--------------------------------------------------------------------------
 # ● Update Window Fade Animation
 #--------------------------------------------------------------------------             
 def update_window_fade_animation
     if @windows_guide.visible
        @windows_guide.opacity += 15
        @windows_guide.contents_opacity += 15        
        if @windows_guide.y > @org_pos[1]
           @windows_guide.y -= 25
           if @windows_guide.y < @org_pos[1]
              @windows_guide.y = @org_pos[1] 
              @windows_guide.opacity += 255
              @windows_guide.contents_opacity = 255
           end
        end              
     else
        @windows_guide.opacity -= 15
        @windows_guide.contents_opacity -= 15
        if @windows_guide.y < (@windows_guide.height + 416) 
           @windows_guide.y += 25
           @windows_guide.y = (@windows_guide.height + 416) if @windows_guide.y > (@windows_guide.height + 416)           
        end       
    end  
 end   
 
 #--------------------------------------------------------------------------
 # ● Update Battleback Animation
 #--------------------------------------------------------------------------              
 def update_battleback_animation
     if @old_battleback == nil
        @battleback1.opacity -= 10
        @battleback2.opacity -= 10
     else
        @battleback1.opacity += 10
        @battleback2.opacity += 10     
     end  
 end
    
 #--------------------------------------------------------------------------
 # ● Update Command
 #--------------------------------------------------------------------------             
 def update_command
     if Input.trigger?(Input::B) or Input.press?(Input::B)
        Sound.play_cancel
        SceneManager.return
      elsif Input.trigger?(Input::C)
        Sound.play_ok   
        return 
        if @windows_guide.visible
           @windows_guide.visible = false
        else
           @windows_guide.visible = true
        end  
     end   
 end
 
 #--------------------------------------------------------------------------
 # ● Refresh Animation
 #--------------------------------------------------------------------------              
 def refresh
     @old_index = @windows_guide.index
     @enemy = @data[@windows_guide.index]
     @windows_status.refresh(@enemy)
     refresh_bgm
     refresh_enemy_sprite
     refresh_batteback
 end
   
 #--------------------------------------------------------------------------
 # ● Refresh Animation
 #--------------------------------------------------------------------------               
 def refresh_enemy_sprite
     if @enemy_sprite.bitmap != nil 
        @enemy_sprite.bitmap.dispose
        @enemy_sprite.bitmap = nil
     end
     if $game_system.bestiary_defeated[@enemy.id] != nil 
        @enemy_sprite.bitmap = Cache.battler(@enemy.battler_name, @enemy.battler_hue)         
        @enemy_sprite_org =  (312/ 2) - (@enemy_sprite.bitmap.width / 2)
        @enemy_sprite.x = -@enemy_sprite.bitmap.width
        @enemy_sprite.y = 272 - @enemy_sprite.bitmap.height
        @enemy_sprite.opacity = 0
     end
 end  
 
 #--------------------------------------------------------------------------
 # ● BGM Refresh
 #--------------------------------------------------------------------------                
 def refresh_bgm
     return unless MOG_MONSTER_BOOK::PLAY_MUSIC
     if $game_system.bestiary_music[@enemy.id] != nil and 
        (@music[0] != $game_system.bestiary_music[@enemy.id].name or
         @music[1] != $game_system.bestiary_music[@enemy.id].volume or
         @music[2] != $game_system.bestiary_music[@enemy.id].pitch)
         m = $game_system.bestiary_music[@enemy.id]
         @music = [m.name, m.volume, m.pitch]
         RPG::BGM.stop
         Audio.bgm_play("Audio/BGM/" +  m.name, m.volume, m.pitch) rescue nil
     end  
 end
 
 #--------------------------------------------------------------------------
 # ● Refresh Battleback
 #--------------------------------------------------------------------------                
 def refresh_batteback    
     if $game_system.bestiary_battleback[@enemy.id] != nil and 
        (@old_battleback[0] != $game_system.bestiary_battleback[@enemy.id][0] or
         @old_battleback[1] != $game_system.bestiary_battleback[@enemy.id][1])
          @old_battleback = [$game_system.bestiary_battleback[@enemy.id][0], $game_system.bestiary_battleback[@enemy.id][1]]
          dispose_battleback
          @battleback1.opacity = 0 
          @battleback2.opacity = 0 
        if $game_system.bestiary_battleback[@enemy.id][0] != nil
           @battleback1.bitmap = Cache.battleback1($game_system.bestiary_battleback[@enemy.id][0])
        else
           @battleback1.bitmap = Cache.battleback1("")
        end
        if $game_system.bestiary_battleback[@enemy.id][1] != nil
           @battleback2.bitmap = Cache.battleback2($game_system.bestiary_battleback[@enemy.id][1])
        else
           @battleback2.bitmap = Cache.battleback2("")
        end           
     end  
 end
 
end
 
if MOG_MONSTER_BOOK::MENU_COMMAND
#==============================================================================
# ■ Window Menu Command
#==============================================================================
class Window_MenuCommand < Window_Command  
  
 #------------------------------------------------------------------------------
 # ● Add Main Commands
 #------------------------------------------------------------------------------     
  alias mog_bestiary_add_main_commands add_main_commands
  def add_main_commands
      mog_bestiary_add_main_commands
      add_command(MOG_MONSTER_BOOK::MENU_COMMAND_NAME, :bestiary, main_commands_enabled)
  end
end   
 
#==============================================================================
# ■ Scene Menu
#==============================================================================
class Scene_Menu < Scene_MenuBase
  
 #------------------------------------------------------------------------------
 # ● Create Command Windows
 #------------------------------------------------------------------------------       
   alias mog_bestiary_create_command_window create_command_window
   def create_command_window
       mog_bestiary_create_command_window
       @command_window.set_handler(:bestiary,     method(:Monster_Book))
   end
   
 #------------------------------------------------------------------------------
 # ● Monster Book
 #------------------------------------------------------------------------------        
   def Monster_Book
       SceneManager.call(Monster_Book)
   end
 
end   
 
end
 
$mog_rgss3_monster_book = true 



(exactement sorine)

Posté dans Forum - [VX Ace] Compatibilité de script

Ryukko - posté le 11/04/2013 à 23:26:30. (30 messages postés)

Domaine concerné: script
Logiciel utilisé: VX Ace
Salut, salut!

J'utilise le script Ace Item Engine de YANFLY que voici :

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
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
 
#==============================================================================
# 
# ▼ Yanfly Engine Ace - Ace Item Menu v1.02
# -- Last Updated: 2012.01.05
# -- Level: Normal, Hard
# -- Requires: n/a
# 
#==============================================================================
 
$imported = {} if $imported.nil?
$imported["YEA-ItemMenu"] = true
 
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.05 - Compatibility Update with Equip Dynamic Stats.
# 2012.01.03 - Started Script and Finished.
#            - Compatibility Update with Ace Menu Engine.
# 
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# The Ace Item Menu offers more item categorization control and a better layout
# that simulatenously provides information regarding the items to the player,
# while keeping a good amount of the item list visible on screen at once. The
# script can also be customized to rearrange commands and categories.
# 
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
# 
# -----------------------------------------------------------------------------
# Item Notetags - These notetags go in the item notebox in the database.
# -----------------------------------------------------------------------------
# <category: string>
# Places this object into the item category for "string". Whenever the selected
# category is highlighted in the Ace Item Menu command window, this object will
# be included and shown in the item window.
# 
# <image: string>
# Uses a picture from Graphics\Pictures\ of your RPG Maker VX Ace Project's
# directory with the filename of "string" (without the extension) as the image
# picture shown in the Ace Item Menu.
# 
# -----------------------------------------------------------------------------
# Weapon Notetags - These notetags go in the weapon notebox in the database.
# -----------------------------------------------------------------------------
# <category: string>
# Places this object into the item category for "string". Whenever the selected
# category is highlighted in the Ace Item Menu command window, this object will
# be included and shown in the item window.
# 
# <image: string>
# Uses a picture from Graphics\Pictures\ of your RPG Maker VX Ace Project's
# directory with the filename of "string" (without the extension) as the image
# picture shown in the Ace Item Menu.
# 
# -----------------------------------------------------------------------------
# Armour Notetags - These notetags go in the armour notebox in the database.
# -----------------------------------------------------------------------------
# <category: string>
# Places this object into the item category for "string". Whenever the selected
# category is highlighted in the Ace Item Menu command window, this object will
# be included and shown in the item window.
# 
# <image: string>
# Uses a picture from Graphics\Pictures\ of your RPG Maker VX Ace Project's
# directory with the filename of "string" (without the extension) as the image
# picture shown in the Ace Item Menu.
# 
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
# 
#==============================================================================
 
module YEA
  module ITEM
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Item Command Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This array adjusts what options appear in the initial item command window
    # before the items are split into separate categories. Add commands, remove
    # commands, or rearrange them. Here's a list of which does what:
    # 
    # -------------------------------------------------------------------------
    # :command         Description
    # -------------------------------------------------------------------------
    # :item            Opens up the various item categories. Default.
    # :weapon          Opens up the various weapon categories. Default.
    # :armor           Opens up the various armour categories. Default.
    # :key_item        Shows a list of the various key items. Default.
    # 
    # :gogototori      Requires Kread-EX's Go Go Totori Synthesis.
    # 
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    COMMANDS =[
      :item,         # Opens up the various item categories. Default.
      :weapon,       # Opens up the various weapon categories. Default.
      :armor,        # Opens up the various armour categories. Default.
      :key_item,     # Shows a list of the various key items. Default.
      :gogototori,   # Requires Kread-EX's Go Go Totori Synthesis.
    # :custom1,      # Custom command 1.
    # :custom2,      # Custom command 2.
    ] # Do not remove this.
    
    #--------------------------------------------------------------------------
    # - Item Custom Commands -
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # For those who use scripts to that may produce unique effects for the item
    # scene, use this hash to manage the custom commands for the Item Command
    # Window. You can disable certain commands or prevent them from appearing
    # by using switches. If you don't wish to bind them to a switch, set the
    # proper switch to 0 for it to have no impact.
    #--------------------------------------------------------------------------
    CUSTOM_ITEM_COMMANDS ={
    # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
      :gogototori => ["Synthesis",            0,         0, :command_totori],
      :custom1 => [ "Custom Name",            0,          0, :command_name1],
      :custom2 => [ "Custom Text",           13,          0, :command_name2],
    } # Do not remove this.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Item Type Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # These arrays adjusts and shows the various item types shown for Items,
    # Weapons, and Armours. Note that when using :category symbols, the
    # specific category shown will be equal to the text used for the Display
    # and the included item must contain a category equal to the Display name.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This array contains the order for the Item categories.
    ITEM_TYPES =[
    # [  :symbol,   "Display"],
      [   :field,     "Field"], # Shows Menu-usable items.
      [  :battle,    "Battle"], # Shows Battle-usable items.
      [:category,   "Special"], # Categorized by <category: string>
      [:category,"Ingredient"], # Categorized by <category: string>
      [:key_item,  "Key Item"], # Shows all key items.
      [     :all,       "All"], # Shows all usable items.
    ] # Do not remove this.
    
    # This array contains the order for the Weapon categories.
    WEAPON_TYPES =[
    # [  :symbol,   "Display"],
      [   :types,  "WPNTYPES"], # Lists all of the individual weapon types.
      [:category,  "Training"], # Categorized by <category: string>
      [:category, "Legendary"], # Categorized by <category: string>
      [     :all,       "All"], # Shows all weapons.
    ] # Do not remove this.
    
    # This array contains the order for the Armour categories.
    ARMOUR_TYPES =[
    # [  :symbol,   "Display"],
      [   :slots,  "ARMSLOTS"], # Lists all of the individual armour slots.
      [   :types,  "ARMTYPES"], # Lists all of the individual armours types.
      [:category,  "Training"], # Categorized by <category: string>
      [:category, "Legendary"], # Categorized by <category: string>
      [     :all,       "All"], # Shows all armours.
    ] # Do not remove this.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Item Status Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # The item status window displays information about the item in detail.
    # Adjust the settings below to change the way the status window appears.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    STATUS_FONT_SIZE = 20       # Font size used for status window.
    MAX_ICONS_DRAWN  = 10       # Maximum number of icons drawn for states.
    
    # The following adjusts the vocabulary used for the status window. Each
    # of the vocabulary settings are self explanatory.
    VOCAB_STATUS ={
      :empty      => "---",          # Text used when nothing is shown.
      :hp_recover => "HP Heal",      # Text used for HP Recovery.
      :mp_recover => "MP Heal",      # Text used for MP Recovery.
      :tp_recover => "TP Heal",      # Text used for TP Recovery.
      :tp_gain    => "TP Gain",      # Text used for TP Gain.
      :applies    => "Applies",      # Text used for applied states and buffs.
      :removes    => "Removes",      # Text used for removed states and buffs.
    } # Do not remove this.
    
  end # ITEM
end # YEA
 
#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
 
module YEA
  module REGEXP
  module BASEITEM
    
    CATEGORY = /<(?:CATEGORIES|category):[ ](.*)>/i
    IMAGE    = /<(?:IMAGE|image):[ ](.*)>/i
    
  end # BASEITEM
  end # REGEXP
end # YEA
 
#==============================================================================
# ■ Numeric
#==============================================================================
 
class Numeric
  
  #--------------------------------------------------------------------------
  # new method: group_digits
  #--------------------------------------------------------------------------
  unless $imported["YEA-CoreEngine"]
  def group; return self.to_s; end
  end # $imported["YEA-CoreEngine"]
    
end # Numeric
 
#==============================================================================
# ■ Vocab
#==============================================================================
 
module Vocab
  
  #--------------------------------------------------------------------------
  # new method: self.item_status
  #--------------------------------------------------------------------------
  def self.item_status(type)
    return YEA::ITEM::VOCAB_STATUS[type]
  end
  
end # Vocab
 
#==============================================================================
# ■ DataManager
#==============================================================================
 
module DataManager
  
  #--------------------------------------------------------------------------
  # alias method: load_database
  #--------------------------------------------------------------------------
  class <<self; alias load_database_aim load_database; end
  def self.load_database
    load_database_aim
    load_notetags_aim
  end
  
  #--------------------------------------------------------------------------
  # new method: load_notetags_aim
  #--------------------------------------------------------------------------
  def self.load_notetags_aim
    groups = [$data_items, $data_weapons, $data_armors]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.load_notetags_aim
      end
    end
  end
  
end # DataManager
 
#==============================================================================
# ■ RPG::BaseItem
#==============================================================================
 
class RPG::BaseItem
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :category
  attr_accessor :image
  
  #--------------------------------------------------------------------------
  # common cache: load_notetags_aim
  #--------------------------------------------------------------------------
  def load_notetags_aim
    @category = []
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YEA::REGEXP::BASEITEM::CATEGORY
        @category.push($1.upcase.to_s)
      when YEA::REGEXP::BASEITEM::IMAGE
        @image = $1.to_s
      end
    } # self.note.split
    #---
  end
  
end # RPG::BaseItem
 
#==============================================================================
# ■ Game_Temp
#==============================================================================
 
class Game_Temp
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :scene_item_index
  attr_accessor :scene_item_oy
  
end # Game_Temp
 
#==============================================================================
# ■ Window_ItemList
#==============================================================================
 
class Window_ItemList < Window_Selectable
  
  #--------------------------------------------------------------------------
  # overwrite method: draw_item
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    return if item.nil?
    rect = item_rect(index)
    rect.width -= 4
    draw_item_name(item, rect.x, rect.y, enable?(item), rect.width - 24)
    draw_item_number(rect, item)
  end
  
end # Window_ItemList
 
#==============================================================================
# ■ Window_ItemCommand
#==============================================================================
 
class Window_ItemCommand < Window_Command
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_reader   :item_window
  
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y)
  end
  
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width; return 160; end
  
  #--------------------------------------------------------------------------
  # visible_line_number
  #--------------------------------------------------------------------------
  def visible_line_number; return 4; end
  
  #--------------------------------------------------------------------------
  # process_ok
  #--------------------------------------------------------------------------
  def process_ok
    $game_temp.scene_item_index = index
    $game_temp.scene_item_oy = self.oy
    super
  end
  
  #--------------------------------------------------------------------------
  # make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    for command in YEA::ITEM::COMMANDS
      case command
      #--- Default Commands ---
      when :item
        add_command(Vocab::item, :item)
      when :weapon
        add_command(Vocab::weapon, :weapon)
      when :armor
        add_command(Vocab::armor, :armor)
      when :key_item
        add_command(Vocab::key_item, :key_item)
      #--- Imported ---
      when :gogototori
        next unless $imported["KRX-AlchemicSynthesis"]
        process_custom_command(command)
      #--- Custom Commands ---
      else
        process_custom_command(command)
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # process_custom_command
  #--------------------------------------------------------------------------
  def process_custom_command(command)
    return unless YEA::ITEM::CUSTOM_ITEM_COMMANDS.include?(command)
    show = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][2]
    continue = show <= 0 ? true : $game_switches[show]
    return unless continue
    text = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][0]
    switch = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][1]
    enabled = switch <= 0 ? true : $game_switches[switch]
    add_command(text, command, enabled)
  end
  
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active
    @item_window.category = current_symbol if @item_window
  end
  
  #--------------------------------------------------------------------------
  # item_window=
  #--------------------------------------------------------------------------
  def item_window=(item_window)
    @item_window = item_window
    update
  end
  
end # Window_ItemCommand
 
#==============================================================================
# ■ Window_ItemType
#==============================================================================
 
class Window_ItemType < Window_Command
  
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_reader   :item_window
  
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y)
    deactivate
    @type = nil
  end
  
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width; return 160; end
  
  #--------------------------------------------------------------------------
  # visible_line_number
  #--------------------------------------------------------------------------
  def visible_line_number; return 4; end
  
  #--------------------------------------------------------------------------
  # reveal
  #--------------------------------------------------------------------------
  def reveal(type)
    @type = type
    refresh
    activate
    select(0)
  end
  
  #--------------------------------------------------------------------------
  # make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    return if @type.nil?
    #---
    case @type
    when :item
      commands = YEA::ITEM::ITEM_TYPES
    when :weapon
      commands = YEA::ITEM::WEAPON_TYPES
    else
      commands = YEA::ITEM::ARMOUR_TYPES
    end
    #---
    for command in commands
      case command[0]
      #---
      when :types
        case @type
        when :weapon
          for i in 1...$data_system.weapon_types.size
            name = $data_system.weapon_types[i]
            add_command(name, :w_type, true, i)
          end
        else
          for i in 1...$data_system.armor_types.size
            name = $data_system.armor_types[i]
            add_command(name, :a_type, true, i)
          end
        end
      #---
      when :slots
        if $imported["YEA-AceEquipEngine"]
          maximum = 1
          for key in YEA::EQUIP::TYPES
            maximum = [maximum, key[0]].max
          end
        else
          maximum = 4
        end
        for i in 1..maximum
          name = Vocab::etype(i)
          add_command(name, :e_type, true, i) if name != ""
        end
      #---
      else
        add_command(command[1], command[0], true, @type)
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active
    @item_window.category = current_symbol if @item_window
  end
  
  #--------------------------------------------------------------------------
  # item_window=
  #--------------------------------------------------------------------------
  def item_window=(item_window)
    @item_window = item_window
    update
  end
  
end # Window_ItemType
 
#==============================================================================
# ■ Window_ItemList
#==============================================================================
 
class Window_ItemList < Window_Selectable
  
  #--------------------------------------------------------------------------
  # alias method: initialize
  #--------------------------------------------------------------------------
  alias window_itemlist_initialize_aim initialize
  def initialize(dx, dy, dw, dh)
    window_itemlist_initialize_aim(dx, dy, dw, dh)
    @ext = :none
    @name = ""
  end
  
  #--------------------------------------------------------------------------
  # alias method: category=
  #--------------------------------------------------------------------------
  alias window_itemlist_category_aim category=
  def category=(category)
    if @types_window.nil?
      window_itemlist_category_aim(category)
    else
      return unless update_types?(category)
      @category = category
      if @types_window.active
        @name = @types_window.current_data[:name]
        @ext = @types_window.current_ext
      end
      refresh
      self.oy = 0
    end
  end
  
  #--------------------------------------------------------------------------
  # new method: update_types?
  #--------------------------------------------------------------------------
  def update_types?(category)
    return true if @category != category
    return false unless @types_window.active
    if category == :category
      return @name != @types_window.current_data[:name]
    end
    return @ext != @types_window.current_ext
  end
  
  #--------------------------------------------------------------------------
  # new method: types_window=
  #--------------------------------------------------------------------------
  def types_window=(window)
    @types_window = window
  end
  
  #--------------------------------------------------------------------------
  # alias method: include?
  #--------------------------------------------------------------------------
  alias window_itemlist_include_aim include?
  def include?(item)
    if @types_window.nil?
      return window_itemlist_include_aim(item)
    else
      return ace_item_menu_include?(item)
    end
  end
  
  #--------------------------------------------------------------------------
  # new method: ace_item_menu_include?
  #--------------------------------------------------------------------------
  def ace_item_menu_include?(item)
    case @category
    #---
    when :field
      return false unless item.is_a?(RPG::Item)
      return item.menu_ok?
    when :battle
      return false unless item.is_a?(RPG::Item)
      return item.battle_ok?
    #---
    when :w_type
      return false unless item.is_a?(RPG::Weapon)
      return item.wtype_id == @types_window.current_ext
    when :a_type
      return false unless item.is_a?(RPG::Armor)
      return item.atype_id == @types_window.current_ext
    when :e_type
      return false unless item.is_a?(RPG::Armor)
      return item.etype_id == @types_window.current_ext
    #---
    when :all
      case @types_window.current_ext
      when :item
        return item.is_a?(RPG::Item)
      when :weapon
        return item.is_a?(RPG::Weapon)
      else
        return item.is_a?(RPG::Armor)
      end
    #---
    when :category
      case @types_window.current_ext
      when :item
        return false unless item.is_a?(RPG::Item)
      when :weapon
        return false unless item.is_a?(RPG::Weapon)
      else
        return false unless item.is_a?(RPG::Armor)
      end
      return item.category.include?(@types_window.current_data[:name].upcase)
    #---
    else
      return window_itemlist_include_aim(item)
    end
  end
  
end # Window_ItemList
 
#==============================================================================
# ■ Window_ItemStatus
#==============================================================================
 
class Window_ItemStatus < Window_Base
  
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy, item_window)
    super(dx, dy, Graphics.width - dx, fitting_height(4))
    @item_window = item_window
    @item = nil
    refresh
  end
  
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    update_item(@item_window.item)
  end
  
  #--------------------------------------------------------------------------
  # update_item
  #--------------------------------------------------------------------------
  def update_item(item)
    return if @item == item
    @item = item
    refresh
  end
  
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    reset_font_settings
    return draw_empty if @item.nil?
    contents.font.size = YEA::ITEM::STATUS_FONT_SIZE
    draw_item_image
    draw_item_stats
    draw_item_effects
  end
  
  #--------------------------------------------------------------------------
  # draw_empty
  #--------------------------------------------------------------------------
  def draw_empty
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(1, 1, 94, 94)
    contents.fill_rect(rect, colour)
    dx = 96; dy = 0
    dw = (contents.width - 96) / 2
    for i in 0...8
      draw_background_box(dx, dy, dw)
      dx = dx >= 96 + dw ? 96 : 96 + dw
      dy += line_height if dx == 96
    end
  end
  
  #--------------------------------------------------------------------------
  # draw_background_box
  #--------------------------------------------------------------------------
  def draw_background_box(dx, dy, dw)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
  end
  
  #--------------------------------------------------------------------------
  # draw_item_image
  #--------------------------------------------------------------------------
  def draw_item_image
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(1, 1, 94, 94)
    contents.fill_rect(rect, colour)
    if @item.image.nil?
      icon_index = @item.icon_index
      bitmap = Cache.system("Iconset")
      rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
      target = Rect.new(0, 0, 96, 96)
      contents.stretch_blt(target, bitmap, rect)
    else
      bitmap = Cache.picture(@item.image)
      contents.blt(0, 0, bitmap, bitmap.rect, 255)
    end
  end
  
  #--------------------------------------------------------------------------
  # draw_item_stats
  #--------------------------------------------------------------------------
  def draw_item_stats
    return unless @item.is_a?(RPG::Weapon) || @item.is_a?(RPG::Armor)
    dx = 96; dy = 0
    dw = (contents.width - 96) / 2
    for i in 0...8
      draw_equip_param(i, dx, dy, dw)
      dx = dx >= 96 + dw ? 96 : 96 + dw
      dy += line_height if dx == 96
    end
  end
  
  #--------------------------------------------------------------------------
  # draw_equip_param
  #--------------------------------------------------------------------------
  def draw_equip_param(param_id, dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
    if $imported["YEA-EquipDynamicStats"]
      draw_percentage_param(param_id, dx, dy, dw)
    else
      draw_set_param(param_id, dx, dy, dw)
    end
  end
  
  #--------------------------------------------------------------------------
  # draw_percentage_param
  #--------------------------------------------------------------------------
  def draw_percentage_param(param_id, dx, dy, dw)
    if @item.per_params[param_id] != 0 && @item.params[param_id] != 0
      text = draw_set_param(param_id, dx, dy, dw)
      dw -= text_size(text).width
      draw_percent_param(param_id, dx, dy, dw)
    elsif @item.per_params[param_id] != 0 && @item.params[param_id] == 0
      draw_percent_param(param_id, dx, dy, dw)
    else
      draw_set_param(param_id, dx, dy, dw)
    end
  end
  
  #--------------------------------------------------------------------------
  # draw_set_param
  #--------------------------------------------------------------------------
  def draw_set_param(param_id, dx, dy, dw)
    value = @item.params[param_id]
    if $imported["YEA-EquipDynamicStats"] && @item.var_params[param_id] > 0
      value += $game_variables[@item.var_params[param_id]] rescue 0
    end
    change_color(param_change_color(value), value != 0)
    text = value.group
    text = "+" + text if value > 0
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
    return text
  end
  
  #--------------------------------------------------------------------------
  # draw_percent_param
  #--------------------------------------------------------------------------
  def draw_percent_param(param_id, dx, dy, dw)
    value = @item.per_params[param_id]
    change_color(param_change_color(value))
    text = (@item.per_params[param_id] * 100).to_i.group + "%"
    text = "+" + text if @item.per_params[param_id] > 0
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
    return text
  end
  
  #--------------------------------------------------------------------------
  # draw_item_effects
  #--------------------------------------------------------------------------
  def draw_item_effects
    return unless @item.is_a?(RPG::Item)
    dx = 96; dy = 0
    dw = (contents.width - 96) / 2
    draw_hp_recover(dx, dy + line_height * 0, dw)
    draw_mp_recover(dx, dy + line_height * 1, dw)
    draw_tp_recover(dx + dw, dy + line_height * 0, dw)
    draw_tp_gain(dx + dw, dy + line_height * 1, dw)
    dw = contents.width - 96
    draw_applies(dx, dy + line_height * 2, dw)
    draw_removes(dx, dy + line_height * 3, dw)
  end
  
  #--------------------------------------------------------------------------
  # draw_hp_recover
  #--------------------------------------------------------------------------
  def draw_hp_recover(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:hp_recover))
    per = 0
    set = 0
    for effect in @item.effects
      next unless effect.code == 11
      per += (effect.value1 * 100).to_i
      set += effect.value2.to_i
    end
    if per != 0 && set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
      draw_text(dx+4, dy, dw-8, line_height, text, 2)
      dw -= text_size(text).width
      change_color(param_change_color(per))
      text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
      draw_text(dx+4, dy, dw-8, line_height, text, 2)
      return
    elsif per != 0
      change_color(param_change_color(per))
      text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
    elsif set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
    else
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
    end
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  
  #--------------------------------------------------------------------------
  # draw_mp_recover
  #--------------------------------------------------------------------------
  def draw_mp_recover(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:mp_recover))
    per = 0
    set = 0
    for effect in @item.effects
      next unless effect.code == 12
      per += (effect.value1 * 100).to_i
      set += effect.value2.to_i
    end
    if per != 0 && set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
      draw_text(dx+4, dy, dw-8, line_height, text, 2)
      dw -= text_size(text).width
      change_color(param_change_color(per))
      text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
      draw_text(dx+4, dy, dw-8, line_height, text, 2)
      return
    elsif per != 0
      change_color(param_change_color(per))
      text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
    elsif set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
    else
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
    end
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  
  #--------------------------------------------------------------------------
  # draw_tp_recover
  #--------------------------------------------------------------------------
  def draw_tp_recover(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:tp_recover))
    set = 0
    for effect in @item.effects
      next unless effect.code == 13
      set += effect.value1.to_i
    end
    if set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
    else
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
    end
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  
  #--------------------------------------------------------------------------
  # draw_tp_gain
  #--------------------------------------------------------------------------
  def draw_tp_gain(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:tp_gain))
    set = @item.tp_gain
    if set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
    else
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
    end
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
  
  #--------------------------------------------------------------------------
  # draw_applies
  #--------------------------------------------------------------------------
  def draw_applies(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:applies))
    icons = []
    for effect in @item.effects
      case effect.code
      when 21
        next unless effect.value1 > 0
        next if $data_states[effect.value1].nil?
        icons.push($data_states[effect.data_id].icon_index)
      when 31
        icons.push($game_actors[1].buff_icon_index(1, effect.data_id))
      when 32
        icons.push($game_actors[1].buff_icon_index(-1, effect.data_id))
      end
      icons.delete(0)
      break if icons.size >= YEA::ITEM::MAX_ICONS_DRAWN
    end
    draw_icons(dx, dy, dw, icons)
  end
  
  #--------------------------------------------------------------------------
  # draw_removes
  #--------------------------------------------------------------------------
  def draw_removes(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:removes))
    icons = []
    for effect in @item.effects
      case effect.code
      when 22
        next unless effect.value1 > 0
        next if $data_states[effect.value1].nil?
        icons.push($data_states[effect.data_id].icon_index)
      when 33
        icons.push($game_actors[1].buff_icon_index(1, effect.data_id))
      when 34
        icons.push($game_actors[1].buff_icon_index(-1, effect.data_id))
      end
      icons.delete(0)
      break if icons.size >= YEA::ITEM::MAX_ICONS_DRAWN
    end
    draw_icons(dx, dy, dw, icons)
  end
  
  #--------------------------------------------------------------------------
  # draw_icons
  #--------------------------------------------------------------------------
  def draw_icons(dx, dy, dw, icons)
    dx += dw - 4
    dx -= icons.size * 24
    for icon_id in icons
      draw_icon(icon_id, dx, dy)
      dx += 24
    end
    if icons.size == 0
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
      draw_text(4, dy, contents.width-8, line_height, text, 2)
    end
  end
  
end # Window_ItemStatus
 
#==============================================================================
# ■ Scene_Item
#==============================================================================
 
class Scene_Item < Scene_ItemBase
  
  #--------------------------------------------------------------------------
  # alias method: start
  #--------------------------------------------------------------------------
  alias scene_item_start_aim start
  def start
    scene_item_start_aim
    create_types_window
    create_status_window
    relocate_windows
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: return_scene
  #--------------------------------------------------------------------------
  def return_scene
    $game_temp.scene_item_index = nil
    $game_temp.scene_item_oy = nil
    super
  end
  
  #--------------------------------------------------------------------------
  # overwrite method: create_category_window
  #--------------------------------------------------------------------------
  def create_category_window
    wy = @help_window.height
    @category_window = Window_ItemCommand.new(0, wy)
    @category_window.viewport = @viewport
    @category_window.help_window = @help_window
    @category_window.y = @help_window.height
    if !$game_temp.scene_item_index.nil?
      @category_window.select($game_temp.scene_item_index)
      @category_window.oy = $game_temp.scene_item_oy
    end
    $game_temp.scene_item_index = nil
    $game_temp.scene_item_oy = nil
    @category_window.set_handler(:ok, method(:on_category_ok))
    @category_window.set_handler(:cancel, method(:return_scene))
    @category_window.set_handler(:item, method(:open_types))
    @category_window.set_handler(:weapon, method(:open_types))
    @category_window.set_handler(:armor, method(:open_types))
    process_custom_item_commands
  end
  
  #--------------------------------------------------------------------------
  # new method: process_custom_item_commands
  #--------------------------------------------------------------------------
  def process_custom_item_commands
    for command in YEA::ITEM::COMMANDS
      next unless YEA::ITEM::CUSTOM_ITEM_COMMANDS.include?(command)
      called_method = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][3]
      @category_window.set_handler(command, method(called_method))
    end
  end
  
  #--------------------------------------------------------------------------
  # new method: create_types_window
  #--------------------------------------------------------------------------
  def create_types_window
    wy = @category_window.y
    @types_window = Window_ItemType.new(Graphics.width, wy)
    @types_window.viewport = @viewport
    @types_window.help_window = @help_window
    @types_window.y = @help_window.height
    @types_window.item_window = @item_window
    @item_window.types_window = @types_window
    @types_window.set_handler(:ok, method(:on_types_ok))
    @types_window.set_handler(:cancel, method(:on_types_cancel))
  end
  
  #--------------------------------------------------------------------------
  # new method: create_status_window
  #--------------------------------------------------------------------------
  def create_status_window
    wx = @category_window.width
    wy = @category_window.y
    @status_window = Window_ItemStatus.new(wx, wy, @item_window)
    @status_window.viewport = @viewport
  end
  
  #--------------------------------------------------------------------------
  # new method: relocate_windows
  #--------------------------------------------------------------------------
  def relocate_windows
    return unless $imported["YEA-AceMenuEngine"]
    case Menu.help_window_location
    when 0 # Top
      @help_window.y = 0
      @category_window.y = @help_window.height
      @item_window.y = @category_window.y + @category_window.height
    when 1 # Middle
      @category_window.y = 0
      @help_window.y = @category_window.height
      @item_window.y = @help_window.y + @help_window.height
    else # Bottom
      @category_window.y = 0
      @item_window.y = @category_window.height
      @help_window.y = @item_window.y + @item_window.height
    end
    @types_window.y = @category_window.y
    @status_window.y = @category_window.y
  end
  
  #--------------------------------------------------------------------------
  # new method: open_categories
  #--------------------------------------------------------------------------
  def open_types
    @category_window.x = Graphics.width
    @types_window.x = 0
    @types_window.reveal(@category_window.current_symbol)
  end
  
  #--------------------------------------------------------------------------
  # new method: on_types_ok
  #--------------------------------------------------------------------------
  def on_types_ok
    @item_window.activate
    @item_window.select_last
  end
  
  #--------------------------------------------------------------------------
  # new method: on_types_cancel
  #--------------------------------------------------------------------------
  def on_types_cancel
    @category_window.x = 0
    @category_window.activate
    @types_window.unselect
    @types_window.x = Graphics.width
  end
  
  #--------------------------------------------------------------------------
  # alias method: on_item_cancel
  #--------------------------------------------------------------------------
  alias scene_item_on_item_cancel_aim on_item_cancel
  def on_item_cancel
    if @types_window.x <= 0
      @item_window.unselect
      @types_window.activate
    else
      scene_item_on_item_cancel_aim
    end
  end
  
  #--------------------------------------------------------------------------
  # new method: command_totori
  #--------------------------------------------------------------------------
  def command_totori
    SceneManager.call(Scene_Alchemy)
  end
  
  #--------------------------------------------------------------------------
  # new method: command_name1
  #--------------------------------------------------------------------------
  def command_name1
    # Do nothing.
  end
  
  #--------------------------------------------------------------------------
  # new method: command_name2
  #--------------------------------------------------------------------------
  def command_name2
    # Do nothing.
  end
  
end # Scene_Item
 
#==============================================================================
# 
# ▼ End of File
# 
#==============================================================================




Mais voilà, je voulais ajouter à mon jeu un bestiaire, avec une commande d'ouverture depuis le menu objet.
J'ai opté pour le script de MOG que je post juste après (taille du post oblige :flaco)

La ligne 126 du script de yanfly permet a priori d'ajouter ce genre de commande :

Portion de code : Tout sélectionner

1
:custom1 => [ "Custom Name",            0,          0, :command_name1],



J'ai essayer d'utiliser la commande manuelle :bestiary, method(:Monster_Book), mais ce n'est pas comme ceci qu'il faut procéder. Comment bien utiliser la compatibilité entre ce deux scripts?

Merci d'avance aux héros qui m'aideront :biere

Posté dans Forum - [VX Ace] VX Ace - Sp1

Ryukko - posté le 10/04/2013 à 10:21:25. (30 messages postés)

Domaine concerné: Script
Logiciel utilisé: VX Ace
Bonjour, je retrouve très souvent ce script dans les démos, mais je ne sais pas à quoi il sert:

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
#==============================================================================
# ■ VXAce_SP1
#------------------------------------------------------------------------------
#  プリセットスクリプトの不具合を修正します。ユーザー定義のスクリプト素材は、
# 原則としてこのセクションより下に配置してください。
#==============================================================================
 
#------------------------------------------------------------------------------
# 【修正内容】
#------------------------------------------------------------------------------
# ●イベントコマンド[ステートの変更]にて、同じステートの付加と解除を同時に実
#   行した際、二回目以降の付加が失敗する不具合を修正しました。
# ●イベントコマンド[アニメーションの表示]にて、表示中のアニメーションがマッ
#   プのスクロールに同期しない不具合を修正しました。
# ●自動戦闘の行動が正常に選択されない不具合を修正しました。
# ●装備できなくなった装備品が外れたことにより、さらに別の装備品が装備できなく
#   なったとき、その装備品が増殖してしまう不具合を修正しました。
# ●イベントコマンド[ピクチャの消去]を実行した後に余分な負荷がかかる不具合を
#   修正しました。
# ●移動ルートのオプション[移動できない場合は飛ばす]にチェックを入れた状態で
#   トリガー[プレイヤーから接触]のイベントに接触すると、イベントが実行中であ
#   っても起動予約がされてしまう不具合を修正しました。
# ●魔法反射されたスキルに対してステート有効度が反映されない不具合を修正しまし
#  た。
# ●フォントのデフォルト設定にて太字または斜体を有効にしていても、ステータス画
#   面を切り替えたとき等に無効な状態に戻ってしまう不具合を修正しました。
#------------------------------------------------------------------------------
class Game_Battler
  attr_accessor :magic_reflection
  #--------------------------------------------------------------------------
  # ● 敵対関係の判定
  #--------------------------------------------------------------------------
  alias vxace_sp1_opposite? opposite?
  def opposite?(battler)
    vxace_sp1_opposite?(battler) || battler.magic_reflection
  end
end
#------------------------------------------------------------------------------
class Game_Actor
  #--------------------------------------------------------------------------
  # ● 装備できない装備品を外す
  #     item_gain : 外した装備品をパーティに戻す
  #--------------------------------------------------------------------------
  alias vxace_sp1_release_unequippable_items release_unequippable_items
  def release_unequippable_items(item_gain = true)
    loop do
      last_equips = equips.dup
      vxace_sp1_release_unequippable_items(item_gain)
      return if equips == last_equips
    end
  end
  #--------------------------------------------------------------------------
  # ● 自動戦闘時の戦闘行動を作成
  #--------------------------------------------------------------------------
  def make_auto_battle_actions
    @actions.size.times do |i|
      @actions[i] = make_action_list.max_by {|action| action.value }
    end
  end
end
#------------------------------------------------------------------------------
class Game_Player
  #--------------------------------------------------------------------------
  # ● マップイベントの起動
  #     triggers : トリガーの配列
  #     normal   : プライオリティ[通常キャラと同じ]かそれ以外か
  #--------------------------------------------------------------------------
  alias vxace_sp1_start_map_event start_map_event
  def start_map_event(x, y, triggers, normal)
    return if $game_map.interpreter.running?
    vxace_sp1_start_map_event(x, y, triggers, normal)
  end
end
#------------------------------------------------------------------------------
class Game_Picture
  #--------------------------------------------------------------------------
  # ● ピクチャの消去
  #--------------------------------------------------------------------------
  alias vxace_sp1_erase erase
  def erase
    vxace_sp1_erase
    @origin = 0
  end
end
#------------------------------------------------------------------------------
class Game_Interpreter
  #--------------------------------------------------------------------------
  # ● ステートの変更
  #--------------------------------------------------------------------------
  alias vxace_sp1_command_313 command_313
  def command_313
    vxace_sp1_command_313
    $game_party.clear_results
  end
end
#------------------------------------------------------------------------------
class Sprite_Character
  #--------------------------------------------------------------------------
  # ● 位置の更新
  #--------------------------------------------------------------------------
  alias vxace_sp1_update_position update_position
  def update_position
    move_animation(@character.screen_x - x, @character.screen_y - y)
    vxace_sp1_update_position
  end
  #--------------------------------------------------------------------------
  # ● アニメーションの移動
  #--------------------------------------------------------------------------
  def move_animation(dx, dy)
    if @animation && @animation.position != 3
      @ani_ox += dx
      @ani_oy += dy
      @ani_sprites.each do |sprite|
        sprite.x += dx
        sprite.y += dy
      end
    end
  end
end
#------------------------------------------------------------------------------
class Sprite_Picture
  #--------------------------------------------------------------------------
  # ● 転送元ビットマップの更新
  #--------------------------------------------------------------------------
  alias vxace_sp1_update_bitmap update_bitmap
  def update_bitmap
    if @picture.name.empty?
      self.bitmap = nil
    else
      vxace_sp1_update_bitmap
    end
  end
end
#------------------------------------------------------------------------------
class Window_Base
  #--------------------------------------------------------------------------
  # ● フォント設定のリセット
  #--------------------------------------------------------------------------
  alias vxace_sp1_reset_font_settings reset_font_settings
  def reset_font_settings
    vxace_sp1_reset_font_settings
    contents.font.bold = Font.default_bold
    contents.font.italic = Font.default_italic
  end
end
#------------------------------------------------------------------------------
class Scene_Battle
  #--------------------------------------------------------------------------
  # ● 魔法反射の発動
  #--------------------------------------------------------------------------
  alias vxace_sp1_invoke_magic_reflection invoke_magic_reflection
  def invoke_magic_reflection(target, item)
    @subject.magic_reflection = true
    vxace_sp1_invoke_magic_reflection(target, item)
    @subject.magic_reflection = false
  end
end




Quelqu'un peut-il m'aiguiller?
Merci :oO

Posté dans Forum - [VX Ace] Script incompatible avec une résolution modifiée

Ryukko - posté le 24/03/2013 à 17:58:42. (30 messages postés)

C'est le sensei qui a juste!

Estheone tu es programmeur ? C'est ton métier!
En tout cas bien vu! Le problème c'était exactement ça!

@+ les mecs
Merci! Un post de résolu

Posté dans Forum - [VX Ace] Script incompatible avec une résolution modifiée

Ryukko - posté le 24/03/2013 à 12:14:12. (30 messages postés)

Estheone : il y a une démo avec le script, avec le lien que j'ai donné,
et en ajoutant Ace core Engine de Yanfly (après avoir mis la résolution de 640*480) sur un nouveau projet, j'ai de nouveau ce problème! C'est drôle que tu ne le vois pas...

Ace Core Engine
http://yanflychannel.wordpress.com/rmvxa/core-scripts/ace-core-engine/

Demo+script POPups de GALV
http://galveraxe.wordpress.com/galvs-event-pop-ups/

Cela décale les POPups par rapport à la résolution de base!
En effet un petit screen sera mieux, je ne suis pas chez moi avant ce soir, je le fais suivre pour être plus clair dans mes demandes dès que possible!

Rq : J'ai modifié les lignes 52, 146, et 223 du script de GALV, et ainsi j'ai pu ajuster les POPups, seulement dès que le héros est sur une carte de taille plus grande, les POPups sont de nouveau en décalage... J'essaie en arrivant chez moi ce que tu proposes Arttroy!

Enfin, je suis carrément motivé pour apprendre le RGSS3, en essayant de traduire et de comprendre certains scripts, ça va déjà un peu mieux, mais mes connaissances sont plus que limitées

Merci à vous 2 d'être toujours au rendez vous!:plusun

Posté dans Forum - [VX Ace] Script incompatible avec une résolution modifiée

Ryukko - posté le 24/03/2013 à 10:16:16. (30 messages postés)

Domaine concerné: Script
Logiciel utilisé: VX Ace
Bonjour, (on va se dire encore lui?!!)

Et bien oui, c'est encore moi :joint

J'ai trouvé un script pour afficher des popups d’évents, voici le lien du script :

http://galveraxe.wordpress.com/galvs-event-pop-ups/

Seulement j'utilise, comme beaucoup avec VX Ace je pense, un autre script (pour le coup celui de YANFLY Ace core engine) pour modifier entre autres la résolution du jeu. Du cou, j'ai 640*480!

Seulement voilà, le script de GALV, n'est pas compatible avec cette résolution et décale tous les POPups, j'ai tenté de modifier Y_OFFSET et X_OFFSET, mais je n'arrive pas à revenir à un résultat convenable!

J'ai besoin à nouveau de vos talents !!
Merci

Posté dans Forum - [VX Ace] Problème de modification de script

Ryukko - posté le 21/03/2013 à 09:30:53. (30 messages postés)

Je viens de tester.... et cela fonctionne à merveille !!! Merci une fois de plus! Merci à toi aussi arttroy pour m'avoir aider.

Concrètement ce petit update, à quoi sert-il, pourquoi règle t-il ce problème?

PS : Trop Bien !!:sonic

Posté dans Forum - [VX Ace] Problème de modification de script

Ryukko - posté le 19/03/2013 à 19:53:49. (30 messages postés)

Salut attroy!

J'ai modifié ainsi mon script, mais l'effet réalisé n'est pas le bon!
Tout le menu met du temps à s'éteindre, comme un lag du jeu.

Une autre idée parfois?

:ange

Posté dans Forum - [VX Ace] Problème de modification de script

Ryukko - posté le 19/03/2013 à 13:23:01. (30 messages postés)

Domaine concerné: Script
Logiciel utilisé: VX Ace
Salut!

Je suis en train de modifier à mon gout un script, ajoutant une fonction de temps que j'ai trouvé sur un site!

http://www.forum-lepalaisdumaking.com/t1861-vx-ace9734script-calendrier9734

(lien du script)

Ce script ajoute une fenêtre dans le menu, et une autre (pouvant être commandée par un interrupteur) sur la map directement. Seulement, d'où mon problème, autres que les nombreuses fautes d'orthographes de l'auteur, est que lorsque l'on quitte le menu, la fenêtre calendrier s'affiche 1/2 secondes avant de disparaître. (bien que l'interrupteur soit en position OFF)

Je voudrai alors, soit faire en sorte qu'elle ne s'affiche pas du tout si l'interrupteur ne l'active pas, soit par défaut, qu'elle s'affiche 3-4 secondes avant de disparaitre lorsque l'on quitte le menu principal.

Merci pour votre aide.
:biere

Posté dans Forum - [VX Ace] Localisation dans le menu

Ryukko - posté le 15/03/2013 à 14:10:14. (30 messages postés)

Salut arttroy! tu as raison pour le 120, mais le 24 c'est la hauteur de ce cadre fictif!

As-tu une idée de ce qu'il faut modifier, le jour où l'on désire insérer le nom de la map affiché sur la map et non le nom de la map (écrit dans les propriétés de la map)? (belle phrase :rit2)

Posté dans Forum - [VX Ace] Localisation dans le menu

Ryukko - posté le 15/03/2013 à 11:22:29. (30 messages postés)

Super Estheone!!

Sérieux faut que je me mette à scripter, vous me faites trop rêver ^^.
Par où commencer d'ailleurs, il y a de tout sur le net!?

J'ai modifié un petit truc pour que l'affichage se fasse au dessus de la fenêtre d'affichage du temps!

def start
super
create_command_window
create_gold_window
create_playtime_window # ajout de la fenêtre temps
create_map_name_window
create_status_window


et

@map_name_window.y = Graphics.height - @gold_window.height - @playtime_window.height - @map_name_window.height

Ça à l'air de fonctionner, ce n'est pas une erreur?

Dernière question, dans ;

self.contents.draw_text(4, 0, 120, 24, "Lieu :")


4 : position en x de "lieu"
0 : position en y de "lieu"
120 : ?
24 : ?
je pensais qu'il s'agissait de l'opacité et de la taille de la police, mais cela change autre chose il me semble.

Merci beaucoup une fois de plus!

Posté dans Forum - [VX Ace] Localisation dans le menu

Ryukko - posté le 14/03/2013 à 18:26:14. (30 messages postés)

Il s'agit du script Mog Basic Menu Plus V 1.0 By Moghunter revu par Berka.

http://rpgmakerspeciality.forumgratuit.fr/t161-mog-basic-menu-plus

Il affiche aussi le temps, mais je n'aurai besoin que de la localisation

Merci pour ton aide précieuse

Posté dans Forum - [VX Ace] Localisation dans le menu

Ryukko - posté le 14/03/2013 à 15:58:54. (30 messages postés)

Domaine concerné: script
Logiciel utilisé: VX Ace
Salut!!

J'en suis toujours à la personnalisation de mes menus de jeu.

Je désire ajouter la localisation du héros lorsqu'il ouvre le menu, au dessus de l'affichage du temps passé en jeu.
J'ai trouvé un script qui permet de la faire pour VX mais n'est pas compatible avec ACE.

Quelqu'un connait il un script pour faire ceci sous ACE, où adapte t-on facilement un script de VX à ACE avec des bases? (pas tout à fait le même langage RGSS 2 et 3 pour les versions respectives de VX et VX Ace)

Merci pour vos aides les amis!

Posté dans Scripts - Window Steps 1.1f

Ryukko - posté le 11/03/2013 à 23:44:27. (30 messages postés)

Ce script aurait été vraiment sympa s'il laissait au joueur la possibilité de remettre à zéro le nombre de pas quand il le souhaite.

On pourrait alors lui dire pour creuser, faite deux pas à droite, 6 pas à gauche ...
Cela l'aiderai dans ses comptes.

Mais c'est vrai que pour les pokemons c'est déjà cool ^^

Posté dans Forum - [VX Ace] Changer l'animation combat

Ryukko - posté le 11/03/2013 à 23:07:07. (30 messages postés)

Simple curiosité, j'ai remarqué que tu avais rajouté dans la modif de scene_map

Graphics.transition(60, name, 100)

A quoi correspond cette ligne?

Posté dans Scripts - Multi-panorama

Ryukko - posté le 11/03/2013 à 00:22:04. (30 messages postés)

Ce script n'a pas l'air de fonctionner pou VX Ace! Ou dis-je une grosse con... bétise?!

Posté dans Forum - [VX Ace] Changer l'animation combat

Ryukko - posté le 10/03/2013 à 16:56:28. (30 messages postés)

Trop bien les gars! Merci pour vos réponses!!

Posté dans Forum - [VX Ace] Changer l'animation combat

Ryukko - posté le 09/03/2013 à 14:42:28. (30 messages postés)

Merci beaucoup cela fonctionne! Sais-tu quel script appelle cette image? On doit pouvoir réaliser un système aléatoire dans le choix de l'animation, non?

Posté dans Forum - [VX Ace] Changer l'animation combat

Ryukko - posté le 09/03/2013 à 12:52:43. (30 messages postés)

Domaine concerné: animation
Logiciel utilisé: VX Ace
Bonjour,

Peut-on modifier l'animation qui se lance pour entrer en combat.

J'ai beau chercher je ne trouve pas, pourtant çà ressemble à un truc simple à faire.

Merci du coup de pouce

Posté dans Forum - [VX Ace] Créer un combat didacticiel au début d'un jeu

Ryukko - posté le 06/03/2013 à 17:11:50. (30 messages postés)

Je vais essayer de me débrouiller avec les events en combat! Je repost quand j'avance un peu, faut dire que je débute tout juste avec RPG maker! merci pour ta participation.

Posté dans Forum - [VX Ace] Créer un combat didacticiel au début d'un jeu

Ryukko - posté le 06/03/2013 à 10:50:00. (30 messages postés)

Domaine concerné: Evenement
Logiciel utilisé: VX Ace
Bien le bonjour à tous!

M'étant lancé dans la création d'un petit RPG (comme beaucoup sur ce site), je rencontre un petit défi, quant à l'élaboration d'un évènement.

En effet, comme le titre l'avance, j'aimerai créer un combat (le premier) qui expliquera au joueur le fonctionnement de toutes les commandes de base en combat. Vous savez, la plupart des jeux mettent en scène lors du premier combat une simulation de combat, et lors du jeu quand une nouvelle commande apparaît aussi.

Quelqu'un a t-il la solution pour me venir en aide?
A priori le sujet n'a pas été traité dans le passé sur ce site.

Merci

Posté dans Tutoriels - Faire une carte en panorama

Ryukko - posté le 15/01/2013 à 18:49:58. (30 messages postés)

Salut! Au top ce tuto comme toujours!

Je suis avec VX Ace, et j'ai une question qui vous paraîtra certainement idiote, mais si l'on veut dans un jeu entier mélanger ce type de mapping et le mapping classique, y a t-il une solution autre que de supprimer

Ligne 14 : create_tilemap
Ligne 108 :dispose_tilemap
Ligne 175 : update_tilemap

Par l'intermédiaire d'un script ou autre...
Car bien évidemment, il est difficile de faire les choses correctement sans voir les tilesets de blocage.

Merci pour vos futures réponses!!

Posté dans Scripts - Option_Offgame

Ryukko - posté le 11/01/2013 à 11:16:23. (30 messages postés)

Hey Tata!

Je viens d'integrer ton script dans mon jeu! Merci

J'ai un soucis d'affichage avec les differentes polices d'écriture, a savoir dans le menu la monnaie apparait un petit carré, ainsi que les numeros des ennemis dans les combats.

Ex : Meduse"Carré" a la place de Meduse A

Que puis-je faire pour m'en sortir (je suis sur Ace)
Merci

Posté dans Scripts - Battle Pop Up

Ryukko - posté le 11/01/2013 à 00:15:13. (30 messages postés)

Salut!

Super ces tutos!

Est-ce normal que lorsque les domages sont supérieurs à 100, le pop up soit erroné et se stop a 100?

Peut-on y remedier, je suis quelque peu novice en la matière ^^

Posté dans Tutoriels - [Script] A-RPG basique avec des script (VX Ace)

Ryukko - posté le 10/01/2013 à 12:39:22. (30 messages postés)

Salut! Salut!

Je fais mes débuts avec RPG Maker (je suis sur VX Ace), et merci pour ces tutos!

J'ai un soucis avec celui-ci car quand je lance le jeu après avoir tout bien fait comme il le fallait, j'obtiens un message d'erreur dans le script ABS Config

ligne 252 : Syntaxe error occurred

unexpected tEQ
if chiffre<i> == 0

Que puis-je faire pour arranger ceci?
Merci

Aller à la page: 1

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