MZ Items that work differently depending on which character uses them?

So I don't know if this is necessarily something I should include, but a friend brought this up and now I'm curious if it's theoretically possible.

The concept is a system of "flavours" for healing items. If an actor 'prefers' the flavour, it will heal more points, and if they 'dislike' the flavour, it will heal less points. Sort of like berry preferences in Pokémon, I guess? It would probably be easier to assign each item a "flavour" and balance preferences based on that than to have the actors each have unique opinions on each healing item, but the latter might be a little easier to code?

I would assume that a plugin that could have the capability for this would be primarily a plugin for adding "types" to items like how equipment has different types. Then, from there, the types could be associated with some kind of percentage modifier depending on 'preference' and preferences on each character could be defined through notetags (default preference being neutral/no effect); I'm not sure how this would work exactly since I don't code JS. (Ideally, there would also be a line in the battle log that tells you whether the character liked the item? Just to make it easier to determine who prefers what.) This could just outright be impossible depending on how hard it is to change the parameters of item healing rates on this basis. Again, I don't really know how plugin coding works.

If this is possible to do at all, I would be satisfied with just having three levels of preference (prefers, neutral, dislikes) but I think a five-level system (loves, likes, neutral, dislikes, hates) could be more fun? Miitopia does food preferences that are (not really, but basically) random per item, so there is a precedent for this concept beyond the aforementioned Pokémon (where preferences aren't that important in casual play outside of a few niche applications). If it's not possible, oh well, was just a quirky little idea. (Though, isn't there a mod for XP that replicates Pokémon? Does that have berry preferences? If so, there's an example of that working in a different RPGM.)

Thanks! :}
Then, from there, the types could be associated with some kind of percentage modifier depending on 'preference' and preferences on each character
by that, you largely described how element rates already work. as an example, if you had a "sweet" element, youd give your actors different sweet element rates for their preferences (25%, 50%, 100%, 125%, 200% for example) and make your sweet drinks do sweet elemental healing
as said above the easiest way is to use elemental damage rates to handle this.

however if that does not fit your wanted numbers or other parts, then an alternative it to use common events.

you basically have to add an invisible target state to the item so that your common event can checki which actor is the target of the healing.
and then use different event commands in thedifferent actor branches.

this method is not limited to healing, but it would be more work the more actors your game has.

EDIT: RMMZ is the first maker that can handle this without the target state trick as the control variable game data can provide the actor ID directly in the "last ..." section
also, just some thoughts.
(Ideally, there would also be a line in the battle log that tells you whether the character liked the item? Just to make it easier to determine who prefers what.)
it might be handy the first few times, but i feel that'll annoy the player in the long run.

1) if the message pops up after the item use, the player doesnt get to use that info before they make the choice to use it the first time they use a new flavor or forget preferences.

2)Unless preferences change over time, theres no need to spend the time and keep reminding the player that actor 1 likes spicy food every time they use a spicy item on them. once the player knows the preference, assumedly they would have used the item because they know the preference is there.

you could try using a preference animation instead of a message. something short like a heart for stuff they like and a cobweb for a dislike. you could use andar's suggestion for it, but the animation would start very noticeably delayed compared to the heal. the Visustella action sequences plugin could be used to force the common event to run earlier, but thats even more setup

3) putting flavor preferences in a character status page in the menu would provide a convenient and nonintrusive method to have all the preferences visible instead of having to use an item to test the preferences
I do know HIME has a plugin for this, but for MV, not sure if its ported to MZ,
which is effect condition, it might be ported over or easy, depending how MZ
works.

but it can do probably what you want too, ask him/her or if permission is given
to port to MZ 🙂
I do know HIME has a plugin for this
Hm. You could use that for this, but it would be a pretty overly complicated approach. You'd have to put a bunch of different Recover HP effects on your item, then have an effect condition for every one checking for the right actors.

If you were going to go that way, it would be less typing to just put it all as JavaScript conditionals in the damage formula.

But I agree with @Robro33, from the OP it sounds like just using an element does what they want.

ask him/her or if permission is given to port to MZ 🙂
That's not really a necessary thing to do, generally. If someone had in their terms that you're not allowed to edit the plugin for personal use (never mind that being completely unenforceable), then that would be a problem...but I've never seen a plugin with that in their terms. And Hime's terms just say "use it freely" without any restrictions.

But it's a good reminder...I do sometimes forget about the various unique plugins Hime made.
oh wow i didn't realize this would be possible without a plugin! the engine surprises me every day. thank you everyone ^_^

Original thread: https://forums.rpgmakerweb.com/threads/items-that-work-differently-depending-on-which-character-uses-them.172658/