Compatibility with Yanfly Battle Equip

Luna engine doesnt seem to be compatible with command equip from yanfly.
Keeps giving me this error when i try to change equip.
tried removing other scripts but only luna engine complete removal fixed it.

DFomz4H.png
This is a known issue that I believe is either being worked on or is just a plain incompatibility problem.
Wow I was about to post about this 😛
It has worked for me, I placed the yanfly Equip below all the Luna engine Scripts as shown in the picture :

Spoiler
fsACCoC.png
and this is what it looks like ingame :

Spoiler
wVqdAuK.png
and i can even use BM advanced Equip to make it look pretter

: the script setup

Spoiler
IXxKmHD.png
what it looks like ingame:

Spoiler
PGcYb5j.png
Here, I worked with GreatRedSpirit, a coding wizard over on RMN, to create a patch for it:


class Object def deep_clone return @deep_cloning_obj if @deep_cloning @deep_cloning_obj = clone @deep_cloning_obj.instance_variables.each do |var| val = @deep_cloning_obj.instance_variable_get(var) begin @deep_cloning = true if(val.is_a? Class) val = val else val = val.deep_clone end rescue TypeError next ensure @deep_cloning = false end @deep_cloning_obj.instance_variable_set(var, val) end deep_cloning_obj = @deep_cloning_obj @deep_cloning_obj = nil return deep_cloning_obj endendclass Array def deep_clone return map { |x| x.deep_clone } endendclass Numeric def deep_clone return self endendclass FalseClass def deep_clone return self endendclass TrueClass def deep_clone return self endendclass NilClass def deep_clone return self endendclass Window_EquipItem < Window_ItemList #-------------------------------------------------------------------------- # overwrite method: update_help #-------------------------------------------------------------------------- def update_help super return if @actor.nil? return if @status_window.nil? return if @last_item == item @last_item = item temp_actor = @actor.deep_clone temp_actor.force_change_equip(@slot_id, item) @status_window.set_temp_actor(temp_actor) endend class Scene_Battle < Scene_Base alias nova_command_equip command_equip def command_equip @actor_command_window.visible = false @status_window.close unless @status_window.nil? or @status_window.disposed? 6.times do update end # grs-get those fukkin windows to proc nova_command_equip @status_window.open @actor_command_window.visible = true @ftb_gauge.show if $imported["YEA-BattleSystem-FTB"] end end # Scene_Battle


Just slap it underneath the command equip script and you'll be golden. Let me know if something went wrong! 


Tested in Luna base ver 1.03


EDIT:

Code:
class Object  
  def deep_clone        
    return @deep_cloning_obj if @deep_cloning    
    @deep_cloning_obj = clone    
    @deep_cloning_obj.instance_variables.each do |var| val = @deep_cloning_obj.instance_variable_get(var)      
  begin        
    @deep_cloning = true        
    if(val.is_a? Class)          
    val = val        
  else          
   val = val.deep_clone        
end      

rescue TypeError        
  next      
  ensure        
  @deep_cloning = false      
end      
  @deep_cloning_obj.instance_variable_set(var, val)    
  end    
  deep_cloning_obj = @deep_cloning_obj    
  @deep_cloning_obj = nil    
  return deep_cloning_obj  
  end
end

class Array  
  def deep_clone    
  return map { |x| x.deep_clone }  
  end
end

class Numeric  
  def deep_clone    
  return self  
  end
end

class FalseClass  
  def deep_clone    
  return self  
  end
end

class TrueClass  
  def deep_clone    
  return self  
  end
end

class NilClass  
  def deep_clone   
  return self  
  end
end

class Window_EquipItem < Window_ItemList  
#--------------------------------------------------------------------------  
# overwrite method: update_help  
#--------------------------------------------------------------------------  
def update_help    
  super    
  return if @actor.nil?    
  return if @status_window.nil?    
  return if @last_item == item    
  @last_item = item    
  temp_actor = @actor.deep_clone    
  temp_actor.force_change_equip(@slot_id, item)    
  @status_window.set_temp_actor(temp_actor)  
  end
end 

class Scene_Battle < Scene_Base  
  alias nova_command_equip command_equip  
  def command_equip     
  @actor_command_window.visible = false    
  @status_window.close unless @status_window.nil? or @status_window.disposed?    
  6.times 
  do 
  update 
  end  # grs-get those fukkin windows to proc    
  nova_command_equip    
  @status_window.open     
  @actor_command_window.visible = true   
  @ftb_gauge.show if $imported["YEA-BattleSystem-FTB"]  
  end  
end # Scene_Battle

Original thread: https://forums.rpgmakerweb.com/threads/compatibility-with-yanfly-battle-equip.42794/