Conflict [ACE] SAS IV with Galv's Quick Weapon Swap

(NONE OF THIS SCRIPTS BELONG TO ME -just in case-)

Hello, I'm having a conflict with the SAS system and the Galv Quick weapon Swap,


For some SAS only register the Icon of the weapon you equip if you manually go to the Inventory and equip the weapon
IF you change weapons using the Galv QWS (Quick Weapon Swap) the Icon from the weapon is not created when you attack, Unless you actually SEE 
the icon of the weapon, can anyone help me fix this Issue?

(If this is not the right place for this kind of question sorry, and if this can be fixed really easy and I'm dumb then again sorry)

For Khas script's info (http://arcthunder.blogspot.co.uk/)
For Galv Script's info (http://galvs-scripts.com/)
 
Unless from the menu, you have to refresh every time you change your weapon in SAS. Try adding the following line somewhere in the Galv script:

Code:
Multiple_Core.refresh
in a random place? like for just try? let me check
in a random place? like for just try? let me check

I haven't seen the code. But it should be somewhere after you make the swap.
Is a short script want me to post it? (not good at coding at least not ruby) is only 200 lines
Is a short script want me to post it? (not good at coding at least not ruby) is only 200 lines

Sure. Let's see..
again: This is not mineeeeeeeee for more information visit Galvs Scripts!!!  (http://galvs-scripts.com/)
 

Spoiler
#-------------------------------------------------------------------------------
#  Galv's Quick Weapon Swap
#-------------------------------------------------------------------------------
#  For: RPGMAKER VX ACE
#  Version 1.4
#  Requested by mary674
#------------------------------------------------------------------------------#
#  2013-04-10 - Version 1.4 - made compatible with explorer's hud script
#                           - (make sure this is below it in the script list)
#  2013-02-25 - Version 1.3 - fixed menu crash
#  2013-02-25 - Version 1.2 - compatability with my pop up script
#  2013-02-25 - Version 1.1 - save bug error fixed
#  2013-02-24 - Version 1.0 - release
#------------------------------------------------------------------------------#
#  Changes the party leader's weapons (or equipment) by pressing a button on the
#  map (default keyboard Q and W (L and R)). It cycles through all weapons the
#  actor can equip and pops up text with which weapon was equipped.
#------------------------------------------------------------------------------#
 
($imported ||= {})["Galv_Quick_Weapon_Swap"] = true
module Galv_Qswap
 
#------------------------------------------------------------------------------#  
#  SETUP OPTIONS
#------------------------------------------------------------------------------#
 
  BTN_LEFT = :L       # Buttons to cycle equipment 🙂L and :R are Q and W keys)
  BTN_RIGHT = :R
   
  DISABLE_SWITCH = 80  # Turn swith ON to disable this.
   
  EQUIP_NONE = false  # true - can equip nothing. false - cannot equip nothing
 
  NO_EQUIP_TXT = "Nothing Equipped"  # Text displayed if you equip nothing
  EQUIP_TXT = " Equipped"            # Text displayed after weapon name
   
  SE = ["Equip1",100,100]       # "SE_Name",volume,pitch when swapping
  Y_OFFSET = -50                # Y offset for popup text
   
  DRAW_ICON = true              # Draws icon with equipped weapon
 
#------------------------------------------------------------------------------#  
#  END SETUP OPTIONS
#------------------------------------------------------------------------------#
 
end
 
 
class Game_Player < Game_Character
  alias galv_quick_weapon_gp_update update
  def update
    quick_change_equip if !$game_map.interpreter.running?
    update_popup if @popsprite
    galv_quick_weapon_gp_update
  end
   
  def quick_change_equip
    return if $game_switches[Galv_Qswap:😀ISABLE_SWITCH]
    if Input.trigger?(Galv_Qswap::BTN_LEFT)
      weapon_list = get_equip_array
      e_id = !actor.equips[0].nil? ? actor.equips[0].id : 0
       
      eq_list = weapon_list.select { |w| w.id < e_id }
      if eq_list.empty? && e_id != 0 && Galv_Qswap::EQUIP_NONE
        do_quick_equip(nil)
      elsif eq_list.empty?
        do_quick_equip(weapon_list.reverse[0])
      else
        do_quick_equip(eq_list.reverse[0])
      end
    elsif Input.trigger?(Galv_Qswap::BTN_RIGHT)
      weapon_list = get_equip_array
      e_id = !actor.equips[0].nil? ? actor.equips[0].id : 0
       
      eq_list = weapon_list.select { |w| w.id > e_id }
      if eq_list.empty? && e_id != 0 && Galv_Qswap::EQUIP_NONE
        do_quick_equip(nil)
      elsif eq_list.empty?
        do_quick_equip(weapon_list[0])
      else
        do_quick_equip(eq_list[0])
      end
    end
  end
   
  def get_equip_array
    @quick_swap = $game_party.all_items.select { |item|
      actor.equippable?(item) && item.is_a?(RPG::Weapon) &&
      !actors_equip?(item) }
  end
   
  def do_quick_equip(item)
    actor.change_equip(0, item)
    RPG::SE.new(Galv_Qswap::SE[0],Galv_Qswap::SE[1],Galv_Qswap::SE[2]).play
    popup(item)
  end
     
  def actors_equip?(item)
    return nil if actor.equips[0].nil?
    actor.equips[0].id == item.id
  end
   
  def update_popup
    @popsprite.update
  end
   
  def dispose_popup
    @popsprite.dispose if @popsprite
    @popsprite = nil
  end
   
  def popup(name)
    @popsprite.dispose if @popsprite
    @popsprite = Sprite_QPopText.new(@viewport1,$game_player,name)
  end
end # Game_Player < Game_Character
 
class Scene_Map < Scene_Base
  alias galv_quick_weapon_sm_dispose_spriteset dispose_spriteset
  def dispose_spriteset
    galv_quick_weapon_sm_dispose_spriteset
    $game_player.dispose_popup
  end
end # Scene_Map < Scene_Base
 


class Sprite_QPopText < Sprite
  def initialize(viewport,character,item)
    super(viewport)
    @character = character
    @item = item
    @rise = 0
    create_bitmap
    update
  end
 
  def dispose
    self.bitmap.dispose
    if @icon_sprite
      @icon_sprite.bitmap.dispose
      @icon_sprite.dispose
    end
    super
  end
 
  def create_bitmap
    if @item && Galv_Qswap:😀RAW_ICON
      @icon_sprite = Sprite.new
      @icon_sprite.bitmap = Cache.system("Iconset")
    end
    self.bitmap = Bitmap.new(200, 20)
    self.bitmap.font.size = 20
    self.bitmap.font.color.set(255, 255, 255)
    self.z = 2
  end
 
  def update
    super
    update_position
    update_bitmap
    update_visibility
    update_icon if @icon_sprite && Galv_Qswap:😀RAW_ICON
    end_popup
  end
 
  def end_popup
    return $game_player.dispose_popup if @rise >= 80
  end
 
  def name_text
    if @item
      return @item.name + Galv_Qswap::EQUIP_TXT
    else
      return Galv_Qswap::NO_EQUIP_TXT
    end
  end
   
  def update_bitmap
    @rise += 1
    self.bitmap.clear
    self.bitmap.draw_text(self.bitmap.rect, name_text, 1)
    self.draw_icon(@item.icon_index) if @item && Galv_Qswap:😀RAW_ICON
  end
   
  def draw_icon(icon_index)
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    @icon_sprite.src_rect = rect
    @icon = icon_index
  end
 
  def update_position
    self.x = @character.screen_x - 100
    self.y = @character.screen_y + Galv_Qswap::Y_OFFSET - @rise * 0.5
  end
 
  def update_icon
    @icon_sprite.x = @character.screen_x - name_text.length * 4 - 26
    @icon_sprite.y = self.y - 2
    @icon_sprite.opacity = self.opacity
  end
   
  def update_visibility
    self.opacity = 390 - @rise * 7
  end
end 


# Sprite_PopText < Sprite
 
 
if $imported["Galv_Explorers_Hud"]
class Scene_Map < Scene_Base
  attr_accessor :galv_hud
end
class Game_Player < Game_Character
  alias galv_quick_weapon_gp_hud_patch_quick_change_equip quick_change_equip
  def quick_change_equip
    galv_quick_weapon_gp_hud_patch_quick_change_equip
    SceneManager.scene.galv_hud.refresh_windows
  end
end
end
Replace:


def do_quick_equip(item)
actor.change_equip(0, item)
RPG::SE.new(Galv_Qswap::SE[0],Galv_Qswap::SE[1],Galv_Qswap::SE[2]).play
popup(item)
end


with


def do_quick_equip(item)
actor.change_equip(0, item)
RPG::SE.new(Galv_Qswap::SE[0],Galv_Qswap::SE[1],Galv_Qswap::SE[2]).play
popup(item)
Multiple_Core.refresh
end


and tell me if that works 🙂
Omg is working thankkkk youuuu very muchhhhhhhhhhhhhhhhhhh  🤣

Original thread: https://forums.rpgmakerweb.com/threads/conflict-ace-sas-iv-with-galvs-quick-weapon-swap.56873/