public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

VXACEChange Battle Background depend on Skill

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: Change Battle Background depend on Skill
  • Original author: GGSlayer
  • Original date: September 24, 2014
  • Source thread: https://forums.rpgmakerweb.com/threads/change-battle-background-depend-on-skill.32323/
  • Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSS3 Scripts (RMVX Ace)

Summary

Battle Background Change  Version. 1.0 Devil Knight Introduction

Archived First Post

Battle Background Change 
Version. 1.0
Devil Knight

Introduction
 
This Script allow you to change battle Background depend on skill use and get affected from it
 
Features

- Easy To use
- You can give each Field State Effect
- You can change whole Background By using skill

How to Use
All Instruction in The Script

Demo
https://www.dropbox.com/s/mew0nd9ol1qskie/Demo%20Battle%20Background%20Change.rar?dl=0
Script

Code:
 #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#                       Condition Battle Background Change

#                       Version: 1.0

#                       Author: Devil Knight

#                       Date: 24th  Sep, 2014

#-------------------------------------------------------------------------------

# Description:

#

#       This Script allow you to change battle Background depend on skill use 

#         and get affected from it

#

#-------------------------------------------------------------------------------

# Instruction:

#

#     - In Editablel Region do the following:

#       

#       - In Skill Section Write The name of the skills that will affect fields

#

#       - In Fields area section write the name of fields (wall or floor)  

#         that will have elemental power with state ID that will accur in those

#         fields

#

#       - From field_affect_by_flame to field_affect_by_wind write Sections 

#         the names of the fieldsthat will get affect from skill, 

#         field that will change to, and the state ID that will accur 

#         (Note: In each secion the :affected_field, :field_change, and 

#             :state_id must be in the same order)

#

#     - You Can Resist State Effect from feature window in DateBase 

#       (From Rate  =>  State Resist  =>  State_Name)

#

#

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

module Devil_Knight

  module Battle_Background_Change

    

    #---------------------------------------------------------------------  

    #                                                                 #

    #                   EDITABLE REGION                               #

    #                                                                 #

    #--------------------------------------------------------------------

    #-----------------------------------------------------------------------

    # Write All Skill Name That Will Affect Field

    #-----------------------------------------------------------------------

    Skill   = 

    {

          :skill    =>  

                {

                                :flame    =>  ["Fire"],            # Flame Skills

                                :ice      =>  ["Ice"],             # Ice Skills

                                oison   =>  ["Poison Cloud"],    # Poison Skills

                                :dark     =>  ["Dark Cloud"],            # Dark Skills

                                :water    =>  ["Water"],           # Water Skills

                                :light    =>  ["Saint", "Shock"],  # Light Skills

                                :wind     =>  ["Wind"],               # Wind Skills

                },

    }

    #-----------------------------------------------------------------------

    # Write All Fields Name That Will Be Affect (Name of Wall or Floor)

    #-----------------------------------------------------------------------

    Fields  = 

    {

          #Fields Elements 

          :area     =>

          {

                          :flame_field  =>    ["Lava2", "LavaCave"],  # Fields That Have Flame Element

                          :flame_state_id =>  26,                      # Original Flame Field State ID

                          :ice_field    =>    ["Snow", "Snowfield"],  # Fields That Have Ice Element

                          :ice_state_id =>  27,                      # Original Ice Field State ID

                          oison_field =>    ["PoisonSwamp"],        # Fields That Have Poison Element

                          oison_state_id =>  2,                     # Original Poison Field State ID

                          :lighting_field =>  [nil],                  # Fields That Have Light Element

                          :light_state_id =>  7,                      # Original Light area State ID

                          :water_area   =>    ["Sea"],                # Fields That Have Water Element

                          :water_state_id =>  nil,                      # Original Water area State ID

                          :dark_area    =>    ["DarkSpace"],          # Fields That Have Dark Element

                          :dark_state_id =>  3,                      # Original Dark Area State ID

                          :wind_area    =>    [nil],                  # Fields That Have Wind Element

                          :wind_state_id =>  nil,                      # Original Wind Area State ID

          },

          

          # Fields That will Affect From Flame Skills

          :field_affect_by_flame => 

          {

            :affected_field   =>  ["Grassland", "Snowfield"], # Fields That Will Affect From Flame 

            #                         |              |

            #                         V              V

            :field_change     =>  ["LavaCave",  "Grassland"], # Fields That Will Change To

            #                         |              |

            #                         V              V

            :state_id         =>  [   26,           nil    ], # State ID Trigger Depend on Field Change To (Take The State From State Menu)

          },

          # Fields That will Affect From Ice Skills

          :field_affect_by_ice => 

          {

            :affected_field   =>  ["Grassland", "LavaCave", "Lava2"],  # Fields That Will Affect From Ice

            #                         |              |

            #                         V              V

            :field_change     =>  ["Snowfield", "Grassland", "Grassland"], # Fields That Will Change To

            #                         |              |

            #                         V              V

            :state_id         =>  [   27,           nil    ,    nil     ], # State ID Trigger Depend on Field Change To (Take The State From State Menu)

          },

          # Fields That will Affect From Poison Skills

          :field_affect_by_poison => 

          {

            :affected_field   =>  ["Grassland"],      # Fields That Will Affect From Poison

            #                         |              

            #                         V              

            :field_change     =>  ["PoisonSwamp"],    # Fields That Will Change To

            #                         |

            #                         V              

            :state_id         =>  [   2],             # State ID Trigger Depend on Field Change To (Take The State From State Menu)

          },

          # Fields That will Affect From Dark Skills

          :field_affect_by_dark => 

          {

            :affected_field   =>  ["Grassland", "Snowfield"], # Fields That Will Affect From Dark

            #                         |              |

            #                         V              V

            :field_change     =>  ["DarkSpace", "DarkSpace"], # Fields That Will Change To

            #                         |              |

            #                         V              V

            :state_id         =>  [   3,             3    ],  # State ID Trigger Depend on Field Change To (Take The State From State Menu)

          },

          # Fields That will Affect From Water Skills

          :field_affect_by_water => 

          {

            :affected_field   =>  ["LavaCave"], # Fields That Will Affect From Water

            #                         |

            #                         V              

            :field_change     =>  ["Lava1"],    # Fields That Will Change To

            #                         |              

            #                         V              

            :state_id         =>  [   nil ],    # State ID Trigger Depend on Field Change To (Take The State From State Menu)

          },

          # Fields That will Affect From Light Skills

          :field_affect_by_light => 

          {

            :affected_field   =>  ["DarkSpace"],  # Fields That Will Affect From Light

            #                         |              

            #                         V              

            :field_change     =>  ["Road1"],  # Fields That Will Change To

            #                         |              

            #                         V

            :state_id         =>  [   nil ],  # State ID Trigger Depend on Field Change To (Take The State From State Menu)

          },

          # Fields That will Affect From Wind Skills

          :field_affect_by_wind => 

          {

            :affected_field   =>  ["Sand", "Desert"], # Fields That Will Affect From Wind

            #                         | 

            #                         V              

            :field_change     =>  ["Sand", "Desert"], # Fields That Will Change To

            #                         |

            #                         V              

            :state_id         =>  [   3,        3  ],   # State ID Trigger Depend on Field Change To (Take The State From State Menu)

          },

          

    }

    #---------------------------------------------------------------------  

    #                                                                 #

    #                   End Of EDITABLE REGION                        #

    #                                                                 #

    #--------------------------------------------------------------------

  end

end

#==============================================================================

# ** Scene_Battle

#------------------------------------------------------------------------------

#  This class performs battle screen processing.

#==============================================================================

 

class Scene_Battle < Scene_Base

  include Devil_Knight::Battle_Background_Change

  attr_accessor   :skill_name                 # Skill that has Been Used

  attr_accessor   revious_effect_id         # Last State ID Has Been Trigger

  attr_accessor   :battle_start_state_trigger # To Apply Field State Effect At Battle Start

  #--------------------------------------------------------------------------

  # * Start Processing

  #--------------------------------------------------------------------------

  alias devil_knight_Battle_background_change_Scene_Battle_start    start

  def start

    devil_knight_Battle_background_change_Scene_Battle_start()

    @battle_start_state_trigger = false # The state of original field did not active

  end

  #--------------------------------------------------------------------------

  # * Event Processing

  #--------------------------------------------------------------------------

  alias devil_knight_Battle_background_change_Scene_Battle_process_event    process_event

  def process_event

    if @spriteset.field_type != "normal" && @battle_start_state_trigger == false

      all_battle_members.each do |battler|

        battler.add_state(@spriteset.original_field_state_id) # Add the state of original field

        @log_window.display_affected_status(battler, nil)

        @log_window.wait_and_clear

      end

       @battle_start_state_trigger = true # The state of original field has activated

    end

    devil_knight_Battle_background_change_Scene_Battle_process_event()

  end

  #--------------------------------------------------------------------------

  # * Battle Action Processing

  #--------------------------------------------------------------------------

  def process_action

    return if scene_changing?

    if !@subject || !@subject.current_action

      @subject = BattleManager.next_subject

    end

    return turn_end unless @subject

    if @subject.current_action

      @subject.current_action.prepare

      if @subject.current_action.valid?

        @status_window.open

        execute_action

        skill_effect(@skill_name) # Call the new method

      end

      @subject.remove_current_action

    end

    process_action_end unless @subject.current_action

  end

  #--------------------------------------------------------------------------

  # * New Method: Skill Effect

  #--------------------------------------------------------------------------

  def skill_effect(skill_name)

    if @spriteset.update_field(skill_name)  # To check is there any change need to do

      all_battle_members.each do |battler|

          if battler.alive? && @spriteset.state_id == nil # To check is the used skill element oppose the original field element

            battler.remove_state(@spriteset.original_field_state_id)  # Remove the original field state effect from battler

            @log_window.display_removed_states(battler)

            @log_window.wait_and_clear

          elsif battler.alive? && @spriteset.state_id != nil  # If used skill element does not oppose the original filed element 

            if @spriteset.state_id != @spriteset.original_field_state_id  # To check is the used skill element same as original field element

              battler.remove_state(@spriteset.original_field_state_id)  # Remove the original field state effect from battler

              @log_window.display_removed_states(battler) 

              @log_window.wait_and_clear

            end

            battler.add_state(@spriteset.state_id)  # Add new field state affect to battler

            @log_window.display_affected_status(battler, nil)

            @log_window.wait_and_clear

          end

          if battler.alive? && @previous_effect_id != nil # Remove the field state effect from battler

            battler.remove_state(@previous_effect_id)

            @log_window.display_affected_status(battler, nil)

            @log_window.wait_and_clear

          end

        end

        @previous_effect_id = @spriteset.state_id # Assign the last state affect has been used

    end

  end

  #--------------------------------------------------------------------------

  # * End Turn

  #--------------------------------------------------------------------------

  alias devil_knight_Battle_Background_change_Scene_Battle_turn_end   turn_end

  def turn_end

    @spriteset.timer -= 1   if @spriteset.timer > 0 # Number of turn end of the new field element

    if @spriteset.timer == 0  

      update_basic  # Change Field Background

      all_battle_members.each do |battler|

        battler.remove_state(@previous_effect_id) # Remove the field state effect from battler

        @log_window.display_auto_affected_status(battler)

        @log_window.wait_and_clear

        if @spriteset.field_type != "normal" # To Check is original field has element effect  

          battler.add_state(@spriteset.original_field_state_id) # Add original field state effect to battler

          @log_window.display_affected_status(battler, nil)

          @log_window.wait_and_clear

        end

      end

    end

    @spriteset.timer = -1 if @spriteset.timer == 0  

    devil_knight_Battle_Background_change_Scene_Battle_turn_end()

  end

  #--------------------------------------------------------------------------

  # * Use Skill/Item

  #--------------------------------------------------------------------------

  alias devil_knight_Battle_Background_change_Scene_Battle_use_item   use_item

  def use_item

    item = @subject.current_action.item

    @skill_name = item.name # Assign Skill name

    devil_knight_Battle_Background_change_Scene_Battle_use_item()

  end

end

#==============================================================================

# ** Spriteset_Battle

#------------------------------------------------------------------------------

#  This class brings together battle screen sprites. It's used within the

# Scene_Battle class.

#==============================================================================

 

class Spriteset_Battle

  include Devil_Knight::Battle_Background_Change

  

  attr_accessor   :field_change_active           # Is Field Change By Skill Or Not?

  attr_accessor   :flame                         # Field Has Flame Element

  attr_accessor   :water                         # Field Has Water Element

  attr_accessor   :ice                           # Field Has Ice Element

  attr_accessor   :dark                          # Field Has Dark Element

  attr_accessor   oison                        # Field Has Poison Element

  attr_accessor   :light                         # Field Has Light Element

  attr_accessor   :wind                          # Field Has Wind Element

  attr_accessor   :timer                         # Number Of Turn That Affect Remain

  attr_accessor   _wall                        # Original Wall Background

  attr_accessor   _floor                       # Original Floor Background

  attr_accessor   :field_type                    # Original Field Element   

  attr_accessor   :state_id                      #  State ID that Will Trigger 

  attr_accessor   revious_Affected_Field_type  # Name Of Last Skill Used

  

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  alias devil_knight_battle_background_change_spriteset_battle_initialize   initialize 

  def initialize

    devil_knight_battle_background_change_spriteset_battle_initialize()

    @p_floor  = @back1_sprite.bitmap  # Save Previous Floor

    @p_wall   = @back2_sprite.bitmap  # Save Previous Wall

    @field_type = original_field_type # Get Field Element Type

    @timer  = -1  

    @state_id = -1

    @field_change_active = false

  end

  #--------------------------------------------------------------------------

  # * New Method: Assign State ID to Each Type of Field

  #--------------------------------------------------------------------------

  def original_field_state_id

    return Fields[:area][:flame_state_id]    if @field_type == "flame" && Fields[:area][:flame_state_id] != nil

    return Fields[:area][:ice_state_id]     if @field_type == "ice"  && Fields[:area][:ice_state_id] != nil

    return Fields[:area][oison_state_id]   if @field_type == "poison"  && Fields[:area][oison_state_id] != nil

    return Fields[:area][:light_state_id]   if @field_type == "lighting" && Fields[:area][:light_state_id]

    return Fields[:area][:dark_state_id]  if @field_type == "dark" && Fields[:area][:dark_state_id] != nil

    return Fields[:area][:wind_state_id]  if @field_type == "wind" && Fields[:area][:wind_state_id] != nil

    return Fields[:area][:water_state_id]  if @field_type == "water" && Fields[:area][:water_state_id]  != nil

  end

  #--------------------------------------------------------------------------

  # * New Method: Change Battle Field Background

  #--------------------------------------------------------------------------

  def update_field(skillname)

    position = -1

    affected_field_type = nil

    affected_field_type = find_skill(skillname)                               # Find If The Skill Affect Original Field

    position = find_field(affected_field_type) if affected_field_type != nil  # Get The Position Of affected Field, New Field, And State ID For The New Field

    # If Flame Skill used On Flame Element Field That Has been Changed By Previous Skill

    if @field_change_active && affected_field_type == :field_affect_by_flame && @field_type == "flame" 

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = original_field_state_id

      return true

    # If Ice Skill used On Ice Element Field That Has been Changed By Previous Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_ice && @field_type == "ice" 

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = original_field_state_id

      return true

    # If Dark Skill used On Dark Element Field That Has been Changed By Previous Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_dark && @field_type == "dark" 

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = original_field_state_id

      return true

    # If Poison Skill used On Poison Element Field That Has been Changed By Previous Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_poison && @field_type == "poison" 

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = original_field_state_id

      return true

    # If Light Skill used On Light Element Field That Has been Changed By Previous Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_light && @field_type == "lighting" 

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = original_field_state_id

      return true

    # If Water Skill used On Water Element Field That Has been Changed By Previous Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_water && @field_type == "water" 

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = original_field_state_id

      return true

    # If Wind Skill used On Wind Element Field That Has been Changed By Previous Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_wind && @field_type == "wind" 

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = original_field_state_id

      return true

    # If Ice Element Skill used On Field That Has been Changed By Flame Element Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_ice && @flame

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = nil

      return true

    # If Water Element Skill used On Field That Has been Changed By Flame Element Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_water && @flame

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = nil

      return true

    # If Flame Element Skill used On Field That Has been Changed By Ice Element Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_flame && @ice

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = nil

      return true

    # If Light Element Skill used On Field That Has been Changed By Dark Element Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_light && @dark

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = nil

      return true

    # If Dark Element Skill used On Field That Has been Changed By Light Element Skill

    elsif @field_change_active && affected_field_type == :field_affect_by_dark && @light

      Graphics.fadeout(30)

      return_original_floor

      return_original_wall

      Graphics.fadein(30)

      @timer  = -1

      @field_change_active = false

      @state_id = nil

      return true

    # If Element Skill used On Field That Has been Changed By same Element Skill

    elsif @field_change_active  &&  @previous_affected_field_type == affected_field_type

      @timer  = 4

      return false

    # Change Field Element And Background Depend on The Used Skill

    elsif position > -1 

      Graphics.fadeout(30)

      change_floor(Fields[affected_field_type][:field_change][position])

      change_wall(Fields[affected_field_type][:field_change][position])

      @timer  = 4

      @field_change_active = true

      @state_id = Fields[affected_field_type][:state_id][position]

      lava_field      if affected_field_type == :field_affect_by_flame

      ice_field       if affected_field_type == :field_affect_by_ice

      water_area      if affected_field_type == :field_affect_by_water

      dark_area       if affected_field_type == :field_affect_by_dark

      poison_field    if affected_field_type == :field_affect_by_poison

      lighting_field  if affected_field_type == :field_affect_by_light

      wind_area       if affected_field_type == :field_affect_by_wind

      Graphics.fadein(30)

      @previous_affected_field_type = affected_field_type

      return true

    else

      return false

    end

  end

  #--------------------------------------------------------------------------

  # * New Method: Check Original Field Status

  #--------------------------------------------------------------------------

  def original_field_type

    # Check Original Field In The Flame Field

    Fields[:area][:flame_field].each do |flame_field|

      if  flame_field ==  battleback1_name || flame_field ==  battleback2_name

        lava_field

        return "flame" 

      end

    end

    # Check Original Field In The Ice Field

    Fields[:area][:ice_field].each do |snow_field|

      if  snow_field ==  battleback1_name || snow_field ==  battleback2_name

        ice_field

        return "ice" 

      end

    end

    # Check Original Field In The Water Field

    Fields[:area][:water_area].each do |water|

      if  water ==  battleback1_name  || water ==  battleback2_name

        water_area

        return "water" 

      end

    end

    # Check Original Field In The Dark Field

    Fields[:area][:dark_area].each do |dark_field|

      if  dark_field ==  battleback1_name || dark_field ==  battleback2_name

        dark_area

        return "dark" 

      end

    end

    # Check Original Field In The Poison Field

    Fields[:area][oison_field].each do |poison_area|

      if  poison_area ==  battleback1_name  || poison_area ==  battleback2_name

        poison_field

        return "poison" 

      end

    end

    # Check Original Field In The Light Field

    Fields[:area][:lighting_field].each do |lighting_area|

      if  lighting_area ==  battleback1_name  || lighting_area ==  battleback2_name

        lighting_field

        return "lighting" 

      end

    end

    # Check Original Field In The Wind Field

    Fields[:area][:wind_area].each do |wind|

      if  wind ==  battleback1_name  || wind ==  battleback2_name

        wind_area

        return "wind" 

      end

    end

    normal_field

    return "normal"

  end

  #--------------------------------------------------------------------------

  # * New Method: Change Floor Background To New One

  #--------------------------------------------------------------------------

  def change_floor(floor)

    @back1_sprite.bitmap = Cache.battleback1(floor)

    @back1_sprite.z = 0

    center_sprite(@back1_sprite)

  end

  #--------------------------------------------------------------------------

  # * New Method: Change Wall Background To New One

  #--------------------------------------------------------------------------

  def change_wall(wall)

    @back2_sprite.bitmap = Cache.battleback1(wall)

    @back2_sprite.z = 1

    center_sprite(@back2_sprite)

  end

  #--------------------------------------------------------------------------

  # * New Method: Find Used Skill Element

  #--------------------------------------------------------------------------

  def find_skill(skillname)

    # Check Flame Skills Element

    Skill[:skill][:flame].each do |flame_skill|

      if flame_skill == skillname

        return :field_affect_by_flame

      end

    end

    # Check Ice Skills Element

    Skill[:skill][:ice].each do |ice_skill|

      if ice_skill == skillname

        return :field_affect_by_ice

      end

    end

    # Check Poison Skills Element

    Skill[:skill][oison].each do |poison_skill|

      if poison_skill == skillname 

        return :field_affect_by_poison

      end

    end

    # Check Water Skills Element

    Skill[:skill][:water].each do |water_skill|

      if water_skill == skillname

        return :field_affect_by_water

      end

    end

    # Check Dark Skills Element

    Skill[:skill][:dark].each do |dark_skill|

      if dark_skill == skillname

        return :field_affect_by_dark

      end

    end

    # Check Light Skills Element

    Skill[:skill][:light].each do |light_skill|

      if light_skill == skillname

        return :field_affect_by_light

      end

    end

    # Check Wind Skills Element

    Skill[:skill][:wind].each do |wind_skill|

      if wind_skill == skillname

        return :field_affect_by_wind

      end

    end

    return nil

  end

  #--------------------------------------------------------------------------

  # * New Method: Find Field That Affect From Skill

  #--------------------------------------------------------------------------

  def find_field(skill_element)

    position = 0

    Fields[skill_element][:affected_field].each do |field|

      if field == battleback1_name || field == battleback2_name

        return position

      else

        position += 1

      end

    end

    return -1

  end

  #--------------------------------------------------------------------------

  # * New Method: Return Original Floor Background

  #--------------------------------------------------------------------------

  def return_original_floor

    @back1_sprite.bitmap = @p_floor

    @back1_sprite.z = 0

    center_sprite(@back1_sprite)

  end

  #--------------------------------------------------------------------------

  # * New Method: Return Original Wall Background

  #--------------------------------------------------------------------------

  def return_original_wall

    @back2_sprite.bitmap = @p_wall

    @back2_sprite.z = 1

    center_sprite(@back2_sprite)

  end

  #--------------------------------------------------------------------------

  # * Update Battle Background (Floor) Sprite

  #--------------------------------------------------------------------------

  alias devil_knight_battle_background_change_spriteset_battle_update_battleback1   update_battleback1

  def update_battleback1

      if @field_change_active == true &&  @timer  ==  0

        Graphics.fadeout(30)

        return_original_floor

      else

        devil_knight_battle_background_change_spriteset_battle_update_battleback1()

      end

  end

  #--------------------------------------------------------------------------

  # * Update Battle Background (Wall) Sprite

  #--------------------------------------------------------------------------

  alias devil_knight_battle_background_change_spriteset_battle_update_battleback2   update_battleback2

  def update_battleback2

    if @field_change_active == true &&  @timer  ==  0

      return_original_wall

      Graphics.fadein(30)

      @field_change_active = false

      original_field_status

    else

      devil_knight_battle_background_change_spriteset_battle_update_battleback2

    end

  end

  #--------------------------------------------------------------------------

  # * New Method: Return Original Field Status

  #--------------------------------------------------------------------------

  def original_field_status

    normal_field    if @field_type == "normal"

    lava_field      if @field_type == "flame"

    ice_field       if @field_type == "ice"

    poison_field    if @field_type == "poison"

    lighting_field  if @field_type == "lighting"

    dark_area       if @field_type == "dark"

    wind_area       if @field_type == "wind"

    water_area      if @field_type == "water"

  end

  #==========================================================================

  # * New Methods: Field Status

  #========================================================================== 

  #--------------------------------------------------------------------------

  # * Normal Field Status

  #-------------------------------------------------------------------------- 

  def normal_field

    @flame    = false

    @water    = false

    @ice      = false

    @dark     = false

    @poison   = false

    @light    = false

    @wind     = false

  end

  #--------------------------------------------------------------------------

  # * Flame Field Status

  #-------------------------------------------------------------------------- 

  def lava_field

    @flame    = true

    @water    = false

    @ice      = false

    @dark     = false

    @poison   = false

    @light    = false

    @wind     = false

  end

  #--------------------------------------------------------------------------

  # * Ice Field Status

  #-------------------------------------------------------------------------- 

  def ice_field

    @flame    = false

    @water    = false

    @ice      = true

    @dark     = false

    @poison   = false

    @light    = false

    @wind     = false

  end

  #--------------------------------------------------------------------------

  # * Poison Field Status

  #-------------------------------------------------------------------------- 

  def poison_field

    @flame    = false

    @water    = false

    @ice      = false

    @dark     = false

    @poison   = true

    @light    = false

    @wind     = false

  end

  #--------------------------------------------------------------------------

  # * Dark Area Status

  #-------------------------------------------------------------------------- 

  def dark_area

    @flame    = false

    @water    = false

    @ice      = false

    @dark     = true

    @poison   = false

    @light    = false

    @wind     = false

  end

  #--------------------------------------------------------------------------

  # * Water Area Status

  #-------------------------------------------------------------------------- 

  def water_area

    @flame    = false

    @water    = true

    @ice      = false

    @dark     = false

    @poison   = false

    @light    = false

    @wind     = false

  end

  #--------------------------------------------------------------------------

  # * Light Field Status

  #-------------------------------------------------------------------------- 

  def lighting_field

    @flame    = false

    @water    = false

    @ice      = false

    @dark     = false

    @poison   = false

    @light    = true

    @wind     = false

  end

  #--------------------------------------------------------------------------

  # * Wind Area Status

  #-------------------------------------------------------------------------- 

  def wind_area

    @flame    = false

    @water    = false

    @ice      = false

    @dark     = false

    @poison   = false

    @light    = false

    @wind     = true

  end

end

 
 
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

Features Mentioned

  • Easy To use
  • You can give each Field State Effect
  • You can change whole Background By using skill

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

License / Terms Note

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

Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#fields#039#rgss3#script-archive

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar