设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2131|回复: 2
打印 上一主题 下一主题

[已经解决] 菜单状态里的装备

[复制链接]

Lv1.梦旅人

梦石
0
星屑
192
在线时间
99 小时
注册时间
2014-1-26
帖子
29
跳转到指定楼层
1
发表于 2014-6-22 00:06:44 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 希尔密璘 于 2014-6-22 00:11 编辑

小的想向各位请教,人物状态里的装备没有写武器、护甲什么的,怎样才可以现实呢?我想要他显示图标和名字。

untitled.PNG (224.58 KB, 下载次数: 12)

untitled.PNG

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

2
发表于 2014-6-22 02:19:08 | 只看该作者
本帖最后由 VIPArcher 于 2014-6-22 02:21 编辑

嗯,看店看到现在...睡前给你写一下
在脚本Window_Status里113行左右改一改,或者你直接替换掉整个我下面给的脚本
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ Window_Status
  4. #------------------------------------------------------------------------------
  5. #  状态画面中,显示角色基本信息的窗口。
  6. #==============================================================================

  7. class Window_Status < Window_Selectable
  8.   #--------------------------------------------------------------------------
  9.   # ● 初始化对象
  10.   #--------------------------------------------------------------------------
  11.   def initialize(actor)
  12.     super(0, 0, Graphics.width, Graphics.height)
  13.     @actor = actor
  14.     refresh
  15.     activate
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 设置角色
  19.   #--------------------------------------------------------------------------
  20.   def actor=(actor)
  21.     return if @actor == actor
  22.     @actor = actor
  23.     refresh
  24.   end
  25.   #--------------------------------------------------------------------------
  26.   # ● 刷新
  27.   #--------------------------------------------------------------------------
  28.   def refresh
  29.     contents.clear
  30.     draw_block1   (line_height * 0)
  31.     draw_horz_line(line_height * 1)
  32.     draw_block2   (line_height * 2)
  33.     draw_horz_line(line_height * 6)
  34.     draw_block3   (line_height * 7)
  35.     draw_horz_line(line_height * 13)
  36.     draw_block4   (line_height * 14)
  37.   end
  38.   #--------------------------------------------------------------------------
  39.   # ● 绘制区域 1
  40.   #--------------------------------------------------------------------------
  41.   def draw_block1(y)
  42.     draw_actor_name(@actor, 4, y)
  43.     draw_actor_class(@actor, 128, y)
  44.     draw_actor_nickname(@actor, 288, y)
  45.   end
  46.   #--------------------------------------------------------------------------
  47.   # ● 绘制区域 2
  48.   #--------------------------------------------------------------------------
  49.   def draw_block2(y)
  50.     draw_actor_face(@actor, 8, y)
  51.     draw_basic_info(136, y)
  52.     draw_exp_info(304, y)
  53.   end
  54.   #--------------------------------------------------------------------------
  55.   # ● 绘制区域 3
  56.   #--------------------------------------------------------------------------
  57.   def draw_block3(y)
  58.     draw_parameters(32, y)
  59.     draw_equipments(288, y)
  60.   end
  61.   #--------------------------------------------------------------------------
  62.   # ● 绘制区域 4
  63.   #--------------------------------------------------------------------------
  64.   def draw_block4(y)
  65.     draw_description(4, y)
  66.   end
  67.   #--------------------------------------------------------------------------
  68.   # ● 绘制水平线
  69.   #--------------------------------------------------------------------------
  70.   def draw_horz_line(y)
  71.     line_y = y + line_height / 2 - 1
  72.     contents.fill_rect(0, line_y, contents_width, 2, line_color)
  73.   end
  74.   #--------------------------------------------------------------------------
  75.   # ● 获取水平线的颜色
  76.   #--------------------------------------------------------------------------
  77.   def line_color
  78.     color = normal_color
  79.     color.alpha = 48
  80.     color
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # ● 绘制基本信息
  84.   #--------------------------------------------------------------------------
  85.   def draw_basic_info(x, y)
  86.     draw_actor_level(@actor, x, y + line_height * 0)
  87.     draw_actor_icons(@actor, x, y + line_height * 1)
  88.     draw_actor_hp(@actor, x, y + line_height * 2)
  89.     draw_actor_mp(@actor, x, y + line_height * 3)
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # ● 绘制能力值
  93.   #--------------------------------------------------------------------------
  94.   def draw_parameters(x, y)
  95.     6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 2) }
  96.   end
  97.   #--------------------------------------------------------------------------
  98.   # ● 绘制经验值信息
  99.   #--------------------------------------------------------------------------
  100.   def draw_exp_info(x, y)
  101.     s1 = @actor.max_level? ? "-------" : @actor.exp
  102.     s2 = @actor.max_level? ? "-------" : @actor.next_level_exp - @actor.exp
  103.     s_next = sprintf(Vocab::ExpNext, Vocab::level)
  104.     change_color(system_color)
  105.     draw_text(x, y + line_height * 0, 180, line_height, Vocab::ExpTotal)
  106.     draw_text(x, y + line_height * 2, 180, line_height, s_next)
  107.     change_color(normal_color)
  108.     draw_text(x, y + line_height * 1, 180, line_height, s1, 2)
  109.     draw_text(x, y + line_height * 3, 180, line_height, s2, 2)
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● 绘制装备
  113.   #--------------------------------------------------------------------------
  114.   def draw_equipments(x, y)
  115. #~     @actor.equips.each_with_index do |item, i|
  116. #~       draw_item_name(item, x, y + line_height * i)
  117. #~     end
  118.      slot_id = 0
  119.      for equip in @actor.equips
  120.       change_color(system_color)
  121.       text = Vocab.etype(@actor.equip_slots[slot_id])
  122.       draw_text(x, y, contents.width - x, line_height, text)
  123.       reset_font_settings
  124.       draw_item_name(equip, x+92, y) unless equip.nil?
  125.       slot_id += 1
  126.       y += line_height
  127.       break if y + line_height > contents.height
  128.     end
  129.   end
  130.   #--------------------------------------------------------------------------
  131.   # ● 绘制说明
  132.   #--------------------------------------------------------------------------
  133.   def draw_description(x, y)
  134.     draw_text_ex(x, y, @actor.description)
  135.   end
  136. end
复制代码

QQ图片20140621172607.jpg (84.98 KB, 下载次数: 16)

酱是不是你要的效果啊?

酱是不是你要的效果啊?

评分

参与人数 2星屑 +10 梦石 +1 收起 理由
taroxd + 1 认可答案
火烧兔子 + 10 精品文章

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
192
在线时间
99 小时
注册时间
2014-1-26
帖子
29
3
 楼主| 发表于 2014-6-22 12:02:46 | 只看该作者
VIPArcher 发表于 2014-6-22 02:19
嗯,看店看到现在...睡前给你写一下
在脚本Window_Status里113行左右改一改,或者你直接替换掉整个我下面给 ...

恩,就是这样子,谢谢~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-25 13:23

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表