Item user PHA

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,299
Reaction score
11,712
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
564
Reaction score
275
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top