Project1
标题: 怎样才能吧菜单栏人物那块的名字和HP的位置改变 [打印本页]
作者: 三千泠 时间: 2013-3-16 10:25
标题: 怎样才能吧菜单栏人物那块的名字和HP的位置改变

↑像那些框框框起来的一样 还有名字可以改成竖行的吗
作者: swbxhlh 时间: 2013-3-16 12:22
可以,改脚本。
作者: 三千泠 时间: 2013-3-16 15:22
swbxhlh 发表于 2013-3-16 12:22 
可以,改脚本。
OAO诶 请问怎么改
作者: j433463 时间: 2013-3-16 15:55
本帖最后由 j433463 于 2013-3-16 15:59 编辑
主菜单的状态页吗?Window_Status 中找到 def refresh 刷新的那个地方:- def refresh
- contents.clear
- draw_block1 (line_height * 0)
- draw_horz_line(line_height * 1)
- draw_block2 (line_height * 2 + 10)
- draw_horz_line(line_height * 6 + 10)
- draw_block3 (line_height * 7 + 10)
- draw_horz_line(line_height * 13 + 10, contents_width - 280)
- draw_block4 (line_height * 14 + 10)
- draw_player
- end
复制代码 状态页分了好几个区块,draw_block1 是最上一排角色姓名,职业,称号,draw_block2 是头像,基本讯息,这个基本讯息就是 HP 和 MP 血槽了,所以只要把这两个换一下,喔,不是换整句,而是把 draw_block1 的 1 改成 2,把 draw_block2 的 2 改成 1,这样就能换了。
draw_horz_line 是水平线,状态页中那一条水平分隔线,不要误删了。
[line]2[/line]
如果是主菜单右边那一块状态窗口,就要去 Window_Base 中找到
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x, y)
draw_actor_level(actor, x, y + line_height * 1)
draw_actor_icons(actor, x, y + line_height * 2)
draw_actor_class(actor, x + 120, y)
draw_actor_hp(actor, x + 100, y + line_height * 1)
draw_actor_mp(actor, x + 100, y + line_height * 2)
draw_actor_tp(actor, x + 280, y + line_height * 1)
draw_actor_exp(actor, x + 280, y + line_height * 2)
end
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x, y)
draw_actor_level(actor, x, y + line_height * 1)
draw_actor_icons(actor, x, y + line_height * 2)
draw_actor_class(actor, x + 120, y)
draw_actor_hp(actor, x + 100, y + line_height * 1)
draw_actor_mp(actor, x + 100, y + line_height * 2)
draw_actor_tp(actor, x + 280, y + line_height * 1)
draw_actor_exp(actor, x + 280, y + line_height * 2)
end
这就不需要我多说了, name 是姓名,level 是等级,icons 是状态图示,class 是职业,hp 是生命值, mp 是魔力值, tp 是特技值, exp 是经验值 ... 呃,好吧,tp 和 exp 是我自己加上去的,别管它了,不好意思 ...
作者: 三千泠 时间: 2013-3-16 16:06
j433463 发表于 2013-3-16 15:55 
主菜单的状态页吗?Window_Status 中找到 def refresh 刷新的那个地方:状态页分了好几个区块,draw_block1 ...
修改了之后没有变化是为什么
作者: j433463 时间: 2013-3-16 16:16
怎会?我试过了,有反应的,不过因为高度的不同,原先的要改一下高度而已:
原本的内容:
def refresh
contents.clear
draw_block1 (line_height * 0)
draw_horz_line(line_height * 1)
draw_block2 (line_height * 2)
draw_horz_line(line_height * 6)
draw_block3 (line_height * 7)
draw_horz_line(line_height * 13)
draw_block4 (line_height * 14)
end
def refresh
contents.clear
draw_block1 (line_height * 0)
draw_horz_line(line_height * 1)
draw_block2 (line_height * 2)
draw_horz_line(line_height * 6)
draw_block3 (line_height * 7)
draw_horz_line(line_height * 13)
draw_block4 (line_height * 14)
end
这是改后的内容:
def refresh
contents.clear
draw_block2 (line_height * 0)
draw_horz_line(line_height * 4) #原本 * 1
draw_block1 (line_height * 5) #原本 * 2
draw_horz_line(line_height * 6)
draw_block3 (line_height * 7)
draw_horz_line(line_height * 13)
draw_block4 (line_height * 14)
end
def refresh
contents.clear
draw_block2 (line_height * 0)
draw_horz_line(line_height * 4) #原本 * 1
draw_block1 (line_height * 5) #原本 * 2
draw_horz_line(line_height * 6)
draw_block3 (line_height * 7)
draw_horz_line(line_height * 13)
draw_block4 (line_height * 14)
end
您该不会是直接把 draw_block1 整行与 draw_block2 互换了吧?没注意看我说的吗?
作者: 三千泠 时间: 2013-3-17 10:10
j433463 发表于 2013-3-16 16:16 
我是指刚打开菜单那右边那一块
作者: hcm 时间: 2013-3-17 17:27
这样啊,
那就在Window_MenuStatus修改以下部分,
原理相同的,- #--------------------------------------------------------------------------
- # ● 获取项目的高度
- #--------------------------------------------------------------------------
- def item_height
- (height - standard_padding * 2) / 4
- end
- #--------------------------------------------------------------------------
- # ● 绘制项目
- #--------------------------------------------------------------------------
- def draw_item(index)
- actor = $game_party.members[index]
- enabled = $game_party.battle_members.include?(actor)
- rect = item_rect(index)
- draw_item_background(index)
- draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)
- draw_actor_simple_status(actor, rect.x + 108, rect.y + line_height / 2)
- end
复制代码
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |