How does one get items to affect skill formulas?

For example.

I have a Gambler character that uses a skill based on a random roll (thanks to this guy here for the idea). For the sake of discussion, this move is called Damage Roll. It works like the formula in the link. A higher random value does more damage after the multiplier.

I got that part working right. But now I want to have an item that alters the formula for Damage Roll a certain way. Let's say the players finds an item called Loaded Dice. What would be the best option for the following, and how would one implement this?

1. Force a single re-roll of the random function if the number generated is less than 4

2. Force the random function (or eliminate it all together) to produce a 4, 5, or 6.

Another example.

Having an item that boosts the effect of damage or healing by providing another mulitplier. So, an item called Healing Talisman, and boosts HP restored by 25%.

So we'd have ((Original Healing Formula) * 0.25).

Do I just make a second skill that replaces the original one as long as the item is equipped, or can the formula line handle understanding the presence of an equipped item?
Hey Frapp.

Just a quick question regarding your post to help answer things. Are these consumable ITEMS or are these ARMORS that can be equipped?

Depending on the answer to that question the answer may be slightly different for each.

Also another thing to note, damage lines don't have a very long character limit, unless you change it with a script.

If these are consumable ITEM you can just give them common events.

Using Formula Bar

If you want to use the formula bars, it would have to basically run a check to see if the armor was equipped on the actor.

Like in the example on the link u posted from Fomar. Instead of checking battler id, you would check if battler/actor is equipped with armor x.

I would suggest this for the healing problem, but not for the loaded dice issue.

The idea is basically => if actor is equipped with armor x, heal *1.25, else heal.

Here is the actor armor include check that you can put in the formula bar.

a.armors.include?($data_armors[x]) ? 

Loaded Dice

I imaging you do the skill through common event already.

If it is an equipment ARMOR, I would suggest having 2 skills, both with their respective common events (Loaded calling a random variable 4-6)

In the features of the ARMOR seal the Damage Roll Skill and Add the new Loaded Damage Roll Skill.

Healing Talisman Alternate Solutions

For the healing issue the damage bar call is listed above, but here are a couple other solutions,which depending on your opinion can be easier than the other options.

1. Create a Healing Element, and give the talisman an increased element rate of damage to the Healing Element. that will cause an increase in healing and would not have to be used by any other skill other than healing skills. This will require that ALL healing skills be the Healing Element.

2. Have the armor bestow a state to the wearer. This will require a couple of scripts that allow passive states. Give the state the ability to increase healing to the wearer, which would require another script. 

Hope these help! Let me know if you have any other questions!

~ Dinhbat

Original thread: https://forums.rpgmakerweb.com/threads/how-does-one-get-items-to-affect-skill-formulas.25325/