The picture is transparent but that definitely helps in the event I choose to use one that isn't already. Thanks!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
@spriteset = Spriteset_Map.new
@over = Sprite.new
@over.bitmap = RPG::Cache.picture(Over_Picture_Graphic)
@spriteset.dispose
@over.dispose
Over_Picture_Graphic = 'Overlay'
#==============================================================================
# Modyfied Scene_Name
# By Cyclope
#------------------------------------------------------------------------------
#´ Instructions
# Place above main
#------------------------------------------------------------------------------
# Credit:
# Nattmath (For making Scene_Name Leters Modification)
# Blizzard (For making Custom Cotrols)
# Cyclope (For modifying Scene_Name Leters Modification and Scene_Name)
#==============================================================================
#==============================================================================
# ** Window_Instructions
#------------------------------------------------------------------------------
# This window displays full status specs on the status screen.
#==============================================================================
class Window_Instruction < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize
super( 0, 400, 640, 80)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.name = "Arial"
self.contents.font.size = 18
self.contents.font.color = normal_color
#Change this text to whatever instructions u want to have!
self.contents.draw_text(26, 9, 500, 32, "Enter = OK")
self.contents.draw_text(128, 9, 500, 32, "Esc/Backspace = Delete")
self.contents.draw_text(336, 9, 500, 32, "abc... = Text")
self.contents.draw_text(448, 9, 500, 32, "Shift = Uppercase")
end
end
#==============================================================================
# ** Window_TextName
#------------------------------------------------------------------------------
# super ( 224, 32, 224, 80)
#==============================================================================
class Window_TextName < Window_Base
def initialize
super ( 224, 32, 224, 80)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = $game_actors[$game_temp.name_actor_id]
refresh
end
def refresh
self.contents.clear
draw_actor_graphic(@actor, 20, 48)
self.contents.font.name = "Arial"
self.contents.font.size = 40
self.contents.font.color = normal_color
self.contents.draw_text(64, 0, 96, 32, "Name:")
end
end
#==============================================================================
# ** Window_NameEdit
#------------------------------------------------------------------------------
# This window is used to edit your name on the input name screen.
#==============================================================================
class Window_NameEdit < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
# max_char : maximum number of characters
#--------------------------------------------------------------------------
def initialize(actor, max_char)
super(16, 128, 608, 96)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
@name = actor.name
@max_char = max_char
# Fit name within maximum number of characters
name_array = @name.split(//)[0...@max_char]
@name = ""
for i in 0...name_array.size
@name += name_array[i]
end
@default_name = @name
@index = name_array.size
refresh
update_cursor_rect
end
#--------------------------------------------------------------------------
# * Return to Default Name
#--------------------------------------------------------------------------
def restore_default
@name = @default_name
@index = @name.split(//).size
refresh
update_cursor_rect
end
#--------------------------------------------------------------------------
# * Add Character
# character : text character to be added
#--------------------------------------------------------------------------
def add(character)
if @index < @max_char and character != ""
@name += character
@index += 1
refresh
update_cursor_rect
end
end
#--------------------------------------------------------------------------
# * Delete Character
#--------------------------------------------------------------------------
def back
if @index > 0
# Delete 1 text character
name_array = @name.split(//)
@name = ""
for i in 0...name_array.size-1
@name += name_array[i]
end
@index -= 1
refresh
update_cursor_rect
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Draw name
self.contents.font.size = 42
name_array = @name.split(//)
for i in 0...@max_char
c = name_array[i]
if c == nil
c = "_"
end
x = 304 - @max_char * 14 + i * 26
self.contents.draw_text(x, 15, 28, 42, c, 1)
end
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
x = 320 - @max_char * 14 + @index * 26
self.cursor_rect.set(x, 55, 20, 5)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_cursor_rect
end
end
#==============================================================================
# ** Window_NameInput
#------------------------------------------------------------------------------
# This window is used to select text characters on the input name screen.
#==============================================================================
class Window_NameInput < Window_Base
CHARACTER_TABLE =
[
"", ""
]
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 128, 640, 0)
self.contents = Bitmap.new(width - 32, height - 32)
@index = 0
refresh
end
#--------------------------------------------------------------------------
# * Text Character Acquisition
#--------------------------------------------------------------------------
def character
return CHARACTER_TABLE[@index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
end
end
#==============================================================================
# ** Scene_Name
#------------------------------------------------------------------------------
# This class performs name input screen processing.
#==============================================================================
class Scene_Name
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Get actor
@actor = $game_actors[$game_temp.name_actor_id]
# Make windows
@edit_window = Window_NameEdit.new(@actor, $game_temp.name_max_char)
@edit_window.back_opacity = 160
@input_window = Window_NameInput.new
@inst_window = Window_Instruction.new
@inst_window.back_opacity = 160
@nametext_window = Window_TextName.new
@nametext_window.back_opacity = 160
@spriteset = Spriteset_Map.new
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@edit_window.dispose
@input_window.dispose
@inst_window.dispose
@nametext_window.dispose
@spriteset.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@edit_window.update
@input_window.update
@nametext_window.update
@inst_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# If cursor position is at [OK]
if @input_window.character == nil
# If name is empty
if @edit_window.name == ""
# If name is empty
if @edit_window.name == ""
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
return
end
# Change actor name
@actor.name = @edit_window.name
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If cursor position is at maximum
if @edit_window.index == $game_temp.name_max_char
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# If text character is empty
if @input_window.character == ""
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Add text character
@edit_window.add(@input_window.character)
return
end
end
end
#==============================================================================
# ** Scene_Name Leters Modification Made By Nattmath and Improved Cyclope
#------------------------------------------------------------------------------
# Makes you imput stuf with the keyboard
#==============================================================================
class Scene_Name
alias name_input_update update
def update
(65...91).each{|i|
if Input.trigger?(i)
$game_system.se_play($data_system.decision_se)
let = Input::Key.index(i)
let = let.downcase unless Input.press?(Input::Key['Shift'])
@edit_window.add(let)
end}
(48...58).each{|i|
if Input.trigger?(i)
$game_system.se_play($data_system.decision_se)
let = Input::Key.index(i)
@edit_window.add(let)
end}
(186...192).each{|i|
if Input.trigger?(i)
$game_system.se_play($data_system.decision_se)
let = Input::Key.index(i)
@edit_window.add(let)
end}
(219...222).each{|i|
if Input.trigger?(i)
$game_system.se_play($data_system.decision_se)
let = Input::Key.index(i)
@edit_window.add(let)
end}
if Input.trigger?(Input::Key['Backspace'])
@edit_window.back
end
if Input.trigger?(Input::Key['Arrow Left'])
@edit_window.back
end
if Input.trigger?(Input::Key['Enter'])
# If name is empty
if @edit_window.name == ""
# Return to default name
@edit_window.restore_default
# If name is empty
if @edit_window.name == ""
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
return
end
# Change actor name
@actor.name = @edit_window.name
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to map screen
$scene = Scene_Map.new
end
if Input.trigger?(Input::Key['Space'])
@actor.name = @edit_window.name
$game_system.se_play($data_system.decision_se)
@edit_window.add(" ")
end
name_input_update
end
end
#==============================================================================
# ** Pausing with F12
#------------------------------------------------------------------------------
# Zeriab
# Version 1.1
# 2009-05-25 (Year-Month-Day)
#------------------------------------------------------------------------------
# * Version History :
#
# Version 1.0 -------------------------------------------------- (2009-05-22)
# - First release
#
# Version 1.1 -------------------------------------------------- (2009-05-25)
# - The pause image now appears immediately when F12 is pressed.
# - Transitions are cut short rather than restarted when F12 is pressed.
#------------------------------------------------------------------------------
# * Description :
#
# This script changes the functionality of pressing F12 during the game
# from resetting the game to (un)pausing the game. A picture is displayed
# while the game is paused. (Having a picture is optional)
#------------------------------------------------------------------------------
# * License :
#
# Copyright (C) 2009 Zeriab
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser Public License for more details.
#
# For the full license see <http://www.gnu.org/licenses/>
# The GNU General Public License: http://www.gnu.org/licenses/gpl.txt
# The GNU Lesser General Public License: http://www.gnu.org/licenses/lgpl.txt
#------------------------------------------------------------------------------
# * Compatibility :
#
# Is most likely not compatible with other F12 prevention scripts.
#------------------------------------------------------------------------------
# * Instructions :
#
# Place this script anywhere above main.
# The image file 'pause' present in Graphics/Pictures is used.
# Note: No picture is shown if there is no 'pause' in Graphics/Pictures.
#==============================================================================
#=============================================================================
# ** Reset class (because it won't be defined until F12 is pressed otherwise)
#=============================================================================
class Reset < Exception
end
#=============================================================================
# ** Module Graphics
#=============================================================================
module Graphics
class << self
#-------------------------------------------------------------------------
# * Aliases Graphics.update and Graphics.transition
#-------------------------------------------------------------------------
unless self.method_defined?(:zeriab_f12_pause_update)
alias_method(:zeriab_f12_pause_update, :update)
alias_method(:zeriab_f12_pause_transition, :transition)
end
#-------------------------------------------------------------------------
# Change the update method so F12 toggles pause
#-------------------------------------------------------------------------
def update(*args)
# Try to update normally
begin
zeriab_f12_pause_update(*args)
return
rescue Reset
# Do nothing
end
# F12 has been pressed
done = false
# Store frame count
frame_count = Graphics.frame_count
# Show pause image
@sprite = Sprite.new
@sprite.z = 9999
begin
@sprite.bitmap = RPG::Cache.picture('pause')
rescue
@sprite.bitmap = Bitmap.new(32,32)
end
# Keep trying to do the update
while !done
begin
zeriab_f12_pause_update(*args)
done = true
rescue Reset
# Do Nothing
end
end
# F12 has been released, update until it is pressed again
while done
begin
zeriab_f12_pause_update(*args)
rescue Reset
done = false
end
end
# F12 has been pressed, keep trying to update
while !done
begin
zeriab_f12_pause_update(*args)
done = true
rescue Reset
# Do nothing
end
end
# F12 has been released, dispose pause image
@sprite.dispose
# Set proper frame count
Graphics.frame_count = frame_count
end
#-------------------------------------------------------------------------
# Changes the transition so it is cut short if F12 is pressed
#-------------------------------------------------------------------------
def transition(*args)
done = false
# Keep trying to do the transition
while !done
begin
zeriab_f12_pause_transition(*args)
done = true
rescue Reset
# Set transition length to 0 frames.
args[0] = 0
end
end
end
end
end
on_decision(make_filename(@file_index))
#==============================================================================
# * Scene_File
#------------------------------------------------------------------------------
# It is superclass of the saving picture and the load picture.
#==============================================================================
class Scene_File
#--------------------------------------------------------------------------
# - Object initialization
# help_text : The character string which is indicated in the help window
#--------------------------------------------------------------------------
def initialize(help_text)
@help_text = help_text
end
#--------------------------------------------------------------------------
# - Main processing
#--------------------------------------------------------------------------
def main
# Drawing up the help window
@help_window = Window_Help.new
@help_window.set_text(@help_text)
# Drawing up the saving file window
@savefile_windows = []
for i in 0..3
@savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
end
# Selecting the file which was operated lastly
@file_index = $game_temp.last_file_index
@savefile_windows[@file_index].selected = true
# Transition execution
Graphics.transition
# Main loop
loop do
# Renewing the game picture
Graphics.update
# Updating the information of input
Input.update
# Frame renewal
update
# When the picture changes, discontinuing the loop
if $scene != self
break
end
end
# Transition preparation
Graphics.freeze
# Releasing the window
@help_window.dispose
for i in @savefile_windows
i.dispose
end
end
#--------------------------------------------------------------------------
# - Frame renewal
#--------------------------------------------------------------------------
def update
# Renewing the window
@help_window.update
for i in @savefile_windows
i.update
end
# When C button is pushed
if Input.trigger?(Input::C)
# Method on_decision (definition ahead succeeding) it calls
on_decision(make_filename(@file_index))
$game_temp.last_file_index = @file_index
return
end
# The B when button is pushed
if Input.trigger?(Input::B)
# od on_cancel (definition ahead succeeding) it calls
on_cancel
return
end
# When the bottom of the direction button is pushed
if Input.repeat?(Input::DOWN)
# Depression state under the direction button is not repeat when
# Or when cursor position it is before from 3
if Input.trigger?(Input::DOWN) or @file_index < 3
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# Moving cursor under
@savefile_windows[@file_index].selected = false
@file_index = (@file_index + 1) % 4
@savefile_windows[@file_index].selected = true
return
end
end
# When the top of the direction button is pushed
if Input.repeat?(Input::UP)
# Depression state on the direction button is not repeat when
# Or when cursor position it is rear from 0
if Input.trigger?(Input::UP) or @file_index > 0
# Performing cursor SE
$game_system.se_play($data_system.cursor_se)
# Moving cursor on
@savefile_windows[@file_index].selected = false
@file_index = (@file_index + 3) % 4
@savefile_windows[@file_index].selected = true
return
end
end
end
#--------------------------------------------------------------------------
# - Compilation of file name
# file_index : Index of saving file (0 - 3)
#--------------------------------------------------------------------------
def make_filename(file_index)
return "Save#{file_index + 1}.rxdata"
end
end
def make_weaponfile(file_index)
return "Weapons#{file_index + 1}.rxdata"
end
def make_classfile(file_index)
return "Classes#{file_index + 1}.rxdata"
end