Hey everyone.
The last couple of months, I've been working on a pretty big game project.
I used to be pretty skilled in RPG Maker XP a couple of years ago, but now I started using RPG Maker VX Ace. So far I've been going pretty well for the most part but suddenly several problems stockpiled and I just cant manage all of it alone (or at least within a short period of time).
So I would like to ask you guys and gals for some with some of my more serious problems:
- Is there a way to remove the "Formation" option in the menu?
- Is there a way to add a Full-screen / Windowed-mode toggle option in this script?
CODE
#==============================================================================
#
# ▼ Yanfly Engine Ace - System Options v1.00
# -- Last Updated: 2012.01.01
# -- Level: Normal
# -- Requires: n/a
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-SystemOptions"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.01 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script replaces the "Game End" option in the Main Menu with a "System"
# menu where the player can adjust various settings in the game. Of them, the
# player can change the window colour, the volume for BGM, BGS, SFX, set
# automatic dashing, message text to display instantly, and speed up battles by
# hiding battle animations.
#
#==============================================================================
# ▼ 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.
#
# -----------------------------------------------------------------------------
# Script Calls - These commands are used with script calls.
# -----------------------------------------------------------------------------
# $game_system.volume_change(:bgm, x)
# $game_system.volume_change(:bgs, x)
# $game_system.volume_change(:sfx, x)
# Unlike the previous Yanfly Engines, this version does not bind volume to a
# variable. Use the script call to change the bgm, bgs, or sfx sound rate by
# x increment. Use a negative value to lower the volume.
#
# $game_system.set_autodash(true)
# $game_system.set_autodash(false)
# Turns autodash on (true) or off (false).
#
# $game_system.set_instantmsg(true)
# $game_system.set_instantmsg(false)
# Turns instant messages on (true) or off (false).
#
# $game_system.set_animations(true)
# $game_system.set_animations(false)
# Turns battle animations on (true) or off (false).
#
#==============================================================================
# ▼ 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 SYSTEM
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - General Setting -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# These are the general settings that govern the System settings. This will
# change the "Game End" vocab, and disable or enable autodash, instant
# messages, or animations by default.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
COMMAND_NAME = "System" # Command name used to replace Game End.
DEFAULT_AUTODASH = false # Enable automatic dashing by default?
DEFAULT_INSTANTMSG = false # Enable instant message text by default?
DEFAULT_ANIMATIONS = true # Enable battle animations by default?
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Command Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# These settings adjust the commands shown in the command list. Add, remove
# or rearrange the commands as you see fit. Here's a list of which commands
# do what:
#
# -------------------------------------------------------------------------
# :command Description
# -------------------------------------------------------------------------
# :blank Inserts an empty blank space.
#
# :window_red Changes the red tone for all windows.
# :window_grn Changes the green tone for all windows.
# :window_blu Changes the blue tone for all windows.
#
# :volume_bgm Changes the BGM volume used.
# :volume_bgs Changes the BGS volume used.
# :volume_sfx Changes the SFX volume used.
#
# :autodash Sets the player to automatically dash.
# :instantmsg Sets message text to appear instantly.
# :animations Enables battle animations or disables them.
#
# :to_title Returns to the title screen.
# :shutdown Shuts down the game.
#
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
COMMANDS =[
:window_red, # Changes the red tone for all windows.
:window_grn, # Changes the green tone for all windows.
:window_blu, # Changes the blue tone for all windows.
:volume_bgm, # Changes the BGM volume used.
:volume_bgs, # Changes the BGS volume used.
:volume_sfx, # Changes the SFX volume used.
:blank,
:autodash, # Sets the player to automatically dash.
:instantmsg, # Sets message text to appear instantly.
:animations, # Enables battle animations or disables them.
# :switch_1, # Custom Switch 1. Adjust settings below.
# :switch_2, # Custom Switch 2. Adjust settings below.
# :variable_1, # Custom Variable 1. Adjust settings below.
# :variable_2, # Custom Variable 2. Adjust settings below.
:blank,
:to_title, # Returns to the title screen.
:shutdown, # Shuts down the game.
] # Do not remove this.
#--------------------------------------------------------------------------
# - Custom Switches -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# If you want your game to have system options other than just the ones
# listed above, you can insert custom switches here to produce such an
# effect. Adjust the settings here as you see fit.
#--------------------------------------------------------------------------
CUSTOM_SWITCHES ={
# -------------------------------------------------------------------------
# :switch => [Switch, Name, Off Text, On Text,
# Help Window Description
# ], # Do not remove this.
# -------------------------------------------------------------------------
:switch_1 => [ 1, "Custom Switch 1", "OFF", "ON",
"Help description used for custom switch 1."
],
# -------------------------------------------------------------------------
:switch_2 => [ 2, "Custom Switch 2", "OFF", "ON",
"Help description used for custom switch 2."
],
# -------------------------------------------------------------------------
} # Do not remove this.
#--------------------------------------------------------------------------
# - Custom Variables -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# If you want your game to have system options other than just the ones
# listed above, you can insert custom variables here to produce such an
# effect. Adjust the settings here as you see fit.
#--------------------------------------------------------------------------
CUSTOM_VARIABLES ={
# -------------------------------------------------------------------------
# :variable => [Switch, Name, Colour1, Colour2, Min, Max,
# Help Window Description
# ], # Do not remove this.
# -------------------------------------------------------------------------
:variable_1 => [ 1, "Custom Variable 1", 9, 1, -100, 100,
"Help description used for custom variable 1."
],
# -------------------------------------------------------------------------
:variable_2 => [ 2, "Custom Variable 2", 10, 2, -10, 10,
"Help description used for custom variable 2."
],
# -------------------------------------------------------------------------
} # Do not remove this.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Vocab Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This hash adjusts the vocab used for both the commands and the help
# description that appears above the command window. Note that for the
# command help descriptions, you may use text codes. Use \n to linebreak.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
COMMAND_VOCAB ={
# -------------------------------------------------------------------------
# :command => [Command Name, Option1, Option2
# Help Window Description,
# ], # Do not remove this.
# -------------------------------------------------------------------------
:blank => ["", "None", "None",
""
], # Do not remove this.
# -------------------------------------------------------------------------
:window_red => ["Window Red", "None", "None",
"Change the red colour tone for windows.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:window_grn => ["Window Green", "None", "None",
"Change the green colour tone for windows.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:window_blu => ["Window Blue", "None", "None",
"Change the blue colour tone for windows.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:volume_bgm => ["BGM Volume", 12, 4, # Options 1 & 2 are Gauge Colours.
"Change the volume used for background music.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:volume_bgs => ["BGS Volume", 13, 5, # Options 1 & 2 are Gauge Colours.
"Change the volume used for background sound.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:volume_sfx => ["SFX Volume", 14, 6, # Options 1 & 2 are Gauge Colours.
"Change the volume used for sound effects.\n" +
"Hold SHIFT to change increment by 10."
], # Do not remove this.
# -------------------------------------------------------------------------
:autodash => ["Auto-Dash", "Walk", "Dash",
"Automatically dash without holding the run button."
], # Do not remove this.
# -------------------------------------------------------------------------
:instantmsg => ["Instant Text", "Normal", "Instant",
"Set message text to appear one-by-one or instantly."
], # Do not remove this.
# -------------------------------------------------------------------------
:animations => ["Battle Animations", "Hide", "Show",
"Hide animations during battle to speed up battles?"
], # Do not remove this.
# -------------------------------------------------------------------------
:to_title => ["Return to Title Screen", "None", "None",
"Go back to the title screen."
], # Do not remove this.
# -------------------------------------------------------------------------
:shutdown => ["Shutdown Game", "None", "None",
"Turns off the game."
], # Do not remove this.
# -------------------------------------------------------------------------
} # Do not remove this.
end # SYSTEM
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.
#==============================================================================
#==============================================================================
# ■ Vocab
#==============================================================================
module Vocab
#--------------------------------------------------------------------------
# overwrite method: self.game_end
#--------------------------------------------------------------------------
def self.game_end
return YEA::SYSTEM::COMMAND_NAME
end
end # Vocab
#==============================================================================
# ■ RPG::BGM
#==============================================================================
class RPG::BGM < RPG::AudioFile
#--------------------------------------------------------------------------
# overwrite method: play
#--------------------------------------------------------------------------
def play(pos = 0)
if @name.empty?
Audio.bgm_stop
@@last = RPG::BGM.new
else
volume = @volume
volume *= $game_system.volume(:bgm) * 0.01 unless $game_system.nil?
Audio.bgm_play('Audio/BGM/' + @name, volume, @pitch, pos)
@@last = self.clone
end
end
end # RPG::BGM
#==============================================================================
# ■ RPG::ME
#==============================================================================
class RPG::ME < RPG::AudioFile
#--------------------------------------------------------------------------
# overwrite method: play
#--------------------------------------------------------------------------
def play
if @name.empty?
Audio.me_stop
else
volume = @volume
volume *= $game_system.volume(:bgm) * 0.01 unless $game_system.nil?
Audio.me_play('Audio/ME/' + @name, volume, @pitch)
end
end
end # RPG::ME
#==============================================================================
# ■ RPG::BGS
#==============================================================================
class RPG::BGS < RPG::AudioFile
#--------------------------------------------------------------------------
# overwrite method: play
#--------------------------------------------------------------------------
def play(pos = 0)
if @name.empty?
Audio.bgs_stop
@@last = RPG::BGS.new
else
volume = @volume
volume *= $game_system.volume(:bgs) * 0.01 unless $game_system.nil?
Audio.bgs_play('Audio/BGS/' + @name, volume, @pitch, pos)
@@last = self.clone
end
end
end # RPG::BGS
#==============================================================================
# ■ RPG::SE
#==============================================================================
class RPG::SE < RPG::AudioFile
#--------------------------------------------------------------------------
# overwrite method: play
#--------------------------------------------------------------------------
def play
unless @name.empty?
volume = @volume
volume *= $game_system.volume(:sfx) * 0.01 unless $game_system.nil?
Audio.se_play('Audio/SE/' + @name, volume, @pitch)
end
end
end # RPG::SE
#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# alias method: initialize
#--------------------------------------------------------------------------
alias game_system_initialize_so initialize
def initialize
game_system_initialize_so
init_volume_control
init_autodash
init_instantmsg
init_animations
end
#--------------------------------------------------------------------------
# new method: init_volume_control
#--------------------------------------------------------------------------
def init_volume_control
@volume = {}
@volume[:bgm] = 100
@volume[:bgs] = 100
@volume[:sfx] = 100
end
#--------------------------------------------------------------------------
# new method: volume
#--------------------------------------------------------------------------
def volume(type)
init_volume_control if @volume.nil?
return [[@volume[type], 0].max, 100].min
end
#--------------------------------------------------------------------------
# new method: volume_change
#--------------------------------------------------------------------------
def volume_change(type, increment)
init_volume_control if @volume.nil?
@volume[type] += increment
@volume[type] = [[@volume[type], 0].max, 100].min
end
#--------------------------------------------------------------------------
# new method: init_autodash
#--------------------------------------------------------------------------
def init_autodash
@autodash = YEA::SYSTEM::DEFAULT_AUTODASH
end
#--------------------------------------------------------------------------
# new method: autodash?
#--------------------------------------------------------------------------
def autodash?
init_autodash if @autodash.nil?
return @autodash
end
#--------------------------------------------------------------------------
# new method: set_autodash
#--------------------------------------------------------------------------
def set_autodash(value)
@autodash = value
end
#--------------------------------------------------------------------------
# new method: init_instantmsg
#--------------------------------------------------------------------------
def init_instantmsg
@instantmsg = YEA::SYSTEM::DEFAULT_INSTANTMSG
end
#--------------------------------------------------------------------------
# new method: instantmsg?
#--------------------------------------------------------------------------
def instantmsg?
init_instantmsg if @instantmsg.nil?
return @instantmsg
end
#--------------------------------------------------------------------------
# new method: set_instantmsg
#--------------------------------------------------------------------------
def set_instantmsg(value)
@instantmsg = value
end
#--------------------------------------------------------------------------
# new method: init_animations
#--------------------------------------------------------------------------
def init_animations
@animations = YEA::SYSTEM::DEFAULT_ANIMATIONS
end
#--------------------------------------------------------------------------
# new method: animations?
#--------------------------------------------------------------------------
def animations?
init_animations if @animations.nil?
return @animations
end
#--------------------------------------------------------------------------
# new method: set_animations
#--------------------------------------------------------------------------
def set_animations(value)
@animations = value
end
end # Game_System
#==============================================================================
# ■ Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# alias method: dash?
#--------------------------------------------------------------------------
alias game_player_dash_so dash?
def dash?
if $game_system.autodash?
return false if @move_route_forcing
return false if $game_map.disable_dash?
return false if vehicle
return !Input.press?(:A)
else
return game_player_dash_so
end
end
end # Game_Player
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# alias method: show_fast?
#--------------------------------------------------------------------------
alias scene_battle_show_fast_so show_fast?
def show_fast?
return true unless $game_system.animations?
return scene_battle_show_fast_so
end
#--------------------------------------------------------------------------
# alias method: show_normal_animation
#--------------------------------------------------------------------------
alias scene_battle_show_normal_animation_so show_normal_animation
def show_normal_animation(targets, animation_id, mirror = false)
return unless $game_system.animations?
scene_battle_show_normal_animation_so(targets, animation_id, mirror)
end
end # Scene_Battle
#==============================================================================
# ■ Window_Message
#==============================================================================
class Window_Message < Window_Base
#--------------------------------------------------------------------------
# alias method: clear_flags
#--------------------------------------------------------------------------
alias window_message_clear_flags_so clear_flags
def clear_flags
window_message_clear_flags_so
@show_fast = true if $game_system.instantmsg?
end
end # Window_Message
#==============================================================================
# ■ Window_SystemOptions
#==============================================================================
class Window_SystemOptions < Window_Command
#--------------------------------------------------------------------------
# initialize
#--------------------------------------------------------------------------
def initialize(help_window)
@help_window = help_window
super(0, @help_window.height)
refresh
end
#--------------------------------------------------------------------------
# window_width
#--------------------------------------------------------------------------
def window_width; return Graphics.width; end
#--------------------------------------------------------------------------
# window_height
#--------------------------------------------------------------------------
def window_height; return Graphics.height - @help_window.height; end
#--------------------------------------------------------------------------
# update_help
#--------------------------------------------------------------------------
def update_help
if current_symbol == :custom_switch || current_symbol == :custom_variable
text = @help_descriptions[current_ext]
else
text = @help_descriptions[current_symbol]
end
text = "" if text.nil?
@help_window.set_text(text)
end
#--------------------------------------------------------------------------
# ok_enabled?
#--------------------------------------------------------------------------
def ok_enabled?
return true if [:to_title, :shutdown].include?(current_symbol)
return false
end
#--------------------------------------------------------------------------
# make_command_list
#--------------------------------------------------------------------------
def make_command_list
@help_descriptions = {}
for command in YEA::SYSTEM::COMMANDS
case command
when :blank
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
when :window_red, :window_grn, :window_blu
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
when :volume_bgm, :volume_bgs, :volume_sfx
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
when :autodash, :instantmsg, :animations
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
when :to_title, :shutdown
add_command(YEA::SYSTEM::COMMAND_VOCAB[command][0], command)
@help_descriptions[command] = YEA::SYSTEM::COMMAND_VOCAB[command][3]
else
process_custom_switch(command)
process_custom_variable(command)
end
end
end
#--------------------------------------------------------------------------
# process_custom_switch
#--------------------------------------------------------------------------
def process_custom_switch(command)
return unless YEA::SYSTEM::CUSTOM_SWITCHES.include?(command)
name = YEA::SYSTEM::CUSTOM_SWITCHES[command][1]
add_command(name, :custom_switch, true, command)
@help_descriptions[command] = YEA::SYSTEM::CUSTOM_SWITCHES[command][4]
end
#--------------------------------------------------------------------------
# process_custom_variable
#--------------------------------------------------------------------------
def process_custom_variable(command)
return unless YEA::SYSTEM::CUSTOM_VARIABLES.include?(command)
name = YEA::SYSTEM::CUSTOM_VARIABLES[command][1]
add_command(name, :custom_variable, true, command)
@help_descriptions[command] = YEA::SYSTEM::CUSTOM_VARIABLES[command][6]
end
#--------------------------------------------------------------------------
# draw_item
#--------------------------------------------------------------------------
def draw_item(index)
reset_font_settings
rect = item_rect(index)
contents.clear_rect(rect)
case @list[index][:symbol]
when :window_red, :window_grn, :window_blu
draw_window_tone(rect, index, @list[index][:symbol])
when :volume_bgm, :volume_bgs, :volume_sfx
draw_volume(rect, index, @list[index][:symbol])
when :autodash, :instantmsg, :animations
draw_toggle(rect, index, @list[index][:symbol])
when :to_title, :shutdown
draw_text(item_rect_for_text(index), command_name(index), 1)
when :custom_switch
draw_custom_switch(rect, index, @list[index][:ext])
when :custom_variable
draw_custom_variable(rect, index, @list[index][:ext])
end
end
#--------------------------------------------------------------------------
# draw_window_tone
#--------------------------------------------------------------------------
def draw_window_tone(rect, index, symbol)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
tone = $game_system.window_tone
case symbol
when :window_red
rate = (tone.red + 255.0) / 510.0
colour1 = Color.new(128, 0, 0)
colour2 = Color.new(255, 0, 0)
value = tone.red.to_i
when :window_grn
rate = (tone.green + 255.0) / 510.0
colour1 = Color.new(0, 128, 0)
colour2 = Color.new(0, 255, 0)
value = tone.green.to_i
when :window_blu
rate = (tone.blue + 255.0) / 510.0
colour1 = Color.new(0, 0, 128)
colour2 = Color.new(0, 0, 255)
value = tone.blue.to_i
end
draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
end
#--------------------------------------------------------------------------
# draw_volume
#--------------------------------------------------------------------------
def draw_volume(rect, index, symbol)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
case symbol
when :volume_bgm
rate = $game_system.volume(:bgm)
when :volume_bgs
rate = $game_system.volume(:bgs)
when :volume_sfx
rate = $game_system.volume(:sfx)
end
colour1 = text_color(YEA::SYSTEM::COMMAND_VOCAB[symbol][1])
colour2 = text_color(YEA::SYSTEM::COMMAND_VOCAB[symbol][2])
value = sprintf("%d%%", rate)
rate *= 0.01
draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
end
#--------------------------------------------------------------------------
# draw_toggle
#--------------------------------------------------------------------------
def draw_toggle(rect, index, symbol)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
case symbol
when :autodash
enabled = $game_system.autodash?
when :instantmsg
enabled = $game_system.instantmsg?
when :animations
enabled = $game_system.animations?
end
dx = contents.width/2
change_color(normal_color, !enabled)
option1 = YEA::SYSTEM::COMMAND_VOCAB[symbol][1]
draw_text(dx, rect.y, contents.width/4, line_height, option1, 1)
dx += contents.width/4
change_color(normal_color, enabled)
option2 = YEA::SYSTEM::COMMAND_VOCAB[symbol][2]
draw_text(dx, rect.y, contents.width/4, line_height, option2, 1)
end
#--------------------------------------------------------------------------
# cursor_right
#--------------------------------------------------------------------------
def draw_custom_switch(rect, index, ext)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
enabled = $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]]
dx = contents.width/2
change_color(normal_color, !enabled)
option1 = YEA::SYSTEM::CUSTOM_SWITCHES[ext][2]
draw_text(dx, rect.y, contents.width/4, line_height, option1, 1)
dx += contents.width/4
change_color(normal_color, enabled)
option2 = YEA::SYSTEM::CUSTOM_SWITCHES[ext][3]
draw_text(dx, rect.y, contents.width/4, line_height, option2, 1)
end
#--------------------------------------------------------------------------
# draw_custom_variable
#--------------------------------------------------------------------------
def draw_custom_variable(rect, index, ext)
name = @list[index][:name]
draw_text(0, rect.y, contents.width/2, line_height, name, 1)
#---
dx = contents.width / 2
value = $game_variables[YEA::SYSTEM::CUSTOM_VARIABLES[ext][0]]
colour1 = text_color(YEA::SYSTEM::CUSTOM_VARIABLES[ext][2])
colour2 = text_color(YEA::SYSTEM::CUSTOM_VARIABLES[ext][3])
minimum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][4]
maximum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][5]
rate = (value - minimum).to_f / [(maximum - minimum).to_f, 0.01].max
dx = contents.width/2
draw_gauge(dx, rect.y, contents.width - dx - 48, rate, colour1, colour2)
draw_text(dx, rect.y, contents.width - dx - 48, line_height, value, 2)
end
#--------------------------------------------------------------------------
# cursor_right
#--------------------------------------------------------------------------
def cursor_right(wrap = false)
cursor_change(:right)
super(wrap)
end
#--------------------------------------------------------------------------
# cursor_left
#--------------------------------------------------------------------------
def cursor_left(wrap = false)
cursor_change(:left)
super(wrap)
end
#--------------------------------------------------------------------------
# cursor_change
#--------------------------------------------------------------------------
def cursor_change(direction)
case current_symbol
when :window_red, :window_blu, :window_grn
change_window_tone(direction)
when :volume_bgm, :volume_bgs, :volume_sfx
change_volume(direction)
when :autodash, :instantmsg, :animations
change_toggle(direction)
when :custom_switch
change_custom_switch(direction)
when :custom_variable
change_custom_variables(direction)
end
end
#--------------------------------------------------------------------------
# change_window_tone
#--------------------------------------------------------------------------
def change_window_tone(direction)
Sound.play_cursor
value = direction == :left ? -1 : 1
value *= 10 if Input.press?(:A)
tone = $game_system.window_tone.clone
case current_symbol
when :window_red; tone.red += value
when :window_grn; tone.green += value
when :window_blu; tone.blue += value
end
$game_system.window_tone = tone
draw_item(index)
end
#--------------------------------------------------------------------------
# change_window_tone
#--------------------------------------------------------------------------
def change_volume(direction)
Sound.play_cursor
value = direction == :left ? -1 : 1
value *= 10 if Input.press?(:A)
case current_symbol
when :volume_bgm
$game_system.volume_change(:bgm, value)
RPG::BGM::last.play
when :volume_bgs
$game_system.volume_change(:bgs, value)
RPG::BGS::last.play
when :volume_sfx
$game_system.volume_change(:sfx, value)
end
draw_item(index)
end
#--------------------------------------------------------------------------
# change_toggle
#--------------------------------------------------------------------------
def change_toggle(direction)
value = direction == :left ? false : true
case current_symbol
when :autodash
current_case = $game_system.autodash?
$game_system.set_autodash(value)
when :instantmsg
current_case = $game_system.instantmsg?
$game_system.set_instantmsg(value)
when :animations
current_case = $game_system.animations?
$game_system.set_animations(value)
end
Sound.play_cursor if value != current_case
draw_item(index)
end
#--------------------------------------------------------------------------
# change_custom_switch
#--------------------------------------------------------------------------
def change_custom_switch(direction)
value = direction == :left ? false : true
ext = current_ext
current_case = $game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]]
$game_switches[YEA::SYSTEM::CUSTOM_SWITCHES[ext][0]] = value
Sound.play_cursor if value != current_case
draw_item(index)
end
#--------------------------------------------------------------------------
# change_custom_variables
#--------------------------------------------------------------------------
def change_custom_variables(direction)
Sound.play_cursor
value = direction == :left ? -1 : 1
value *= 10 if Input.press?(:A)
ext = current_ext
var = YEA::SYSTEM::CUSTOM_VARIABLES[ext][0]
minimum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][4]
maximum = YEA::SYSTEM::CUSTOM_VARIABLES[ext][5]
$game_variables[var] += value
$game_variables[var] = [[$game_variables[var], minimum].max, maximum].min
draw_item(index)
end
end # Window_SystemOptions
#==============================================================================
# ■ Scene_Menu
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# overwrite method: command_game_end
#--------------------------------------------------------------------------
def command_game_end
SceneManager.call(Scene_System)
end
end # Scene_Menu
#==============================================================================
# ■ Scene_System
#==============================================================================
class Scene_System < Scene_MenuBase
#--------------------------------------------------------------------------
# start
#--------------------------------------------------------------------------
def start
super
create_help_window
create_command_window
end
#--------------------------------------------------------------------------
# create_command_window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_SystemOptions.new(@help_window)
@command_window.set_handler(:cancel, method(:return_scene))
@command_window.set_handler(:to_title, method(:command_to_title))
@command_window.set_handler(:shutdown, method(:command_shutdown))
end
#--------------------------------------------------------------------------
# command_to_title
#--------------------------------------------------------------------------
def command_to_title
fadeout_all
SceneManager.goto(Scene_Title)
end
#--------------------------------------------------------------------------
# command_shutdown
#--------------------------------------------------------------------------
def command_shutdown
fadeout_all
SceneManager.exit
end
end # Scene_System
#==============================================================================
#
# ▼ End of File
#
#==============================================================================
- Can anyone help me fix the "picture selection" rectangle position in this script?
NOTE: I'm using a script to change the game resolution to 640x480, but the script was meant for the original resolution, so I edit out everything I could but I cant find what controls that specific part.
CODE
#==============================================================================
# +++ MOG - Picture Gallery ACE (v1.2) +++
#==============================================================================
# By Moghunter
# http://www.atelier-rgss.com/
#==============================================================================
# Sistema de galeria de imagens.
#==============================================================================
# Para ativar o script use o comando abaixo através de um evento usando o
# comando chamar script. (Call Script)
#
# SceneManager.call(Scene_Picture_Gallery)
#
#==============================================================================
# Para disponibilizar as imagens na galeria você deverá usar o seguinte
# código através do comando chamar script.
#
# $game_system.gallery[ID] = true
#
# EX $game_system.gallery[10] = true
#
#==============================================================================
# Você deverá criar uma pasta com o nome "Gallery" onde as imagens deverão
# ser gravadas.
#
# Graphics/Gallery/
#
# A nomeação das imagens devem ser numéricas. (ID da imagem)
# 0.jpg (Imagem não disponível.)
# 1.jpg
# 2.jpg
# 3.jpg
# ...
#
# Prefira usar imagens com resoluções igual ou maior a 544x416 pixels.
#==============================================================================
# Histórico
#
# 1.1 - Opção de adicionar o command Picture Gallery no Menu principal.
# 1.2 - Compatibilidade com o sistema de cursor.
#
#==============================================================================
module MOG_PICTURE_GALLERY
#Quantidade maxima de imagens na galeria.
MAX_PICTURES = 40
#Ativar o Scene Picture Gallery no Menu
PICTURE_GALLERY_MENU_COMMAND = true
#Nome do comando apresentado no menu.
PICTURE_GALLERY_COMMAND_NAME = "Gallery"
end
#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
attr_accessor :gallery
#------------------------------------------------------------------------------
# ● Initialize
#------------------------------------------------------------------------------
alias art_picture_initialize initialize
def initialize
art_picture_initialize
@gallery = []
end
end
#==============================================================================
# ■ RPG
#==============================================================================
module Cache
def self.gallery(filename)
load_bitmap("Graphics/Gallery/", filename)
end
end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● Draw_Thumbnail
#--------------------------------------------------------------------------
def draw_thumbnail(x,y,id)
bitmap = Cache.gallery(id.to_s) rescue nil
return if bitmap == nil
src_rect = Rect.new(0, 0, bitmap.width , bitmap.height )
src_rect2 = Rect.new(x, y, 118, 59)
self.contents.stretch_blt(src_rect2, bitmap, src_rect)
bitmap.dispose
end
end
#==============================================================================
# ■ Window_Picture
#==============================================================================
class Window_Picture < Window_Selectable
#------------------------------------------------------------------------------
# ● Initialize
#------------------------------------------------------------------------------
def initialize(page)
super(0, 64, 640, 480)
self.opacity = 0
@index = -1
@page = page
@pic_max = MOG_PICTURE_GALLERY::MAX_PICTURES
@pic_max = 1 if @pic_max <= 0
@pag_max = @pic_max / 9
if @pag_max == page
o = @pag_max * 9
o2 = @pic_max - o
@item_max = o2
else
@item_max = 9
end
@i_max = @item_max
refresh(page)
select(0)
activate
end
#------------------------------------------------------------------------------
# ● Refresh
#------------------------------------------------------------------------------
def refresh(page = 0)
if self.contents != nil
self.contents.dispose
self.contents = nil
end
if @item_max > 0
self.contents = Bitmap.new(width - 32, 6 * 89)
for i in 0...@item_max
draw_item(i,page)
end
end
end
#------------------------------------------------------------------------------
# ● draw_item
#------------------------------------------------------------------------------
def draw_item(index,page)
np = 9 * page
picture_number = index + 1 + np
x = 65 + index % 3 * 183
y = 12 + index / 3 * 89
s = picture_number
s = 0 if $game_system.gallery[picture_number] == nil
draw_thumbnail(x,y,s)
self.contents.draw_text(x + 32,y + 49, 64, 32, "N - " + picture_number.to_s,1)
end
#------------------------------------------------------------------------------
# ● item_rect
#------------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(0, 0, 0, 0)
rect.width = 190
rect.height = 90
rect.x = @index % col_max * (rect.width + 32)
rect.y = @index / col_max * 90
return rect
end
#------------------------------------------------------------------------------
# ● Col Max
#------------------------------------------------------------------------------
def col_max
return 3
end
#------------------------------------------------------------------------------
# ● Item Max
#------------------------------------------------------------------------------
def item_max
return @item_max == nil ? 0 : @item_max
end
end
#==============================================================================
# ■ Scene_ArtPictures
#==============================================================================
class Scene_Picture_Gallery
include MOG_PICTURE_GALLERY
#------------------------------------------------------------------------------
# ● Main
#------------------------------------------------------------------------------
def main
setup
create_image
create_background
create_loading_text
create_window
create_cursor
create_button
execute_loop
execute_dispose
end
#------------------------------------------------------------------------------
# ● Create_Loading
#------------------------------------------------------------------------------
def create_loading_text
@loading = Sprite.new
@loading.bitmap = Bitmap.new(100,32)
@loading.z = 300
@loading.bitmap.font.size = 20
@loading.bitmap.font.bold = true
@loading.bitmap.font.name = "Georgia"
@loading.bitmap.draw_text(0,0, 100, 32, "Loading...",1)
@loading.x = (640 / 2) - 50
@loading.y = (480 / 2)
Graphics.transition(20)
end
#------------------------------------------------------------------------------
# ● Setup
#------------------------------------------------------------------------------
def setup
@max_pictures = MAX_PICTURES
@max_pictures = 1 if @max_pictures <= 0
v = (@max_pictures / 9)
v2 = (v - 1) * 9
v3 = (@max_pictures - v2) - 9
if v3 != 0
@max_pages = (@max_pictures / 9) + 1
else
@max_pages = (@max_pictures / 9)
end
@max_pages = 1 if @max_pages == 0
@aw_center = 0
@aw_left = 0
@aw_right = 0
@slide_type = 0
@page_old = 0
@picture_id = 0
@image_active = false
@old_index = 0
@picures_enabled = 0
@comp = 0
@ex = 0
@ey = 0
@ex_max = 0
@ey_max = 0
@ex_max_zoom = 0
@ey_max_zoom = 0
for i in 0..MAX_PICTURES
@picures_enabled += 1 if $game_system.gallery[i]
end
end
#------------------------------------------------------------------------------
# ● create_background
#------------------------------------------------------------------------------
def create_background
@background = Sprite.new
@background.bitmap = Cache.gallery("Background")
@background.z = 0
@background2 = Plane.new
@background2.bitmap = Cache.gallery("Background2")
@background2.z = -1
end
#------------------------------------------------------------------------------
# ● Create Window
#------------------------------------------------------------------------------
def create_window
@info = Window_Help.new
@info.y = 360
@info.opacity = 0
@wp_page = 0
@wp_page_old = @wp_page
@wp_index = 0
@wp =[]
for i in 0...@max_pages
@wp[i] = Window_Picture.new(i)
end
check_active_window(true)
refresh_info_window(true)
#@wp[@wp_page].x = 0
end
#------------------------------------------------------------------------------
# ● Create_image
#------------------------------------------------------------------------------
def create_image
@picture = Sprite.new
@picture.bitmap = Cache.gallery("")
@picture.z = 100
@picture.opacity = 0
end
#------------------------------------------------------------------------------
# ● Check Active Window
#------------------------------------------------------------------------------
def check_active_window(starting = false)
for i in 0...@max_pages
if i == @wp_page
@wp[@wp_page].active = true
@wp[@wp_page].visible = true
if @slide_type == 0
@wp[@wp_page].x = 640
else
@wp[@wp_page].x = -640
end
elsif i == @page_old and starting == false
@wp[@page_old].active = false
@wp[@page_old].visible = true
@wp[@page_old].visible = false if starting
@wp[@page_old].x = 0
else
@wp[i].active = false
@wp[i].visible = false
end
end
end
#------------------------------------------------------------------------------
# ● Create Button
#------------------------------------------------------------------------------
def create_button
@button_image = Cache.gallery("Button")
@button_bitmap = Bitmap.new(@button_image.width, @button_image.height)
@cw = @button_image.width
@ch = @button_image.height / 2
src_rect = Rect.new(0, 0, @cw, @ch)
@button_bitmap .blt(0,0, @button_image, src_rect)
@button = Sprite.new
@button.bitmap = @button_bitmap
@button.y = 480
@button.z = 250
@button.opacity = 0
@button_fade_time = 0
end
#------------------------------------------------------------------------------
# ● Create Cursor
#------------------------------------------------------------------------------
def create_cursor
@cx1 = 0
@cx2 = 0
@cursor_speed = 0
image = Cache.gallery("Cursor")
@bitmap = Bitmap.new(image.width, image.height)
cw = image.width / 2
ch = image.height
src_rect = Rect.new(cw, 0, cw, ch)
@bitmap.blt(0,0, image, src_rect)
@cursor1 = Sprite.new
@cursor1.bitmap = @bitmap
@cursor1.x = 0 + @cx1
@cursor1.y = 190
@cursor1.z = 400
@bitmap2 = Bitmap.new(image.width, image.height)
src_rect2 = Rect.new(0, 0, cw, ch)
@bitmap2.blt(0,0, image, src_rect2)
@cursor2 = Sprite.new
@cursor2.bitmap = @bitmap2
@cursor2.x = 640 + @cx2
@cursor2.y = 190
@cursor2.z = 200
image.dispose
if @max_pages == 1
@cursor1.visible = false
@cursor2.visible = false
end
end
#------------------------------------------------------------------------------
# ● Execute Loop
#------------------------------------------------------------------------------
def execute_loop
loop do
Graphics.update
Input.update
update
if SceneManager.scene != self
break
end
end
end
#------------------------------------------------------------------------------
# ● Execute Dispose
#------------------------------------------------------------------------------
def execute_dispose
Graphics.freeze
for i in 0...@max_pages
@wp[i].dispose
end
@info.dispose
if @picture.bitmap != nil
@picture.bitmap.dispose
end
@picture.dispose
@background.bitmap.dispose
@background.dispose
@background2.bitmap.dispose
@background2.dispose
@bitmap.dispose
@bitmap2.dispose
@cursor1.bitmap.dispose
@cursor1.dispose
@cursor2.bitmap.dispose
@cursor2.dispose
@button_bitmap.dispose
@button.bitmap.dispose
@button.dispose
@button_image.dispose
if @loading != nil
@loading.bitmap.dispose
@loading.dispose
end
end
#------------------------------------------------------------------------------
# ● Update
#------------------------------------------------------------------------------
def update
@wp.each {|wid| wid.update}
@info.update
if @image_active
update_command_image
else
update_command
end
update_slide
update_image_effect
update_cursor_animation
refresh_info_window
end
#------------------------------------------------------------------------------
# ● update_cursor_animation
#------------------------------------------------------------------------------
def update_cursor_animation
@cursor_speed += 1
case @cursor_speed
when 1..20
@cx1 += 1
@cx2 -= 1
when 21..40
@cx1 -= 1
@cx2 += 1
else
@cursor_speed = 0
@cx1 = 0
@cx2 = 0
end
@cursor1.x = 0 + @cx1
@cursor2.x = 610 + @cx2
end
#------------------------------------------------------------------------------
# ● Update Image Effect
#------------------------------------------------------------------------------
def update_image_effect
return if @wp[@wp_page].x != 0
@button_fade_time -= 1 if @button_fade_time > 0
if @image_active
@picture.opacity += 15
if @button_fade_time != 0
@button.opacity += 5
else
if @button.y < 480
@button.opacity -= 10
@button.y += 1
end
end
@wp[@wp_page].contents_opacity -= 15
@info.contents_opacity -= 15
@background.opacity -= 15
@cursor1.opacity -= 15
@cursor2.opacity -= 15
else
@picture.opacity -= 10
@button.opacity -= 15
@wp[@wp_page].contents_opacity += 15
@info.contents_opacity += 15
@background.opacity += 15
@cursor1.opacity += 15
@cursor2.opacity += 15
end
end
#------------------------------------------------------------------------------
# ● Refresh Info Window
#------------------------------------------------------------------------------
def refresh_info_window(starting = false)
return if @image_active
return if @wp_page_old == @wp_page and starting == false
@wp_page_old = @wp_page
page = @wp_page + 1
@picture_id = (9 * @wp_page) + @wp[@wp_page].index + 1
p_pages = "Page - " + page.to_s + " / " + @max_pages.to_s
comp = " Completed " + (@picures_enabled.to_f / @max_pictures.to_f * 100).truncate.to_s + "%"
p_number = " Pictures " + @picures_enabled.to_s + " / " + @max_pictures.to_s
@info.set_text(" " + p_pages + comp + p_number)
end
#------------------------------------------------------------------------------
# ● Update Slide
#------------------------------------------------------------------------------
def update_slide
@background2.ox += 1
if @loading != nil
@loading.opacity -= 5
if @loading.opacity <= 0
@loading.bitmap.dispose
@loading.dispose
@loading = nil
end
end
return if @wp[@wp_page].x == 0
slide_speed = 25
@picture.opacity = 0
@background.opacity = 255
if @slide_type == 1
if @wp[@wp_page].x < 0
@wp[@wp_page].x += slide_speed
if @wp[@wp_page].x >= 0
@wp[@wp_page].x = 0
end
end
if @wp[@page_old].x < 640
@wp[@page_old].x += slide_speed
if @wp[@page_old].x >= 640
@wp[@page_old].x = 640
end
end
else
if @wp[@wp_page].x > 0
@wp[@wp_page].x -= slide_speed
if @wp[@wp_page].x <= 0
@wp[@wp_page].x = 0
end
end
if @wp[@page_old].x > -640
@wp[@page_old].x -= slide_speed
if @wp[@page_old].x <= -640
@wp[@page_old].x = -640
end
end
end
if @slide_type == 0
@wp[@wp_page].x = 0 if @wp[@wp_page].x <= 0
else
@wp[@wp_page].x = 0 if @wp[@wp_page].x >= 0
end
end
#------------------------------------------------------------------------------
# ● Check_limite
#------------------------------------------------------------------------------
def check_limit
if @wp_page < 0
@wp_page = @max_pages - 1
elsif @wp_page >= @max_pages
@wp_page = 0
end
check_active_window
end
#------------------------------------------------------------------------------
# ● Update Command Image
#------------------------------------------------------------------------------
def update_command_image
if Input.trigger?(Input::B) or Input.trigger?(Input::C)
Sound.play_cursor
@image_active = false
@wp[@wp_page].active = true
return
end
if Input.trigger?(Input::R) or Input.trigger?(Input::L)
Sound.play_cursor
execute_zoom
end
if Input.press?(Input::RIGHT)
@ex += 4
elsif Input.press?(Input::LEFT)
@ex -= 4
elsif Input.press?(Input::DOWN)
@ey += 4
elsif Input.press?(Input::UP)
@ey -= 4
end
@ex = @ex_max + @ex_max_zoom if @ex > @ex_max + @ex_max_zoom
@ex = 0 if @ex < 0
@ey = @ey_max + @ey_max_zoom if @ey > @ey_max + @ey_max_zoom
@ey = 0 if @ey < 0
@picture.x = -@ex
@picture.y = -@ey
end
#------------------------------------------------------------------------------
# ● Execute Zoom
#------------------------------------------------------------------------------
def execute_zoom
if @picture.zoom_x == 1.0
@picture.zoom_x = 1.5
@picture.zoom_y = 1.5
refresh_button(1)
@ex_max_zoom = (@picture.bitmap.width / 2)
if @ex != @ex_max
@ex += @ex_max_zoom / 2
else
if @ex_max != 0
@ex += @ex_max_zoom
else
@ex += @ex_max_zoom / 2
end
end
@ey_max_zoom = (@picture.bitmap.height / 2)
if @ey != @ey_max
@ey += @ey_max_zoom / 2
else
if @ey_max != 0
@ey += @ey_max_zoom
else
@ey += @ey_max_zoom / 2
end
end
else
if @picture.bitmap.width > 640 or
@picture.bitmap.height > 480
refresh_button(1)
else
refresh_button(0)
end
@ex -= @ex_max_zoom / 2
@ey -= @ey_max_zoom / 2
@picture.zoom_x = 1.0
@picture.zoom_y = 1.0
@ex_max_zoom = 0
@ey_max_zoom = 0
end
end
#------------------------------------------------------------------------------
# ● check_avaliable_picture?
#------------------------------------------------------------------------------
def check_avaliable_picture?
@picture_id = (9 * @wp_page) + @wp[@wp_page].index + 1
return false if $game_system.gallery[@picture_id] == nil
return true
end
#------------------------------------------------------------------------------
# ● create_bitmap
#------------------------------------------------------------------------------
def create_bitmap
@picture.opacity = 0
@picture.bitmap.dispose
@picture.bitmap = Cache.gallery(@picture_id.to_s) rescue nil
@ex = 0
@ey = 0
@ex_max_zoom = 0
@ey_max_zoom = 0
@picture.zoom_x = 1.0
@picture.zoom_y = 1.0
if @picture.bitmap == nil
@picture.bitmap = Cache.gallery("")
refresh_button(0)
return
end
if @picture.bitmap.width > 640
@ex_max = @picture.bitmap.width - 640
else
@ex_max = 0
end
if @picture.bitmap.height > 480
@ey_max = @picture.bitmap.height - 480
else
@ey_max = 0
end
if @picture.bitmap.width > 640 or
@picture.bitmap.height > 480
refresh_button(1)
else
refresh_button(0)
end
end
#------------------------------------------------------------------------------
# ● Refresh Button
#------------------------------------------------------------------------------
def refresh_button(type = 0)
@button.bitmap.clear
if type == 0
src_rect = Rect.new(0, 0, @cw, @ch)
else
src_rect = Rect.new(0, @ch, @cw, @ch)
end
@button_bitmap .blt(0,0, @button_image, src_rect)
@button.y = 379
@button_fade_time = 120
@button.opacity = 0 unless @button.y == 379
end
#------------------------------------------------------------------------------
# ● Update Command
#------------------------------------------------------------------------------
def update_command
return if @wp[@wp_page].x != 0
if Input.trigger?(Input::B)
Sound.play_cancel
SceneManager.return
return
end
if Input.trigger?(Input::C)
if check_avaliable_picture?
Sound.play_ok
@image_active = true
@wp[@wp_page].active = false
create_bitmap
else
Sound.play_buzzer
end
return
end
if Input.trigger?(Input::L) and @max_pages != 1
Sound.play_cursor
@page_old = @wp_page
@wp_page -= 1
@slide_type = 1
check_limit
return
elsif Input.trigger?(Input::R) and @max_pages != 1
Sound.play_cursor
@page_old = @wp_page
@wp_page += 1
@slide_type = 0
check_limit
return
end
end
end
if MOG_PICTURE_GALLERY::PICTURE_GALLERY_MENU_COMMAND
#==============================================================================
# ■ Window Menu Command
#==============================================================================
class Window_MenuCommand < Window_Command
#------------------------------------------------------------------------------
# ● Add Main Commands
#------------------------------------------------------------------------------
alias mog_picture_gallery_add_main_commands add_main_commands
def add_main_commands
mog_picture_gallery_add_main_commands
add_command(MOG_PICTURE_GALLERY::PICTURE_GALLERY_COMMAND_NAME, :picture, main_commands_enabled)
end
end
#==============================================================================
# ■ Scene Menu
#==============================================================================
class Scene_Menu < Scene_MenuBase
#------------------------------------------------------------------------------
# ● Create Command Windows
#------------------------------------------------------------------------------
alias mog_picture_gallery_create_command_window create_command_window
def create_command_window
mog_picture_gallery_create_command_window
@command_window.set_handler(:picture, method(:Picture_Gallery))
end
#------------------------------------------------------------------------------
# ● Picture Gallery
#------------------------------------------------------------------------------
def Picture_Gallery
SceneManager.call(Scene_Picture_Gallery)
end
end
end
$mog_rgss3_picture_gallery = true
- When converting a movie to the OGV format, after it plays in the game in the last 0.5 second there's always a weird sound...is that normal? I convert the videos using this site: http://video.online-convert.com/convert-to-ogg. OR is there any specific program that can be used to convert the videos? (note: I need to be able to change the video resolution in it)
In the case of the two script questions I already sent e-mails to the creators but no luck with replies from them so far...
Any help will be greatly appreciated!
Thanks in advance