(a.atk > a.mat) ? item.damage.element_id=3 ; a.atk*4 - b.def*2 : a.mat*4 - a.mdf*2
it might still work that way, but yeah IDK if the element value can actually be changed
^ I just did some testing and research, and you can't use a ternary operator like that. You get a syntax error when the damage is calculated. Thus you either have to use a method like mine or break the whole thing into an if/else. Or apparently brackets work, though you have the element change in the wrong spot anyway : )
And I tested that the element value could be changed before I suggested it. I honestly expected it to be a read-only method.
Can anyone help me make a skill formula that will make this effect?
1. It needs to have a base damage of exactly 777.
2. It needs to call Game Data: Save Count (either through a variable or on it's own), and then reduce the damage of the skill by 1% for every Save the player has made.
So for example, if the player has made 50 saves, it deals exactly 388 damage. If they've made 90 saves, it would deal exactly 77 damage (I think VX Ace always rounds down, right? Well whatever, that's not important.) If they've made 100 saves or more, the attack deals 0 damage.
This should do the trick: 777 - 7.77*$game_system.save_count
or in case you want a more general term in case you wanna suddenly change the base (so you don't need to recalculate the 1%):
777*(100-$game_system.save_count)/100
Thanks 🙂
In the same sense, what is the call for determining how many battles you have fought, to factor that into damage reduction?
$game_system.battle_count will give you how many battles you've been in.
quick question, how would I make a skill deal more damage based on the number of states the target has?
EDIT:
Nevermind, I found what I was looking for somewhere else.
The fire element for my game is relying on TP growth for damage. TP for the fire element is acting as fuel. My formula so far looks pretty balanced over time but I can still see some room for out of control growth, especially when hitting around 30 TP for a character or enemy. I'm trying to come up with a way to keep control over the growth of damage with TP rising but do not want to take too much power away from the dependence on TP. It has to be TP dependent. So far, this is the formula I'm toying with:
a.mat * 1.8 + a.tp * 6 * 2.8 - b.mdf * 3.2.
I was thinking of making it a little harder for fire based enemies and characters to build TP. If I go to TP Charge rate and lower it to 85%, will this be what I need to slow down TP growth? I'm thinking that is the answer I want...
Question, how do I add a 2nd state check to something like "if b.state?(4) ? b.add_state(5) : b.add_state(4)" so that it effectively checks 2 states before adding state 4?
Basically I have tierd states, and 4, 5 and 6 are meant to be linked. If you have 5, you get 6. If you have 4 you get 5. If you have none of those, you get 4.
The closest I got was a silly little thing that entirely skilled state 4 and added 5 and 6 right immediately after each other, which was funny cause each state adds resistance to lower one, so it would quickly display states 5 and 6 being applied then remove 5 all in quick succession lol. Anyway, any help would be appreciated.
EDIT:
Err, might as well throw this in too. A way to average out damage/healing based on targets. A skill that targets all enemies/allies, but the effect is divded by the number of targets. So if the skill is only affecting 2 targets, each target gets half the damage/healing effect, if it's 5 targets they're each getting 20% etc.
Strangely I can event both of these, but it's just so inconvenient and completley unefficient.
Ahh, sorry for the late reply.
I ended up working out the same formula, thanks to your earlier post (thanks again for that~) But it didn't work, it never checks/adds the 6th state. I thought I was doing it wrong, but after seeing your post I decided to try it in a blank project and it works fine. So one of my edits to the default scripts must somehow be affecting how that works, but at least now I know where to go from here now heh.
Thanks again :3
so does using that errors or something?
you can always try out something like
(rand(100)+25)/100.0
so now it will randomize from 25 to 125 then divide it with 100.0, turning it to percent... the .0 is important btw, it keeps the result a decimal
there were no errors, but it would only return, in damage, 48, after every use in battle
and thanks. your formula works 🙂
probably, rand returns and takes integers only so it might actually be turning 1.25 to 1. and since rand actually randomizes from 0 to Number - 1, so the randomization always returns 0... which then makes your formula always use .25
Okay, I have a question. Is there a formula that abjusts damage dealt based on MP/TP consumption?