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
| #==============================================================================
#
# ▼ Yanfly Engine Ace - Ace Core Engine v1.09
# -- Last Updated: 2012.02.19
# -- Level: Easy, Normal
# -- Requires: n/a
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-CoreEngine"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.02.19 - Bug Fixed: Parallax updating works properly with looping maps.
# 2012.02.10 - Bug Fixed: Forced actions no longer cancel out other actions
# that have been queued up for later.
# 2012.01.08 - Font resets no longer reset bold and italic to off, but instead
# to whatever default you've set.
# 2011.12.26 - New Bugfix: When using substitute, allies will no longer take
# place of low HP allies for friendly skills.
# 2011.12.20 - New Bugfix: Force Action no longer cancels out an actor's queue.
# Credits to Yami for finding and making the fix for!
# Switch added for those who want removed forced action battlers.
# 2011.12.15 - Updated for better menu gauge appearance.
# 2011.12.10 - Bug Fixed: Right and bottom sides of the map would show
# the left and top sides of the map.
# - Bug Fixed: Viewport sizes didn't refresh from smaller maps.
# 2011.12.07 - New Bugfix: Dual weapon normal attacks will now play both
# animations without one animation interrupting the other.
# 2011.12.04 - Updated certain GUI extensions for increased screen size.
# - More efficient digit grouping method credits to TDS.
# 2011.12.01 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This is the core engine for Yanfly Engine Ace, made for RPG Maker VX Ace.
# This script provides various changes made to the main engine including bug
# fixes and GUI upgrades.
#
# -----------------------------------------------------------------------------
# Bug Fix: Animation Overlay
# -----------------------------------------------------------------------------
# - It's the same bug from VX. When an all-screen animation is played against a
# group of enemies, the animation bitmap is actually made multiple times, thus
# causing a pretty extreme overlay when there are a lot of enemies on screen.
# This fix will cause the animation to play only once.
#
# -----------------------------------------------------------------------------
# Bug Fix: Animation Interruption
# -----------------------------------------------------------------------------
# - A new bug. When a character dual wields and attacks a single target, if an
# animation lasts too long, it will interrupt and/or halt the next animation
# from occurring. This script will cause the first animation to finish playing
# and then continue forth.
#
# -----------------------------------------------------------------------------
# Bug Fix: Battle Turn Order Fix
# -----------------------------------------------------------------------------
# - Same bug from VX. For those who use the default battle system, once a
# turn's started, the action order for the turn becomes set and unchanged for
# the remainder of that turn. Any changes to a battler's AGI will not be
# altered at all even if the battler were to receive an AGI buff or debuff.
# This fix will cause the speed to be updated properly upon each action.
#
# -----------------------------------------------------------------------------
# Bug Fix: Forced Action Fix
# -----------------------------------------------------------------------------
# - A new bug. When a battler is forced to perform an action, the battler's
# queued action is removed and the battler loses its place in battle. This
# fix will resume queue after a forced action.
#
# -----------------------------------------------------------------------------
# Bug Fix: Gauge Overlap Fix
# -----------------------------------------------------------------------------
# - Same bug from VX. When some values exceed certain amounts, gauges can
# overextend past the width they were originally designed to fit in. This fix
# will prevent any overextending from gauges.
#
# -----------------------------------------------------------------------------
# Bug Fix: Held L and R Menu Scrolling
# -----------------------------------------------------------------------------
# - Before in VX, you can scroll through menus by holding down L and R buttons
# (Q and W on the keyboard) to scroll through menus quickly. This fix will
# re-enable the ability to scroll through menus in such a fashion. Disable it
# in the module if you wish to.
#
# -----------------------------------------------------------------------------
# Bug Fix: Substitute Healing
# -----------------------------------------------------------------------------
# If an actor has the substitute (cover) flag on them, they will attempt to
# take the place of low HP allies when they're the target of attack. However,
# this is also the case for friendly skills such as heal. This script will fix
# it where if a battler targets an ally, no substitutes will take place.
#
# -----------------------------------------------------------------------------
# New Feature: Screen Resolution Size
# -----------------------------------------------------------------------------
# - The screen can now be resized from 544x416 with ease and still support maps
# that are smaller than 544x416. Maps smaller than 544x416 will be centered on
# the screen without having sprites jumping all over the place.
#
# -----------------------------------------------------------------------------
# New Feature: Adjust Animation Speed
# -----------------------------------------------------------------------------
# - RPG Maker VX Ace plays animations at a rate of 15 FPS by default. Speed up
# the animations by changing a simple constant in the module.
#
# -----------------------------------------------------------------------------
# New Feature: GUI Modifications
# -----------------------------------------------------------------------------
# - There are quite a lot of different modifications you can do to the GUI.
# This includes placing outlines around your gauges, changing the colours of
# each individual font aspect, and more. Also, you can change the default font
# setting for your games here.
#
# -----------------------------------------------------------------------------
# New Feature: Numeric Digit Grouping
# -----------------------------------------------------------------------------
# This will change various scenes to display numbers in groups where they are
# separated by a comma every three digits. Thus, a number like 1234567 will
# show up as 1,234,567. This allows for players to read numbers quicker.
#
# And that's all for the bug fixes and features!
#
#==============================================================================
# ▼ 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.
#
#==============================================================================
# ▼ 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 CORE
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Screen Resolution Size -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# RPG Maker VX Ace has the option of having larger width and height for
# your games. Resizing the width and height will have these changes:
#
# Default Resized Min Tiles Default Min Tiles New
# Width 544 640 17 20
# Height 416 480 13 15
#
# * Note: Maximum width is 640 while maximum height is 480.
# Minimum width is 110 while maximum height is 10.
# These are limitations set by RPG Maker VX Ace's engine.
#
# By selecting resize, all of the default menus will have their windows
# adjusted, but scripts provided by non-Yanfly Engine sources may or may
# not adjust themselves properly.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
RESIZE_WIDTH = 640
RESIZE_HEIGHT = 480
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Adjust Animation Speed -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# By default, the animation speed played in battles operates at 15 FPS
# (frames per second). For those who would like to speed it up, change this
# constant to one of these values:
# RATE Speed
# 4 15 fps
# 3 20 fps
# 2 30 fps
# 1 60 fps
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ANIMATION_RATE = 3
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Digit Grouping -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Setting this to true will cause numbers to be grouped together when they
# are larger than a thousand. For example, 12345 will appear as 12,345.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
GROUP_DIGITS = true
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Font Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Adjust the default font settings for your game here. The various settings
# will be explained below.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
FONT_NAME = ["VL Gothic", "Verdana", "Arial", "Courier"]
# This adjusts the fonts used for your game. If the font at the start of
# the array doesn't exist on the player's computer, it'll use the next one.
FONT_SIZE = 24 # Adjusts font size. Default: 24
FONT_BOLD = false # Makes font bold. Default: false
FONT_ITALIC = false # Makes font italic. Default: false
FONT_SHADOW = false # Gives font a shadow. Default: false
FONT_OUTLINE = true # Gives font an outline. Default: true
FONT_COLOUR = Color.new(255, 255, 255, 255) # Default: 255, 255, 255, 255
FONT_OUTLINE_COLOUR = Color.new(0, 0, 0, 128) # Default: 0, 0, 0, 128
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Forced Action Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# For those who would like to allow the game to remove a forced action
# battler from the queue list, use the switch below. If you don't want to
# use this option, set the switch ID to 0.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
FORCED_ACTION_REMOVE_SWITCH = 0
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Gauge Appearance Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# You can modify the way your gauges appear in the game. If you wish for
# them to have an outline, it's possible. You can also adjust the height
# of the gauges, too.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
GAUGE_OUTLINE = true
GAUGE_HEIGHT = 6
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Held L and R Menu Scrolling -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# VX gave the ability to scroll through menus quickly through holding the
# L and R buttons (Q and W on the keyboard). VX Ace disabled it. Now, you
# can re-enable the ability to scroll faster by setting this constant to
# true. To disable it, set this constant to false.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
QUICK_SCROLLING = true
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - System Text Colours -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Sometimes the system text colours are boring as just orange for HP, blue
# for MP, and green for TP. Change the values here. Each number corresponds
# to the colour index of the Window.png skin found in Graphics\System.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
COLOURS ={
# :text => ID
:normal => 0, # Default: 0
:system => 16, # Default: 16
:crisis => 17, # Default: 17
:knockout => 18, # Default: 18
:gauge_back => 19, # Default: 19
:hp_gauge1 => 28, # Default: 20
:hp_gauge2 => 29, # Default: 21
:mp_gauge1 => 22, # Default: 22
:mp_gauge2 => 23, # Default: 23
:mp_cost => 23, # Default: 23
:power_up => 24, # Default: 24
:power_down => 25, # Default: 25
:tp_gauge1 => 10, # Default: 28
:tp_gauge2 => 2, # Default: 29
:tp_cost => 2, # Default: 29
} # Do not remove this.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - System Text Options -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Here, you can adjust the transparency used for disabled items, the %
# needed for HP and MP to enter "crisis" mode.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
TRANSPARENCY = 160 # Adjusts transparency of disabled items. Default: 160
HP_CRISIS = 0.25 # When HP is considered critical. Default: 0.25
MP_CRISIS = 0.25 # When MP is considered critical. Default: 0.25
ITEM_AMOUNT = "×%s" # The prefix used for item amounts.
end # CORE
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.
#==============================================================================
Graphics.resize_screen(YEA::CORE::RESIZE_WIDTH, YEA::CORE::RESIZE_HEIGHT)
Font.default_name = YEA::CORE::FONT_NAME
Font.default_size = YEA::CORE::FONT_SIZE
Font.default_bold = YEA::CORE::FONT_BOLD
Font.default_italic = YEA::CORE::FONT_ITALIC
Font.default_shadow = YEA::CORE::FONT_SHADOW
Font.default_outline = YEA::CORE::FONT_OUTLINE
Font.default_color = YEA::CORE::FONT_COLOUR
Font.default_out_color = YEA::CORE::FONT_OUTLINE_COLOUR
#==============================================================================
# ■ Numeric
#==============================================================================
class Numeric
#--------------------------------------------------------------------------
# new method: group_digits
#--------------------------------------------------------------------------
def group
return self.to_s unless YEA::CORE::GROUP_DIGITS
self.to_s.gsub(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/,'\1,\2')
end
end # Numeric
#==============================================================================
# ■ Switch
#==============================================================================
module Switch
#--------------------------------------------------------------------------
# self.forced_action_remove
#--------------------------------------------------------------------------
def self.forced_action_remove
return false if YEA::CORE::FORCED_ACTION_REMOVE_SWITCH <= 0
return $game_switches[YEA::CORE::FORCED_ACTION_REMOVE_SWITCH]
end
end # Switch
#==============================================================================
# ■ Window_selectable
#==============================================================================
if YEA::CORE::QUICK_SCROLLING
def process_cursor_move
return unless cursor_movable?
last_index = @index
cursor_down (Input.trigger?(:DOWN)) if Input.repeat?(:DOWN)
cursor_up (Input.trigger?(:UP)) if Input.repeat?(:UP)
cursor_right(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
cursor_left (Input.trigger?(:LEFT)) if Input.repeat?(:LEFT)
cursor_pagedown if !handle?(:pagedown) && Input.repeat?(:R)
cursor_pageup if !handle?(:pageup) && Input.repeat?(:L)
Sound.play_cursor if @index != last_index
end
end
#==============================================================================
#
# ▼ End of File
#
#============================================================================== |