Krótki opis:
Skrypt zmienia wygląd okna zapisu i zwiększa ilość slotów.
Autor:
YANFLY
Tłumaczenie:
Doom
Kompatybilność:
RPG Maker VX Ace
Skrypt:
Spoiler:
Kod:
#==============================================================================
#
# Yanfly Engine Ace - Ace Save Engine v1.02
# -- Last Updated: 2012.01.23
# -- Level: Normal
# -- Requires: n/a
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-SaveEngine"] = true
#==============================================================================
# Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.23 - Anti-crash method added for removed maps.
# 2011.12.26 - Compatibility Update: New Game+
# 2011.12.26 - Started Script and Finished.
#
#==============================================================================
# Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script provides a new save interface for the player. Along with a new
# interface, the player can also load and delete saves straight from the menu
# itself. This will in turn make the save command from the Main Menu always
# available, but the save option within the new save menu will be enabled
# depending on whether or not it is allowed or disallowed. From the interface,
# the player is given more information regarding the save file including the
# the location the player saved at, the amount of gold available, and any
# variables that you want to show the player as well.
#
#==============================================================================
# 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.
#
# For first time installers, be warned that loading this script the first time
# may not display all information in the status window for save files made
# before the installation of this script. To remedy this, just load up the save
# and save the file again.
#
#==============================================================================
# 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 SAVE
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Slot Window Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This section adjusts how the slot window appears on the left side of the
# screen. This also adjusts the maximum number of saves a player can make,
# the way the slot names appear, and the icons used.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
MAX_FILES = 24 # Maximum saves a player can make. Default: 16
SLOT_NAME = "Zapis %s" # How the file slots will be named.
# These are the icons
SAVE_ICON = 368 # Icon used to indicate a save is present.
EMPTY_ICON = 375 # Icon used to indicate an empty file.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Action Window Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This section adjusts how the action window appears, the sound effect
# played when deleting files, and what appears in the help window above.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ACTION_LOAD = "Załaduj" # Text used for loading games.
ACTION_SAVE = "Zapisz" # Text used for saving games.
ACTION_DELETE = "Usuń" # Text used for deleting games.
DELETE_SOUND = RPG::SE.new("Collapse3", 100, 100) # Sound for deleting.
# These text settings adjust what displays in the help window.
SELECT_HELP = "Wybierz slot zapisu."
LOAD_HELP = "Załadowanie danych z zapisanego stanu gry."
SAVE_HELP = "Zapisuje bieżący postęp w grze."
DELETE_HELP = "Skasuj wszystkie zapisy."
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Status Window Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This section adjusts how the status window appears in the middle of the
# screen (that displays the game's data) such as the total playtime, total
# times saved, total gold, the party's current location, and the variables
# to be displayed.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
EMPTY_TEXT = "Pusty slot" # Text used when no save data is present.
PLAYTIME = "Czas gry" # Text used for total playtime.
TOTAL_SAVE = "Wszystkie zapisy: " # Text used to indicate total saves.
TOTAL_GOLD = "Całe złoto: " # Text used to indicate total gold.
LOCATION = "Lokacja: " # Text used to indicate current location.
# These variables will be shown in each of the two columns for those who
# would want to display more information than just what's shown. Input the
# variables into the arrays below to designate what data will be shown.
COLUMN1_VARIABLES = [1, 2, 3]
COLUMN2_VARIABLES = [4, 5, 6]
end # SAVE
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.
#==============================================================================
#--------------------------------------------------------------------------
# draw_save_location
#--------------------------------------------------------------------------
def draw_save_location(dx, dy, dw)
return if @header[:map].nil?
reset_font_settings
change_color(system_color)
draw_text(dx, dy, dw, line_height, YEA::SAVE::LOCATION)
change_color(normal_color)
cx = text_size(YEA::SAVE::LOCATION).width
return if $data_mapinfos[@header[:map]].nil?
text = @header[:map].display_name
text = $data_mapinfos[@header[:map].map_id].name if text == ""
draw_text(dx+cx, dy, dw-cx, line_height, text)
end
#--------------------------------------------------------------------------
# draw_save_characters
#--------------------------------------------------------------------------
def draw_save_characters(dx, dy)
return if @header[:party].nil?
reset_font_settings
make_font_smaller
dw = (contents.width - dx) / @header[:party].max_battle_members
dx += dw/2
for member in @header[:party].battle_members
next if member.nil?
member = @header[:actors][member.id]
change_color(normal_color)
draw_actor_graphic(member, dx, dy)
text = member.name
draw_text(dx-dw/2, dy, dw, line_height, text, 1)
text = member.level.group
draw_text(dx-dw/2, dy-line_height, dw-4, line_height, text, 2)
cx = text_size(text).width
change_color(system_color)
text = Vocab::level_a
draw_text(dx-dw/2, dy-line_height, dw-cx-4, line_height, text, 2)
dx += dw
end
end
#--------------------------------------------------------------------------
# draw_save_column1
#--------------------------------------------------------------------------
def draw_save_column1(dx, dy, dw)
data = YEA::SAVE::COLUMN1_VARIABLES
draw_column_data(data, dx, dy, dw)
end
#--------------------------------------------------------------------------
# draw_save_column2
#--------------------------------------------------------------------------
def draw_save_column2(dx, dy, dw)
data = YEA::SAVE::COLUMN2_VARIABLES
draw_column_data(data, dx, dy, dw)
end
#--------------------------------------------------------------------------
# draw_column_data
#--------------------------------------------------------------------------
def draw_column_data(data, dx, dy, dw)
return if @header[:variables].nil?
reset_font_settings
for variable_id in data
next if $data_system.variables[variable_id].nil?
change_color(system_color)
name = $data_system.variables[variable_id]
draw_text(dx, dy, dw, line_height, name, 0)
value = @header[:variables][variable_id].group
change_color(normal_color)
draw_text(dx, dy, dw, line_height, value, 2)
dy += line_height
end
end
#--------------------------------------------------------------------------
# add_load_command
#--------------------------------------------------------------------------
def add_load_command
add_command(YEA::SAVE::ACTION_LOAD, :load, load_enabled?)
end
#--------------------------------------------------------------------------
# load_enabled?
#--------------------------------------------------------------------------
def load_enabled?
return false if @header.nil?
return true
end
#--------------------------------------------------------------------------
# add_save_command
#--------------------------------------------------------------------------
def add_save_command
add_command(YEA::SAVE::ACTION_SAVE, :save, save_enabled?)
end
#--------------------------------------------------------------------------
# save_enabled?
#--------------------------------------------------------------------------
def save_enabled?
return false if @header.nil? && SceneManager.scene_is?(Scene_Load)
return false if SceneManager.scene_is?(Scene_Load)
return false if $game_system.save_disabled
return true
end
#--------------------------------------------------------------------------
# add_delete_command
#--------------------------------------------------------------------------
def add_delete_command
add_command(YEA::SAVE::ACTION_DELETE, :delete, delete_enabled?)
end
#--------------------------------------------------------------------------
# delete_enabled?
#--------------------------------------------------------------------------
def delete_enabled?
return false if @header.nil?
return true
end
#--------------------------------------------------------------------------
# update_help
#--------------------------------------------------------------------------
def update_help
case current_symbol
when :load; @help_window.set_text(YEA::SAVE::LOAD_HELP)
when :save; @help_window.set_text(YEA::SAVE::SAVE_HELP)
when :delete; @help_window.set_text(YEA::SAVE::DELETE_HELP)
end
end
#--------------------------------------------------------------------------
# overwrite method: start
#--------------------------------------------------------------------------
def start
super
create_all_windows
end
#--------------------------------------------------------------------------
# overwrite method: terminate
#--------------------------------------------------------------------------
def terminate
super
end
#--------------------------------------------------------------------------
# overwrite method: update
#--------------------------------------------------------------------------
def update
super
end
#--------------------------------------------------------------------------
# new method: create_all_windows
#--------------------------------------------------------------------------
def create_all_windows
create_help_window
create_file_window
create_action_window
create_status_window
end
#--------------------------------------------------------------------------
# new method: on_file_ok
#--------------------------------------------------------------------------
def on_file_ok
@action_window.activate
index = SceneManager.scene_is?(Scene_Load) ? 0 : 1
@action_window.select(index)
end
#--------------------------------------------------------------------------
# new method: on_action_cancel
#--------------------------------------------------------------------------
def on_action_cancel
@action_window.unselect
@file_window.activate
@help_window.set_text(YEA::SAVE::SELECT_HELP)
end
#--------------------------------------------------------------------------
# new method: on_action_load
#--------------------------------------------------------------------------
def on_action_load
if DataManager.load_game(@file_window.index)
on_load_success
else
Sound.play_buzzer
end
end
#--------------------------------------------------------------------------
# new method: on_action_save
#--------------------------------------------------------------------------
def on_action_save
@action_window.activate
if DataManager.save_game(@file_window.index)
on_save_success
refresh_windows
else
Sound.play_buzzer
end
end
#--------------------------------------------------------------------------
# overwrite method: on_save_success
#--------------------------------------------------------------------------
def on_save_success; Sound.play_save; end
#--------------------------------------------------------------------------
# new method: on_action_delete
#--------------------------------------------------------------------------
def on_action_delete
@action_window.activate
DataManager.delete_save_file(@file_window.index)
on_delete_success
refresh_windows
end
#--------------------------------------------------------------------------
# new method: on_delete_success
#--------------------------------------------------------------------------
def on_delete_success
YEA::SAVE::DELETE_SOUND.play
end
#--------------------------------------------------------------------------
# new method: refresh_windows
#--------------------------------------------------------------------------
def refresh_windows
@file_window.refresh
@action_window.refresh
@status_window.refresh
end
#--------------------------------------------------------------------------
# overwrite method: on_savefile_ok
#--------------------------------------------------------------------------
def on_savefile_ok; super; end
#--------------------------------------------------------------------------
# overwrite method: on_load_success
#--------------------------------------------------------------------------
def on_load_success; super; end
end # Scene_Load
#==============================================================================
#
# End of File
#
#==============================================================================
U mnie inaczej to wygląda ;/ Jeśli chodzi o Total Saves to mam bardzo blisko kolejnego napisu i jak mam więcej niż 9 zapisane to widać mi tylko jedną liczbę. Np. jak mam 10 to widać tylko 1 ; /
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