TheoAllen's Limited Inventory for one Actor

Hello everybody ! This time I was wondering if there was a way to tweak TheoAllen's Limited Inventory to skip the window for actor selection when "Using" an item. My game only has one player. The scripter already did a little patch:

Code:
class Scene_Item
  def use_command_ok
    theo_liminv_use_item
    @freeslot.refresh
  end
end

So there's 2 issues I could see when I tested for myself: 1) The item (in this case a healing potion) was still used despite the player having PV at full. Instead there should a SE be played that indicates the item cannot be used. And 2) Upon executing the Use command the game completely freezes. I don't know if it's an issue on my part but I would appreciate some help. Thanks !
I see your issue resolved with two things
Use TsukiHime's Single Actor Menu script
Then this
Ruby:
class Scene_Item
  def use_command_ok
    if item_usable?
      theo_liminv_use_item
    else
      Sound.play_buzzer
    end
    @freeslot.refresh
    @itemsize.refresh
    on_item_ok
  end
end
I see your issue resolved with two things
Use TsukiHime's Single Actor Menu script
Then this
Ruby:
class Scene_Item
  def use_command_ok
    if item_usable?
      theo_liminv_use_item
    else
      Sound.play_buzzer
    end
    @freeslot.refresh
    @itemsize.refresh
    on_item_ok
  end
end

Ohh, this is nice ! Thank you ! 😂 I use DT's One Person Menu instead but it also works as it has the same feature of removing the actor selection. As for the script fix, it works too !

The sound played is just my custom "accept" sound, though, and not my custom "buzzer" 😢 I think that could be nice to adapt. If it's not too much to ask: could you also make the text for an item that cannot be used a little faded out like in the screenshot attached ? Thanks Roninator !

Spoiler
Deleted
The sound played is just my custom "accept" sound, though, and not my custom "buzzer" 😢 I think that could be nice to adapt.
Are you asking me to change it?

If you don't want the buzzer sound then remove that line.

could you also make the text for an item that cannot be used a little faded out like in the screenshot attached ?
Ruby:
class Window_ItemUseCommand < Window_Command
  def make_command_list
    add_command(UseVocab, :use, enabled?(@item))
    add_command(DiscardVocab, :discard, discardable?(@item))
    add_command(CancelVocab, :cancel)
  end
  def enabled?(item)
    good = $game_party.usable?(item)
    return good if item.nil?
    user = $game_party.members[0]
    if item.is_a?(RPG::Item)
      good = user.item_has_any_valid_effects?(user, @item)
    else
      good = $game_party.usable?(item)
    end
    return good
  end
end
Are you asking me to change it?

If you don't want the buzzer sound then remove that line.


Ruby:
class Window_ItemUseCommand < Window_Command
  def make_command_list
    add_command(UseVocab, :use, enabled?(@item))
    add_command(DiscardVocab, :discard, discardable?(@item))
    add_command(CancelVocab, :cancel)
  end
  def enabled?(item)
    good = $game_party.usable?(item)
    return good if item.nil?
    user = $game_party.members[0]
    good = user.item_has_any_valid_effects?(user, @item)
    return good
  end
end

Thanks for your time. I should have specified things beforehand. Now it works as I imagined. Thank you very much for your contributions !
I see that I ran into another problem with this fix. Whenever I try to open the window to "Use" a Weapon, the game crashes. Same for Armors.
Captura de pantalla (621).png

Captura de pantalla (620).png


Any help with this?
I see that I ran into another problem with this fix. Whenever I try to open the window to "Use" a Weapon, the game crashes. Same for Armors.
View attachment 283887
View attachment 283886

Any help with this?
Fixed. changes above.
Thank you a lot !

Original thread: https://forums.rpgmakerweb.com/threads/theoallens-limited-inventory-for-one-actor.162891/