Hello everybody, I have a doubt, I'm trying to create a group of attacks with the "curse element" basically they are attacks which has a chance to make 9999 of damage, at least the target has certain state which nulify this posibility (it'll make damage still, but it won't have a chance to make 9999 of damage)
For example: "Demon fang" makes certain damage but it has a 40% of chance to make 9999 of damage, at least the target has the "curse protection" state (state id 40) so I made this formula to test it:
b.state?(40) or rand(100) <= 40 ? 500 : 9999
Allright, now in this formula I want to make the 9999 of damage ignores the "guard" command and the damage variance, BUT I don't want the 500 of damage do that, is that possible? How?
Well, thanks a lot who anyone can solve this problem
Ignoring guard command and variance in a portion of damage formula
● ARCHIVED · READ-ONLY
-
-
Is that in the damage formula? You need to end it with a number.
b.state?(40) or rand(100) <= 40 ? 500 : 9999That should solve the first problem.
I think guarding and variance is elsewhere in the script so you'd need to make actual script changes to override that. However, you can just set the variance to 0 on the skill (unless you're saying you want a variance if the damage is 500, but not if it's 9999?) -
Is that in the damage formula? You need to end it with a number.
b.state?(40) or rand(100) <= 40 ? 500 : 9999That should solve the first problem.
Not exactly, I tested it and well, when the player has the state, the attack doesn't do any damage,and that's not the concept, the idea is when the player has this state he'll still receive the 500 of damage, but it'll nulify the 9999 damage thing
Edit: I tested again and now this formula works as I want:
b.state?(40) ? 500 : (rand(100) <= 50 ? 500 : 9999)
So I only need to solve the another problem
Yup, I want the 500 of damage has a variance, but no the 9999I think guarding and variance is elsewhere in the script so you'd need to make actual script changes to override that. However, you can just set the variance to 0 on the skill (unless you're saying you want a variance if the damage is 500, but not if it's 9999?) -
Moving to RGSS3 Script Requests then, as you'll need a script mod to do that.
You can check for the state and random number in one hit - with an or condition, like I've done above. The only difference you made to yours is checking for <= 50 instead of your original 40. The brackets, in this case, do nothing. -
So, is there a way to make the 9999 of damage thing?
-
BUMP
-
Does someone know how to make a portion of the damage formula can ignore the guard command and the variance?
-
BUMP
-
BUMP
-
BUMP
-
BUMP
-
If you only want to ignore the guard effect(that is, reducing damage) and damage variance, you can try a reverse approach which requires no custom script:
Let's say the original damage variance is 10%, now set it as 0% and change the damage formula to be:
b.state?(40) or rand(100) <= 40 ? 500 * (0.9 + rand * 0.2) : 9999 * (b.guard? ? 2 * grd : 1)(0.9 + rand * 0.2) should return a number between 0.9 and 1.1 which effectively replicate that original 10% damage variance.
2 * grd is the divisor used for guard and b.guard? is true if and only if b has special flag guard.
This whole setup should be a close enough approximation enough although strictly speaking it's not doing exactly what you want :) -
I totally apologize by not answering this, life problems
Well, looking into that, I found another trouble, is is possible to make the 9999 damage is no elemental? Because I want to make this for elemental attacks, but of course, with that, if the enemy is inmune to this, it won't receive the 9999 hit
I... Actually didn't understand the guard part, would you mind to explain it to me again? n_n' -
To have 2 damages with different elementals, you'll probably need a script. But if only the damage matters, then you can set the damage element as none and use the below damage formula as an approximation:
b.state?(40) || rand(100) <= 40 ? 500 * (0.9 + rand * 0.1 + rand * 0.1) * b.element_rate(element_id) : 9999 * (b.guard? ? 2 * grd : 1)Where b.element_rate(element_id) is b's element rate of the element with id element_id.
Regarding guard, when a battler has special flag guard, its damage will be divided by 2 * grd, that's why the 9999 damage needs to multiply 2 * grd when b has special flag guard. -
Ohhh we ALMOST got it
When the character doesn't have this protective state against the 9999 damage, and it's guarding itself, the 9999 is nulified
Any idea about what could be happening? -
It could be because of pdr or mdr in case of physical and magical hit types, or the damage isn't 9999 because of the output of rand(100) <= 40 being true.
-
I put this attack as Certain Hit in Hit type box, under that cuestion, I guess PDR and MDG is not the problem
And that only happens if the target uses the guard command and doesn't have the protective state against those hits, so it should make or the regular damage or 9999, and it makes one of two: The regular damage or 0 -
Try this:
b.state?(40)||rand(100)<=40?500*(0.9+rand*0.2)*b.element_rate(element_id):9999*(b.guard? ? 2*b.grd: 1)P.S.: There are 2 problems in the previous formula:
1. It's more than 100 characters
2. grd should be b.grd instead -
Splendid! It works perfect!
Well... Almost, I'm using Yanfly battle engine and if the target is weak/resistant to that element, the pop up isn't showed, but that's a minor detail, Thank you
(If you can solve this one, it'd be great, but it's not a issue at all) -
Solving that definitely needs a script :)