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

Project1

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

[已经解决] VA战斗选项怎么添加更换装备

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2013-6-26
帖子
23
跳转到指定楼层
1
发表于 2013-12-3 01:02:45 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
战斗选项怎么添加更换装备

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2013-6-26
帖子
23
2
 楼主| 发表于 2013-12-3 12:48:46 | 只看该作者
连看的人都没

点评

不要连贴啊…  发表于 2013-12-6 17:58

评分

参与人数 1星屑 -50 收起 理由
熊喵酱 -50 純水

查看全部评分

回复 支持 反对

使用道具 举报

Lv3.寻梦者

虚空人形

梦石
0
星屑
4604
在线时间
2037 小时
注册时间
2011-8-11
帖子
3398

贵宾

3
发表于 2013-12-6 17:48:59 | 只看该作者
在Main前插入这脚本就行了。
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Command Equip v1.01
  4. # -- Last Updated: 2012.01.10
  5. # -- Level: Easy, Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-CommandEquip"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.10 - Compatibility Update: Ace Battle Engine v1.15+
  15. # 2011.12.13 - Started Script and Finished.
  16. #
  17. #==============================================================================
  18. # ▼ Introduction
  19. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  20. # This command allows your actors to be able to change equipment in the middle
  21. # of battle by directly accessing the equip scene in the middle of battle, and
  22. # returning back to the battle scene exactly as it was. Furthermore, you can
  23. # limit how frequently your player can switch equipment for each of the actors.
  24. #
  25. #==============================================================================
  26. # ▼ Instructions
  27. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  28. # To install this script, open up your script editor and copy/paste this script
  29. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  30. #
  31. #==============================================================================
  32. # ▼ Compatibility
  33. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  34. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  35. # it will run with RPG Maker VX without adjusting.
  36. #
  37. #==============================================================================

  38. module YEA
  39.   module COMMAND_EQUIP
  40.    
  41.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  42.     # - Battle Equip Settings -
  43.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  44.     # This is just how the text appears visually in battle for your actors and
  45.     # how often they can change equips in battle.
  46.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  47.     COMMAND_TEXT   = "Equip"      # Text used for the command.
  48.     EQUIP_COOLDOWN = 2            # Turns to wait before re-equipping.
  49.    
  50.   end # COMMAND_EQUIP
  51. end # YEA

  52. #==============================================================================
  53. # ▼ Editting anything past this point may potentially result in causing
  54. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  55. # halitosis so edit at your own risk.
  56. #==============================================================================

  57. #==============================================================================
  58. # ■ SceneManager
  59. #==============================================================================

  60. module SceneManager
  61.   
  62.   #--------------------------------------------------------------------------
  63.   # new method: self.force_recall
  64.   #--------------------------------------------------------------------------
  65.   def self.force_recall(scene_class)
  66.     [url=home.php?mod=space&uid=420706]@Scene[/url] = scene_class
  67.   end
  68.   
  69. end # SceneManager

  70. #==============================================================================
  71. # ■ Game_Battler
  72. #==============================================================================

  73. class Game_Battler < Game_BattlerBase
  74.   
  75.   #--------------------------------------------------------------------------
  76.   # alias method: on_battle_start
  77.   #--------------------------------------------------------------------------
  78.   alias game_battler_on_battle_start_ceq on_battle_start
  79.   def on_battle_start
  80.     game_battler_on_battle_start_ceq
  81.     reset_equip_cooldown
  82.   end
  83.   
  84.   #--------------------------------------------------------------------------
  85.   # new method: reset_equip_cooldown
  86.   #--------------------------------------------------------------------------
  87.   def reset_equip_cooldown
  88.     @equip_cooldown = 0
  89.   end
  90.   
  91.   #--------------------------------------------------------------------------
  92.   # alias method: on_turn_end
  93.   #--------------------------------------------------------------------------
  94.   alias game_battler_on_turn_end_ceq on_turn_end
  95.   def on_turn_end
  96.     game_battler_on_turn_end_ceq
  97.     update_equip_cooldown
  98.   end
  99.   
  100.   #--------------------------------------------------------------------------
  101.   # new method: update_equip_cooldown
  102.   #--------------------------------------------------------------------------
  103.   def update_equip_cooldown
  104.     reset_equip_cooldown if @equip_cooldown.nil?
  105.     @equip_cooldown = [@equip_cooldown - 1, 0].max
  106.   end
  107.   
  108.   #--------------------------------------------------------------------------
  109.   # new method: battle_equippable?
  110.   #--------------------------------------------------------------------------
  111.   def battle_equippable?
  112.     reset_equip_cooldown if @equip_cooldown.nil?
  113.     return @equip_cooldown <= 0
  114.   end
  115.   
  116.   #--------------------------------------------------------------------------
  117.   # new method: set_equip_cooldown
  118.   #--------------------------------------------------------------------------
  119.   def set_equip_cooldown
  120.     @equip_cooldown = YEA::COMMAND_EQUIP::EQUIP_COOLDOWN
  121.   end
  122.   
  123.   #--------------------------------------------------------------------------
  124.   # alias method: on_battle_end
  125.   #--------------------------------------------------------------------------
  126.   alias game_battler_on_battle_end_ceq on_battle_end
  127.   def on_battle_end
  128.     game_battler_on_battle_end_ceq
  129.     reset_equip_cooldown
  130.   end
  131.   
  132. end # Game_Battler

  133. #==============================================================================
  134. # ■ Window_EquipCommand
  135. #==============================================================================

  136. class Window_EquipCommand < Window_HorzCommand
  137.   
  138.   #--------------------------------------------------------------------------
  139.   # overwrite method: handle?
  140.   #--------------------------------------------------------------------------
  141.   def handle?(symbol)
  142.     if [:pageup, :pagedown].include?(symbol) && $game_party.in_battle
  143.       return false
  144.     end
  145.     return super(symbol)
  146.   end
  147.   
  148. end # Window_EquipCommand

  149. #==============================================================================
  150. # ■ Window_ActorCommand
  151. #==============================================================================

  152. class Window_ActorCommand < Window_Command
  153.   
  154.   #--------------------------------------------------------------------------
  155.   # alias method: make_command_list
  156.   #--------------------------------------------------------------------------
  157.   alias window_actorcommand_make_command_list_ceq make_command_list
  158.   def make_command_list
  159.     window_actorcommand_make_command_list_ceq
  160.     return unless @actor
  161.     return if $imported["YEA-BattleCommandList"]
  162.     add_equip_command
  163.   end
  164.   
  165.   #--------------------------------------------------------------------------
  166.   # new method: add_equip_command
  167.   #--------------------------------------------------------------------------
  168.   def add_equip_command
  169.     text = YEA::COMMAND_EQUIP::COMMAND_TEXT
  170.     add_command(text, :equip, @actor.battle_equippable?)
  171.   end
  172.   
  173. end # Window_ActorCommand

  174. #==============================================================================
  175. # ■ Scene_Battle
  176. #==============================================================================

  177. class Scene_Battle < Scene_Base
  178.   
  179.   #--------------------------------------------------------------------------
  180.   # alias method: create_actor_command_window
  181.   #--------------------------------------------------------------------------
  182.   alias create_actor_command_window_ceq create_actor_command_window
  183.   def create_actor_command_window
  184.     create_actor_command_window_ceq
  185.     @actor_command_window.set_handler(:equip, method(:command_equip))
  186.   end
  187.   
  188.   #--------------------------------------------------------------------------
  189.   # new method: command_equip
  190.   #--------------------------------------------------------------------------
  191.   def command_equip
  192.     Graphics.freeze
  193.     @info_viewport.visible = false
  194.     hide_extra_gauges if $imported["YEA-BattleEngine"]
  195.     SceneManager.snapshot_for_background
  196.     actor = $game_party.battle_members[@status_window.index]
  197.     $game_party.menu_actor = actor
  198.     previous_equips = actor.equips.clone
  199.     index = @actor_command_window.index
  200.     oy = @actor_command_window.oy
  201.     #---
  202.     SceneManager.call(Scene_Equip)
  203.     SceneManager.scene.main
  204.     SceneManager.force_recall(self)
  205.     #---
  206.     show_extra_gauges if $imported["YEA-BattleEngine"]
  207.     actor.set_equip_cooldown if previous_equips != actor.equips
  208.     @info_viewport.visible = true
  209.     @status_window.refresh
  210.     @actor_command_window.setup(actor)
  211.     @actor_command_window.select(index)
  212.     @actor_command_window.oy = oy
  213.     perform_transition
  214.   end
  215.   
  216. end # Scene_Battle

  217. #==============================================================================
  218. #
  219. # ▼ End of File
  220. #
  221. #==============================================================================
复制代码

评分

参与人数 2星屑 +80 收起 理由
754707165 + 14 塞糖
熊喵酱 + 66 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2013-6-26
帖子
23
4
 楼主| 发表于 2013-12-6 22:31:08 | 只看该作者
hcm 发表于 2013-12-6 17:48
在Main前插入这脚本就行了。

72行有点问题哦

点评

把脚本放到66RPG上时偶尔会自动帮你附加url的,72行改为@Scene = scene_class就好  发表于 2013-12-23 09:39
回复 支持 反对

使用道具 举报

Lv3.寻梦者

虚空人形

梦石
0
星屑
4604
在线时间
2037 小时
注册时间
2011-8-11
帖子
3398

贵宾

5
发表于 2013-12-6 23:41:19 | 只看该作者
754707165 发表于 2013-12-6 22:31
72行有点问题哦

是和你的脚本冲突了吧,我测试无误。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2013-6-26
帖子
23
6
 楼主| 发表于 2013-12-22 17:59:54 | 只看该作者
最近没上RPG了,上线就被扣经验其实50点没什么所谓,可是动不动说人家纯水的真怀疑人格问题
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-10-5 23:22

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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