Murdertron 0 Posted April 9, 2017 (edited) I'll be brief with this. I'm trying to pull off a pretty simple type of attack which has a scaling damage output based on the amount of resource (MP, TP, etc.) actually CONSUMED by the attack. I more or less figured out how to get it to scale upwards based on the current amount, but that's not exactly what I'm after (though it will be helpful later on). Could someone shed a little light on this for me? Here's what I've come up with so far, if it helps at all: 2 * a.atk ** 2 * ((100 + a.tp) / 100) / (a.atk + b.def) Furthermore, how can I cause the damage scaling to be exponential? For instance, when 10 TP is consumed, it does ~100 damage, when 50 TP is consumed it deals ~1000 damage, and when all 100 TP is consumed it deals ~10,000 damage. I've read up on quite a few guides regarding this, but really I just need a little hands on and someone to help me work through it. Edited April 9, 2017 by Murdertron Share this post Link to post Share on other sites
Lord Vectra 414 Posted April 9, 2017 Does the TP cost ever change throughout the battle? Share this post Link to post Share on other sites
Murdertron 0 Posted April 9, 2017 No sir. No costs ever change in my project. It will cost at least X amount, but consumes the entire gauge. Share this post Link to post Share on other sites
Lord Vectra 414 Posted April 9, 2017 So if something is 50 TP, do you want to ADD 100 damage or IS the damage 100? Share this post Link to post Share on other sites
Murdertron 0 Posted April 9, 2017 The intent is exactly how the original post reads. In this hypothetical equation, the attack will do 100 damage at 10 TP consumed, 1000 damage at 50 TP consumed, and 10,000 damage at 100 TP consumed. Think of it like the stat curve generator in the Classes menu. Share this post Link to post Share on other sites
Lord Vectra 414 Posted April 9, 2017 Okay, Imma just assume that if 10TP, the damage = 100 and is not added. Due to that, you don't need a.atk, b.def, or even a.tp I did some number crunching to get these numbers you see based on what you gave me on 10, 50 and 100 TP Cost = Damage 10 - 100 20 - 325 30 - 550 40 - 775 50 - 1000 60 - 3259 70 - 5500 40 - 7750 100 - 10000 If you the TP Cost IS the damage, you put in the TP cost and you said it doesn't change; therefore, if something cost 50, just put 1000. If 70, just put 5500. Now, if the damage is added, them same numbers come to use. Add it at the end. Do the player decide how much TP is consumed or is it a set amount that is set by you? Share this post Link to post Share on other sites
Murdertron 0 Posted April 9, 2017 Well, it's meant to scale based on the amount consumed. It always consumes the whole gauge, but gains damage scaled on how much it actually managed to consume. You can cast it no matter what your TP is. All the formula needs to care about is what % was in the gauge before it depleted, scaling up based on that. Share this post Link to post Share on other sites
Lord Vectra 414 Posted April 9, 2017 I don't know, but I'll PM a friend that may know. Share this post Link to post Share on other sites
Murdertron 0 Posted April 9, 2017 Well, I appreciate the help. I'll just be on standby until then, I guess :^) On a somewhat unrelated tangent, do you happen to know of any way I can cause self-targeting skills to skip the target window? It's less an important thing and more of a convenience thing. Share this post Link to post Share on other sites
Lord Vectra 414 Posted April 9, 2017 Does it say "one ally" or "the user" as the target scope? If it is "the user", it should already skip the target window. Share this post Link to post Share on other sites
Murdertron 0 Posted April 9, 2017 I'm using the skill directly from the menu, just like the way Guard is used. Share this post Link to post Share on other sites
dinhbat3 57 Posted April 10, 2017 (edited) Hey Murdertron. This seems to be more of a damage calculation/math question it seems if I am understanding it correctly. Your general damage formual shoudl be something like this: c = a.tp; a.tp = 0; Damage Formula * Multiplier - This sets variable "c" to equal a.tp - This also creates the use all TP by setting a.tp to 0 - You can now have a base damage formula and use the "c" variable in the multiplier to get your increased power effect All you would need to do is find the correct multiplier equation to accomplish what you want. In your example you used: ((100 + c) / 100) This would increase damage by a percentage, making the max damage 2x the base: TP = 10, it would give you 1.1x TP = 50, it would give you 1.5x TP = 100, it would give you 2.0x if you want it to be exponential, then the question is how exponential exactly? Remember this is the MULTIPLIER and not necessarily the damage. ​​I will give some examples: c ** 2 TP = 0, it would give you 0x TP = 10, it would give you 100x TP = 50, it would give you 2,500x TP = 100, it would give you 10,000x Now for a more realistic approach: 3 ** ((c +100)/100) TP = 0, it would give you 3x TP = 10, it would give you 3.35x TP = 50, it would give you 5.20x TP = 100, it would give you 9x Basically you can do it anyway you'd like just use the "c" variable in the multiplier appropriately. Hopefully that made sense and was somewhat helpful. ~ Dinhbat3 Edited April 10, 2017 by dinhbat3 Share this post Link to post Share on other sites
Murdertron 0 Posted April 10, 2017 (edited) This is more than helpful. I'll go ahead and try something like this out to see if it works. I had no idea we could set up variables like that directly in the formula. This is excellent. Edit: After lots of testing with this formula, I've concluded the damage doesn't scale right. c = a.tp; a.tp = 0; ((a.atk / 2) ** 2 / (a.atk + b.def)) * 3 ** ((c +100)/100) It seems to scale higher when LESS TP is used or possibly the same damage regardless of the cost. Am I getting my order of operations wrong or something? I tested it with a "1" before the multiplier just to see if it would scale right, and it did indeed climb up to 9 damage. Edited April 10, 2017 by Murdertron Share this post Link to post Share on other sites
dinhbat3 57 Posted April 11, 2017 (edited) 2 thoughts: 1. With 0 tp, your equation yields a multiplier of 3^1 = 3 With 100 tp, your equation yields a multiplier of 3^2 = 9 This means that the max you will get is actually 3x the damage NOT 9x the damage. There are other ways you can set up the equation to make it more impactful, but just make sure u test mathematically what it means. 2. Here are the base damages I came up with based on your equation: ((a.atk / 2) ** 2 / (a.atk + b.def)) a.atk = 50, b.def = 50 25^2/100 = 6.25 Min damage = 18.75 Max damage = 56.52 a.atk = 100, b.def = 50 50^2/150 = 16.67 Min damage = 50.01 Max damage = 150.03 a.atk = 250, b.def = 50 125^2/300 = 52.09 Min damage = 156.27 Max damage = 468.81 Just some food for thought. You are on the right track, but need to figure out the best modifier that works for what you want to achieve. My example of 3 ** ((c +100)/100) was more just for argument sake, but there are lots of options and fun equations you can play with here. The answer is really a matter of how do you want it to scale, and finding the equation that can match that scaling. You can easily change the base of the exponent as well. If you want a 9x the damage at full tp you could simply do this: 3 ** ((c +100)/50) tp = 0 yield 9x tp = 50 yields 27x (which is 3x greater than 0 tp tp = 100 yields 81x (which is 9x greater than 0 tp and 3x greater than tp = 50) you would just need to make ur base damage equation a smaller number that will account for the higher multiplier. The scaling would be closer to what you want though. ~ Dinhbat3 Edited April 11, 2017 by dinhbat3 Share this post Link to post Share on other sites
Murdertron 0 Posted April 11, 2017 Thanks for the support, Slick. I did manage to work this out earlier. I finally settled on a flat multiplier though, despite all that work; c = a.tp; a.tp = 0; ((4 * a.atk ** 2 / (a.atk + b.def)) / 2) * (c / 10) I just wish we could set entire equations to a variable to simplify calculations. Share this post Link to post Share on other sites
dinhbat3 57 Posted April 11, 2017 You can set a variable equal to a calculation if you want. you could easily do c = a.tp; a.tp = 0; d = ((4 * a.atk ** 2 / (a.atk + b.def)) / 2); d * c / 10 that would result in the same calculation as you had previously. The only issue is the limit of characters in the damage box, and the fact that the variable is only valid within the calculation. ~ Dinhbat3 Share this post Link to post Share on other sites
Murdertron 0 Posted April 11, 2017 Yeah, I'm aware of that. It'd just make organizing the thing a lot easier for me. I'd be able to calculate the base damage separately from any multiplier solely to be absolutely sure I did it right. Share this post Link to post Share on other sites