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

Project1

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

[已经解决] 求转换此VX战斗界面脚本为VA版

[复制链接]

Lv2.观梦者

梦石
0
星屑
301
在线时间
573 小时
注册时间
2005-10-27
帖子
1164
跳转到指定楼层
1
发表于 2012-2-5 19:21:20 | 显示全部楼层 |只看大图 回帖奖励 |倒序浏览 |阅读模式
1星屑
本帖最后由 仲秋启明 于 2012-2-18 09:34 编辑


此VX脚本效果如图
  1. #==============================================================================

  2. # ☆ Window_BattleFaceStatus Ver.1.00

  3. #------------------------------------------------------------------------------

  4. #  バトル画面でパーティメンバーのステータスを顔表示するウィンドウです。

  5. #==============================================================================


  6. class Window_BattleStatus < Window_Selectable

  7.   #--------------------------------------------------------------------------

  8.   # ☆ オブジェクト初期化 <追加変更>

  9.   #--------------------------------------------------------------------------

  10.   def initialize

  11.     super(0, 0-16, 416, 128+32)#変更

  12.    
  13.     @item_max = 1      # 追加: 項目数

  14.     @column_max = 4    # 追加: 桁数

  15.     @index = -1        # 追加: カーソル位置

  16.     @spacing = 0       # 追加: 横に項目が並ぶときの空白の幅

  17.     self.opacity = 0   # 追加: ウィンドウ背景透明

  18.    
  19.     refresh

  20.     self.active = false

  21.   end  

  22.   #--------------------------------------------------------------------------

  23.   # ☆ 項目を描画する矩形の取得  <新規追加>

  24.   #     index : 項目番号

  25.   #--------------------------------------------------------------------------

  26.   def item_rect(index)

  27.     rect = Rect.new(0, 0, 0, 0)

  28.     @column_max=$game_party.members.size

  29.    
  30.     #rect.width = (contents.width + @spacing) / @column_max - @spacing

  31.     #rect.height = contents.height + 32 -32

  32.     #rect.x = index % @column_max * (rect.width + @spacing)

  33.     #rect.y = index / @column_max - 16 +16 #* WLH

  34.    
  35.     rect.width = (contents.width + @spacing) / @column_max - @spacing

  36.     rect.width=96 if @column_max<4

  37.     rect.height = contents.height + 32 -32

  38.     x=((self.width-32) - rect.width*@column_max )/(@column_max+1)

  39.     rect.x = index*rect.width + x*(index+1)

  40.     rect.y = index / @column_max - 16 +16 #* WLH

  41.    
  42.     return rect

  43.   end

  44.   #--------------------------------------------------------------------------

  45.   # ☆ 項目の描画 <追加変更>

  46.   #     index   : 項目番号

  47.   #--------------------------------------------------------------------------

  48.   def draw_item(index)

  49.     rect = item_rect(index)

  50.     rect.x += 4

  51.     rect.width -= 8

  52.     #self.contents.clear_rect(rect)

  53.     self.contents.font.color = normal_color

  54.     actor = $game_party.members[index]

  55.    
  56.    
  57.     ms=$game_party.members.size

  58.     w=96

  59.     w=(self.width-32)/ms if ms>4

  60.     x=((self.width-32) - w*ms )/(ms+1)

  61.     x=0 if x<0

  62.     draw_actor_face(actor,actor.index * w + 2 + x*(actor.index+1), 0,w-4) #追加

  63.    
  64.     size = self.contents.font.size  #追加

  65.     self.contents.font.size=16      #追加

  66.    
  67.     draw_actor_name(actor, actor.index * w + 2 + x*(actor.index+1), 0-4) #追加

  68.     draw_actor_state(actor, index*w + x*(actor.index+1), WLH*2 +12, w) #追加

  69.    
  70.     draw_actor_hp(actor, index*w +2 + x*(actor.index+1), WLH*3 +8, w-4) #追加

  71.     draw_actor_mp(actor, index*w +2 + x*(actor.index+1), WLH*4 +4, w-4) #追加

  72.    
  73.     self.contents.font.size=size    #追加


  74.   end

  75.   #--------------------------------------------------------------------------

  76.   # ☆ 顔グラフィックの描画 <追加変更>

  77.   #     face_name  : 顔グラフィック ファイル名

  78.   #     face_index : 顔グラフィック インデックス

  79.   #     x          : 描画先 X 座標

  80.   #     y          : 描画先 Y 座標

  81.   #     size       : 表示サイズ

  82.   #--------------------------------------------------------------------------

  83.   def draw_face(face_name, face_index, x, y, size = 96)

  84.     bitmap = Cache.face(face_name)

  85.     rect = Rect.new(0, 0, 0, 0)

  86.     rect.x = face_index % 4 * 96 + (96 - size) / 2

  87.     rect.y = face_index / 4 * 96 #+ (96 - size) / 2#追加

  88.    
  89.     rect.width = size

  90.    
  91.     rect.height = 96 #size#追加

  92.     self.contents.blt(x, y, bitmap, rect)

  93.     bitmap.dispose

  94.   end

  95.   

  96.   #--------------------------------------------------------------------------

  97.   # ☆ HP の描画 <追加変更>

  98.   #     actor : アクター

  99.   #     x     : 描画先 X 座標

  100.   #     y     : 描画先 Y 座標

  101.   #     width : 幅

  102.   #--------------------------------------------------------------------------

  103.   def draw_actor_hp(actor, x, y, width = 120)

  104.     ms = self.contents.font.size/2  #追加

  105.    
  106.     draw_actor_hp_gauge(actor, x, y, width)

  107.     self.contents.font.color = system_color

  108.     self.contents.draw_text(x, y+2, 30, WLH, Vocab::hp_a)             #追加

  109.     self.contents.font.color = hp_color(actor)

  110.     xr = x + width

  111.     if width <90                                                      #追加

  112.       self.contents.draw_text(xr - ms*4, y+2, ms*4, WLH, actor.hp, 2) #追加

  113.     else

  114.       self.contents.draw_text(xr - ms*9, y+2, ms*4, WLH, actor.hp, 2) #追加

  115.       self.contents.font.color = normal_color                         #追加

  116.       self.contents.draw_text(xr - ms*5, y+2, ms, WLH, "/", 2)        #追加

  117.       self.contents.draw_text(xr - ms*4, y+2, ms*4, WLH, actor.maxhp, 2)#追加

  118.     end

  119.   end

  120.   #--------------------------------------------------------------------------

  121.   # ☆ MP の描画 <追加変更>

  122.   #     actor : アクター

  123.   #     x     : 描画先 X 座標

  124.   #     y     : 描画先 Y 座標

  125.   #     width : 幅

  126.   #--------------------------------------------------------------------------

  127.   def draw_actor_mp(actor, x, y, width = 120)

  128.     ms = self.contents.font.size/2  #追加   
  129.    
  130.     draw_actor_mp_gauge(actor, x, y, width)

  131.     self.contents.font.color = system_color

  132.     self.contents.draw_text(x, y+2, 30, WLH, Vocab::mp_a)             #追加

  133.     self.contents.font.color = mp_color(actor)

  134.     xr = x + width

  135.     if width <90                                                      #追加

  136.       self.contents.draw_text(xr - ms*4, y+2, ms*4, WLH, actor.mp, 2) #追加

  137.     else

  138.       self.contents.draw_text(xr - ms*9, y+2, ms*4, WLH, actor.mp, 2) #追加

  139.       self.contents.font.color = normal_color                         #追加

  140.       self.contents.draw_text(xr - ms*5, y+2, ms, WLH, "/", 2)        #追加

  141.       self.contents.draw_text(xr - ms*4, y+2, ms*4, WLH, actor.maxmp, 2)#追加

  142.     end

  143.   end

  144. end


  145. class Scene_Battle < Scene_Base

  146.   #--------------------------------------------------------------------------

  147.   # ☆ 対象アクター対象選択の開始 <追加変更>

  148.   #--------------------------------------------------------------------------

  149.   alias old_start_target_actor_selection start_target_actor_selection

  150.   def start_target_actor_selection

  151.     old_start_target_actor_selection

  152.    
  153.     @target_actor_window.y -= 16  #追加  

  154.   end

  155. end


  156. #////////////////////////////////////////////////////////////////

  157. #作成者: ehime

  158. #サイト: 未完のダンボール (Mikan no Danboru)

  159. #   URL: http://www.abcoroti.com/~nekoneko/index.html

  160. #readmeやスタッフロールの明記,使用報告は任意.

  161. #////////////////////////////////////////////////////////////////
复制代码
在VA里直接插入使用原VX脚本的话,284行出错


求高人转换

评分

参与人数 1星屑 +170 收起 理由
orzfly + 170 2

查看全部评分

认真地猥琐,猥琐地认真
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-5-14 18:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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