赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 818 |
最后登录 | 2014-8-11 |
在线时间 | 4 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 4 小时
- 注册时间
- 2014-8-2
- 帖子
- 15
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 YS4RWQEYTEF 于 2014-8-4 09:00 编辑
我用的是这个脚本,请问怎么把读档改成存档?
#encoding:utf-8 #============================================================================== # ■ Window_MenuStatus #------------------------------------------------------------------------------ # 菜单画面中,显示队伍成员状态的窗口 #============================================================================== class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # ● 初始化对象 #-------------------------------------------------------------------------- def initialize(x, y) super(x, y, window_width, window_height) self.y = Graphics.height - self.height @pending_index = -1 refresh end #-------------------------------------------------------------------------- # ● 获取窗口的高度 #-------------------------------------------------------------------------- def window_height 112 end #-------------------------------------------------------------------------- # ● 获取项目数 #-------------------------------------------------------------------------- def item_max return 1 #$game_party.members.size end #-------------------------------------------------------------------------- # ● 绘制简单的状态 #-------------------------------------------------------------------------- def draw_actor_simple_status(actor, x, y) draw_actor_name(actor, x, y) draw_actor_level(actor, x, y + line_height * 1 + 10) draw_actor_icons(actor, x, y + line_height * 2) draw_actor_class(actor, x + 120, y) end #-------------------------------------------------------------------------- # ● 绘制等级 #-------------------------------------------------------------------------- def draw_actor_level(actor, x, y) change_color(system_color) draw_text(x, y, 64, line_height, Vocab::level_a) change_color(normal_color) draw_text(x + 64, y, 24, line_height, actor.level, 2) end end #============================================================================== # ■ Window_MenuCommand #------------------------------------------------------------------------------ # 菜单画面中显示指令的窗口 #============================================================================== VOCAB_LOAD = "读档" class Window_MenuCommand < Window_Command #-------------------------------------------------------------------------- # ● 生成指令列表 #-------------------------------------------------------------------------- def make_command_list add_main_commands add_original_commands add_load_command add_game_end_command end #-------------------------------------------------------------------------- # ● 向指令列表添加主要的指令 #-------------------------------------------------------------------------- def add_main_commands add_command(Vocab::item, :item, main_commands_enabled) end #-------------------------------------------------------------------------- # ● 添加读档指令 #-------------------------------------------------------------------------- def add_load_command add_command(VOCAB_LOAD, :load, continue_enabled) end #-------------------------------------------------------------------------- # ● 获取“继续游戏”选项是否有效 #-------------------------------------------------------------------------- def continue_enabled DataManager.save_file_exists? end end #============================================================================== # ■ Scene_Menu #------------------------------------------------------------------------------ # 菜单画面 #============================================================================== class Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # ● 开始处理 #-------------------------------------------------------------------------- def start super create_command_window create_status_window end #-------------------------------------------------------------------------- # ● 生成指令窗口 #-------------------------------------------------------------------------- def create_command_window @command_window = Window_MenuCommand.new @command_window.x = 0 #(Graphics.width - @command_window.width) / 2 @command_window.y = (Graphics.height - @command_window.height) #/ 2 @command_window.set_handler(:item, method(:command_item)) @command_window.set_handler(:load, method(:command_load)) @command_window.set_handler(:game_end, method(:command_game_end)) @command_window.set_handler(:cancel, method(:return_scene)) end #-------------------------------------------------------------------------- # ● 指令“读档” #-------------------------------------------------------------------------- def command_load SceneManager.call(Scene_Load) end end
#encoding:utf-8
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 菜单画面中,显示队伍成员状态的窗口
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, window_height)
self.y = Graphics.height - self.height
@pending_index = -1
refresh
end
#--------------------------------------------------------------------------
# ● 获取窗口的高度
#--------------------------------------------------------------------------
def window_height
112
end
#--------------------------------------------------------------------------
# ● 获取项目数
#--------------------------------------------------------------------------
def item_max
return 1 #$game_party.members.size
end
#--------------------------------------------------------------------------
# ● 绘制简单的状态
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x, y)
draw_actor_level(actor, x, y + line_height * 1 + 10)
draw_actor_icons(actor, x, y + line_height * 2)
draw_actor_class(actor, x + 120, y)
end
#--------------------------------------------------------------------------
# ● 绘制等级
#--------------------------------------------------------------------------
def draw_actor_level(actor, x, y)
change_color(system_color)
draw_text(x, y, 64, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 64, y, 24, line_height, actor.level, 2)
end
end
#==============================================================================
# ■ Window_MenuCommand
#------------------------------------------------------------------------------
# 菜单画面中显示指令的窗口
#==============================================================================
VOCAB_LOAD = "读档"
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# ● 生成指令列表
#--------------------------------------------------------------------------
def make_command_list
add_main_commands
add_original_commands
add_load_command
add_game_end_command
end
#--------------------------------------------------------------------------
# ● 向指令列表添加主要的指令
#--------------------------------------------------------------------------
def add_main_commands
add_command(Vocab::item, :item, main_commands_enabled)
end
#--------------------------------------------------------------------------
# ● 添加读档指令
#--------------------------------------------------------------------------
def add_load_command
add_command(VOCAB_LOAD, :load, continue_enabled)
end
#--------------------------------------------------------------------------
# ● 获取“继续游戏”选项是否有效
#--------------------------------------------------------------------------
def continue_enabled
DataManager.save_file_exists?
end
end
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
# 菜单画面
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# ● 开始处理
#--------------------------------------------------------------------------
def start
super
create_command_window
create_status_window
end
#--------------------------------------------------------------------------
# ● 生成指令窗口
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_MenuCommand.new
@command_window.x = 0 #(Graphics.width - @command_window.width) / 2
@command_window.y = (Graphics.height - @command_window.height) #/ 2
@command_window.set_handler(:item, method(:command_item))
@command_window.set_handler(:load, method(:command_load))
@command_window.set_handler(:game_end, method(:command_game_end))
@command_window.set_handler(:cancel, method(:return_scene))
end
#--------------------------------------------------------------------------
# ● 指令“读档”
#--------------------------------------------------------------------------
def command_load
SceneManager.call(Scene_Load)
end
end
改成了这样但是是灰色的
#encoding:utf-8 #============================================================================== # ■ Window_MenuStatus #------------------------------------------------------------------------------ # 菜单画面中,显示队伍成员状态的窗口 #============================================================================== class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # ● 初始化对象 #-------------------------------------------------------------------------- def initialize(x, y) super(x, y, window_width, window_height) self.y = Graphics.height - self.height @pending_index = -1 refresh end #-------------------------------------------------------------------------- # ● 获取窗口的高度 #-------------------------------------------------------------------------- def window_height 112 end #-------------------------------------------------------------------------- # ● 获取项目数 #-------------------------------------------------------------------------- def item_max return 1 #$game_party.members.size end #-------------------------------------------------------------------------- # ● 绘制简单的状态 #-------------------------------------------------------------------------- def draw_actor_simple_status(actor, x, y) draw_actor_name(actor, x, y) draw_actor_level(actor, x, y + line_height * 1 + 10) draw_actor_icons(actor, x, y + line_height * 2) draw_actor_class(actor, x + 120, y) end #-------------------------------------------------------------------------- # ● 绘制等级 #-------------------------------------------------------------------------- def draw_actor_level(actor, x, y) change_color(system_color) draw_text(x, y, 64, line_height, Vocab::level_a) change_color(normal_color) draw_text(x + 64, y, 24, line_height, actor.level, 2) end end #============================================================================== # ■ Window_MenuCommand #------------------------------------------------------------------------------ # 菜单画面中显示指令的窗口 #============================================================================== VOCAB_SAVE = "存档" class Window_MenuCommand < Window_Command #-------------------------------------------------------------------------- # ● 生成指令列表 #-------------------------------------------------------------------------- def make_command_list add_main_commands add_original_commands add_save_command add_game_end_command end #-------------------------------------------------------------------------- # ● 向指令列表添加主要的指令 #-------------------------------------------------------------------------- def add_main_commands add_command(Vocab::item, :item, main_commands_enabled) end #-------------------------------------------------------------------------- # ● 添加存档指令 #-------------------------------------------------------------------------- def add_save_command add_command(VOCAB_SAVE, :save, continue_enabled) end #-------------------------------------------------------------------------- # ● 获取“继续游戏”选项是否有效 #-------------------------------------------------------------------------- def continue_enabled DataManager.save_file_exists? end end #============================================================================== # ■ Scene_Menu #------------------------------------------------------------------------------ # 菜单画面 #============================================================================== class Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # ● 开始处理 #-------------------------------------------------------------------------- def start super create_command_window create_status_window end #-------------------------------------------------------------------------- # ● 生成指令窗口 #-------------------------------------------------------------------------- def create_command_window @command_window = Window_MenuCommand.new @command_window.x = 0 #(Graphics.width - @command_window.width) / 2 @command_window.y = (Graphics.height - @command_window.height) #/ 2 @command_window.set_handler(:item, method(:command_item)) @command_window.set_handler(:save, method(:command_save)) @command_window.set_handler(:game_end, method(:command_game_end)) @command_window.set_handler(:cancel, method(:return_scene)) end #-------------------------------------------------------------------------- # ● 指令“存档” #-------------------------------------------------------------------------- def command_save SceneManager.call(Scene_Save) end end
#encoding:utf-8
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 菜单画面中,显示队伍成员状态的窗口
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, window_height)
self.y = Graphics.height - self.height
@pending_index = -1
refresh
end
#--------------------------------------------------------------------------
# ● 获取窗口的高度
#--------------------------------------------------------------------------
def window_height
112
end
#--------------------------------------------------------------------------
# ● 获取项目数
#--------------------------------------------------------------------------
def item_max
return 1 #$game_party.members.size
end
#--------------------------------------------------------------------------
# ● 绘制简单的状态
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x, y)
draw_actor_level(actor, x, y + line_height * 1 + 10)
draw_actor_icons(actor, x, y + line_height * 2)
draw_actor_class(actor, x + 120, y)
end
#--------------------------------------------------------------------------
# ● 绘制等级
#--------------------------------------------------------------------------
def draw_actor_level(actor, x, y)
change_color(system_color)
draw_text(x, y, 64, line_height, Vocab::level_a)
change_color(normal_color)
draw_text(x + 64, y, 24, line_height, actor.level, 2)
end
end
#==============================================================================
# ■ Window_MenuCommand
#------------------------------------------------------------------------------
# 菜单画面中显示指令的窗口
#==============================================================================
VOCAB_SAVE = "存档"
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# ● 生成指令列表
#--------------------------------------------------------------------------
def make_command_list
add_main_commands
add_original_commands
add_save_command
add_game_end_command
end
#--------------------------------------------------------------------------
# ● 向指令列表添加主要的指令
#--------------------------------------------------------------------------
def add_main_commands
add_command(Vocab::item, :item, main_commands_enabled)
end
#--------------------------------------------------------------------------
# ● 添加存档指令
#--------------------------------------------------------------------------
def add_save_command
add_command(VOCAB_SAVE, :save, continue_enabled)
end
#--------------------------------------------------------------------------
# ● 获取“继续游戏”选项是否有效
#--------------------------------------------------------------------------
def continue_enabled
DataManager.save_file_exists?
end
end
#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
# 菜单画面
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# ● 开始处理
#--------------------------------------------------------------------------
def start
super
create_command_window
create_status_window
end
#--------------------------------------------------------------------------
# ● 生成指令窗口
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_MenuCommand.new
@command_window.x = 0 #(Graphics.width - @command_window.width) / 2
@command_window.y = (Graphics.height - @command_window.height) #/ 2
@command_window.set_handler(:item, method(:command_item))
@command_window.set_handler(:save, method(:command_save))
@command_window.set_handler(:game_end, method(:command_game_end))
@command_window.set_handler(:cancel, method(:return_scene))
end
#--------------------------------------------------------------------------
# ● 指令“存档”
#--------------------------------------------------------------------------
def command_save
SceneManager.call(Scene_Save)
end
end
|
|