a.atk + (a.atk * ((level - 1) * .05)) + (Math.randomint(9) + 1) * (luk * .1) - b.def + (b.def * ((level - 1) * .05)) + (Math.randomint(9) + 1) * (luk * .1)
You can check if the state is still on the user and add the '!' To invert the condition.How would I check if a state has been removed within the scope of the current action?
Try changing 'level' to 'a.level' for user. Also, enemies by default dont have levels, so you will need a plug-in for that.I was trying out this formula, but keep getting 0's returned, any idea what I did wrong?
a.atk * ((level - 1) * .05) + ((Math.randomint(9) + 1) * (luk * .1)) - b.def * ((level - 1) * .05) + ((Math.randomint(9) + 1) * (luk * .1))The idea was that every level above 1 gets an additional 5% to their stats (level - 1 * .05) and they gain anywhere from 10-100% of their luck randomly (math.radomint(9) + 1) * (luk * .1))I was testing with atk values well over double defense values and very minimal luck.
Edit: ... just noticed that if the level is 1, i multiplied attack/defense by 0 ... might be the problem, trying to figure it out now.
Edit: Nope, getting rid of the -1 did not help... , but noticed instead of adding 5%, I'm only USING 5%... trying it out now...
Edit: again, a big no, new formula (below) still not working.
a.atk + (a.atk * ((level - 1) * .05)) + (Math.randomint(9) + 1) * (luk * .1) - b.def + (b.def * ((level - 1) * .05)) + (Math.randomint(9) + 1) * (luk * .1)
Yeah. It would be easier that way.... I also found out that Math.randomint needs to be Math.randomInt, caps have always caused me problems xD. Thanks, I'll try this out!
Edit: and I don't need a plugin, when creating enemies I'll just add in the extra defense depending on what level I want them to be xD
(a.atk + (a.atk * ((a.level - 1) * .05)) + ((Math.randomInt(9) +1 ) * (a.luk * .1))) - (b.def + (b.def + ((Math.randomInt(9) + 1) * (b.luk * .1))))Gives me the following errorbut only when the enemy attacks, not when the character does...![]()
EDIT:I am an idiot... you said they don't have a level, so when it attacks it tries to use it's level, so I have to make a separate attack for opponents, except confusion will be out of the question, and I don't want that... I either need to ditch the idea of adding the 5% per level altogether or get a plugin after all xD so much for my clever idea
I finally found the answer thanks to another user, Trihan. For anyone interested in doing the same kind of shenanigans, the new formula I used isOkay, on the note of game actors, here's a formula I used in rmvxa for a basic attack-
(a.atk*(((v[48+4*a.id]+v[50+4*a.id])*2)+2))-b.def
it took two variables, determined by the actor's id, and used those to multiply the actor's attack. So, with actor id being one, the variables used would be 52 and 54. That way I could use one attack skill and call on multiple "Physical damage growth" and "Physical damage bonus" variables.
Anyone have an idea on how to do this in MV?
This seems similar to something I am trying to accomplish using the formula but I don't quite understand it.1: Buffs / Debuffs: a.addBuff(x, y) / b.addDebuff(x, y)
with x: 0 = mhp,
1 = mmp,
2 = atk,
3 = def,
4 = mat,
5 = mdf,
6 = agi,
7 = luck,
and y = numbers of turn.
Buffs increase are based on a formula, and can stack. Example:This seems similar to something I am trying to accomplish using the formula but I don't quite understand it.
Could someone give me an example of how to write this formula including the actual parameter increase?
Also: would it be possible to include the a.mat into the buff? Let's say... a.add 2 = atk, 0 + a.mat(0,3)
It would really help me out if I could figure out how to include the user's magic attack into my buff formulas instead of having to do it in a common event.
Could this formula work?Buffs increase are based on a formula, and can stack. Example:
MaxHP = (buff_level * 0.25) + 1
Buffs can be positive or negative (debuffs). Hence, whenever you use addBuff(x,y), you're increasing the buff_level once.
If you're looking for more dynamic stats changes (which stacks with the Buffs/Debuffs), just use States.
I hope that answers your question.
I'm not sure, but you can try using Yanfly's BuffStateCore and adjust the parameter there for the buff formula.Could this formula work?
MaxHP = (buff_level * 0.25) + a.mat
I've tried everything I can think of and it doesn't seem to allow me to alter the basic buff formula. It seems to give me the same buff no matter what I type into the formula after I set a buff effect. And when i don't set a buff affect nothing happens at all.I'm not sure, but you can try using Yanfly's BuffStateCore and adjust the parameter there for the buff formula.
I have a quick question, my RMVX Ace project was converted so I kept a lot of custom formulas, for example:
a.weapons.include?($data_weapons[219]) ? 932 : 780
This skill gets boosted when the gunner is using the Corra MK II Custom (basically their ultimate weapon) otherwise it does usual damage for the skill, in MV terms, would it still work or is the string completely different? I tried looking through the topic but I'm not sure if I overlooked it.
No expeet here, but using one of Yanfly's Tips & Tricks video as reference, i'm guessing the formula should be:
var w = $dataWeapons[219]; (user.hasWeapon(w)) ? 932 : 780;
- Try your original formula and see if it works.
- If it doesnt, try this one.
- If it still doesnt work, try using (user.hasWeapons(w)) instead.
Hope that help!
- Riff
I'm trying to create a skill in MV where the skill deals 9,999,999 damage if and only if the target is weak to Element #13. Otherwise, the skill deals moderate (or 0) damage.
Right now I'm trying to use this formula, but whenever I use it, no matter who I use it on, it always deals 0 damage. Even on those weak to Element #13.
if b.element_rate(13) > 1.000; 9999999; else; 0; end
Help?