- Joined
- Jun 21, 2013
- Messages
- 441
- Reaction score
- 262
- First Language
- English
- Primarily Uses
Try this instead:
(b.elementRate(13) > 1.0) ? 9999999 : 0;
- Riff
It works! Thanks!
Try this instead:
(b.elementRate(13) > 1.0) ? 9999999 : 0;
- Riff
Hello there.
I'm trying to set up a Skill that runs two elements in it's calculation. (description of the skill is -> Hits enemy 4 times with Wind/Water element)
I tried this formula-> ((4*a.atk-2*b.def) * b.element_rate(12) + (4*a.atk-2*b.def) * b.element_rate(3))
But when i use this my actor only deals zero damage no matter how much ATK he has.
(this attacks are also only available when under a certain state if that could cause problems)
I hope someone can help me <_>
This actually let's my actor do damage but when i alter the elemental efficiencys on my target it still does the same-ish damage (changed water from 150 to 20 and wind from 120 to 60) while at first it did around 2500-3000 dmg it now does the same amount.Hello.
Try this instead:
((4*a.atk-2*b.def) * b.elementRate(12) + (4*a.atk-2*b.def) * b.elementRate(3))
This actually let's my actor do damage but when i alter the elemental efficiencys on my target it still does the same-ish damage (changed water from 150 to 20 and wind from 120 to 60) while at first it did around 2500-3000 dmg it now does the same amount.
Nevermind. I forgot to change the elemental types in the formula to the right elements. It's working !! Thanks for the help!What were your attacker's attack stat and defender's defense stats? And what was the defender's element rate?
Atk of attacker was 284 (+20% from a state) and enemy def is 10. Defenders Element rate are Fire 120 earth 200 /water 20 and wind is 80. and both skills do around 2400-3000 damage even though his water/wind rate are much lower than his earth/fire rates.
Nevermind. I forgot to change the elemental types in the formula to the right elements. It's working !! Thanks for the help!
(4*a.atk-2*b.def) = 1,116
b.elementRate(120% Fire) = 1,339
b.elementRate(200% Earth) = 2,232
b.elementRate(20% Water) = 223
b.elementRate(80% Wind) = 892
With variance of 20,
Fire/Earth should do 2,856 ~ 4,285
Water/Wind should do 892 ~ 1,338
If you get a value lower than 2,856, you might have conflicting plugins, or wrong element id in the formula. Have you tried on a fresh project?
Hello there again. I've got another little question.
I want to make a skill that checks the Targets states. With every positive state applied the damage of the skill will be halfed. But also with every positive the User has
the damage will be multiplier by 1.3 again. Is that possible? So basically My User uses the Skill (base damage 99999) and it checks the Target with say 6 states. The damage
will then drop down to 1563. Then it checks the users states (let's say 3) and the damage is then going up to 3433.
How do you define your positive states? And about how many of them are there?
Define? And actually I noticed that iI've got a mistake. I'll try to explain it a little different. The base idea is the same. There are certian Mitigation layers and each layer will reduce the damage by half. These mititagion layers are defined by states (for example Protes /shell/Wall) which stick to the user and there are mitigation layers on the enemy (full break breakdowns and dual breaks) which together are 6 layers of mitigation. The enemy will check if these layers are intact and the damage of the skill is halfed by 2 per layer. But the enemy can also enable states himself that will multiply the damage by 1.3 again (he can do that 8 times with 8 states)
Sorry, but I am still a bit confused, but I referred to your earlier statement. So what I came up with (with Yanfly's example as reference) does this:
- Base damage is 99999
- Check if target has mitigation states. Reduce damage (multiply by 0.5) for each state present.
- Check if user has offensive states. Increase damage (multiply by 1.3) for each state present.
Give this a try:
var rate = 1; for (var i = 0; i < b.states().length; ++i) { var state = b.states(); if (!state) continue; if ([11, 12, 13, 14, 15, 16].contains(state.id)) rate *= 0.50; } for (i = 0; i < a.states().length; ++i) { state = a.states(); if (!state) continue; if ([17, 18, 19, 20, 21, 22, 23, 24].contains(state.id)) rate *= 1.30; } value = 99999 * rate;
Here's a cleaner version if you are using Yanfly's Damage Core:
var rate = 1;
for (var i = 0; i < b.states().length; ++i) {
var state = b.states();
if (!state) continue;
if ([11, 12, 13, 14, 15, 16].contains(state.id)) rate *= 0.50;
}
for (i = 0; i < a.states().length; ++i) {
state = a.states();
if (!state) continue;
if ([17, 18, 19, 20, 21, 22, 23, 24].contains(state.id)) rate *= 1.30;
}
value = 99999 * rate;
So what you can do here are
- Change [11, 12, 13, 14, 15, 16] to the mitigation state ids
- Change [17, 18, 19, 20, 21, 22, 23, 24] to the offensive state ids
- You can also change the rates and base damage value
Hope this answers your question!
- Riff
Hi there,
I'm trying a make a number of skills that does damage and heals at the same time. The different skills in the series will have different combinations from one of each category:
Offensive
1. Single-enemy
2. Random-enemy
3. All-enemy
Defensive
1. Self-heal
2. Single-ally heal
3. All-allies heal
Does anyone know how I can go about doing this? Thanks!
Wow this looks overwhelming Thanks for that. I think this almoast works. I think I'll have to change 3 States though. Full Break/Breakdown/Dual Break has to be applied on the attacker. So i guess I'll have to make a third calculation that looks like this=
for (var i = 0; i < a.states().length; ++i) {
var state = a.states();
if (!state) continue;
if ([14, 15, 16].contains(state.id)) rate *= 0.50;
so that the 3 states (offensive layers from the party) apply to the enemy right?
Basically If party is under state 11 12 and 13 it will be halfed and if attacker is under state 14 15 and 16 it will be halfed again.
While state 17 to 25 on the attacker raises the damage by 1.3
var rate = 1;
for (var i = 0; i < b.states().length; ++i) {
var state = b.states()[i];
if (!state) continue;
if ([11, 12, 13].contains(state.id)) rate *= 0.50;
}
for (i = 0; i < a.states().length; ++i) {
state = a.states()[i];
if (!state) continue;
if ([14, 15, 16].contains(state.id)) rate *= 0.50;
}
for (i = 0; i < a.states().length; ++i) {
state = a.states()[i];
if (!state) continue;
if ([17, 18, 19, 20, 21, 22, 23, 24].contains(state.id)) rate *= 1.30;
}
value = 99999 * rate;
If the defensive-side happens to be Single-ally heal, which ally is selected. Is it random?
Yes, but don't forget the close curly bracket too. So your final version should look like this:
var rate = 1;
for (var i = 0; i < b.states().length; ++i) {
var state = b.states();
if (!state) continue;
if ([11, 12, 13].contains(state.id)) rate *= 0.50;
}
for (i = 0; i < a.states().length; ++i) {
state = a.states();
if (!state) continue;
if ([14, 15, 16].contains(state.id)) rate *= 0.50;
}
for (i = 0; i < a.states().length; ++i) {
state = a.states();
if (!state) continue;
if ([17, 18, 19, 20, 21, 22, 23, 24].contains(state.id)) rate *= 1.30;
}
value = 99999 * rate;
Good question. Ideally it would be selectable, though I can already see that this will probably need a plugin. The next best option would be if it targets the ally with the lowest % (or value) HP. If that also doesn't work, then I guess I'll just scrap the single-ally heal and just make it all-allies heal, since there's very low utility in having a random single-target heal from the player's perspective.
Thanks for helping! =)
Okay it works for the party mitigation layers. But somehow the enemy buffs aren't calculated. I had 3 layers up. (12500 dmg) and he had 2 layers up (1.3 x2) so the damage should be around 21000 but it only did the 12500. (with all 6 layers he does only 1563 dmg as intended)
The stages are correct. I had 3 layers (11,12,13) and He had 2 layers (17,18) but it didn't calculate his 2 layers. So he did the damage as if he hasn't buffed himself even though he did buff himselfSorry, I'm confused again. There are 3 stages, right?
- Stage 1: Party Mitigation Layer (State 11, 12, 13) - Each multiplies damage by 0.5
- Stage 2: Enemy Mitigation Layer (State 14, 15, 16) - Each multiplies damage by 0.5
- Stage 3: Enemy 'Weakening' Layer (State 17, 18, 19, 20, 21, 22, 23, 24) - Each multiplies damage by 1.3
So are you saying you had state 11, 12, 13 up and damage is correct, but when you add 2 of stage 3 states, the damage wasn't correct?
Also, when you said all 6 layers, which are you refering to?