查看: 2972|回复: 1

[已经解决] [新手練習] 物品名稱附加圖示腳本

[复制链接]
梦石
0
星屑
405
在线时间
31 小时
注册时间
2013-1-17
回帖
6
发表于 2013-3-14 20:53:03 | 显示全部楼层 |阅读模式

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

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

×
想以圖示代替顏色,改了Window_Base > draw_item_name的腳本
單純新手練習,請多多指教!!

原碼

  def draw_item_name(item, x, y, enabled = true, width = 172)
    return unless item
    draw_icon(item.icon_index, x, y, enabled)
    change_color(normal_color, enabled)
    draw_text(x + 24, y, width, line_height, item.name)
  end

修改後

  def draw_item_name(item, x, y, enabled = true, width = 172)
    return unless item
    draw_icon(item.icon_index, x, y, enabled)
    change_color(normal_color, enabled)
    draw_text(x + 24, y, width, line_height, item.name)
    #editStart
    n = item.note.to_i
    s = item.name.length * 18 + 25 #全形字符限定
    draw_icon(n, x + s, y, enabled)
    #editEnd
  end
01.jpg
02.jpg
03.jpg
梦石
0
星屑
50
在线时间
687 小时
注册时间
2012-10-29
回帖
1526
发表于 2013-3-14 22:19:51 | 显示全部楼层
不错啊,也许可以改成用图示数目来显示物品的品级,比如一级物品一颗星,二级两颗,这样直观的知道物品的优劣。
修改劇本中,仔細審查原來的劇情大綱,覺得有點不太滿意,嘗試編寫不同主角不同主線的劇情,希望能寫得出來。
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部