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
| #==============================================================================
#
# ▼ Yami Engine Symphony - Add-on: 8D/Kaduki Battlers
# -- Last Updated: 2013.02.01
# -- Level: Nothing
# -- Requires: n/a
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["BattleSymphony-8D"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2013.02.01 - Adjust for Symphony v1.13.
# 2012.10.20 - Finished Script.
# 2012.07.01 - Started Script.
#
#==============================================================================
# ▼ 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.
# Remember to put this script under Battle Symphony.
#
#==============================================================================
# Down Down Left Down Dash Down Left Dash
# Left Upper Left Left Dash Upper Left Dash
# Right Down Right Right Dash Down Right Dash
# Up Upper Right Up Dash Up Right Dash
#
# Ready/Idle Victory Pose 2H Swing
# Damage Evade/Dodge 1H Swing
# Dazed/Critical Dead 1-3 Cast/Use Item
# Marching Downed/Fallen Channeling
#==============================================================================
$imported = {} if $imported.nil?
$imported["BattleSymphony-8D"] = true
#==============================================================================
# ■ Direction - Advanced Configuration
#==============================================================================
module Direction
#--------------------------------------------------------------------------
# self.index_8d
#--------------------------------------------------------------------------
def self.index_8d(pose)
case pose
# array = [index, direction, frames]
# frames is optional, default is 15
when :down
array = [0, 2]
when :left
array = [0, 4]
when :right
array = [0, 6]
when :up
array = [0, 8]
#---
when :down_l
array = [1, 2]
when :up_l
array = [1, 4]
when :down_r
array = [1, 6]
when :up_l
array = [1, 8]
#---
when :down_d
array = [2, 2]
when :left_d
array = [2, 4]
when :right_d
array = [2, 6]
when :up_d
array = [2, 8]
#---
when :down_l_d
array = [3, 2]
when :up_l_d
array = [3, 4]
when :down_r_d
array = [3, 6]
when :up_l_d
array = [3, 8]
#--- Pose Creation ---
when :ready
array = [4, 2, 12]
when :damage
array = [4, 4, 10]
when :critical
array = [4, 6, 12]
when :marching
array = [4, 8, 12]
#---
when :victory
array = [5, 2]
when :dodge
array = [5, 4, 5]
when :dead
array = [5, 6]
when :fallen
array = [5, 8]
#---
when :swing2h
array = [6, 2, 6]
when :r2hswing
array = [6, 2, 6]
when :swing1h
array = [6, 4, 6]
when :r1hswing
array = [6, 4, 6]
when :cast
array = [6, 6, 6]
when :channeling
array = [6, 8, 8]
else; array = [4, 2]
end
return array
end
#--------------------------------------------------------------------------
# self.auto_pose
#--------------------------------------------------------------------------
def self.auto_pose(battler)
return :fallen if battler.dead?
return :critical if battler.hp < battler.mhp / 4
return :move if [7, 9, 1, 3].include?(SYMPHONY::View::PARTY_DIRECTION)
return :ready
end
end # Direction
#==============================================================================
# ■ BattleManager
#==============================================================================
module BattleManager
#--------------------------------------------------------------------------
# alias method: process_victory
#--------------------------------------------------------------------------
class <<self; alias bes_8d_process_victory process_victory; end
def self.process_victory
$game_party.alive_members.each { |battler| battler.force_pose_8d(:victory) }
return bes_8d_process_victory
end
#--------------------------------------------------------------------------
# alias method: process_defeat
#--------------------------------------------------------------------------
class <<self; alias bes_8d_process_defeat process_defeat; end
def self.process_defeat
$game_troop.alive_members.each { |battler| battler.force_pose_8d(:victory) }
return bes_8d_process_defeat
end
end # BattleManager
#==============================================================================
# ■ Game_Battler
#==============================================================================
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# new method: use_8d?
#--------------------------------------------------------------------------
def use_8d?
return @character_name =~ /(_8D)/i if use_charset?
end
#--------------------------------------------------------------------------
# alias method: set_default_position
#--------------------------------------------------------------------------
alias bes_8d_set_default_position set_default_position
def set_default_position
bes_8d_set_default_position
set_8d_default_position if self.use_8d?
end
#--------------------------------------------------------------------------
# new method: set_8d_default_position
#--------------------------------------------------------------------------
def set_8d_default_position
self.pose = Direction.auto_pose(self)
end
#--------------------------------------------------------------------------
# alias method: break_pose
#--------------------------------------------------------------------------
alias bes_8d_break_pose break_pose
def break_pose
bes_8d_break_pose
break_pose_8d if self.use_8d?
end
#--------------------------------------------------------------------------
# new method: break_pose_8d
#--------------------------------------------------------------------------
def break_pose_8d
@pose = Direction.auto_pose(self)
#---
return unless SceneManager.scene.spriteset
return unless self.sprite
@direction = SYMPHONY::View::PARTY_DIRECTION
@direction = Direction.opposite(@direction) if self.enemy?
self.sprite.mirror = [9, 6, 3].include?(@direction)
#@direction = Direction.opposite(@direction) if self.sprite.mirror
end
#--------------------------------------------------------------------------
# new method: force_pose_8d
#--------------------------------------------------------------------------
def force_pose_8d(pose, reverse = false)
return unless self.use_8d?
return unless self.exist?
#---
self.break_pose
self.pose = pose
@reverse_pose = reverse
@force_pose = true
end
end # Game_Battler
#==============================================================================
# ■ Sprite_Battler
#==============================================================================
class Sprite_Battler < Sprite_Base
#--------------------------------------------------------------------------
# alias method: correct_change_pose
#--------------------------------------------------------------------------
alias bes_8d_correct_change_pose correct_change_pose
def correct_change_pose
bes_8d_correct_change_pose unless @battler.use_8d?
correct_change_pose_8d if @battler.use_8d?
end
#--------------------------------------------------------------------------
# new method: correct_change_pose_8d
#--------------------------------------------------------------------------
def correct_change_pose_8d
array = Direction.index_8d(pose)
@pattern = array[0] > 3 ? (@battler.reverse_pose ? 2 : 0) : 1
@timer = array[2].nil? ? 15 : array[2]
@back_step = false
@last_pose = pose
end
end # Sprite_Battler
#===============================================================================
#
# END OF FILE
#
#===============================================================================
Holders Battlers
#==============================================================================
#
# ▼ Yami Engine Symphony - Add-on: Holder Battlers
# -- Last Updated: 2013.02.01
# -- Level: Nothing
# -- Requires: n/a
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["BattleSymphony-HB"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2013.02.01 - Adjust for Symphony v1.13.
# 2012.10.20 - Finished Script.
# 2012.07.01 - Started Script.
#
#==============================================================================
# ▼ 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.
# Remember to put this script under Battle Symphony.
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["BattleSymphony-HB"] = true
#==============================================================================
# ■ Direction - Advanced Configuration
#==============================================================================
module Direction
#--------------------------------------------------------------------------
# self.index_hb
#--------------------------------------------------------------------------
def self.index_hb(pose)
case pose
# array = [row, frames]
# frames is optional, default is 15
when :idle
array = [0, 12]
when :struck
array = [3, 10]
when :woozy
array = [2, 12]
#---
when :victory
array = [10]
when :defend
array = [1, 5]
when :dead
array = [12]
#---
when :attack
array = [4, 4]
when :skill
array = [6, 6]
when :magic
array = [7, 6]
when :item
array = [5, 6]
#---
when :advance
array = [8, 5]
when :retreat
array = [9, 5]
else; array = [0, 12]
end
return array
end
#--------------------------------------------------------------------------
# self.auto_pose_hb
#--------------------------------------------------------------------------
def self.auto_pose_hb(battler)
return :dead if battler.dead?
return :woozy if battler.hp < battler.mhp / 4
return :idle
end
end # Direction
#==============================================================================
# ■ BattleManager
#==============================================================================
module BattleManager
#--------------------------------------------------------------------------
# alias method: process_victory
#--------------------------------------------------------------------------
class <<self; alias bes_hb_process_victory process_victory; end
def self.process_victory
$game_party.alive_members.each { |battler| battler.force_pose_hb(:victory) }
return bes_hb_process_victory
end
#--------------------------------------------------------------------------
# alias method: process_defeat
#--------------------------------------------------------------------------
class <<self; alias bes_hb_process_defeat process_defeat; end
def self.process_defeat
$game_troop.alive_members.each { |battler| battler.force_pose_hb(:victory) }
return bes_hb_process_defeat
end
end # BattleManager
#==============================================================================
# ■ Regular Expression
#==============================================================================
module REGEXP
module SYMPHONY
HOLDERS_BATTLER = /<(?:HOLDERS_BATTLER|holders battler):[ ]*(.*)>/i
end
end
#==============================================================================
# ■ DataManager
#==============================================================================
module DataManager
#--------------------------------------------------------------------------
# alias method: load_database
#--------------------------------------------------------------------------
class <<self; alias load_database_bes_hb load_database; end
def self.load_database
load_database_bes_hb
load_notetags_bes_hb
end
#--------------------------------------------------------------------------
# new method: load_notetags_bes_hb
#--------------------------------------------------------------------------
def self.load_notetags_bes_hb
groups = [$data_actors, $data_enemies]
groups.each { |group|
group.each { |obj|
next if obj.nil?
obj.battle_symphony_holders_battler
}
}
end
end # DataManager
#==============================================================================
# ■ RPG::BaseItem
#==============================================================================
class RPG::BaseItem
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :holders_name
#--------------------------------------------------------------------------
# new method: battle_symphony_holders_battler
#--------------------------------------------------------------------------
def battle_symphony_holders_battler
self.note.split(/[\r\n]+/).each { |line|
case line
when REGEXP::SYMPHONY::HOLDERS_BATTLER
@holders_name = $1.to_s
end
}
end
end # RPG::BaseItem
#==============================================================================
# ■ Game_Battler
#==============================================================================
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# new method: use_hb?
#--------------------------------------------------------------------------
def use_hb?
self.actor? ? !actor.holders_name.nil? : !enemy.holders_name.nil?
end
#--------------------------------------------------------------------------
# new method: holders_name
#--------------------------------------------------------------------------
def holders_name
self.actor? ? actor.holders_name : enemy.holders_name
end
#--------------------------------------------------------------------------
# alias method: set_default_position
#--------------------------------------------------------------------------
alias bes_hb_set_default_position set_default_position
def set_default_position
bes_hb_set_default_position
set_hb_default_position if self.use_hb?
end
#--------------------------------------------------------------------------
# new method: set_8d_default_position
#--------------------------------------------------------------------------
def set_hb_default_position
self.pose = Direction.auto_pose_hb(self)
end
#--------------------------------------------------------------------------
# alias method: break_pose
#--------------------------------------------------------------------------
alias bes_hb_break_pose break_pose
def break_pose
bes_hb_break_pose
break_pose_hb if self.use_hb?
end
#--------------------------------------------------------------------------
# new method: break_pose_hb
#--------------------------------------------------------------------------
def break_pose_hb
@pose = Direction.auto_pose_hb(self)
#---
return unless SceneManager.scene.spriteset
return unless self.sprite
@direction = SYMPHONY::View::PARTY_DIRECTION
@direction = Direction.opposite(@direction) if self.enemy?
self.sprite.mirror = [9, 6, 3].include?(@direction)
#@direction = Direction.opposite(@direction) if self.sprite.mirror
end
#--------------------------------------------------------------------------
# new method: force_pose_hb
#--------------------------------------------------------------------------
def force_pose_hb(pose)
return unless self.use_hb?
return unless self.exist?
#---
self.break_pose
self.pose = pose
@force_pose = true
end
end # Game_Battler
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# alias method: use_charset?
#--------------------------------------------------------------------------
alias bes_hb_use_charset? use_charset?
def use_charset?
return false if use_hb?
return bes_hb_use_charset?
end
end # Game_Actor
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# alias method: use_charset?
#--------------------------------------------------------------------------
alias bes_hb_use_charset? use_charset?
def use_charset?
return false if use_hb?
return bes_hb_use_charset?
end
end # Game_Enemy
#==============================================================================
# ■ Sprite_Battler
#==============================================================================
class Sprite_Battler < Sprite_Base
#--------------------------------------------------------------------------
# alias method: update_bitmap
#--------------------------------------------------------------------------
alias bes_hb_update_bitmap update_bitmap
def update_bitmap
correct_change_pose if @timer.nil?
@battler.use_hb? ? update_hbset : bes_hb_update_bitmap
end
#--------------------------------------------------------------------------
# alias method: update_origin
#--------------------------------------------------------------------------
alias bes_hb_update_origin update_origin
def update_origin
bes_hb_update_origin
update_origin_hb if @battler.use_hb?
end
#--------------------------------------------------------------------------
# new method: update_charset
#--------------------------------------------------------------------------
def update_hbset
@battler.set_default_position unless pose
#---
update_hbset_bitmap
update_src_rect
end
#--------------------------------------------------------------------------
# alias method: correct_change_pose
#--------------------------------------------------------------------------
alias bes_hb_correct_change_pose correct_change_pose
def correct_change_pose
bes_hb_correct_change_pose unless @battler.use_hb?
correct_change_pose_hb if @battler.use_hb?
end
#--------------------------------------------------------------------------
# new method: correct_change_pose_hb
#--------------------------------------------------------------------------
def correct_change_pose_hb
array = Direction.index_hb(pose)
@pattern = @battler.reverse_pose ? 3 : 0
@timer = array[1].nil? ? 15 : array[1]
@last_pose = pose
@back_step = false
end
#--------------------------------------------------------------------------
# new method: update_charset_origin
#--------------------------------------------------------------------------
def update_origin_hb
if bitmap
self.ox = @cw / 2
self.oy = @ch
end
end
#--------------------------------------------------------------------------
# new method: hb_graphic_changed?
#--------------------------------------------------------------------------
def hb_graphic_changed?
self.bitmap.nil? || @character_name != @battler.holders_name
end
#--------------------------------------------------------------------------
# alias method: set_character_bitmap
#--------------------------------------------------------------------------
alias bes_hb_set_character_bitmap set_character_bitmap
def set_character_bitmap
bes_hb_set_character_bitmap unless @battler.use_hb?
return unless @battler.use_hb?
self.bitmap = Cache.character(@character_name)
@cw = bitmap.width / 4
@ch = bitmap.height / 14
end
#--------------------------------------------------------------------------
# new method: update_hbset_bitmap
#--------------------------------------------------------------------------
def update_hbset_bitmap
if hb_graphic_changed?
@character_name = @battler.holders_name
set_character_bitmap
end
end
#--------------------------------------------------------------------------
# alias method: update_src_rect
#--------------------------------------------------------------------------
alias bes_hb_update_src_rect update_src_rect
def update_src_rect
bes_hb_update_src_rect unless @battler.use_hb?
return unless @battler.use_hb?
@timer -= 1
if @battler.force_pose
if @timer <= 0 && @pattern < 3
array = []
array = Direction.index_hb(pose)
@pattern += 1
@timer = array[1].nil? ? 15 : array[1]
end
else
if @timer <= 0
@pattern += 1
@pattern = 0 if @pattern > 3
@timer = 15
end
end
#---
line_no = Direction.index_hb(pose)[0]
sx = @pattern * @cw
sy = line_no * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
end # Sprite_Battler
#===============================================================================
#
# END OF FILE
#
#=============================================================================== |