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

Project1

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

关于字体(召唤偶橡水颐格

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
58 小时
注册时间
2007-8-10
帖子
284
跳转到指定楼层
1
发表于 2008-5-18 18:29:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
如何把红色圈里的字改成绿圈里那种 应该怎摸改呢要艘索那里
我找不到了                     谢谢
  1. #==============================================================================
  2. # ■ Window_Base
  3. #------------------------------------------------------------------------------
  4. #  游戏中全部窗口的超级类。
  5. #==============================================================================
  6. class Window_Base < Window
  7.   def draw_actor_guard_state(actor, x, y)
  8.     guard_state = []
  9.     if actor.armor1_id != 0
  10.       for i in $data_armors[actor.armor1_id].guard_state_set
  11.         if !guard_state.include?(i)
  12.           guard_state.push(i)
  13.         end
  14.       end
  15.     end
  16.     if actor.armor2_id != 0
  17.       for i in $data_armors[actor.armor2_id].guard_state_set
  18.         if !guard_state.include?(i)
  19.           guard_state.push(i)
  20.         end
  21.       end
  22.     end
  23.     if actor.armor3_id != 0
  24.       for i in $data_armors[actor.armor3_id].guard_state_set
  25.         if !guard_state.include?(i)
  26.           guard_state.push(i)
  27.         end
  28.       end
  29.     end
  30.     if actor.armor4_id != 0
  31.       for i in $data_armors[actor.armor4_id].guard_state_set
  32.         if !guard_state.include?(i)
  33.           guard_state.push(i)
  34.         end
  35.       end
  36.     end
  37.     self.contents.font.color = system_color
  38.     self.contents.draw_text(x, y, 120, 32, "状态防御")
  39.     self.contents.font.color = normal_color
  40.     for i in 0...guard_state.size
  41.       self.contents.draw_text(x + 96 + i%4*48, y+ i/4*32, 48, 32, $data_states[guard_state[i]].name)
  42.     end
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● 生辰成描绘用状态字符串
  46.   #     actor       : 角色
  47.   #     width       : 描画目标的宽度
  48.   #     need_normal : [正常] 是否为必须 (true / false)
  49.   #--------------------------------------------------------------------------
  50.   def make_battler_state_text(battler, width, need_normal)
  51.     # 获取括号的宽
  52.     brackets_width = self.contents.text_size("[]").width
  53.     # 生成状态名字符串
  54.     text = ""
  55.     for i in battler.states
  56.       if $data_states[i].rating >= 1
  57.         if text == ""
  58.           text = $data_states[i].name
  59.         else
  60.           new_text = text + "/" + $data_states[i].name
  61.           text_width = self.contents.text_size(new_text).width
  62.           if text_width > width - brackets_width
  63.             break
  64.           end
  65.           text = new_text
  66.         end
  67.       end
  68.     end
  69.     # 状态名空的字符串是 "[正常]" 的情况下
  70.     if text == ""
  71.       if need_normal
  72.         text = "●正常"
  73.       end
  74.     else
  75.       # 加上括号
  76.       text = "★" + text
  77.     end
  78.     # 返回完成后的文字类
  79.     return text
  80.   end
  81.   #--------------------------------------------------------------------------
  82.   # ● 描绘状态
  83.   #     actor : 角色
  84.   #     x     : 描画目标 X 坐标
  85.   #     y     : 描画目标 Y 坐标
  86.   #     width : 描画目标的宽
  87.   #--------------------------------------------------------------------------
  88.   def draw_actor_state(actor, x, y, width = 120)
  89.     text = make_battler_state_text(actor, width, true)
  90.     if !actor.states.empty?
  91.       self.contents.font.color = actor.hp == 0 ? knockout_color : text_color(3)
  92.     else
  93.       self.contents.font.color = normal_color
  94.     end
  95.     self.contents.font.size = 16
  96.     self.contents.draw_text(x, y, width, 32, text)
  97.     self.contents.font.size = 20
  98.     self.contents.font.color=normal_color
  99.   end
  100.   #--------------------------------------------------------------------------
  101.   # ● 描画 EXP
  102.   #     actor : 角色
  103.   #     x     : 描画目标 X 坐标
  104.   #     y     : 描画目标 Y 坐标
  105.   #--------------------------------------------------------------------------
  106.   def draw_actor_exp(actor, x, y)
  107.     self.contents.font.color = system_color
  108.     self.contents.draw_text(x , y, 48, 32, "经验")
  109.     self.contents.font.color = normal_color
  110.     self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
  111.     self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
  112.     self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
  113.   end
复制代码
  1. #==============================================================================
  2. # ■ Window_Base
  3. #==============================================================================

  4. class Window_Base < Window
  5.   
  6.   #--------------------------------------------------------------------------
  7.   # ○ ゲージを描画
  8.   #--------------------------------------------------------------------------
  9.   def draw_meter(now, max, x, y, width, height, start_color, end_color=start_color )
  10.     color=Color.new(96, 96, 96, 255)
  11.     color1 = Color.new(255, 255, 255, 255)
  12.     color2= Color.new(0,0,0,160)
  13.     self.contents.fill_rect(x+0,y+1+1, 1, height-2, color2)
  14.     self.contents.fill_rect(x+0+1,y+1, width-2, height, color2)
  15.     self.contents.fill_rect(x+width,y+1+1, 1, height-2, color2)
  16.    
  17.     self.contents.fill_rect(x, y+1, 1, height-2, color1)
  18.     self.contents.fill_rect(x+width-1, y+1, 1, height-2, color1)
  19.     self.contents.fill_rect(x+1, y, width-2, height, color1)
  20.    
  21.     self.contents.fill_rect(x+2,y+1, width-4, height-2, color)
  22.     self.contents.fill_rect(x+1,y+2, 1, height-4, color)
  23.     self.contents.fill_rect(x-2+width,y+2, 1, height-4, color)
  24.    
  25.     now = now > max ? max : now
  26.     percentage = max != 0 ? (width-2) * now / max.to_f : 0
  27.     if start_color == end_color
  28.       self.contents.fill_rect(x+1, y+1, percentage, height-2, start_color)
  29.     else
  30.       for i in 1..percentage
  31.         r = start_color.red + (end_color.red - start_color.red) / percentage * i
  32.         g = start_color.green + (end_color.green - start_color.green) / percentage * i
  33.         b = start_color.blue + (end_color.blue - start_color.blue) / percentage * i
  34.         a = start_color.alpha + (end_color.alpha - start_color.alpha) / percentage * i
  35.         if i == 1 or i == percentage
  36.           self.contents.fill_rect(x+i, y+2, 1, height-4, Color.new(r, g, b, a))
  37.         else
  38.           self.contents.fill_rect(x+i, y+1, 1, height-2, Color.new(r, g, b, a))
  39.         end
  40.       end
  41.     end
  42.   end
  43. end
复制代码

版务信息:本贴由楼主自主结贴~
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-1-6
帖子
1139
2
发表于 2008-5-18 19:29:57 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
58 小时
注册时间
2007-8-10
帖子
284
3
 楼主| 发表于 2008-5-19 20:01:43 | 只看该作者
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
58 小时
注册时间
2007-8-10
帖子
284
4
 楼主| 发表于 2008-5-20 18:47:01 | 只看该作者
很难吗?
回复 支持 反对

使用道具 举报

Lv3.寻梦者

酱油的

梦石
0
星屑
1265
在线时间
2161 小时
注册时间
2007-12-22
帖子
3271

贵宾

5
发表于 2008-5-20 18:49:31 | 只看该作者
PM 東宮水娘問問吧...XD
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
58 小时
注册时间
2007-8-10
帖子
284
6
 楼主| 发表于 2008-5-20 18:51:08 | 只看该作者
禾西大侠说什么呢
回复 支持 反对

使用道具 举报

Lv3.寻梦者

酱油的

梦石
0
星屑
1265
在线时间
2161 小时
注册时间
2007-12-22
帖子
3271

贵宾

7
发表于 2008-5-20 18:53:26 | 只看该作者
你直接問作者 - 水迭澜 - 不是更快?何必等好多天呢?(契約這麽多腳本,一個個找可是不現實滴)
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
58 小时
注册时间
2007-8-10
帖子
284
8
 楼主| 发表于 2008-5-20 19:10:57 | 只看该作者
我 只是移埴了这两个伟大的脚本
[HTML#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
#  游戏中全部窗口的超级类。
#==============================================================================
class Window_Base < Window
  def draw_actor_guard_state(actor, x, y)
    guard_state = []
    if actor.armor1_id != 0
      for i in $data_armors[actor.armor1_id].guard_state_set
        if !guard_state.include?(i)
          guard_state.push(i)
        end
      end
    end
    if actor.armor2_id != 0
      for i in $data_armors[actor.armor2_id].guard_state_set
        if !guard_state.include?(i)
          guard_state.push(i)
        end
      end
    end
    if actor.armor3_id != 0
      for i in $data_armors[actor.armor3_id].guard_state_set
        if !guard_state.include?(i)
          guard_state.push(i)
        end
      end
    end
    if actor.armor4_id != 0
      for i in $data_armors[actor.armor4_id].guard_state_set
        if !guard_state.include?(i)
          guard_state.push(i)
        end
      end
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, "状态防御")
    self.contents.font.color = normal_color
    for i in 0...guard_state.size
      self.contents.draw_text(x + 96 + i%4*48, y+ i/4*32, 48, 32, $data_states[guard_state].name)
    end
  end
  #--------------------------------------------------------------------------
  # ● 生辰成描绘用状态字符串
  #     actor       : 角色
  #     width       : 描画目标的宽度
  #     need_normal : [正常] 是否为必须 (true / false)
  #--------------------------------------------------------------------------
  def make_battler_state_text(battler, width, need_normal)
    # 获取括号的宽
    brackets_width = self.contents.text_size("[]").width
    # 生成状态名字符串
    text = ""
    for i in battler.states
      if $data_states.rating >= 1
        if text == ""
          text = $data_states.name
        else
          new_text = text + "/" + $data_states.name
          text_width = self.contents.text_size(new_text).width
          if text_width > width - brackets_width
            break
          end
          text = new_text
        end
      end
    end
    # 状态名空的字符串是 "[正常]" 的情况下
    if text == ""
      if need_normal
        text = "●正常"
      end
    else
      # 加上括号
      text = "★" + text
    end
    # 返回完成后的文字类
    return text
  end
  #--------------------------------------------------------------------------
  # ● 描绘状态
  #     actor : 角色
  #     x     : 描画目标 X 坐标
  #     y     : 描画目标 Y 坐标
  #     width : 描画目标的宽
  #--------------------------------------------------------------------------
  def draw_actor_state(actor, x, y, width = 120)
    text = make_battler_state_text(actor, width, true)
    if !actor.states.empty?
      self.contents.font.color = actor.hp == 0 ? knockout_color : text_color(3)
    else
      self.contents.font.color = normal_color
    end
    self.contents.font.size = 16
    self.contents.draw_text(x, y, width, 32, text)
    self.contents.font.size = 20
    self.contents.font.color=normal_color
  end
  #--------------------------------------------------------------------------
  # ● 描画 EXP
  #     actor : 角色
  #     x     : 描画目标 X 坐标
  #     y     : 描画目标 Y 坐标
  #--------------------------------------------------------------------------
  def draw_actor_exp(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x , y, 48, 32, "经验")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
    self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
    self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
  end[/code]
回复 支持 反对

使用道具 举报

Lv3.寻梦者

酱油的

梦石
0
星屑
1265
在线时间
2161 小时
注册时间
2007-12-22
帖子
3271

贵宾

9
发表于 2008-5-27 06:37:09 | 只看该作者
處理版務的時候才看到....囧。查找  $data_system.words.吧
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
不做頭像做簽名,看我囧冏有神(多謝山人有情提供 )
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
58 小时
注册时间
2007-8-10
帖子
284
10
 楼主| 发表于 2008-5-27 18:32:58 | 只看该作者
哈哈 没有
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-8-1 22:34

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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