- Joined
- Oct 22, 2017
- Messages
- 16
- Reaction score
- 8
- First Language
- English
- Primarily Uses
- RMMV
Hello
In my project I'm creating sort of dice aspect to my formulas utilizing the Math.randomInt() to create custom dice for each of my skills to give me more control on the damage variance for my game.
I have been successful in making formulas that roll multiple dice but in my play testing I've noticed that an issue pops up where if say a high DEF enemy ends up having more defense than the random dice rolled, then nothing will happen and there will be no effect and no damage whatsoever
I've been trying to use IF statements in my damage formula to make it so that if a number is <= to 0 then do a specific # for damage (Basically the damage would be as if the player rolled a 1 on all their dice and the wouldn't add in their ATK bonus.) but every attempt I've made to make this work seems to basically break the skill and then there is no effect whatsoever
I've been reviewing Skunk's Damage Formulas 101 forum post and trying different things but I'm just not seeing why this isn't working.
This is the original formula that I created that does work, but has the problem of occasionally doing nothing when the value is below enemy defense.
Heres the edit I tried to make
I also tried doing something with a smaller number of Math.randomInt in there but it still causes the issue with it breaking the skill and just playing the animation and doing no damage.
Any tips or thoughts on how to make this work would be greatly appreciated
-Thanks
In my project I'm creating sort of dice aspect to my formulas utilizing the Math.randomInt() to create custom dice for each of my skills to give me more control on the damage variance for my game.
I have been successful in making formulas that roll multiple dice but in my play testing I've noticed that an issue pops up where if say a high DEF enemy ends up having more defense than the random dice rolled, then nothing will happen and there will be no effect and no damage whatsoever
I've been trying to use IF statements in my damage formula to make it so that if a number is <= to 0 then do a specific # for damage (Basically the damage would be as if the player rolled a 1 on all their dice and the wouldn't add in their ATK bonus.) but every attempt I've made to make this work seems to basically break the skill and then there is no effect whatsoever
I've been reviewing Skunk's Damage Formulas 101 forum post and trying different things but I'm just not seeing why this isn't working.
This is the original formula that I created that does work, but has the problem of occasionally doing nothing when the value is below enemy defense.
(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+a.atk-b.def
Heres the edit I tried to make
if(((Math.randomInt(3)+1)+(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+a.atk-b.def)<=0)5else;(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+(Math.randomInt(3)+1)+a.atk-b.def
I also tried doing something with a smaller number of Math.randomInt in there but it still causes the issue with it breaking the skill and just playing the animation and doing no damage.
(Math.randomInt(3)+1 >= 1) 10
Any tips or thoughts on how to make this work would be greatly appreciated
-Thanks

