Project1
标题:
有没有脚本能让战斗时附加一个项目更改角色装备
[打印本页]
作者:
qq19750508
时间:
2014-8-1 14:13
标题:
有没有脚本能让战斗时附加一个项目更改角色装备
今日累死,连提两个问题……………………
我要与链接里的Taroxd的脚本共用啊!!!
还是一样,标题说得清楚了……
附加的项目名字就是装备,打开后就会弹出非战斗时主菜单的“装备”窗口
而且功能也和他一样,可以更改装备,按Esc就会自动消除战斗窗口,回到了普通战斗的界面{:2_282:}
麻烦了……………………{:2_249:}
作者:
千夙
时间:
2014-8-1 14:20
不太明白楼主说的什么意思。。你是想在战斗的时候有一个更改装备的选项让你可以在战斗中更改装备?
作者:
qq19750508
时间:
2014-8-1 14:32
本帖最后由 qq19750508 于 2014-8-1 14:34 编辑
@VIPArcher
@taroxd
作者:
VIPArcher
时间:
2014-8-1 14:44
本帖最后由 VIPArcher 于 2014-8-1 15:34 编辑
qq19750508 发表于 2014-8-1 14:32
@VIPArcher
@taroxd
@Scene
← 无视它
我摔脚本。
#==============================================================================
#
# ▼ Yanfly Engine Ace - Command Equip v1.01
# -- Last Updated: 2012.01.10
# -- Level: Easy, Normal
# -- Requires: n/a
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-CommandEquip"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.10 - Compatibility Update: Ace Battle Engine v1.15+
# 2011.12.13 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This command allows your actors to be able to change equipment in the middle
# of battle by directly accessing the equip scene in the middle of battle, and
# returning back to the battle scene exactly as it was. Furthermore, you can
# limit how frequently your player can switch equipment for each of the actors.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================
module YEA
module COMMAND_EQUIP
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Battle Equip Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This is just how the text appears visually in battle for your actors and
# how often they can change equips in battle.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
COMMAND_TEXT = "Equip" # Text used for the command.
EQUIP_COOLDOWN = 2 # Turns to wait before re-equipping.
end # COMMAND_EQUIP
end # YEA
#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
#==============================================================================
# ■ SceneManager
#==============================================================================
module SceneManager
#--------------------------------------------------------------------------
# new method: self.force_recall
#--------------------------------------------------------------------------
def self.force_recall(scene_class)
@Scene = scene_class
end
end # SceneManager
#==============================================================================
# ■ Game_Battler
#==============================================================================
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# alias method: on_battle_start
#--------------------------------------------------------------------------
alias game_battler_on_battle_start_ceq on_battle_start
def on_battle_start
game_battler_on_battle_start_ceq
reset_equip_cooldown
end
#--------------------------------------------------------------------------
# new method: reset_equip_cooldown
#--------------------------------------------------------------------------
def reset_equip_cooldown
@equip_cooldown = 0
end
#--------------------------------------------------------------------------
# alias method: on_turn_end
#--------------------------------------------------------------------------
alias game_battler_on_turn_end_ceq on_turn_end
def on_turn_end
game_battler_on_turn_end_ceq
update_equip_cooldown
end
#--------------------------------------------------------------------------
# new method: update_equip_cooldown
#--------------------------------------------------------------------------
def update_equip_cooldown
reset_equip_cooldown if @equip_cooldown.nil?
@equip_cooldown = [@equip_cooldown - 1, 0].max
end
#--------------------------------------------------------------------------
# new method: battle_equippable?
#--------------------------------------------------------------------------
def battle_equippable?
reset_equip_cooldown if @equip_cooldown.nil?
return @equip_cooldown <= 0
end
#--------------------------------------------------------------------------
# new method: set_equip_cooldown
#--------------------------------------------------------------------------
def set_equip_cooldown
@equip_cooldown = YEA::COMMAND_EQUIP::EQUIP_COOLDOWN
end
#--------------------------------------------------------------------------
# alias method: on_battle_end
#--------------------------------------------------------------------------
alias game_battler_on_battle_end_ceq on_battle_end
def on_battle_end
game_battler_on_battle_end_ceq
reset_equip_cooldown
end
end # Game_Battler
#==============================================================================
# ■ Window_EquipCommand
#==============================================================================
class Window_EquipCommand < Window_HorzCommand
#--------------------------------------------------------------------------
# overwrite method: handle?
#--------------------------------------------------------------------------
def handle?(symbol)
if [:pageup, :pagedown].include?(symbol) && $game_party.in_battle
return false
end
return super(symbol)
end
end # Window_EquipCommand
#==============================================================================
# ■ Window_ActorCommand
#==============================================================================
class Window_ActorCommand < Window_Command
#--------------------------------------------------------------------------
# alias method: make_command_list
#--------------------------------------------------------------------------
alias window_actorcommand_make_command_list_ceq make_command_list
def make_command_list
window_actorcommand_make_command_list_ceq
return unless @actor
return if $imported["YEA-BattleCommandList"]
add_equip_command
end
#--------------------------------------------------------------------------
# new method: add_equip_command
#--------------------------------------------------------------------------
def add_equip_command
text = YEA::COMMAND_EQUIP::COMMAND_TEXT
add_command(text, :equip, @actor.battle_equippable?)
end
end # Window_ActorCommand
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# alias method: create_actor_command_window
#--------------------------------------------------------------------------
alias create_actor_command_window_ceq create_actor_command_window
def create_actor_command_window
create_actor_command_window_ceq
@actor_command_window.set_handler(:equip, method(:command_equip))
end
#--------------------------------------------------------------------------
# new method: command_equip
#--------------------------------------------------------------------------
def command_equip
Graphics.freeze
@info_viewport.visible = false
hide_extra_gauges if $imported["YEA-BattleEngine"]
SceneManager.snapshot_for_background
actor = $game_party.battle_members[@status_window.index]
$game_party.menu_actor = actor
previous_equips = actor.equips.clone
index = @actor_command_window.index
oy = @actor_command_window.oy
#---
SceneManager.call(Scene_Equip)
SceneManager.scene.main
SceneManager.force_recall(self)
#---
show_extra_gauges if $imported["YEA-BattleEngine"]
actor.set_equip_cooldown if previous_equips != actor.equips
@info_viewport.visible = true
@status_window.refresh
@actor_command_window.setup(actor)
@actor_command_window.select(index)
@actor_command_window.oy = oy
perform_transition
end
end # Scene_Battle
#==============================================================================
#
# ▼ End of File
#
#==============================================================================
复制代码
作者:
qq19750508
时间:
2014-8-1 15:30
VIPArcher 发表于 2014-8-1 14:44
我摔脚本。
你摔的脚本有一点错误,我的72行出错了。
作者:
qq19750508
时间:
2014-8-1 15:47
本帖最后由 qq19750508 于 2014-8-1 15:54 编辑
谢谢 VIPArcher 摔的脚本!
我感觉他们卖萌的都要收编了………………233
(此处有白字,小心监视)
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1