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

Project1

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

[RMVX发布] 追加描绘角色状态和属性槽描绘兼容

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
273 小时
注册时间
2011-5-20
帖子
295
跳转到指定楼层
1
发表于 2011-7-3 13:30:55 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 Cherry 于 2011-7-3 13:32 编辑

追加描绘角色的命中、回避、会心一击:http://rpg.blue/thread-83071-1-1.html

在显示属性旁加下属性槽:
  1. #==============================================================================
  2. # ■ draw_actor_parameter美化  By Rion幻音
  3. #------------------------------------------------------------------------------
  4. #  在显示属性旁加下属性槽
  5. #==============================================================================

  6. class Window_Base < Window
  7.   def draw_actor_parameter(actor, x, y, type)
  8.     case type
  9.     when 0
  10.       parameter_name = Vocab::atk
  11.       parameter_value = actor.atk
  12.       gc1 = text_color(0)
  13.       gc2 = text_color(1)
  14.     when 1
  15.       parameter_name = Vocab::def
  16.       parameter_value = actor.def
  17.       gc1 = text_color(0)
  18.       gc2 = text_color(2)
  19.     when 2
  20.       parameter_name = Vocab::spi
  21.       parameter_value = actor.spi
  22.       gc1 = text_color(0)
  23.       gc2 = text_color(3)
  24.     when 3
  25.       parameter_name = Vocab::agi
  26.       parameter_value = actor.agi
  27.       gc1 = text_color(0)
  28.       gc2 = text_color(4)
  29.     when 4
  30.       parameter_name = "命中"
  31.       parameter_value = actor.hit
  32.       gc1 = text_color(0)
  33.       gc2 = text_color(5)
  34.     when 5
  35.       parameter_name = "回避修正"
  36.       parameter_value = actor.eva
  37.       gc1 = text_color(0)
  38.       gc2 = text_color(6)
  39.     when 6
  40.       parameter_name = "要害修正"
  41.       parameter_value = actor.cri
  42.       gc1 = text_color(0)
  43.       gc2 = text_color(7)
  44.    
  45.     end
  46.     gw = 160 * parameter_value / 500
  47.     self.contents.fill_rect(x, y + WLH - 8, 160, 6, gauge_back_color)
  48.     self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  49.     self.contents.font.color = system_color
  50.     self.contents.draw_text(x, y, 120, WLH, parameter_name)
  51.     self.contents.font.color = normal_color
  52.     self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
  53.   end
  54. end
复制代码
其中when4,when5,when6是我添加的,这样两个脚本就能同时使用了。


顺便问一下高手,命中、回避、会心一击的最大值只有100,如何把 gw = 160 * parameter_value / 500
这句改掉,让每个能力值有不同的值槽。
如图,后三项属性太短了。
PS:作为一个脚本新手已经不容易了,看了半天······

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1071 小时
注册时间
2011-5-12
帖子
2317

贵宾

2
发表于 2011-7-3 14:02:54 | 只看该作者
本帖最后由 月夜神音 于 2011-7-3 14:04 编辑

把那个
gw = 160 * parameter_value / 500
中加红的数值用变量代替,比如length
然后在when 6(啥号码都好)的下面加入
length = 100#要多少就多少
如脚本:


    when 0
      parameter_name = Vocab::atk
      parameter_value = actor.atk
      gc1 = text_color(0)
      gc2 = text_color(1)
      length = 500
    when 1
      parameter_name = Vocab::def
      parameter_value = actor.def
      gc1 = text_color(0)
      gc2 = text_color(2)
      length = 500
    when 2
      parameter_name = Vocab::spi
      parameter_value = actor.spi
      gc1 = text_color(0)
      gc2 = text_color(3)
      length = 500
    when 3
      parameter_name = Vocab::agi
      parameter_value = actor.agi
      gc1 = text_color(0)
      gc2 = text_color(4)
      length = 500
    when 4
      parameter_name = "命中"
      parameter_value = actor.hit
      gc1 = text_color(0)
      gc2 = text_color(5)
      length = 100
    when 5
      parameter_name = "回避修正"
      parameter_value = actor.eva
      gc1 = text_color(0)
      gc2 = text_color(6)
      length = 100
    when 6
      parameter_name = "要害修正"
      parameter_value = actor.cri
      gc1 = text_color(0)
      gc2 = text_color(7)
      length = 100
    end

点评

谢谢,学会了  发表于 2011-7-3 14:09
找我请找芙蕾娅
顺带一提,完全看得懂我头像请捡起你自己的节操哟(自重
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
85
在线时间
424 小时
注册时间
2009-8-3
帖子
984
3
发表于 2011-7-8 11:13:24 | 只看该作者
这个。。颜色可以改渐变吗?

点评

好像是不明显。。突破上限以后又是另一回事了  发表于 2011-7-8 17:13
ms渐变的。  发表于 2011-7-8 16:49
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-21 00:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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