KMS Generic Gauges + Galv's Menu Layout Compatibility Patch?

So I found the translated Generic Gauges script from Mr. Bubble and Tomy, and I love the script. I also like Galv's Menu Layout script for its appearance (the vertically aligned actor images are much more aesthetically pleasing to me than the default face icons). Unfortunately, the two scripts seem incompatible with one another, and while I did find a compatibility patch for Galv's Menu Themes script, I don't know if there's one for the Menu Layout.

This is the error that pops up when using the two scripts as-is:
4ff76a7e81b66394fb78af2ff2e74df4.png


Unfortunately I don't know enough Ruby to be able to make a compatibility patch myself. I tried changing the order of the scripts in the editor, thinking maybe changing the priority would maybe fix the loading, but it looks to be something in the arguments specifically, so I don't know how to fix it.

Any help (even just a few lines of code to alter it) would be greatly appreciated!

KMS Gauges | Menu Layout
I know that one exists, but I'm looking for one for the Menu Layout, not the Menu Themes.

galv-menu-layout.jpg
Sorry, forgot that Galv had a few menu scripts
Spoiler: Comp fix
Ruby:
#==============================================================================
# Compatibility Patch :                                         v1.0 (05/10/20)
#   Galv Menu Layout + KMS Generic Gauge
#==============================================================================
# Script by:
#     Mr. Bubble - recreated by Roninator2
#--------------------------------------------------------------------------
# Place this script below both Galv Menu Layout and KMS Generic Gauge
# in your script edtior.
#
#==============================================================================

$imported = {} if $imported.nil?
$kms_imported = {} if $kms_imported.nil?

#==============================================================================
# ■ Window_MainMenuStatus
#==============================================================================

if $imported["Galv_Menu_Layout"] && $kms_imported["GenericGauge"]
class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Draw Gauge
  #     rate   : Rate (full at 1.0)
  #     color1 : Left side gradation
  #     color2 : Right side gradation
  #--------------------------------------------------------------------------
  def draw_gauge(x, y, width, rate, color1, color2)
    fill_w = (width * rate).to_i
    gauge_y = y + line_height - 8
    contents.fill_rect(x, gauge_y, width, 6, gauge_back_color)
    contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)
  end

  def draw_actor_hp(actor, x, y, width = col_width)
    draw_actor_hp_gauge(actor, x, y, width)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::hp_a)
    draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
      hp_color(actor), normal_color)
  end
    
  def draw_actor_mp(actor, x, y, width = col_width)
    draw_actor_mp_gauge(actor, x, y, width)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::mp_a)
    draw_current_and_max_values(x, y + 3, width, actor.mp, actor.mmp,
      mp_color(actor), normal_color)
  end
    
  def draw_actor_tp(actor, x, y, width = col_width)
    draw_actor_tp_gauge(actor, x, y, width)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::tp_a)
    change_color(tp_color(actor))
    draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2)
  end

end
end # if $imported["Galv_Menu_Themes"]
Sorry, forgot that Galv had a few menu scripts
Spoiler: Comp fix
Ruby:
#==============================================================================
# Compatibility Patch :                                         v1.0 (05/10/20)
#   Galv Menu Layout + KMS Generic Gauge
#==============================================================================
# Script by:
#     Mr. Bubble - recreated by Roninator2
#--------------------------------------------------------------------------
# Place this script below both Galv Menu Layout and KMS Generic Gauge
# in your script edtior.
#
#==============================================================================

$imported = {} if $imported.nil?
$kms_imported = {} if $kms_imported.nil?

#==============================================================================
# ■ Window_MainMenuStatus
#==============================================================================

if $imported["Galv_Menu_Layout"] && $kms_imported["GenericGauge"]
class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Draw Gauge
  #     rate   : Rate (full at 1.0)
  #     color1 : Left side gradation
  #     color2 : Right side gradation
  #--------------------------------------------------------------------------
  def draw_gauge(x, y, width, rate, color1, color2)
    fill_w = (width * rate).to_i
    gauge_y = y + line_height - 8
    contents.fill_rect(x, gauge_y, width, 6, gauge_back_color)
    contents.gradient_fill_rect(x, gauge_y, fill_w, 6, color1, color2)
  end

  def draw_actor_hp(actor, x, y, width = col_width)
    draw_actor_hp_gauge(actor, x, y, width)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::hp_a)
    draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
      hp_color(actor), normal_color)
  end
   
  def draw_actor_mp(actor, x, y, width = col_width)
    draw_actor_mp_gauge(actor, x, y, width)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::mp_a)
    draw_current_and_max_values(x, y + 3, width, actor.mp, actor.mmp,
      mp_color(actor), normal_color)
  end
   
  def draw_actor_tp(actor, x, y, width = col_width)
    draw_actor_tp_gauge(actor, x, y, width)
    change_color(system_color)
    draw_text(x, y, 30, line_height, Vocab::tp_a)
    change_color(tp_color(actor))
    draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2)
  end

end
end # if $imported["Galv_Menu_Themes"]

Okay, I tried that out and now it's giving me the opposite error.
5a4ed8a419e2a158b9e924c0d045b3bc.png


I haven't changed anything in the Generic Gauges script, just set up the config in the Menu Layout, and the project is a fresh one to set things up. I have absolutely no clue what's going on now.

Sorry if I'm being a bother!
KMS generic gauge script,
Galv menu layout script
my patch

Do you have them in that order?
KMS generic gauge script,
Galv menu layout script
my patch

Do you have them in that order?
Yep. I tried both putting the menu layout first and then the generic gauge script, then the generic gauges and menu layout, and both have the same result. The error is specifically in the gauge script itself, not the patch.
The error is specifically in the gauge script itself, not the patch.
Looking at the number for that error, line 279 for me is a comment line.
# ○ HP ゲージの描画
Do you have a bad copy of the script?
#_/ ◇ Last update : 2012/08/05 (TOMY@Kamesoft) ◇

Mine is 377 lines long
Looking at the number for that error, line 279 for me is a comment line.
# ○ HP ゲージの描画
Do you have a bad copy of the script?
#_/ ◇ Last update : 2012/08/05 (TOMY@Kamesoft) ◇

Mine is 377 lines long
Oh, that may explain it!
Last update : 2012/01/15 (TOMY@Kamesoft)

Do you have the more recent version? Mine is clearly outdated.
Do you have the more recent version? Mine is clearly outdated.
IT WORKS!
Thank you! Sorry to be a bother!

Original thread: https://forums.rpgmakerweb.com/threads/kms-generic-gauges-galvs-menu-layout-compatibility-patch.159641/