じ☆ve冰风 发表于 2026-8-1 14:22:19

Battle Skills Combining

Battle Skill Combination​
Version: 1.0​
Author: Devil Knight​


Introduction
This Script allow you in battle to Combine Between Skills To Make Stronger One

Features

- Easy to use.

- Make You use high level skills in the beginning of the game

 
How to Use

- Put above main and below Materials
- Other Instruction in the script

 
Demo

https://www.dropbox.com/s/es88hbgtyuum782/Skill%20Combination%20Demo.rar?dl=0



Script:
Spoiler                Code:       
 #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#                       #                       Battle Skill Combination#                       Version: 1.0#                       Author: Devil Knight#                       Date: 2nd  Oct, 2014#-------------------------------------------------------------------------------# Description:##       This Script allow you to Combine Between Skills To Make Stronger One##-------------------------------------------------------------------------------# Instruction:##     - In Editablel Region do the following:#       #       - In Skill Combination Section Write name of the skills that will Combine##       - Should Be Like This:#             "(first skill name)(space)(+)(space)(second skill name)"##       - If The Combination of skills was not in skill_combination then #           the second skill will executed#             #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=module Devil_Knight  module  Skill_Combination    #---------------------------------------------------------------------      #                                                                 #    #                  Start of EDITABLE REGION                       #    #                                                                 #    #--------------------------------------------------------------------    Skills =     {      #                                combination        :skill_combination      =>  ["Fire + Fire", "Thunder + Thunder"],      #                                    |                 |      # Result of combination              V                 V        :combination_result     =>  [   "Flame",        "Spark" ],      #                                     |                 |      # Result of combination Skill ID      V                 V        :combination_result_id  =>  [     53,               61      ], # Take it from Skill ID From Database     }    #---------------------------------------------------------------------      #                                                                 #    #                  End of EDITABLE REGION                         #    #                                                                 #    #--------------------------------------------------------------------  endend#==============================================================================# ** Window_BattleSkill#------------------------------------------------------------------------------#  This window is for selecting skills to use in the battle window.#============================================================================== class Window_BattleSkill < Window_SkillList  #--------------------------------------------------------------------------  # * Handling Processing for OK and Cancel Etc.  #--------------------------------------------------------------------------  alias devil_knight_skill_combination_window_battleskill_process_handling  process_handling  def process_handling    devil_knight_skill_combination_window_battleskill_process_handling()    return process_select          if select_enabled?    && Input.trigger?(:SHIFT)  # Assign Button to Skill Select    return process_select_cancel   if select_disabled?    && Input.trigger?(:CTRL)  # Assign Button to Skill Select Cancel  end  #--------------------------------------------------------------------------  # * New Method: Get Activation State of Select Processing  #--------------------------------------------------------------------------  def select_enabled?    handle?(:select)  end   #--------------------------------------------------------------------------  # * New Method: Call Select Handler  #--------------------------------------------------------------------------  def call_select_handler    call_handler(:select)  end  #--------------------------------------------------------------------------  # * New Method: Get Activation State of Select Disabled Processing  #--------------------------------------------------------------------------  def select_disabled?    handle?(:cancel_select)  end  #--------------------------------------------------------------------------  # * New Method: Call Select Cancel Handler  #--------------------------------------------------------------------------  def call_select_cancel_handler    call_handler(:cancel_select)  end  #--------------------------------------------------------------------------  # * New Method: Processing When Select Button Is Pressed  #--------------------------------------------------------------------------  def process_select    if current_item_enabled?      Sound.play_ok      Input.update       call_select_handler    else      Sound.play_buzzer    end  end  #--------------------------------------------------------------------------  # * New Method: Processing When Select Cancel Button Is Pressed  #--------------------------------------------------------------------------  def process_select_cancel      Sound.play_buzzer      call_select_cancel_handler  endend #==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------#  This class performs battle screen processing.#============================================================================== class Scene_Battle < Scene_Base  include Devil_Knight::Skill_Combination  attr_accessor     :first_skill    # Assign First Selected Skill  attr_accessor     :secound_skill  # Assign Secound Selected Skill  #--------------------------------------------------------------------------  # * Start Processing  #--------------------------------------------------------------------------  alias devil_knight_skill_combination_scene_battle_start   start  def start    devil_knight_skill_combination_scene_battle_start()    @first_skill    = nil    @secound_skill  = nil  end  #--------------------------------------------------------------------------  # * Create Skill Window  #--------------------------------------------------------------------------  alias devil_knight_skill_combination_scene_battle_create_skill_window   create_skill_window  def create_skill_window    devil_knight_skill_combination_scene_battle_create_skill_window()    @skill_window.set_handler(:select,            method(:on_skill_select))    @skill_window.set_handler(:cancel_select,     method(:on_skill_select_cancel))  end  #--------------------------------------------------------------------------  # * Skill   #--------------------------------------------------------------------------  alias devil_knight_skill_combination_scene_battle_on_skill_ok   on_skill_ok  def on_skill_ok    if @first_skill != nil  && @secound_skill != nil  # Check Is There Any Selected Skill      @skill = $data_skills # Assign The Result Combination Skill       BattleManager.actor.input.set_skill(@skill.id)      BattleManager.actor.last_skill.object = @skill      @first_skill   = nil  # Delete The First Assigned Skill      @secound_skill = nil  # Delete The Secound Assigned Skill      if !@skill.need_selection?        @skill_window.hide        next_command      elsif @skill.for_opponent?        select_enemy_selection      else        select_actor_selection      end    else      devil_knight_skill_combination_scene_battle_on_skill_ok()    end  end  #--------------------------------------------------------------------------  # * New Method: Get The Result Of Skills Combination  #--------------------------------------------------------------------------  def get_skill_combination_result    i = -1    current_combination = @first_skill.name + " + " + @secound_skill.name # Make Text of Combination Skills Names To Check    Skills[:skill_combination].each do |combination|      if combination == current_combination        i += 1        return Skills[:combination_result_id]  # Return Result of Combination Skill ID      else        i += 1      end    end    return @secound_skill.id  # Return The ID of Secound Skill  end  #--------------------------------------------------------------------------  # * New Method: Skill   #--------------------------------------------------------------------------  def on_skill_select    if @first_skill == nil  # Check if First Skill Has Been Selected      @first_skill    = @skill_window.item  # Assign First  Skill      @help_window.set_text(@first_skill.name + " + ")  # Text Appear in Help Window For clarification    else      @secound_skill = @skill_window.item # Assign Secound  Skill      @help_window.set_text(@first_skill.name + " + " + @secound_skill.name)  # Text Appear in Help Window For clarification    end  end  #--------------------------------------------------------------------------  # * New Method: Skill   #--------------------------------------------------------------------------  def on_skill_select_cancel    if @secound_skill != nil # Check if Secound Skill Has Been Selected       @secound_skill = nil  # Delete The Secound Assigned Skill      @help_window.set_text(@first_skill.name + " + ")  # Text Appear in Help Window For clarification    elsif @first_skill != nil # Check if First Skill Has Been Selected      @first_skill = nil  # Delete The First Assigned Skill      @help_window.clear  # Clear Help Window    end  end  #--------------------------------------------------------------------------  # * Start Actor Command Selection  #--------------------------------------------------------------------------  alias devil_knight_skill_combination_scene_battle_start_actor_command_selection   start_actor_command_selection   def start_actor_command_selection    @first_skill    = nil # Delete The First Assigned Skill    @secound_skill  = nil # Delete The Secound Assigned Skill    devil_knight_skill_combination_scene_battle_start_actor_command_selection()  endend







Credit and Thanks

- all Members of this community For all help they gave me to do this



Author's Notes

- Any Question I am More Than happy to answer

- Please Feedback because it is really Help
- Have Fun


本贴来自国际rpgmaker官方论坛作者:GGSlayer处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/battle-skills-combining.32546/
页: [1]
查看完整版本: Battle Skills Combining