Topdod

Villager
Member
Joined
Jan 2, 2013
Messages
15
Reaction score
0
Primarily Uses
Not sure if I'm missing something obvious here or not but when from the item menu NOT in battle, using an item uses whoever has the highest PHA stat or leader.

I'm using Hime's Custom Use Conditions script which allows me to have requirements to use an item which in this case is a state but here is the problem as whoever is in front of the party will only ever use the item on the rest of the party and the item's condition isn't used for anybody but the first actor.
If actor 1 uses the item on themselves it locks out the entire party from using this item but if the item is used on anybody but the first it can be used until there is no more of the item left.

I guess like the target of the item would use the item on themselves instead of whoever had the highest PHA.
This would let me give a buff, make the party member wait X amount of battles for it to wear off and then they can use the item again.

Edit:
Ah, sorry about posting in the wrong place.
Hime script
http://himeworks.com/2013/11/custom-use-conditions/
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,315
Reaction score
11,737
First Language
English
Primarily Uses
RMVXA
[move]RGSSx Script Support[/move]
Would you please edit your post to include a link to the web page where you got that script. That way if anyone needs to check something before making a suggestion, they won't have to go hunting.
Thanks
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
608
Reaction score
320
First Language
German
Primarily Uses
Hey there,

Haven't tested it yet or anything (again), but you could try to use this as an additional script:
Code:
# ============================================================================
#  * Menu Item User Fix
#    Version 1.0 (January 4th, 2019)
#    by Another Fen <forums.rpgmakerweb.com>
# ----------------------------------------------------------------------------
#  This script attempts to change the "user" for items used from the menu, so...
#  ...items with self-scope should now be used by the target.
#  ...items are used by a party member that can actually use the item
#     (e.g. if item usablility is restricted through other scripts).
#  ...reusing an item after immobilizing the party with it does not cause an
#     error.
# ----------------------------------------------------------------------------
#  Place this script within the "▼ Materials" section of the script editor.
#  The script overwrites  Scene_ItemBase#user  and should be placed above
#  other scripts that alias this method.
# ============================================================================

class Scene_ItemBase
  # Scene_ItemBase#user  (Redefined)
  # Try to find a user that can actually use the item, and fix self-scope
  def user
    users = (item && item.for_user?) ? item_target_actors : $game_party.members
    return users.select { |a| a.usable?(item) }.max_by { |a| a.pha } || users[0]
  end
end
 

Latest Threads

Latest Posts

Latest Profile Posts

Sometimes you Just need to realise someone is beyond help... Still hard to walk away tho :(
100 Horror/Tragedy Sample Maps, Penguin Mech Sprite, & TileD Templates | RPG Maker News #70

Continuing working on abs. So far I have done the workout twice. I am excited to see the results after a couple of weeks. How is everyone doing? :)
MZ: oh boy imma work today
Me, excited: Really?
MZ, doesn't do what I tell It too
Me: I Thought-
MZ: I am Working!
Oof, this "side project" of mine is starting to get as complex as a VS plugin, at least as far as plugin parameters are concerned. I think I now understand why a plugin like this doesn't already exist(that I know of). Learning a lot while trying to make it work though!

Forum statistics

Threads
112,216
Messages
1,066,609
Members
145,822
Latest member
ghanovdn
Top