How do I disabled sub menu when using items?

Whenever I tried to use an item, this sub menu always appeared. How do I make it disappear?
I use this code for the menu so that's why it looks cropped like this.

1690635663653.png
depends on which menu it is - normally an item needs a target and/or a user as the source for possible parameter values.

do you have multiple actors or will there always be only one?

one of the selections might be able to be bypassed by setting the scope to the user, but for the other case you'll need a script to autoselect an actor instead of asking for it.

Such scripts were once on the VXAce Master Script List, but many websites have been taken down since then.
depends on which menu it is - normally an item needs a target and/or a user as the source for possible parameter values.

do you have multiple actors or will there always be only one?

one of the selections might be able to be bypassed by setting the scope to the user, but for the other case you'll need a script to autoselect an actor instead of asking for it.

Such scripts were once on the VXAce Master Script List, but many websites have been taken down since then.
Thank you for the reply. It'll be only one actor on my menu.
Do you of any chance remember the name of such scripts? Or at least the one who made it?
Do you of any chance remember the name of such scripts? Or at least the one who made it?
I did a quick search and couldn't find the script I have, so here it is

Hime Single Actor Menu
Ruby:
=begin
#==============================================================================
 ** Single-actor Menu
 Author: Hime
 Date: May 26, 2012
------------------------------------------------------------------------------
 ** Change log
 May 26
   - initial release
------------------------------------------------------------------------------   
 This script provides functionality for a single actor menu system
#==============================================================================
=end
$imported = {} if $imported.nil?
$imported["Tsuki_SingleActorMenu"] = true
#==============================================================================
# ** Configuration
#==============================================================================
#==============================================================================
# ** Rest of the script.
#==============================================================================
class Game_Party < Game_Unit
 
  def party_size
    @actors.size
  end
end

class Scene_ItemBase < Scene_MenuBase
 
  alias :th_sa_menu_determine_item :determine_item
  def determine_item
    if item.for_friend? && $game_party.party_size == 1
      if item_usable?
        use_item
      else
        Sound.play_buzzer
      end
      activate_item_window
    else
      th_sa_menu_determine_item
    end
  end
end

class Scene_Menu < Scene_MenuBase
 
  alias :th_sa_menu_command_personal :command_personal
  def command_personal
    if $game_party.party_size == 1
      on_personal_ok
    else
      th_sa_menu_command_personal
    end
  end
end
I did a quick search and couldn't find the script I have, so here it is

Hime Single Actor Menu
Ruby:
=begin
#==============================================================================
 ** Single-actor Menu
 Author: Hime
 Date: May 26, 2012
------------------------------------------------------------------------------
 ** Change log
 May 26
   - initial release
------------------------------------------------------------------------------  
 This script provides functionality for a single actor menu system
#==============================================================================
=end
$imported = {} if $imported.nil?
$imported["Tsuki_SingleActorMenu"] = true
#==============================================================================
# ** Configuration
#==============================================================================
#==============================================================================
# ** Rest of the script.
#==============================================================================
class Game_Party < Game_Unit
 
  def party_size
    @actors.size
  end
end

class Scene_ItemBase < Scene_MenuBase
 
  alias :th_sa_menu_determine_item :determine_item
  def determine_item
    if item.for_friend? && $game_party.party_size == 1
      if item_usable?
        use_item
      else
        Sound.play_buzzer
      end
      activate_item_window
    else
      th_sa_menu_determine_item
    end
  end
end

class Scene_Menu < Scene_MenuBase
 
  alias :th_sa_menu_command_personal :command_personal
  def command_personal
    if $game_party.party_size == 1
      on_personal_ok
    else
      th_sa_menu_command_personal
    end
  end
end
OH MY GOD THANK YOU VERY MUCH IT WORKS LIKE A CHARM.
But first, an explanation of what actually happened.
VX Ace uses a weird viewport system that erases anything in the region where the subwindows appear (usually as tall as the game window itself). To prevent it from ever happening, there are 2 solutions. You either don't use any custom viewport or you create a different viewport for the subwindows.

Now let me ask you something @Shuutaa . Is your whole game about never adding new actors to the player's party? If so, that's not the optimal solution. Yet, if you might let other heroes join him, then the solution above is good enough for your needs and you don't need to alter it in any way possible.

So which option is true in your case, @Shuutaa ?
But first, an explanation of what actually happened.
VX Ace uses a weird viewport system that erases anything in the region where the subwindows appear (usually as tall as the game window itself). To prevent it from ever happening, there are 2 solutions. You either don't use any custom viewport or you create a different viewport for the subwindows.

Now let me ask you something @Shuutaa . Is your whole game about never adding new actors to the player's party? If so, that's not the optimal solution. Yet, if you might let other heroes join him, then the solution above is good enough for your needs and you don't need to alter it in any way possible.

So which option is true in your case, @Shuutaa ?
In my case it'll be never adding new actors. Why is the solution not optimal? If so, what is the other option?
In your case, you'll only have a single actor so any submenu becomes useless.

Ruby:
class Scene_Menu
  def command_personal
    on_personal_ok
  end
end

class Scene_Item
  def determine_item
    item.for_friend? ? on_actor_ok : use_item
    activate_item_window
  end
end

That's all you need.
In your case, you'll only have a single actor so any submenu becomes useless.

Ruby:
class Scene_Menu
  def command_personal
    on_personal_ok
  end
end

class Scene_Item
  def determine_item
    item.for_friend? ? on_actor_ok : use_item
    activate_item_window
  end
end

That's all you need.
Oh dang this is good I'll appreciate it thank you so much.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-disabled-sub-menu-when-using-items.159829/