Project1
标题:
[脚本汉化]转职脚本----完美Debug版本
[打印本页]
作者:
光的圆周率
时间:
2008-7-20 01:49
标题:
[脚本汉化]转职脚本----完美Debug版本
转职脚本
原 作:The Black Knight
中文化:光的圆周率
版权说明:
使用脚本请保留脚本制作者(范围:地球地区)和汉化者(大中华地区)名称!
使用这个脚本是免费的,使用请注明版权信息.
汉化者的话:这个脚本是注明了有版权信息的,请勿使用于商业用途,有一些不必要汉化的就没有汉化.范例是建立在中文版RM VX 1.02 的基础上的.这个脚本对许多国家的语言都完美支持,您可以在不同的语言环境中放心的使用
使用说明:
将全部脚本完整的插入到Main 脚本前面,然后如果您想在菜单中加入选项,请按这种方法做(以Rpg Maker VX 1.02 汉化版为例):
1.在场景下找到Scene_Menu脚本(在范例中加了★号,如果没有修改菜单的话,您可以直接覆盖,免去以下步骤)
2.在第57行脚本 def create_command_window下面s6 = ***** 下面插入一行:s7 = "转职" (其中s7为变量名,可以自定义,要注意的是就是不能和其他的相同,但是接下来的步骤就要跟着更改,如果已存在s7就改为s8依此类推)
3.在s7 = "转职" 下面的 @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) 行改为: “@command_window = Window_Command.new(160, [s1, s2, s7, s3, s4, s5, s6]) ” (不含中文引号,其中 [s1, s2, s7, s3, s4, s5, s6]为顺序,其中s7为上步的名称,和上面的名称必须相同!
4.完成,检查是否有冲突
#==============================================================================
# ** Scene_Job
# ** 转职脚本 完美Debug版本
#------------------------------------------------------------------------------
# 脚本制作 by The Black Knight
# (aka tk_blackknight, aka Keith Brewer, aka rockstar1986)
# 脚本本地中文化 by 光的圆周率
#
# 使用脚本请保留脚本制作者(范围:地球地区)和汉化者(大中华地区)名称!
# 使用这个脚本是免费的,使用请注明信息.
#
# 注:
# 这个脚本只是为您的游戏建立起基本的转职界面,转职需要靠玩家自己选择.
#
#
# 这个脚本是为了Baka Artses Studios Inc.的需求而编写的.
#==============================================================================
class Scene_Job < Scene_Base
#--------------------------------------------------------------------------
# * 初始化对象
# actor_index : actor index
#--------------------------------------------------------------------------
def initialize(actor_index = 0, from_menu = false)
@actor_index = actor_index
@from_menu = from_menu
end
#--------------------------------------------------------------------------
# * 开始处理
#--------------------------------------------------------------------------
def start
super
@actor = $game_party.members[@actor_index]
create_menu_background
@actor = $game_party.members[@actor_index]
@class_status_window = Window_ClassStatus.new(@actor)
@scenename_window = Window_SceneName.new(0, 0, "转职")
@help_window = Window_Help.new
@help_window.x = 160
@help_window.y = 0
@help_window.width = 384
create_class_list
create_option_list
@command_window.active = false
@command_window2.active = true
end
#--------------------------------------------------------------------------
# * 创建选项列表
#--------------------------------------------------------------------------
def create_option_list
s1 = "转职"
s2 = "退出"
@command_window2 = Window_Command.new(544, [s1, s2], 2)
@command_window2.x = 0
@command_window2.y = 56
@command_window2.height = 56
end
#--------------------------------------------------------------------------
# * 创建角色列表
#--------------------------------------------------------------------------
def create_class_list
s1 = $data_classes[1].name
s2 = $data_classes[2].name
s3 = $data_classes[3].name
s4 = $data_classes[4].name
s5 = $data_classes[5].name
s6 = $data_classes[6].name
s7 = $data_classes[7].name
s8 = $data_classes[8].name
@command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6, s7, s8], 2)
@command_window.x = 0
@command_window.y = 240
@command_window.height = 176
end
#--------------------------------------------------------------------------
# * 终止处理
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@class_status_window.dispose
@scenename_window.dispose
@command_window.dispose
@command_window2.dispose
@help_window.dispose
end
#--------------------------------------------------------------------------
# * 切换到下一个角色
#--------------------------------------------------------------------------
def next_actor
@actor_index += 1
@actor_index %= $game_party.members.size
$scene = Scene_Job.new(@actor_index, @from_menu)
end
#--------------------------------------------------------------------------
# * 切换到上一个角色
#--------------------------------------------------------------------------
def prev_actor
@actor_index += $game_party.members.size - 1
@actor_index %= $game_party.members.size
$scene = Scene_Job.new(@actor_index, @from_menu)
end
#--------------------------------------------------------------------------
# * 更新选择窗口 >> 允许检查输入
#--------------------------------------------------------------------------
def update_class_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@command_window2.active = true
@command_window.active = false
elsif Input.trigger?(Input::C)
Sound.play_decision
case @command_window.index
when 0
@actor.class_id = 1
$scene = Scene_Job.new(@actor_index, @from_menu)
when 1
@actor.class_id = 2
$scene = Scene_Job.new(@actor_index, @from_menu)
when 2
@actor.class_id = 3
$scene = Scene_Job.new(@actor_index, @from_menu)
when 3
@actor.class_id = 4
$scene = Scene_Job.new(@actor_index, @from_menu)
when 4
@actor.class_id = 5
$scene = Scene_Job.new(@actor_index, @from_menu)
when 5
@actor.class_id = 6
$scene = Scene_Job.new(@actor_index, @from_menu)
when 6
@actor.class_id = 7
$scene = Scene_Job.new(@actor_index, @from_menu)
when 7
@actor.class_id = 8
$scene = Scene_Job.new(@actor_index, @from_menu)
end
end
end
#--------------------------------------------------------------------------
# * 更新选择窗口 >> 允许检查输出
#--------------------------------------------------------------------------
def update_option_selection
if Input.trigger?(Input::B)
Sound.play_cancel
if @from_menu == false
$scene = Scene_Map.new
else
$scene = Scene_Menu.new
end
elsif Input.trigger?(Input::C)
Sound.play_decision
case @command_window2.index
when 0
Sound.play_decision
@command_window.active = true
@command_window2.active = false
when 1
Sound.play_decision
if @from_menu == false
$scene = Scene_Map.new
else
$scene = Scene_Menu.new
end
end
end
end
#--------------------------------------------------------------------------
# * 更新框架
#--------------------------------------------------------------------------
def update
update_menu_background
if @command_window.active
#如果窗口为活动的, 那么就在帮助窗口中显示:
@help_window.set_text("请选择需要进阶的职业")
else
#如果没满足,那么就显示:
@help_window.set_text("")
end
if @command_window2.active
update_option_selection
else
update_class_selection
end
@command_window.update
@command_window2.update
@class_status_window.update
@help_window.update
if Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
end
super
end
end
#==============================================================================
# ** Window_ClassStatus
#------------------------------------------------------------------------------
# This window displays full status specs on the Job Change screen.
#==============================================================================
class Window_ClassStatus < Window_Base
#--------------------------------------------------------------------------
# * 对象初始化
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 112, 544, 128)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# * 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 128, 0)
draw_actor_class(@actor, 128, 24)
draw_actor_face(@actor, 0, 0)
draw_actor_graphic(@actor, 96, 96)
draw_basic_info(216, 0)
#~ draw_parameters(32, 160)
draw_exp_info(364, 0)
#~ draw_equipments(288, 160)
end
#--------------------------------------------------------------------------
# * 制定基本参数
# x : 绘出X轴坐标
# y : 绘出Y轴坐标
#--------------------------------------------------------------------------
def draw_basic_info(x, y)
draw_actor_level(@actor, x, y + WLH * 0)
draw_actor_state(@actor, x, y + WLH * 1)
draw_actor_hp(@actor, x, y + WLH * 2)
draw_actor_mp(@actor, x, y + WLH * 3)
end
#--------------------------------------------------------------------------
# * 设置参数
# x : 绘出X轴坐标
# y : 绘出Y轴坐标
#--------------------------------------------------------------------------
#~ def draw_parameters(x, y)
#~ draw_actor_parameter(@actor, x, y + WLH * 0, 0)
#~ draw_actor_parameter(@actor, x, y + WLH * 1, 1)
#~ draw_actor_parameter(@actor, x, y + WLH * 2, 2)
#~ draw_actor_parameter(@actor, x, y + WLH * 3, 3)
#~ end
#--------------------------------------------------------------------------
# * 信息
# x : 绘出X轴坐标
# y : 绘出Y轴坐标
#--------------------------------------------------------------------------
def draw_exp_info(x, y)
s1 = @actor.exp_s
s2 = @actor.next_rest_exp_s
s_next = sprintf(Vocab::ExpNext, Vocab::level)
self.contents.font.color = system_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next)
self.contents.font.color = normal_color
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 0)
self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 0)
end
#--------------------------------------------------------------------------
# * Draw Equipment
# x : 绘出X轴坐标
# y : 绘出Y轴坐标
#--------------------------------------------------------------------------
#~ def draw_equipments(x, y)
#~ self.contents.font.color = system_color
#~ self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
#~ for i in 0..4
#~ draw_item_name(@actor.equips, x + 16, y + WLH * (i + 1))
#~ end
#~ end
end
#==============================================================================
# ** Window_ClassStatus
#------------------------------------------------------------------------------
# This window displays full status specs on the Job Change screen.
#==============================================================================
class Window_ClassStatus < Window_Base
#--------------------------------------------------------------------------
# * 初始化对象
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 112, 544, 128)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# * 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 128, 0)
draw_actor_class(@actor, 128, 24)
draw_actor_face(@actor, 0, 0)
draw_actor_graphic(@actor, 96, 96)
draw_basic_info(216, 0)
#~ draw_parameters(32, 160)
draw_exp_info(364, 0)
#~ draw_equipments(288, 160)
end
#--------------------------------------------------------------------------
# * 制定基本参数
# x : 绘出X轴坐标
# y : 绘出Y轴坐标
#--------------------------------------------------------------------------
def draw_basic_info(x, y)
draw_actor_level(@actor, x, y + WLH * 0)
draw_actor_state(@actor, x, y + WLH * 1)
draw_actor_hp(@actor, x, y + WLH * 2)
draw_actor_mp(@actor, x, y + WLH * 3)
end
#--------------------------------------------------------------------------
# * 设置参数
# x : 绘出X轴坐标
# y : 绘出Y轴坐标
#--------------------------------------------------------------------------
#~ def draw_parameters(x, y)
#~ draw_actor_parameter(@actor, x, y + WLH * 0, 0)
#~ draw_actor_parameter(@actor, x, y + WLH * 1, 1)
#~ draw_actor_parameter(@actor, x, y + WLH * 2, 2)
#~ draw_actor_parameter(@actor, x, y + WLH * 3, 3)
#~ end
#--------------------------------------------------------------------------
# * 经验信息
# x : 绘出X轴坐标
# y : 绘出Y轴坐标
#--------------------------------------------------------------------------
def draw_exp_info(x, y)
s1 = @actor.exp_s
s2 = @actor.next_rest_exp_s
s_next = sprintf(Vocab::ExpNext, Vocab::level)
self.contents.font.color = system_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next)
self.contents.font.color = normal_color
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 0)
self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 0)
end
#--------------------------------------------------------------------------
# * Draw Equipment
# x : 绘出X轴坐标
# y : 绘出Y轴坐标
#--------------------------------------------------------------------------
#~ def draw_equipments(x, y)
#~ self.contents.font.color = system_color
#~ self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
#~ for i in 0..4
#~ draw_item_name(@actor.equips, x + 16, y + WLH * (i + 1))
#~ end
#~ end
end
class Window_SceneName < Window_Base
#--------------------------------------------------------------------------
# * 初始化对象
# x : 绘出X轴坐标
# y : 绘出Y轴坐标
#--------------------------------------------------------------------------
def initialize(x, y, text)
super(x, y, 160, 56)
@text = text
refresh
end
#--------------------------------------------------------------------------
# * 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.draw_text(4, 0, 128, WLH, @text, 1)
end
end
复制代码
点击我下载
作者:
雷特爾
时间:
2008-7-21 03:06
SF..
不錯不錯..給你PPS(拍拍手)
對我們还蠻有用D
作者:
光的圆周率
时间:
2008-7-21 04:15
呵呵
作者:
火鸡三毛老大
时间:
2008-7-21 05:20
你发这贴的时候我就下载了范例
现在还没打开 ...瞬间失意{/bz}
作者:
zianyygy12
时间:
2008-9-7 13:42
顶下·
作者:
zianyygy12
时间:
2008-9-9 09:30
晕··
这么下不了!
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1