Project1
标题:
如何将原本的图鉴脚本改成这种样式?
[打印本页]
作者:
眼中目之瞳
时间:
2016-11-24 09:48
标题:
如何将原本的图鉴脚本改成这种样式?
本帖最后由 眼中目之瞳 于 2016-11-25 12:46 编辑
https://rpg.blue/forum.php?mod=v ... p;extra=&page=1
的敌人图鉴,在回复中出现的另一种样式,不过暂时没有放出脚本(这一暂就是……4年- -b)
怎样才能改成他的样式呢?
改了一个MP问题的文件:
Project1.rar
(1.43 MB, 下载次数: 82)
2016-11-24 09:49 上传
点击文件名下载附件
魔物图鉴说明文
作者:
VIPArcher
时间:
2016-11-25 11:38
本帖最后由 VIPArcher 于 2016-11-25 11:39 编辑
class Window_EnemyDetail < Window_Base
alias vip20161125_initialize initialize
def initialize
vip20161125_initialize
self.x,self.width = 0,Graphics.width
create_contents; deactivate
end
#--------------------------------------------------------------------------
# ● 窗口半刷新(这个绘制的部分最好自己从新改一下坐标什么的)
#--------------------------------------------------------------------------
def partial_refresh
return unless @enemy # 无敌人时返回
rect = Rect.new(ENEMY_IMAGE_MAX_WIDTH+8, 0,
contents.width-(ENEMY_IMAGE_MAX_WIDTH+8), contents.height-line_height)
contents.clear_rect(rect)
if ENEMY_MORE_INFO && @partial
Sound.play_cursor
draw_other_info
@partial = false
else
draw_enemy_hp(ENEMY_IMAGE_MAX_WIDTH+8, 0) # 绘制敌人体力
draw_enemy_mp(ENEMY_IMAGE_MAX_WIDTH+8, line_height) # 绘制敌人魔力
2.upto(7){ |n|
draw_enemy_param(ENEMY_IMAGE_MAX_WIDTH+8, line_height*n, n) # 绘制敌人能力
}
draw_enemy_gold(ENEMY_IMAGE_MAX_WIDTH+8, line_height*8) # 绘制敌人掉落金
draw_enemy_item(ENEMY_IMAGE_MAX_WIDTH+8, line_height*9) # 绘制敌人掉落物
@partial = true
end
end
end
class Window_EnemyList < Window_ItemList
alias vip20161125_initialize initialize
def initialize(*args)
vip20161125_initialize(*args)
self.width = Graphics.width
end
def col_max; 4 end
#--------------------------------------------------------------------------
# ● 获取选择项目的有效状态
#--------------------------------------------------------------------------
def current_item_enabled?
$TEST || $game_party.enemy_percent(item.id) > 0
end
end
class Scene_List < Scene_Base
alias vip20161125_create_list_window create_list_window
def create_list_window
vip20161125_create_list_window
@list_window.set_handler(:ok, method(:on_list_ok))
end
alias vip20161125_create_detail_window create_detail_window
def create_detail_window
vip20161125_create_detail_window
@detail_window.hide
end
#打开列表确定的敌人图鉴
def on_list_ok
@list_window.deactivate
@list_window.hide
@detail_window.activate
@detail_window.show
end
#敌人图鉴内容窗口取消
def on_detail_cancel
@list_window.activate
@list_window.show
@detail_window.deactivate
@detail_window.hide
end
#--------------------------------------------------------------------------
# ● 场景更新 (Window_EnemyDetail继承的是Window_Base所以只好覆盖了)
#--------------------------------------------------------------------------
def update
super
return unless @detail_window.active
on_list_partial_refersh if Input.trigger?(ENEMY_MORE_INFO_BUTTON)
enemy_percent_change(:left) if Input.trigger?(:LEFT)
enemy_percent_change(:right) if Input.trigger?(:RIGHT)
on_detail_cancel if Input.trigger?(:B)
end
#--------------------------------------------------------------------------
# ● 更改敌人辨识度百分比(仅游戏测试时可用)
#--------------------------------------------------------------------------
def enemy_percent_change(sym)
return unless $TEST
return unless @detail_window.active
enemy = @detail_window.enemy
return unless enemy
$game_party.see_enemy(enemy.id, TEST_PERCENT) if sym == :right
$game_party.see_enemy(enemy.id, -TEST_PERCENT) if sym == :left
@list_window.refresh
@detail_window.enemy = enemy
end
end
复制代码
你要的补丁,敌人图鉴窗口里面的信息绘制大概需要重新排版一下,我觉得你可以自己做到,努力试试吧
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1