Favorite Foods/Healing Items Affecting Characters Differently

Since many of the healing items in my game are food-based, I was wondering if there is a way to make some items affect certain characters more than others.

For example, Character A’s favorite food is meat (meat heals him 50% extra), he likes fruits (fruits heal him 25% extra), is neutral to grains (no extra healing bonus) and is allergic to vegetables (cannot use vegetables to heal). However, Character B’s favorite food is fruits (fruits heal her 50% extra), she likes vegetables (vegetables heal her 25% extra), is neutral to meat (no extra bonus) and is allergic to grain (cannot use grains to heal.)

The closest I can come to this is by creating a skill that allows a character (let’s say Character A) to use the particular item. I lock the skill so it can't be removed or replaced. Then I create a common event within the exclusive item’s traits that checks to see if Character A has that skill. Unfortunately, RPG Maker takes that as literally as possible. ANY character can use the character A-exclusive item as long as Character A has the skill required. >:(

Can anyone think of any other ways to do this? It might require a plugin.
So I'm glad I hunt for unconventional formulas for questions like these, assuming this trick still works in MZ:

b.id == 5 ? 0 : 5000 or b.id == 12 ? 0 : 5000

What this is, this is a formula where if the person eating the sandwich matches actor ID 5 or 12, they will not get healed. Everyone else will get healed by 5000 HP - no scripting necessary.

It's a good start at least. 😅
Use element rates? So A would have 150% element rate for meat, and meats would be of the "meat" element, thus increasing the healing received.
Use element rates? So A would have 150% element rate for meat, and meats would be of the "meat" element, thus increasing the healing received.

That's pretty genius actually. I never thought about having a separate element for different healing based on element rates.

... I know I'm not the person who made the thread but I'm stealing the heck out of this idea.
Use element rates? So A would have 150% element rate for meat, and meats would be of the "meat" element, thus increasing the healing received.
I was gonna say that too. You were too fast! Haha. 😛

Edit: Great idea btw, about having some food heal more than others, and different per character.
Maybe you can even put things like: Ham+cheese+latuce sandwich having all the next elements: Dairy, meat, veggies and bread. Which will have a super boos on someone who likes meat and bread and veggies and dairy. But less of a boos if only 1 of the ingredients are liked less?
While I would fully use what options have been presented to you, if you're looking to add a little extra to your food items, as well as easily set up favorites for actors, there is a plugin for that. However, let me reiterate: only consider this if you want some extra oomph to your food.

So I'm glad I hunt for unconventional formulas for questions like these, assuming this trick still works in MZ:

b.id == 5 ? 0 : 5000 or b.id == 12 ? 0 : 5000

What this is, this is a formula where if the person eating the sandwich matches actor ID 5 or 12, they will not get healed. Everyone else will get healed by 5000 HP - no scripting necessary.

It's a good start at least. 😅
This is an interesting formula. Where would I plug it in? In the note for the item/s?
Use element rates? So A would have 150% element rate for meat, and meats would be of the "meat" element, thus increasing the healing received.
That's brilliant! I love solutions that don't rely on plugins. :LZSjoy: I'm going to test this and see if it works the way I hope it will.
While I would fully use what options have been presented to you, if you're looking to add a little extra to your food items, as well as easily set up favorites for actors, there is a plugin for that. However, let me reiterate: only consider this if you want some extra oomph to your food.

I had a feeling there was a plugin out there that could do what I'm looking for. This one is definitely intriguing, and I will look into it in the near future. I've run into significant compatibility issues with plugins with my current project, particularly with the battle system, so I'm a little leery about paying for a plugin that may not be compatible. On the other hand, I don't think this plugin would directly interfere with the battle system, so it's a risk worth considering for $4.
This is an interesting formula. Where would I plug it in? In the note for the item/s?

You would plug it in for the damage calculation formula, yes.

That said I like the element rate thing Amaranth brought up much more, since it's far more customizable that way. Because the thing I brought up has a few limitations - for one, if you have too many actors with specific tastes, you'll run out of space in the formula bar. 😅
I just can't stop thinking about meat element.
I just can't stop thinking about meat element.
Hmmmm...sweet, sweet bacon....:LZSyum:
Use element rates? So A would have 150% element rate for meat, and meats would be of the "meat" element, thus increasing the healing received.
I tested this idea, and it didn't work. The amount of HP granted didn't seem to be influenced by the Element Rate of either character. It was roughly equivalent on both characters regardless of which item I used. I presume that an Element Rate of 0% means the Element Rate is ignored entirely, so I set it at a small number to test it. Is my setup incorrect?
The Element only affects the Formula numbers. (which you have as zero in both)
Just tested it out in VXace, should be the same in MZ (I think)
I just tested and it's the same in MV, I think MZ should be the same as well. Only the formula is affected by element rates, and if you put recover HP under effects, it overrides the formula.

If you want the food to heal a 20% + 100 of max hp you could use

Code:
Math.floor(b.mhp * 0.2) + 100

in the formula (or round or ceil, whichever you prefer)
I just tested and it's the same in MV, I think MZ should be the same as well. Only the formula is affected by element rates, and if you put recover HP under effects, it overrides the formula.

If you want the food to heal a 20% + 100 of max hp you could use

Code:
Math.floor(b.mhp * 0.2) + 100

in the formula (or round or ceil, whichever you prefer)
This works perfectly! Thank you so much! :LZSjoy:

Original thread: https://forums.rpgmakerweb.com/threads/favorite-foods-healing-items-affecting-characters-differently.144747/