赞 | 0 |
VIP | 0 |
好人卡 | 3 |
积分 | 1 |
经验 | 1064 |
最后登录 | 2013-5-16 |
在线时间 | 518 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 518 小时
- 注册时间
- 2010-6-16
- 帖子
- 1073
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 Rion幻音 于 2010-10-18 11:18 编辑
因为只是修改坐标……所以不敢以原创发布……
截图
脚本- #==============================================================================
- # ■ Window_BattleStatus
- #------------------------------------------------------------------------------
- # 作者:Rion幻音
- # 来自:66RPG
- # 显示战斗画面同伴状态的窗口。
- #==============================================================================
- class Window_BattleStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 416, 128)
- refresh
- self.active = false
- end
- #--------------------------------------------------------------------------
- # ● 释放
- #--------------------------------------------------------------------------
- def dispose
- super
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.members.size
- for i in 0...@item_max
- draw_item(i)
- end
- end
- #--------------------------------------------------------------------------
- # ● 描绘项目
- # index : 项目索引
- #--------------------------------------------------------------------------
- def draw_item(index)
- rect = item_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.font.color = normal_color
- @item_max = $game_party.members.size
- for actor in $game_party.members
- draw_actor_face(actor,actor.index*96, 0)
- draw_actor_name(actor,actor.index*96, 0)
- draw_actor_state(actor,actor.index*96, 24)
- draw_actor_hp(actor,actor.index*96, 54,96)
- draw_actor_mp(actor,actor.index*96, 72,96)
- end
- end
- def update_cursor
- if @index < 0
- self.cursor_rect.empty
- else
- self.cursor_rect.set(@index * 96, 0, 96, 96)
- end
- end
- end
复制代码 更新项目!!!
(感谢oikl1268以及九大的指出)
截图
脚本- #==============================================================================
- # ■ Window_BattleStatus
- #------------------------------------------------------------------------------
- # 作者:Rion幻音
- # 来自:66RPG
- # 显示战斗画面同伴状态的窗口。
- #==============================================================================
- class Window_BattleStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 544, 128)
- refresh
- self.active = false
- end
- #--------------------------------------------------------------------------
- # ● 释放
- #--------------------------------------------------------------------------
- def dispose
- super
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.members.size
- for i in 0...@item_max
- draw_item(i)
- end
- end
- #--------------------------------------------------------------------------
- # ● 描绘项目
- # index : 项目索引
- #--------------------------------------------------------------------------
- def draw_item(index)
- rect = item_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.font.color = normal_color
- @item_max = $game_party.members.size
- for actor in $game_party.members
- draw_actor_face(actor,actor.index*128, 0)
- draw_actor_name(actor,actor.index*128, 0)
- draw_actor_state(actor,actor.index*128, 24)
- draw_actor_hp(actor,actor.index*128, 54)
- draw_actor_mp(actor,actor.index*128, 72)
- end
- end
- def update_cursor
- if @index < 0
- self.cursor_rect.empty
- else
- self.cursor_rect.set(@index * 128, 0, 128, 96)
- end
- end
- end
复制代码 第二个- #==============================================================================
- # ■ Window_PartyCommand
- #------------------------------------------------------------------------------
- # 战斗画面、选择战斗与逃跑的窗口。
- #==============================================================================
- class Window_PartyCommand < Window_Command
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- s1 = Vocab::fight
- s2 = Vocab::escape
- super(272, [s1, s2], 2, 1)
- draw_item(0, true)
- draw_item(1, $game_troop.can_escape)
- self.active = false
- end
- end
- #==============================================================================
- # ■ Window_ActorCommand
- #------------------------------------------------------------------------------
- # 选择角色命令(如「攻击」或「技能」)的窗口。
- #==============================================================================
- class Window_ActorCommand < Window_Command
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(544, [], 4, 1)
- self.active = false
- end
- #--------------------------------------------------------------------------
- # ● 设置
- # actor : 角色
- #--------------------------------------------------------------------------
- def setup(actor)
- s1 = Vocab::attack
- s2 = Vocab::skill
- s3 = Vocab::guard
- s4 = Vocab::item
- if actor.class.skill_name_valid # 是否指定职业技能文字
- s2 = actor.class.skill_name # 替换「技能」命令文字
- end
- @commands = [s1, s2, s3, s4]
- @item_max = 4
- refresh
- self.index = 0
- end
- end
- #==============================================================================
- # ■ Scene_Battle
- #------------------------------------------------------------------------------
- # 处理战斗画面的类。
- #==============================================================================
- class Scene_Battle < Scene_Base
- def update
- super
- update_basic(true)
- update_info_viewport # 更新资讯显示端口
- if $game_message.visible
- @info_viewport.visible = false
- @info_viewport.visible1 = false
- @info_viewport.visible2 = false
- @message_window.visible = true
- end
- unless $game_message.visible # 除非讯息显示中
- return if judge_win_loss # 判断胜负结果
- update_scene_change
- if @target_enemy_window != nil
- update_target_enemy_selection # 选择目标敌人
- elsif @target_actor_window != nil
- update_target_actor_selection # 选择目标角色
- elsif @skill_window != nil
- update_skill_selection # 选择技能
- elsif @item_window != nil
- update_item_selection # 选择物品
- elsif @party_command_window.active
- update_party_command_selection # 选择队伍命令
- elsif @actor_command_window.active
- update_actor_command_selection # 选择角色命令
- else
- process_battle_event # 战斗事件处理
- process_action # 战斗行动
- process_battle_event # 战斗事件处理
- end
- end
- end
- def create_info_viewport
- @info_viewport = Viewport.new(0, 288, 544, 416)
- @info_viewport1 = Viewport.new(0, 0, 544, 56)
- @info_viewport2 = Viewport.new(0, 232, 544, 56)
- @info_viewport.z = 100
- @info_viewport1.z = 100
- @info_viewport2.z = 100
- @status_window = Window_BattleStatus.new
- @party_command_window = Window_PartyCommand.new
- @actor_command_window = Window_ActorCommand.new
- @status_window.viewport = @info_viewport
- @party_command_window.viewport = @info_viewport1
- @actor_command_window.viewport = @info_viewport2
- @info_viewport.visible = false
- @info_viewport1.visible = false
- @info_viewport2.visible = false
- end
-
- def dispose_info_viewport
- @status_window.dispose
- @party_command_window.dispose
- @actor_command_window.dispose
- @info_viewport.dispose
- @info_viewport1.dispose
- @info_viewport2.dispose
- end
-
- def update_info_viewport
- @info_viewport1.visible = true if @party_command_window.active
- @info_viewport1.visible = false if @actor_command_window.active
- @info_viewport2.visible = true if @actor_command_window.active
- @info_viewport2.visible = false if @party_command_window.active
- @party_command_window.update
- @actor_command_window.update
- @status_window.update
- end
-
- def start_party_command_selection
- if $game_temp.in_battle
- @status_window.refresh
- @status_window.index = @actor_index = -1
- @active_battler = nil
- @info_viewport.visible = true
- @info_viewport1.visible = true
- @message_window.visible = false
- @party_command_window.active = true
- @party_command_window.index = 0
- @actor_command_window.active = false
- $game_party.clear_actions
- if $game_troop.surprise or not $game_party.inputable?
- start_main
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 开始角色命令选择
- #--------------------------------------------------------------------------
- def start_actor_command_selection
- @party_command_window.active = false
- @actor_command_window.setup(@active_battler)
- @actor_command_window.active = true
- @actor_command_window.index = 0
- @info_viewport2.visible = true
- end
-
- def update_actor_command_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- prior_actor
- @info_viewport2.visible = true
- elsif Input.trigger?(Input::C)
- case @actor_command_window.index
- when 0 # 攻击
- Sound.play_decision
- @active_battler.action.set_attack
- start_target_enemy_selection
- when 1 # 技能
- Sound.play_decision
- start_skill_selection
- when 2 # 防御
- Sound.play_decision
- @active_battler.action.set_guard
- next_actor
- when 3 # 物品
- Sound.play_decision
- start_item_selection
- end
- @info_viewport2.visible = false
- end
- end
- end
复制代码 脚本写法粗鲁请勿见怪……
这个灵感是来自6R的游戏,因为大多都是用默认的战斗状态……囧
也顺便送给新人参考
让我们一起讨论下还有怎样的排列法吧!
PS:如果觉得好的话,请给我经验啊 |
评分
-
查看全部评分
|