赞 | 0 |
VIP | 1 |
好人卡 | 0 |
积分 | 1 |
经验 | 191333 |
最后登录 | 2013-1-10 |
在线时间 | 9 小时 |
Lv1.梦旅人 史上最强粉丝
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 9 小时
- 注册时间
- 2007-8-20
- 帖子
- 5574

|
re:主题:《属性升级,删除速度加点!》 试试- -两个都复制吧。
- # 推荐脚本搭配:魔法商店脚本,两者结合,制作自由型RPG
- #==============================================================================
- # ■ Window_Command
- #------------------------------------------------------------------------------
- # 一般的命令选择行窗口。(追加定义)
- #==============================================================================
- class Window_Command < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 项目有效化
- # index : 项目编号
- #--------------------------------------------------------------------------
- def able_item(index)
- draw_item(index, normal_color)
- end
- end
- #==============================================================================
- # ■ Game_Actor
- #------------------------------------------------------------------------------
- # 处理角色的类。(再定义)
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # ● 更改 EXP
- # exp : 新的 EXP
- #--------------------------------------------------------------------------
- def exp=(exp)
- @exp = [[exp, 9999999].min, 0].max
- # 升级
- while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
- @level += 1
- # 增加4点可自由分配的点数
- $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
- # 学会特技
- for j in $data_classes[@class_id].learnings
- if j.level == @level
- learn_skill(j.skill_id)
- end
- end
- end
- # 降级
- while @exp < @exp_list[@level]
- @level -= 1
- end
- # 修正当前的 HP 与 SP 超过最大值
- @hp = [@hp, self.maxhp].min
- @sp = [@sp, self.maxsp].min
- end
- end
- #==============================================================================
- # ■ Window_Base
- #------------------------------------------------------------------------------
- # 游戏中全部窗口的超级类(追加定义)
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● 描绘 HP
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # width : 描画目标的宽
- #--------------------------------------------------------------------------
- def draw_actor_hp_lvup(actor, x, y)
- self.contents.font.color = system_color
- self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.hp)
- if $temp_hp == 0
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 120 , y, 48, 32, actor.maxhp.to_s, 2)
- else
- maxhp = actor.maxhp + $temp_hp
- self.contents.font.color = Color.new(255, 128, 128, 255)
- self.contents.draw_text(x + 120 , y, 48, 32, maxhp.to_s ,2)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
- if $temp_hp >=0
- self.contents.font.color = Color.new(255, 128, 128, 255)
- self.contents.draw_text(x + 155, y, 36, 32, " +",2)
- else
- self.contents.font.color = Color.new(255,255,0,255)
- self.contents.draw_text(x + 155, y, 36, 32, " -",2)
- end
- self.contents.draw_text(x + 200, y, 36, 32, $temp_hp.to_s, 2)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
- end
- end
- #--------------------------------------------------------------------------
- # ● 描绘 SP
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # width : 描画目标的宽
- #--------------------------------------------------------------------------
- def draw_actor_sp_lvup(actor, x, y)
- self.contents.font.color = system_color
- self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.sp)
- if $temp_sp == 0
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 120 , y, 48, 32, actor.maxsp.to_s, 2)
- else
- maxsp = actor.maxsp + $temp_sp
- self.contents.font.color = Color.new(255, 128, 128, 255)
- self.contents.draw_text(x + 120 , y, 48, 32, maxsp.to_s ,2)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
- if $temp_sp >=0
- self.contents.font.color = Color.new(255, 128, 128, 255)
- self.contents.draw_text(x + 155, y, 36, 32, " +",2)
- else
- self.contents.font.color = Color.new(255,255,0,255)
- self.contents.draw_text(x + 155, y, 36, 32, " -",2)
- end
- self.contents.draw_text(x + 200, y, 36, 32, $temp_sp.to_s, 2)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
- end
- end
- #--------------------------------------------------------------------------
- # ● 描绘能力值
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # type : 能力值种类 (0~4)
- #--------------------------------------------------------------------------
- def draw_actor_lvup(actor, x, y, type)
- # 定义数字颜色
- lvup = normal_color
- upcolor = Color.new(255, 128, 128, 255)
- self.contents.font.color = normal_color
- case type
- when 0
- parameter_name = $data_system.words.str
- parameter_value = actor.str
- parameter_value_temp = parameter_value + $temp_str
- if $temp_str != 0
- lvup = upcolor
- self.contents.draw_text(x + 256, y, 16, 32, "(")
- if $temp_str >= 0
- self.contents.font.color = lvup
- self.contents.draw_text(x + 272, y, 80, 32, "+",0)
- else
- self.contents.font.color = Color.new(255,255,0,255)
- self.contents.draw_text(x + 272, y, 80, 32, "-",0)
- end
- self.contents.draw_text(x + 272, y, 80, 32, $temp_str.abs.to_s,1)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
- end
- when 1
- parameter_name = $data_system.words.dex
- parameter_value = actor.dex
- parameter_value_temp = parameter_value + $temp_dex
- if $temp_dex != 0
- lvup = upcolor
- self.contents.draw_text(x + 256, y, 16, 32, "(")
- if $temp_dex >= 0
- self.contents.font.color = lvup
- self.contents.draw_text(x + 272, y, 80, 32, "+",0)
- else
- self.contents.font.color = Color.new(255,255,0,255)
- self.contents.draw_text(x + 272, y, 80, 32, "-",0)
- end
- self.contents.draw_text(x + 272, y, 80, 32, $temp_dex.abs.to_s,1)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
- end
- when 2
- parameter_name = $data_system.words.agi
- parameter_value = actor.agi
- parameter_value_temp = parameter_value + $temp_agi
- if $temp_agi != 0
- lvup = upcolor
- self.contents.draw_text(x + 256, y, 16, 32, "(")
- if $temp_agi >= 0
- self.contents.font.color = lvup
- self.contents.draw_text(x + 272, y, 80, 32, "+",0)
- else
- self.contents.font.color = Color.new(255,255,0,255)
- self.contents.draw_text(x + 272, y, 80, 32, "-",0)
- end
- self.contents.draw_text(x + 272, y, 80, 32, $temp_agi.abs.to_s,1)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
- end
- when 3
- parameter_name = $data_system.words.int
- parameter_value = actor.int
- parameter_value_temp = parameter_value + $temp_int
- if $temp_int != 0
- lvup = upcolor
- self.contents.draw_text(x + 256, y, 16, 32, "(")
- if $temp_int >= 0
- self.contents.font.color = lvup
- self.contents.draw_text(x + 272, y, 80, 32, "+",0)
- else
- self.contents.font.color = Color.new(255,255,0,255)
- self.contents.draw_text(x + 272, y, 80, 32, "-",0)
- end
- self.contents.draw_text(x + 272, y, 80, 32, $temp_int.abs.to_s,1)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
- end
- when 4
- parameter_name = "剩余属性点数"
- parameter_value = $point
- if $point != 0
- lvup = upcolor
- end
- end
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 120, 32, parameter_name)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)
- if type != 4
- self.contents.draw_text(x + 150, y, 36, 32, "→")
- end
- self.contents.font.color = lvup
- self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
- self.contents.font.color = normal_color
- end
- end
- #==============================================================================
- # ■ Window_lvup
- #------------------------------------------------------------------------------
- # 显示升级状态窗口。
- #==============================================================================
- class Window_Lvup < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(0, 0, 512, 320)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_actor_graphic(@actor, 40, 112)
- draw_actor_name(@actor, 4, 0)
- draw_actor_class(@actor, 4 + 144, 0)
- draw_actor_level(@actor, 96, 32)
- draw_actor_state(@actor, 96, 64)
- draw_actor_hp_lvup(@actor, 96+128, 32)
- draw_actor_sp_lvup(@actor, 96+128, 64)
- draw_actor_lvup(@actor, 96, 128, 0)
- draw_actor_lvup(@actor, 96, 160, 1)
- draw_actor_lvup(@actor, 96, 192, 2)
- draw_actor_lvup(@actor, 96, 224, 3)
- draw_actor_lvup(@actor, 96, 256, 4)
- end
- end
- #==============================================================================
- # ■ Window_Help
- #------------------------------------------------------------------------------
- # 特技及物品的说明、角色的状态显示的窗口。
- #==============================================================================
- class Window_Lvup_Help < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 320, 640, 160)
- self.contents = Bitmap.new(width - 32, height - 32)
- @test = "" #——这个东西用来检测,节约内存专用
- end
- #--------------------------------------------------------------------------
- # ● 设置文本
- #--------------------------------------------------------------------------
- def lvup_text(text1, text2 = nil, text3 = nil, text4 = nil)
- if @test != text1
- @test = text1
- else
- return
- end
- self.contents.clear
- self.contents.font.color = normal_color
- self.contents.draw_text(4, 0, self.width - 40, 32, text1)
- if text2 != nil
- self.contents.draw_text(4 , 32, self.width - 40, 32, text2)
- end
- self.contents.font.size -= 4
- if text3 != nil
- self.contents.draw_text(4 , 64, self.width - 40, 32, text3)
- end
- if text4 != nil
- self.contents.draw_text(4 , 96, self.width - 40, 32, text4)
- end
- self.contents.font.size += 4
- end
- end
- #==============================================================================
- # ■ Scene_lvup
- #------------------------------------------------------------------------------
- # 处理升级画面的类。
- #==============================================================================
- class Scene_Lvup
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor_index : 角色索引
- # menu_index : 选项起始位置
- #--------------------------------------------------------------------------
- def initialize(actor_index = 0 , menu_index = 0)
- @actor_index = actor_index
- @menu_index = menu_index
- end
- #--------------------------------------------------------------------------
- # ● 主处理
- #--------------------------------------------------------------------------
- def main
- s1 = " HP"
- s2 = " STR"
- s3 = " DEX"
- s4 = " AGI"
- s5 = " INT"
- s6 = " 确认加点"
- s7 = " 点数重置"
- @command_window = Window_Command.new(128, [s1, s2, s3, s4, s5, s6, s7])
- @command_window.index = @menu_index
- # 获取角色
- @actor = $game_party.actors[@actor_index]
- # 将角色的剩余点数带入
- $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]
- # 初始化临时量
- $temp_str = 0
- $temp_dex = 0
- $temp_agi = 0
- $temp_int = 0
- $temp_hp = 0
- $temp_sp = 0
- #=========================================================================
- # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
- # (各种编程语言都有这种意外),建议还是使用整数,正负不限
- #=========================================================================
- # 每提升一次力量,提升多少附加能力
- #=========================================================================
- @str_hp = 5 # 每提升一次力量附加提升多少HP
- @str_sp = 0 # 每提升一次力量附加提升多少SP
- @str_dex = 0 # 每提升一次力量附加提升多少灵巧
- @str_agi = 0 # 每提升一次力量附加提升多少速度
- @str_int = 0 # 每提升一次力量附加提升多少魔力
- @str_str = 1 # 每提升一次力量附加提升多少力量
- #=========================================================================
- # 每提升一次灵巧,提升多少附加能力
- #=========================================================================
- @dex_hp = 1 # 每提升一次灵巧附加提升多少HP
- @dex_sp = 1 # 每提升一次灵巧附加提升多少SP
- @dex_str = 0 # 每提升一次灵巧附加提升多少力量
- @dex_agi = 0 # 每提升一次灵巧附加提升多少速度
- @dex_int = 0 # 每提升一次灵巧附加提升多少魔力
- @dex_dex = 2 # 每提升一次灵巧附加提升多少灵巧
- #=========================================================================
- # 每提升一次魔力,提升多少附加能力
- #=========================================================================
- @int_hp = 0 # 每提升一次魔力附加提升多少HP
- @int_sp = 3 # 每提升一次魔力附加提升多少SP
- @int_str = 0 # 每提升一次魔力附加提升多少力量
- @int_dex = 0 # 每提升一次魔力附加提升多少灵巧
- @int_agi = 0 # 每提升一次魔力附加提升多少速度
- @int_int = 1 # 每提升一次魔力附加提升多少魔力
- #=========================================================================
- # 每提升一次体力,提升多少附加能力
- #=========================================================================
- @hp = 10 # 每提升一次体力提升多少HP
- @sp = 0 # 每提升一次体力提升多少SP
- @hp_str = 0 # 每提升一次体力提升多少力量
- @hp_dex = 0 # 每提升一次体力提升多少速度
- @hp_agi = 0 # 每提升一次体力提升多少灵巧
- @hp_int = 0 # 每提升一次体力提升多少魔力
- # 定义说明文字
- @text_hp_sc = "HP可增加角色的最大生命值,延长生存的能力!"
- @text_str_sc = "STR可增加角色的物理攻击力,并大幅度影响绝技的威力!"
- @text_dex_sc = "DEX可增加角色的物理攻击命中率和会心一击的概率!"
- @text_agi_sc = "AGI可增加角色的回避率和逃跑的成功率!"
- @text_int_sc = "INT可增加角色的灵力,并大幅度影响仙术的威力!"
- @text_save = "保存分配情况并返回主菜单"
- @text_reset= "重新分配属性点数"
- @text_2 = ""
- @text_hp = "最大" + $data_system.words.hp + "值"
- @text_sp = "最大" + $data_system.words.sp + "值"
- @text_str = "最大" + $data_system.words.str + "值"
- @text_dex = "最大" + $data_system.words.dex + "值"
- @text_agi = "最大" + $data_system.words.agi + "值"
- @text_int = "最大" + $data_system.words.int + "值"
- s_disable
- # 生成状态窗口
- @lvup_window = Window_Lvup.new(@actor)
- @lvup_window.x = 128
- @lvup_window.y = 0
- # 生成帮助窗口并初始化帮助文本
- @help_window = Window_Lvup_Help.new
- # 执行过渡
- Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition)
- # 主循环
- loop do
- # 刷新游戏画面
- Graphics.update
- # 刷新输入信息
- Input.update
- # 刷新画面
- update
- # 如果切换画面就中断循环
- if $scene != self
- break
- end
- end
- # 准备过渡
- Graphics.freeze
- # 释放窗口
- @command_window.dispose
- @lvup_window.dispose
- @help_window.dispose
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- # 刷新窗口
- @command_window.update
- # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
- s_disable
- @lvup_window.update
- #=============================================================
- # 按下 B 键的情况下
- #=============================================================
- if Input.trigger?(Input::B)
- # 演奏取消 SE
- $game_system.se_play($data_system.cancel_se)
- # 切换到地图画面
- $scene = Scene_Menu.new
- return
- end
- #=============================================================
- # 按下 C 键的情况下
- #=============================================================
- if Input.trigger?(Input::C)
- if @command_window.index == 5
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 将角色的剩余点数带回
- $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
- # 将角色点数实际加上
- @actor.str += $temp_str
- @actor.dex += $temp_dex
- @actor.agi += $temp_agi
- @actor.int += $temp_int
- @actor.maxhp += $temp_hp
- @actor.maxsp += $temp_sp
- # 切换到地图画面
- $scene = Scene_Menu.new
- return
- end
- if @command_window.index == 6
- # 演奏确定 SE
- $game_system.se_play($data_system.cancel_se)
- # 将角色的剩余点数带入
- $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]
- # 初始化临时量
- $temp_str = 0
- $temp_dex = 0
- $temp_agi = 0
- $temp_int = 0
- $temp_hp = 0
- $temp_sp = 0
- @lvup_window.refresh
- return
- end
- if $point == 0
- # 演奏冻结 SE
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- case @command_window.index
- when 0
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- $temp_hp += @hp
- $temp_sp += @sp
- $temp_str += @hp_str
- $temp_dex += @hp_dex
- $temp_agi += @hp_agi
- $temp_int += @hp_int
- $point -= 1
- @lvup_window.refresh
- s_disable
- return
- when 1
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- $temp_str += @str_str
- $temp_hp += @str_hp
- $temp_sp += @str_sp
- $temp_dex += @str_dex
- $temp_agi += @str_agi
- $temp_int += @str_int
- $point -= 1
- @lvup_window.refresh
- s_disable
- return
- when 2
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- $temp_dex += @dex_dex
- $temp_hp += @dex_hp
- $temp_sp += @dex_sp
- $temp_str += @dex_str
- $temp_agi += @dex_agi
- $temp_int += @dex_int
- $point -= 1
- @lvup_window.refresh
- s_disable
- return
- when 3
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- $temp_agi += @agi_agi
- $temp_hp += @agi_hp
- $temp_sp += @agi_sp
- $temp_str += @agi_str
- $temp_dex += @agi_dex
- $temp_int += @agi_int
- $point -= 1
- @lvup_window.refresh
- s_disable
- return
- when 4
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- $temp_int += @int_int
- $temp_hp += @int_hp
- $temp_sp += @int_sp
- $temp_str += @int_str
- $temp_dex += @int_dex
- $temp_agi += @int_agi
- $point -= 1
- @lvup_window.refresh
- s_disable
- return
- end
- end
- #=============================================================
- # 什么都没有按下的情况
- #=============================================================
- case @command_window.index
- when 0 # 增加体力
- temptext1 = @text_hp + @hp.to_s + "点 " + @text_str + @hp_str.to_s + "点 " + @text_dex + @hp_dex.to_s + "点"
- temptext2 = @text_sp + @sp.to_s + "点 " + @text_agi + @hp_agi.to_s + "点 " + @text_int + @hp_int.to_s + "点"
- @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
- when 1 # 增加力量
- temptext1 = @text_hp + @str_hp.to_s + "点 " + @text_str + @str_str.to_s + "点 " + @text_dex + @str_dex.to_s + "点"
- temptext2 = @text_sp + @str_sp.to_s + "点 " + @text_agi + @str_agi.to_s + "点 " + @text_int + @str_int.to_s + "点"
- @help_window.lvup_text(@text_str_sc , @text_2 , temptext1 , temptext2)
- when 2 # 增加灵巧
- temptext1 = @text_hp + @dex_hp.to_s + "点 " + @text_str + @dex_agi.to_s + "点 " + @text_dex + @dex_dex.to_s + "点"
- temptext2 = @text_sp + @dex_sp.to_s + "点 " + @text_agi + @dex_agi.to_s + "点 " + @text_int + @dex_int.to_s + "点"
- @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 , temptext2)
- when 3 # 增加魔力
- temptext1 = @text_hp + @int_hp.to_s + "点 " + @text_str + @int_str.to_s + "点 " + @text_dex + @int_dex.to_s + "点"
- temptext2 = @text_sp + @int_sp.to_s + "点 " + @text_agi + @int_agi.to_s + "点 " + @text_int + @int_int.to_s + "点"
- @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2)
- when 4 # 保存设定
- @help_window.lvup_text(@text_save)
- when 5 # 点数重置
- @help_window.lvup_text(@text_reset)
- end
- #=============================================================
- # 按下R与L换人的情况
- #=============================================================
- if Input.trigger?(Input::R)
- # 演奏光标 SE
- $game_system.se_play($data_system.cursor_se)
- # 移至下一位角色
- @actor_index += 1
- @actor_index %= $game_party.actors.size
- # 切换到别的状态画面
- $scene = Scene_Lvup.new(@actor_index , @command_window.index)
- return
- end
- # 按下 L 键的情况下
- if Input.trigger?(Input::L)
- # 演奏光标 SE
- $game_system.se_play($data_system.cursor_se)
- # 移至上一位角色
- @actor_index += $game_party.actors.size - 1
- @actor_index %= $game_party.actors.size
- # 切换到别的状态画面
- $scene = Scene_Lvup.new(@actor_index , @command_window.index)
- return
- end
- end
- #--------------------------------------------------------------------------
- # ● 选项明暗判断
- #--------------------------------------------------------------------------
- def s_disable
- # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
- if $point == 0
- @command_window.disable_item(0)
- @command_window.disable_item(1)
- @command_window.disable_item(2)
- @command_window.disable_item(3)
- @command_window.disable_item(4)
- else
- @command_window.able_item(0)
- @command_window.able_item(1)
- @command_window.able_item(2)
- @command_window.able_item(3)
- @command_window.able_item(4)
- end
- end
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- # 人物介绍 Ver. 1.1 作者: Claimh 翻译与修正:柳柳
- #------------------------------------------------------------------------------
- # http://www.k3.dion.ne.jp/~claimh/
- #==============================================================================
-
- #——功能简介:在状态页面按下回车键会进入人物介绍页面。
- #——如果想自行建立功能,使用$scene = Scene_Charactor(角色编号).new即可
- #——如果自行建立了功能不想使用默认的切换,去掉217行以后的内容
-
- #——以下数组,如果人物超过8人,请自行继续添加(一般游戏没那么多主人公吧)
- #——如果想更改内容,比如把“体重”改为“智商”,请修改102-107行的文字内容
-
- # 从状态页面切换至人物介绍页面的按键
- CHENGE_KEY = Input::C
- #--------------------------------------------------------------------------
- # 人物年龄 (自定义)
- #--------------------------------------------------------------------------
- CHARA_AGE = ["20","19","17","??","??","??","15","15"]
- #--------------------------------------------------------------------------
- # 人物性格
- #--------------------------------------------------------------------------
- CHARA_FROM = ["幽默风趣","外柔内刚","嫉恶如仇","??","??","??","雷都","日本东京"]
- #--------------------------------------------------------------------------
- # 人物属性
- #--------------------------------------------------------------------------
- CHARA_H = ["不详","土","木","??","??","??","162","165"]
- #--------------------------------------------------------------------------
- # 人物门派
- #--------------------------------------------------------------------------
- CHARA_W = ["不详","天宗派","灵霄派","??","??","??","46","53"]
- #--------------------------------------------------------------------------
- # 人物介绍,可以写多行
- #--------------------------------------------------------------------------
- # 人物1号介绍
- L1 = "身世不明,对自己的过去一无所知,是一个外表看来"
- L2 = "不经世事,内心却充满着正义与向往的少年."
- L3 = ""
- L_SET1 = [L1, L2, L3] # 人物1号的数组
- # 人物2号介绍
- L1 = "天宗派青卢真人的徒弟,为人十分友善.是一外表看似"
- L2 = "柔弱,但内心却无比坚强的女孩."
- L3 = ""
- L_SET2 = [L1, L2, L3] # 人物2号的数组
- # 人物3号介绍
- L1 = "天宗派青卢真人的徒弟,为人十分友善,是一个外表看"
- L2 = "似柔弱,但内心却无比坚强的女孩."
- L3 = ""
- L_SET2 = [L1, L2, L3] # 人物2号的数组
- # 人物3号介绍
- L1 = "史上最强的狂战士"
- L2 = ""
- L3 = ""
- L_SET3 = [L1, L2, L3]
- # 人物4号介绍
- L1 = "年青的盗贼,冷血到无法言比喻"
- L2 = "她执行任务从来没失败过"
- L3 = "因为据说所有不小心见到她偷盗的人,都被一剑穿心"
- L_SET4 = [L1, L2, L3]
- # 人物5号介绍
- L1 = "“如果有一天,鹤雪不在了,你还在”"
- L2 = "“如果有一天,你不在了”"
- L3 = "“——之要你的威名仍在,天下就仍存在着希望”"
- L_SET5 = [L1, L2, L3]
- # 人物6号介绍
- L1 = "富家公子,战斗技能很差,只会用枪防身"
- L2 = ""
- L3 = ""
- L_SET6 = [L1, L2, L3]
- # 人物7号介绍
- L1 = "充满冷酷的红魔法师"
- L2 = "11岁,父母阵亡后加入了杀手组织"
- L3 = "13岁,在一次行动失利中被抓到地牢严刑拷打长达半年"
- L4 = "14岁,一个人杀光所有蹂躏她的狱卒,独自踏上旅途"
- L_SET7 = [L1, L2, L3, L4]
- # 人物8号介绍
- L1 = "娇生惯养的贵族魔法师,从不懂人世艰难"
- L2 = "自以为实力天下第一"
- L3 = ""
- L_SET8 = [L1, L2, L3]
- # 人物介绍数组,如果不够继续添加。
- CHARA_INFO = [L_SET1,L_SET2,L_SET3,L_SET4,L_SET5,L_SET6,L_SET7,L_SET8]
- #==============================================================================
- # Window_Charactor
- #==============================================================================
- class Window_Charactor < Window_Base
- #--------------------------------------------------------------------------
- # actor : 初始化的角色
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_battler_graphics(@actor, 100, 200)
- self.contents.font.color.set(255, 255,50)
- self.contents.draw_text(250, 10, 80, 32, "姓名")
- self.contents.draw_text(250, 50, 80, 32, "年龄")
- self.contents.draw_text(250, 90, 80, 32, "性格")
- self.contents.draw_text(250, 130, 80, 32, "属性")
- self.contents.draw_text(250, 170, 80, 32, "门派")
- self.contents.font.color = normal_color
- draw_actor_name(@actor, 350, 10)
- draw_actor_age(@actor, 350, 50)
- draw_actor_from(@actor, 350, 90)
- draw_actor_height(@actor, 350, 130)
- draw_actor_weight(@actor, 350, 170)
- draw_actor_other(@actor, 50, 250)
- end
- end
- class Window_Base < Window
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_battler_graphics(actor, x, y)
- battler=RPG::Cache.battler(actor.battler_name, actor.battler_hue)
- w = battler.width
- h = battler.height
- self.contents.blt(x-w/2, y-h, battler, Rect.new(0, 0, w,h))
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_age(actor, x, y)
- self.contents.draw_text(x, y, 80, 32, CHARA_AGE[actor.id-1])
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_from(actor, x, y)
- self.contents.draw_text(x, y, 180, 32, CHARA_FROM[actor.id-1])
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_height(actor, x, y)
- self.contents.draw_text(x, y , 200, 32, CHARA_H[actor.id-1])
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_weight(actor, x, y)
- self.contents.draw_text(x, y, 250, 32, CHARA_W[actor.id-1])
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def draw_actor_other(actor, x, y)
- info = CHARA_INFO[actor.id-1]
- for i in 0...info.size
- self.contents.draw_text(x, y+32*i, 600, 32, info[i])
- end
- end
- end
- #==============================================================================
- # Scene_Charactor
- #==============================================================================
- class Scene_Charactor
- #--------------------------------------------------------------------------
- # actor_index :角色编号
- #--------------------------------------------------------------------------
- def initialize(actor_index = 0, equip_index = 0)
- @actor_index = actor_index
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def main
- @actor = $game_party.actors[@actor_index]
- @status_window = Window_Charactor.new(@actor)
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @status_window.dispose
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def update
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- $scene = Scene_Menu.new(8)
- return
- end
- if Input.trigger?(Input::R)
- $game_system.se_play($data_system.cursor_se)
- @actor_index += 1
- @actor_index %= $game_party.actors.size
- $scene = Scene_Charactor.new(@actor_index)
- return
- end
- if Input.trigger?(Input::L)
- $game_system.se_play($data_system.cursor_se)
- @actor_index += $game_party.actors.size - 1
- @actor_index %= $game_party.actors.size
- $scene = Scene_Charactor.new(@actor_index)
- return
- end
- end
- end
- #==============================================================================
- # Scene_Status
- #==============================================================================
- class Scene_Status
- alias update_chara update
- def update
- if Input.trigger?(CHENGE_KEY)
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Charactor.new(@actor_index)
- return
- end
- update_chara
- end
- end
复制代码 |
|