yep. That is what the lunatic code before is from
RMMV Damage Formula - ideas and help
● ARCHIVED · READ-ONLY
-
-
oh i see... you might need to consult yanfly directly to see what is going on.... also you might try putting a space between the - and the 1.50
o_O though is this a skill? if so you might want to try something like
<Custom HP Life Steal Rate>
if target.isStateAffected(27)
than
rate = user.hpRate(1.50)
else
rate = user.hpRate(0.75);
</Custom HP Life Steal Rate>
or it might be if target.isStateAffected(27) rate = user.hpRate(1.50)
could just be you have the condition in wrong -
oh i see... you might need to consult yanfly directly to see what is going on.... also you might try putting a space between the - and the 1.50
o_O though is this a skill? if so you might want to try something like
<Custom HP Life Steal Rate>
if target.isStateAffected(27)
than
rate = user.hpRate(1.50)
else
rate = user.hpRate(0.75);
</Custom HP Life Steal Rate>
or it might be if target.isStateAffected(27) rate = user.hpRate(1.50)
could just be you have the condition in wrong
Don't know if the wording is wrong, I'll try to contact Yanfly, and see if the negative and over heal effects are actually supposed to work with the Rate and Flat conditions.
Also user.hpRate has directly to do with how many hp the user has, it can be affected by buff and debuffs, as such, it cannot be changed by this particular Lunatic code, unless I made the formula more complicated, what I mean is that Yanfly used the user.hpRate as placeholder, the lunatic code works if I replace it for 0.75 for example, but not if the number goes negative or is more than 1.00, which Yanfly options in the plugin, allow over heal and negative healing(then damage to user) should allow. -
Hi guys!! im trying to make a weapon that drains your hp for a certain percentage and every turn then does additional damage equal to the hp that was drained. How would i go about doing that?
-
Hi guys!! im trying to make a weapon that drains your hp for a certain percentage and every turn then does additional damage equal to the hp that was drained. How would i go about doing that?
I'm not at my computer right now, but this sounds like a job for variables. If you use yanflys script that always runs the battle events from one specific troop (can't remember the name of it off the top of my head) then you could setup an event to take away a % of HP using "if weapons is equipped" and variables. Then in the damage formula you would need to reference said weapon and use the variable as the damage multiplier.
if I remember I'll come back later and give you links and formula to make this happen. Hopefully this info will be enough to get you started! :) -
This gives you a false swipe move like from Pokemon:
b.hp - 1
Leaving the enemy with 1 hp.
A little obvious probably...but I wanted to contribute SOMETHING, lol.
Edit: Sorry fixed it, had messed up lol. -
This gives you a false swipe move like from Pokemon:
b.hp - 1
Leaving the enemy with 1 hp.
A little obvious probably...but I wanted to contribute SOMETHING, lol.
Edit: Sorry fixed it, had messed up lol.
Actually, False Swipe deals damage that leaves the target 1 HP so long as they have more than 1 HP but it does not automatically reduce them too 1 HP:
damage = [formula for damage here]; if(b.hp > 1 && damage > b.hp) damage = damage - (b.hp - damage) - 1; damage
the syntax is a bit off but that would be the method -
Actually, False Swipe deals damage that leaves the target 1 HP so long as they have more than 1 HP but it does not automatically reduce them too 1 HP:
damage = [formula for damage here]; if(b.hp > 1 && damage > b.hp) damage = damage - (b.hp - damage) - 1; damage
the syntax is a bit off but that would be the method
Oh right, my bad. Maybe I should say that it is akin to false swipe in that regard. Well, I tried haha. If anyone needed a skill to reduce the enemy to 1 hp though there it is, lol. Though... they'd probably think that up easily enough. :/ I shall think some more so that I may officially contribute. -
How to recall a stored variable into a damage formula. I thought it was $game_variables[]. The damage formula is simple a.atk + variable[3] * 5 - b.def * 2.
Am I doing that correct? -
There is already a command for variables, v[ID] (ID being the number of the variable you want)
-
That works wonderfully, thanks!
I want to the skill to do damage based on Current TP.. The idea is atk * current tp. The formula im tampering with is a,atk * a.tp - b .def * 2 -
@Siolenas you are aware that tp can go up to 100, right? that is one overpowered skill if you don't multiply a.tp by something like * 0.05 or something
That said, doesn't a.atk * a.tp - b.def * 2 work? -
@Siolenas you are aware that tp can go up to 100, right? that is one overpowered skill if you don't multiply a.tp by something like * 0.05 or something
That said, doesn't a.atk * a.tp - b.def * 2 work?
all attacks = 0 -
a.tp should work, easy way to check is just put 'a.tp' in the formula box to see if it is working
-
So I was wondering can I use multiple formulas? Like could I write a formula that would allow me to influence damage, hit rates and criticals?
-
you can do many things with damage formulas, even use ifs inside them for "multiple formulas", but they don't influence hit rate and critical rate or damage. You'll need a plugin for those.
-
@Shaz Is there a formula generator for MV? I find the lack of "quick formula" (like in VX ace) a bit of a nuisance personally, as I don't know how to work these formulas without the "quick formula" option..
-
Guess if the button isn't there, the function isn't there.
You could probably use Ace to generate the formula, and then modify it for use in MV, according to the language requirements. -
How would I go about making a formula to get a random number from 0 to the user's attack stat minus a random number from 0 to the enemy's defense stat.
EDIT: oo i got it
Math.randomInt(a.atk) - Math.randomInt(b.def) -
Please, somebody can helpme? before the update, I had a skill that left the Tp of the actor at 0;
After the program update, the formula "b.setTp(0);" gives an error, does anyone know what I can do?