Introduction This script is desinged for the default battler only and will probably not work with other battle systems.
Okay, here is what the script really does. You know how when you have one potion left, and you have Ralph use one? Then you pull open the item window for Ulrika, and you still have one? Why? Shouldn't there be no potions left, since Ralph already selected to use one?
If you answered yes, then this script is for you. Of course, the item shouldnt actually be consumed until it is 'used', so I have accounted for this as well.
Features - Only one actor can use any given single item (read: one item use) in any given combat round (this includes non-consumables) - Items selected are NOT consumed until they are actually used. Actors will see a reduction in quantity as they select their items, but if anyone selecting to 'use' an item cancels out, the item will be available for use by someone else. - completely plug and play
How to Use Place it in the materials section above main and below scripts that alter item numbers.
# Item Selection Number Fix # v 1.0b # By Mithran # Created January 27, 2009 # Only tested with default battler system. # Subtracts 1 item for each member 'using' the item in the command selection. # The items are NOT really 'gone', but will be unavailable for the next actors # to select. # In other words, if Ralph selects to 'use' the last potion, there wont be one # Ulrika wont be able to select it. If for some reason Ralph doesn't get to use # the potion before the combat round or battle ends, it is still available for # use the next round or after battle. If Ralph cancels using the potion, Ulrika # can then use it. # Also dissalows multiple actors from selecting the same non-consumable item # (there must be one for each actor selecting the item)
class Scene_Battle < Scene_Base alias start_actor_command_selection_item_number_fix start_actor_command_selection def start_actor_command_selection start_actor_command_selection_item_number_fix @active_battler.action.clear end alias process_action_item_number_fix process_action def process_action $game_temp.action_processing_item_number = true process_action_item_number_fix $game_temp.action_processing_item_number = false end end
class Game_Temp attr_accessor :action_processing_item_number end
class Game_Party < Game_Unit alias item_number_item_number_fix item_number def item_number(item) n = item_number_item_number_fix(item) return n unless $game_temp.in_battle return n if item.class != RPG::Item return n if $game_temp.action_processing_item_number for member in members n -= 1 if member.action.kind == 2 && member.action.item_id == item.id end return [n, 0].max end end
FAQ q. How about one for (insert custom battle system here)? a. Shoot me a name and a link and I'll look into it. No promises, though.
Credit and Thanks - Mithran
Author's Notes This script is a purely optional addon. Feedback is welcome.