| 赞 | 0  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 1 | 
 
| 经验 | 2580 | 
 
| 最后登录 | 2014-8-10 | 
 
| 在线时间 | 58 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 50 
 
        - 在线时间
 - 58 小时
 
        - 注册时间
 - 2012-9-24
 
        - 帖子
 - 31
 
 
 
 | 
	
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
x
 
本来是一个在主站整合里面找到的VX脚本,效果是技能横向展示。 
现在想用在VA,但是不太会改,在VA区询问了一下还是没有结果,我自己修改了总是出错。 
后来反思了一下发现,VA里面技能画面有不同,所以可能脚本不太适合了。 
自己是脚本盲不会修改,所以放这里讨论下具体修改是要怎样。 
除了语法,可能显示的位置啥也要修改?我用在VA主要问题出在100行后,貌似是有些不匹配。 
下面是VX上显示的效果: 
 
 
 
 
然后是VX原本的脚本 
- module SNF
 
 -   SKILL_NOCOST = "---" 
 
 -   
 
 -   SKILL_NOTE = true 
 
 -   
 
 -   SKILL_SCOPE_DETAILD = {0 => "---",
 
 -                          1 => "敵單體", 
 
 -                          2 => "敵全體", 
 
 -                          3 => "随机目标",
 
 -                          4 => "随机目标",
 
 -                          5 => "敌二体随机",
 
 -                          6 => "敌三体随机",
 
 -                          7 => "我方單體", 
 
 -                          8 => "我方全體",
 
 -                          9 => "瀕死單體",  
 
 -                          10 =>"瀕死全體", 
 
 -                          11 =>"使用者本身"}
 
 -   
 
 -   SKILL_NONELEMENT = "—"    
 
 -   SKILL_ELEMENTPOINT = "/" 
 
 -   
 
 -   SKILL_SCOPE_WORD = "對象"
 
 -   SKILL_ELEMENTS_WORD = "屬性"
 
 -   SKILL_NOTE_WORD = "簡介"
 
  
-   
 
 - end
 
  
- class Window_Base < Window
 
 -   def draw_item_name2(item, x, y, enabled = true)
 
 -     if item != nil
 
 -      
 
 -       draw_icon(item.icon_index, x, y, enabled)
 
 -       self.contents.font.color = normal_color
 
 -       self.contents.font.color.alpha = enabled ? 255 : 128
 
 -       self.contents.draw_text(x + 24, y, 256, WLH, item.name)
 
 -     end
 
 -   end
 
 - end
 
  
- class Window_Skill < Window_Selectable
 
 -   def initialize(x, y, width, height, actor)
 
 -     super(x, y, width, height)
 
 -     @actor = actor
 
 -     @column_max = 1
 
 -     self.index = 0
 
 -     refresh
 
 -   end
 
 -   def draw_item(index)
 
 -     skill = @data[index]
 
 -     if skill != nil
 
 -     rect = item_rect(index)
 
 -     self.contents.clear_rect(rect)
 
 -     skill = @data[index]
 
 -       enabled = @actor.skill_can_use?(skill)
 
 -       draw_item_name2(skill, rect.x, rect.y, enabled)
 
 -       scope = skill_memo_scan(skill, 0)
 
 -       scope = SNF::SKILL_SCOPE_DETAILD[skill.scope] if scope.size ==0
 
 -       element = skill_memo_scan(skill, 1)
 
 -       if element.size ==0
 
 -         rect.width -= 4
 
 -         skill_element = skill.element_set
 
 -         element = ""
 
 -         for i in 0...skill_element.size
 
 -           if element == ""
 
 -             element = $data_system.elements[skill_element[i]]
 
 -           else
 
 -             element += SNF::SKILL_ELEMENTPOINT
 
 -             element += $data_system.elements[skill_element[i]]
 
 -           end
 
 -         end
 
 -         element = SNF::SKILL_NONELEMENT if element == "" 
 
 -       end
 
 -       note = skill_memo_scan(skill, 2)
 
 -       skill_x = 0
 
 -       skill_x += 64 unless SNF::SKILL_NOTE
 
 -       skill_y = 0 + 24 * index
 
 -       if @actor.calc_mp_cost(skill) == 0
 
 -         cost = SNF::SKILL_NOCOST
 
 -       else
 
 -         cost = @actor.calc_mp_cost(skill)
 
 -       end
 
 -       self.contents.draw_text(skill_x + 216, skill_y, 40, 24, cost, 2)
 
 -       self.contents.draw_text(skill_x + 256, skill_y, 96, 24, scope, 2)
 
 -       self.contents.draw_text(skill_x + 368, skill_y, 128, 24, element, 2)
 
 -       self.contents.draw_text(skill_x + 448, skill_y, 64, 24, note, 2) if SNF::SKILL_NOTE
 
 -     end
 
 -   end
 
 -   def skill_memo_scan(skill, type)
 
 -     case type
 
 -       when 0
 
 -         memo = skill.note.scan(/<#{SNF::SKILL_SCOPE_WORD}:(\S+)>/)
 
 -       when 1
 
 -         memo = skill.note.scan(/<#{SNF::SKILL_ELEMENTS_WORD}:(\S+)>/)
 
 -       when 2
 
 -         memo = skill.note.scan(/<#{SNF::SKILL_NOTE_WORD}:(\S+)>/)
 
 -       else
 
 -     end
 
 -     return memo
 
 -   end
 
 - end
 
 - class Scene_Skill < Scene_Base
 
 -   def show_target_window(right)
 
 -     @skill_window.active = false
 
 -     width_remain = 544 - @target_window.width
 
 -     @target_window.x = right ? width_remain : 0
 
 -     @target_window.visible = true
 
 -     @target_window.active = true
 
 -   end
 
 -     end
 
 
  复制代码 |   
 
 
 
 |