Dostałem od Darknessa ten skrypt. Chciałbym wykorzystać go w grze, ale wygląda na to, że nadpisuje ładowanie i zapisywanie gry, tak jak Neo Save System. Byłbym wdzięczny, jeśliby ktoś dokonał fuzji, albo przerobił ten skrypt tak, by był bardziej skory do współpracy...
Spoiler:
Kod:
#===============================================================================
# +++ MOG - Advanced Load Bar VX (v1.0) +++
#===============================================================================
# By Moghunter
# http://www.atelier-rgss.com
#===============================================================================
# Apresenta uma barra de carregar entre as cenas de Save e Load.
#
# O propósito deste Script é apresentar alguns artworks de seu jogo
# enquanto o jogador espera a barra de leitura.
#
#===============================================================================
# Você pode adpatar esse script em alguma outra Scene ou ativar pelo evento.
# Basta usar este código.
#
# $scene = Scene_Load_Bar.new
#===============================================================================
module MOG_LOAD_BAR
# Tempo para fazer load.(Segundos)
LOAD_DURATION = 3
# Ativar o sistema ao carregar o jogo.
ENABLE_LOAD_BAR_FOR_SCENE_LOAD = true
# Ativar o sistema ao salvar o jogo.
ENABLE_LOAD_BAR_FOR_SCENE_SAVE = true
# Definição das imagens que ficarão no plano de fundo.
LOAD_BACKGROUND_PICTURES = [
"Background_1",
#"Background_2",
#"Background_3",
#"Background_4",
#"Background_5",
#"Background_6"
#"Background_7",
#"Background_8",
#"Background_9",
#"Background_10",
# ...
]
# Ativar ordem aleatória ou sequencial.
PICTURE_RANDOM_SELECTION = false
# Posição do geral da Hud.
LOAD_BAR_POSITION = [30,350]
# Posição do medidor.
LOAD_BAR_METER_POSITION = [11,27]
# Posição do Texto.
LOAD_BAR_TEXT_POSITION = [ 10, -3]
# Som ao carregar o arquivo.
LOAD_SE = "Bow1"
# Velocidade da animação do medidor.
LOAD_BAR_FLOW_SPEED = 25
# Definição da Cena que será ativada após salvar via menu.
# Caso o save seja feito pelo evento, a cena será o Mapa.
RETURN_TO_SCENE = Scene_Menu.new(4)
# Ativar a animação de levitação do texto.
ENABLE_FLOAT_TEXT_ANIMATION = true
# Apresentar o sprite do personagem.
ENABLE_CHARACTER_SPRITE = true
# Ativar barras laterais.
ENABLE_STRIPE_SPRITE = true
# Velocidade das barras laterais.
STRIPE_SPEED = 1
end
#--------------------------------------------------------------------------
# ● Initialize
#--------------------------------------------------------------------------
alias load_bar_initialize initialize
def initialize
load_bar_initialize
@load_bar_pre_index = -1
@save_calling_load_bar = false
end
end
#=============================================================================
# ■ Game_System
#=============================================================================
class Game_System
attr_accessor :load_bar_pre_index
#--------------------------------------------------------------------------
# ● Initialize
#--------------------------------------------------------------------------
alias load_bar_initialize initialize
def initialize
load_bar_initialize
@load_bar_pre_index = 0
end
#--------------------------------------------------------------------------
# ● BGS Stop
#--------------------------------------------------------------------------
def bgs_stop
Audio.bgs_stop
end
end
#=============================================================================
# ■ Scene Load Bar
#=============================================================================
class Scene_Load_Bar
include MOG_LOAD_BAR
#--------------------------------------------------------------------------
# ● Main
#--------------------------------------------------------------------------
def main
Graphics.transition
execute_loop
execute_dispose
end
#--------------------------------------------------------------------------
# ● Execute Loop
#--------------------------------------------------------------------------
def execute_loop
loop do
Graphics.update
update
if $scene != self
break
end
end
end
#--------------------------------------------------------------------------
# ● update_float_text
#--------------------------------------------------------------------------
def update_float_text
return unless ENABLE_FLOAT_TEXT_ANIMATION
@text_float_time += 1
case @text_float_time
when 1..10
@text_float_y += 1
when 11..20
@text_float_y -= 1
else
@text_float_y = 0
@text_float_time = 0
end
@text_sprite.y = @text_fy + @text_float_y
end
#--------------------------------------------------------------------------
# ● Update Bar Flow
#--------------------------------------------------------------------------
def update_bar_flow
@bar_sprite.bitmap.clear
@bar_width = @bar_range * @load_duration / @load_duration_max
@bar_width = @bar_range if @load_duration > @load_duration_max
@bar_src_rect = Rect.new(@bar_flow, 0,@bar_width, @bar_height)
@bar_bitmap.blt(0,0, @bar_image, @bar_src_rect)
@bar_flow += LOAD_BAR_FLOW_SPEED
if @bar_flow >= @bar_image.width - @bar_range
@bar_flow = 0
end
end
#--------------------------------------------------------------------------
# ● Update Bar Duration
#--------------------------------------------------------------------------
def update_bar_duration
@load_duration += 1
if @load_duration == @load_duration_max
Audio.se_play("Audio/SE/" + LOAD_SE,100,100) rescue nil
elsif @load_duration == @load_duration_max + 10
if @bar_type == 0 or $game_temp.save_calling_load_bar
if @bar_type == 0
$game_temp.load_pre_bgm.play
$game_temp.load_pre_bgs.play
end
$scene = Scene_Map.new
else
$scene = MOG_LOAD_BAR::RETURN_TO_SCENE
end
$game_temp.save_calling_load_bar = false
end
end
end
#=============================================================================
# ■ Game_Temp
#=============================================================================
class Scene_File < Scene_Base
#--------------------------------------------------------------------------
# * Return to Original Screen
#--------------------------------------------------------------------------
alias mog_adv_load_bar_return_scene return_scene
def return_scene
mog_adv_load_bar_return_scene
$game_temp.save_calling_load_bar = true if @from_event
$scene = Scene_Load_Bar.new(1)
end
#===============================================================
# ● [VX] ◦ Neo Save System III ◦ □
#--------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 15/02/2009
# ◦ Version: 3.0
#--------------------------------------------------------------
# ◦ Log III:
# - Change back to draw tilemap as screenshot. Don't need any image.
# - For drawing tilemap, the characters won't show on the tilemap.
#--------------------------------------------------------------
# ◦ Log II:
# - Screenshot DLL is not work with Vista Aero, so I remove it
# and use image for each map instead of screenshot.
# - Actor's level in last version (V.1) is incorrect.
#--------------------------------------------------------------
# ◦ Features:
# - Unlimited save slots, you can choose max save slot
# - You can use image for scene's background
# - Choose your save file's name, and folder to store save files
# - Choose to show only information you want
# - Editable text for information's title
# - Draw tilemap for map that player is currently in.
# - Remove text you don't want from map's name (e.g. tags for special script)
# - Choose map that you don't want to show its name
# - Include save confirmation window before overwrite old save
#=================================================================
module Wora_NSS
#==========================================================================
# * START NEO SAVE SYSTEM - SETUP
#--------------------------------------------------------------------------
NSS_WINDOW_OPACITY = 200 # All windows' opacity (Lowest 0 - 255 Highest)
# You can change this to 0 in case you want to use image for background
NSS_IMAGE_BG = '' # Background image file name, it must be in folder Picture.
# use '' for no background
NSS_IMAGE_BG_OPACITY = 255 # Opacity for background image
MAX_SAVE_SLOT = 20 # Max save slots no.
SLOT_NAME = 'Historia {id}'
# Name of the slot (show in save slots list), use {id} for slot ID
SAVE_FILE_NAME = 'Save{id}.rvdata'
# Save file name, you can also change its file type from .rvdata to other
# use {id} for save slot ID
SAVE_PATH = 'Save/' # Path to store save file, e.g. 'Save/' or '' (for game folder)
SAVED_SLOT_ICON = 133 # Icon Index for saved slot
EMPTY_SLOT_ICON = 141 # Icon Index for empty slot
EMPTY_SLOT_TEXT = '-Tabula Rasa-' # Text to show for empty slot's data
MAP_NAME_TEXT_SUB = %w{}
# Text that you want to remove from map name,
# e.g. %w{[LN] [DA]} will remove text '[LN]' and '[DA]' from map name
MAP_NO_NAME_LIST = [] # ID of Map that will not show map name, e.g. [1,2,3]
MAP_NO_NAME_NAME = '.-.-.-.-.' # What you will use to call map in no name list
MAP_BORDER = Color.new(0,0,0,200) # Map image border color (R,G,B,Opacity)
FACE_BORDER = Color.new(0,0,0,200) # Face border color
## SAVE CONFIRMATION WINDOW ##
SFC_Text_Confirm = 'Nadpisz dawną Historię' # Text to confirm to save file
SFC_Text_Cancel = 'Wróć' # Text to cancel to save
SFC_Window_Width = 300 # Width of Confirmation Window
SFC_Window_X_Offset = 0 # Move Confirmation Window horizontally
SFC_Window_Y_Offset = 0 # Move Confirmation Window vertically
#----------------------------------------------------------------------
# END NEO SAVE SYSTEM - SETUP
#=========================================================================
end
def make_filename(file_index)
return SAVE_PATH + SAVE_FILE_NAME.gsub(/\{ID\}/i) { (file_index).to_s }
end
def file_exist?(slot_id)
return @exist_list[slot_id] if !@exist_list[slot_id].nil?
@exist_list[slot_id] = FileTest.exist?(make_filename(slot_id))
return @exist_list[slot_id]
end
def get_mapname(map_id)
if @map_data.nil?
@map_data = load_data("Data/MapInfos.rvdata")
end
if @map_name[map_id].nil?
if MAP_NO_NAME_LIST.include?(map_id)
@map_name[map_id] = MAP_NO_NAME_NAME
else
@map_name[map_id] = @map_data[map_id].name
MAP_NAME_TEXT_SUB.each_index do |i|
@map_name[map_id].sub!(MAP_NAME_TEXT_SUB[i], '')
end
end
end
return @map_name[map_id]
end
def dispose_tilemap
unless @tilemap.nil?
@tilemap.dispose
@tilemap = nil
end
end
end
class Scene_Title < Scene_Base
def check_continue
file_name = Wora_NSS::SAVE_PATH + Wora_NSS::SAVE_FILE_NAME.gsub(/\{ID\}/i) { '*' }
@continue_enabled = (Dir.glob(file_name).size > 0)
end
end
#======================================================================
# END - NEO SAVE SYSTEM by Woratana
#======================================================================
________________________
"Na trolla pewne są tylko dwie pewne metody, jedna samopowtarzalna i druga, wymagająca przeładowania ręcznego."
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum