STUCK ON A DAMAGE FORMULA (MV)
Posts
Pages:
1
I'm trying to make an enemy skill in MV that takes away MP, or hits hard if you don't have any MP remaining.
From what I know of the formulas from VX Ace, I should be able to do that by setting the skill to deal MP damage, then use something along the lines of:
b.result.hp_damage = (a.atk * 2 - b.mp * 999); a.atk*4 - b.def*2
However, when I use this formula, the attack never does any hp damage. For that matter, if I just make a skill set to b.result.hp_damage = 100 or b.result.mp_damage = 100, it doesn't do anything. Could somebody tell me what the proper notation is for what I'm trying to do?
From what I know of the formulas from VX Ace, I should be able to do that by setting the skill to deal MP damage, then use something along the lines of:
b.result.hp_damage = (a.atk * 2 - b.mp * 999); a.atk*4 - b.def*2
However, when I use this formula, the attack never does any hp damage. For that matter, if I just make a skill set to b.result.hp_damage = 100 or b.result.mp_damage = 100, it doesn't do anything. Could somebody tell me what the proper notation is for what I'm trying to do?
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
If you want a skill to use one of two different formulas depending on a condition, you can use the x?y:z format. x?y:z is a shorthand way of writing "if x, then y, else z". In other words, you put a condition in x, and two different formulas in y and z. Then the skill will use formula y if the condition is true, and formula z if the condition is false.
An example would be this skill formula:
...which does double damage to any target that has 0 MP.
However, this method WON'T be enough for what you want to do, because changing the skill's formula will not let you change it from HP damage to MP damage. The type of damage is not part of the skill's formula.
Instead you will actually need two skills. One that uses this formula, and does HP damage:
...and a second skill that uses this formula, and does MP damage:
Change the actual amounts of damage from a.atk*4 - b.def*2 to whatever you want.
So the first skill does HP damage only if the target is out of MP, and does no damage otherwise, and the second skill does MP damage only if the target still has MP left, and does no damage otherwise. Then you will need to make the player use both of these skills one after another. This can be done easily with a common event if only one party member is capable of learning the skill, or if it's a boss skill. However, if the entire party is capable of learning the skill, then you'll need a plugin that lets one skill invoke another skill. I am almost sure Yanfly made one.
An example would be this skill formula:
b.mp == 0 ? a.atk*8 - b.def*4 : a.atk*4 - b.def*2
...which does double damage to any target that has 0 MP.
However, this method WON'T be enough for what you want to do, because changing the skill's formula will not let you change it from HP damage to MP damage. The type of damage is not part of the skill's formula.
Instead you will actually need two skills. One that uses this formula, and does HP damage:
b.mp == 0 ? a.atk*4 - b.def*2 : 0
...and a second skill that uses this formula, and does MP damage:
b.mp == 0 ? 0 : a.atk*4 - b.def*2
Change the actual amounts of damage from a.atk*4 - b.def*2 to whatever you want.
So the first skill does HP damage only if the target is out of MP, and does no damage otherwise, and the second skill does MP damage only if the target still has MP left, and does no damage otherwise. Then you will need to make the player use both of these skills one after another. This can be done easily with a common event if only one party member is capable of learning the skill, or if it's a boss skill. However, if the entire party is capable of learning the skill, then you'll need a plugin that lets one skill invoke another skill. I am almost sure Yanfly made one.
Pages:
1














