It would help if you would explain what that "Spiraller" is and what it is supposed to do - you can't expect everyone to have played the same games you have...
How to make the most of custom formulae. Part #1
RMVXAce TutorialsGoogle is the best. It's an ability from Final Fantasy that requires button input after use of a skill called 'Blitz', like a 2-d fighter.
I have no idea how to accomplish that without Yanfly's Target Manager and Follow Up Skills scripts, though I can conceive it being done with a Common Event if only one character can learn the skill.
the second sentence says what the skill does: heals the whole party to full HP and MP, cures all status, but the user is KOed. it also says what I'm accomplishing in each field in the skill creation tab.
also, I have no intent on removing the user from combat - having him KOed would be enough. I'm also not interested in recreating the BLITZ command either, because memorizing button inputs is silly to me. cute, but silly. all I'm looking to do is have a KOed user, and a fully revitalized team.
I have a skill which may inflict either State 32, or State 64, with a one in four chance that it will be one of them. Another way of phrasing this is that there is a 50% chance that some state will be inflicted. I know that I have to set up a variable with a range of 0...3. I had thought that if Variable = 0, then state 32; if Variable = 1, then state 64; if Variable = 2 or 3, then nothing.
However, I cannot get my head round the syntax of what goes in the damage formula. Can anyone help me?
Thanks.
However, I cannot get my head round the syntax of what goes in the damage formula. Can anyone help me?
Thanks.
v[n] = math.rand(0,3); v[n]==0 ? b.add_state(32) : v[n]==1 ? b.add_state(64):v[n]==1;[Damage Formula]
I think.
I think.
Looks good to me. Thank you very much.
I am trying to make a skill that hits multiple elements (for example, a Scald attack, which deals reduced damage based both on water and fire resists).
Assuming that Fire is the second named element in the database and that water is the fourth, and I want them to hold equal bearing on the attack, would I do "b.element_rate(2) * b.element_rate(4) * (formula)?"
For b.element_rate(n)-- if they normally take 60% more damage than usual / have 'Elem Rate (n): 160%" as a tag, does it return 1.6 or 0.4? I assume 1.6; but I wouldn't be surprised either way...
Assuming that Fire is the second named element in the database and that water is the fourth, and I want them to hold equal bearing on the attack, would I do "b.element_rate(2) * b.element_rate(4) * (formula)?"
For b.element_rate(n)-- if they normally take 60% more damage than usual / have 'Elem Rate (n): 160%" as a tag, does it return 1.6 or 0.4? I assume 1.6; but I wouldn't be surprised either way...
Ok so trying to implement my own custom formula but it keeps returning a nil value. The math is fine but because of the way RGSS handles it, I think I need to through a .to_i somewhere in the formula.
Formula in question
12 * sqrt((a.mat * 1.1 - b.mdf) / 4) * (a.tp/100)the sqrt function appears to be the culprit
Formula in question
12 * sqrt((a.mat * 1.1 - b.mdf) / 4) * (a.tp/100)the sqrt function appears to be the culprit
no, the problem is most likely the last part.
a.tp is an integer value between 0 and 100, which means that the division has a result between 0.00 and 1.00 - but all results below 1.00 (that includes 0.99) are automatically rounded down to zero when converting to integer.
Which means that unless the actor has 100 TP, that formula will always return zero due to the last part.
a.tp is an integer value between 0 and 100, which means that the division has a result between 0.00 and 1.00 - but all results below 1.00 (that includes 0.99) are automatically rounded down to zero when converting to integer.
Which means that unless the actor has 100 TP, that formula will always return zero due to the last part.
Unfortunately thats not it, with sqrt(a.mat*1.1-b.mdf)* removed from the formula, damage is still applied.
Dissecting the formula shows that something within the sqrt portion of the formula returns something that the formula box cannot process for some reason.
Edit:
Plugged the formula into excel again, looks like my math might be off.
Tried the formula with and without the sqrt() function
Dissecting the formula shows that something within the sqrt portion of the formula returns something that the formula box cannot process for some reason.
Edit:
Plugged the formula into excel again, looks like my math might be off.
Tried the formula with and without the sqrt() function
Code:
12 * (a.mat * 1.1 - b.mdf) / 4 * a.tp / 100 # Returns Damage12 * sqrt((a.mat * 1.1 - b.mdf) / 4) * a.tp / 100 # Does Not Return Damage
what are the values for mdf and mat? It could be that the result becomes negative, and that would not be able to be processed as the squareroot of a negative number is not defined in real numbers...
a.mat is set to 5
b.mdf is set to 1
a.tp is set to 97
The 1st formula returns 13.09 and is consistent inside VX Ace
The 2nd formula returns 12.34, and returns no damage in VX Ace
12 * (a.mat * 1.1 - b.mdf) / 4 * a.tp / 100 #12 * sqrt((a.mat * 1.1 - b.mdf) / 4) * a.tp / 100 #I'm starting to think it's an issue with the formula box itself and not the math.
b.mdf is set to 1
a.tp is set to 97
The 1st formula returns 13.09 and is consistent inside VX Ace
The 2nd formula returns 12.34, and returns no damage in VX Ace
12 * (a.mat * 1.1 - b.mdf) / 4 * a.tp / 100 #12 * sqrt((a.mat * 1.1 - b.mdf) / 4) * a.tp / 100 #I'm starting to think it's an issue with the formula box itself and not the math.
I think sqrt is not valid... If that's within the MAth module, then it should be Math.sqrt
Correct it should be:
or
Code:
12 * Math.sqrt((a.mat * 1.1 - b.mdf) / 4).to_i * a.tp / 100
Code:
(12 * Math.sqrt((a.mat * 1.1 - b.mdf) / 4) * a.tp / 100).to_i
thanks guys, that seems to have done the trick.
Note:
Also removed the a.tp portion of the damage formula since it will be easier to control via an auto state and the fact that it always produces a 0 on the first turn a skill is used for some reason :/
Note:
Also removed the a.tp portion of the damage formula since it will be easier to control via an auto state and the fact that it always produces a 0 on the first turn a skill is used for some reason :/
Hello
I know you guys are busy and this may have already been answered but I think my situation is pretty darn specific and its wracking my brain. I think I have a good chunk of it down but the final steps are throwing me for a loop. Here is essentially what I want to do:
I have an item called a Glass dagger which can store blood in it after striking an enemy which can then be used for blood magic. Mechanically what I already have working is the following:
if a.id==1; a.add_state(9); else; ; end; + (20 + a.atk * 0.4 - b.def * 0.2)
So here I have assigned an if condition where it must be actor one attacking in order to automatically receive a status ailment upon striking. This is the actor who will be assigned the glass dagger. Status ailment 9 has been assigned as "bloodied". The reasoning behind this, is that I have used a small tag which allows me to create a cost to a skill which is a status ailment instead of MP or TP.
In short, the formula applies a stack of "bloodied" to actor 1 whenever he strikes. Whenever he uses a skill called "violent thirst" he consumes the "bloodied" ailment. Now I have three problems, two mechanical and the other cosmetic. Mechanical first:
1: I want the ailment to only activate when he uses the glass dagger and not some other weapon. (I am assuming this will work similar to the actor id, in that I designate an if condition for weapon(weapon_id) but the syntax is a bit confusing for me at the moment help on this would be appreciated.)
2: I would like to be able to stack charges of blood into the dagger at a later point. Stacking status ailments is proving to be tricky. (someone mentioned creating multiple ailments which represent stacks essentially. for example creating three separate ailments called: bloodied, bloodied 2 stacks, bloodied 3 stacks. This method seems to be my best option. I am looking into this currently but again the syntax is a bit confusing, help would again be appreciated.)
Cosmetically:
I would simply like an event to happen in battle the very first time the weapon draws blood. Some text or interaction showing surprise at the dagger's powers.
Thanks in advance to any help or input!
I know you guys are busy and this may have already been answered but I think my situation is pretty darn specific and its wracking my brain. I think I have a good chunk of it down but the final steps are throwing me for a loop. Here is essentially what I want to do:
I have an item called a Glass dagger which can store blood in it after striking an enemy which can then be used for blood magic. Mechanically what I already have working is the following:
if a.id==1; a.add_state(9); else; ; end; + (20 + a.atk * 0.4 - b.def * 0.2)
So here I have assigned an if condition where it must be actor one attacking in order to automatically receive a status ailment upon striking. This is the actor who will be assigned the glass dagger. Status ailment 9 has been assigned as "bloodied". The reasoning behind this, is that I have used a small tag which allows me to create a cost to a skill which is a status ailment instead of MP or TP.
In short, the formula applies a stack of "bloodied" to actor 1 whenever he strikes. Whenever he uses a skill called "violent thirst" he consumes the "bloodied" ailment. Now I have three problems, two mechanical and the other cosmetic. Mechanical first:
1: I want the ailment to only activate when he uses the glass dagger and not some other weapon. (I am assuming this will work similar to the actor id, in that I designate an if condition for weapon(weapon_id) but the syntax is a bit confusing for me at the moment help on this would be appreciated.)
2: I would like to be able to stack charges of blood into the dagger at a later point. Stacking status ailments is proving to be tricky. (someone mentioned creating multiple ailments which represent stacks essentially. for example creating three separate ailments called: bloodied, bloodied 2 stacks, bloodied 3 stacks. This method seems to be my best option. I am looking into this currently but again the syntax is a bit confusing, help would again be appreciated.)
Cosmetically:
I would simply like an event to happen in battle the very first time the weapon draws blood. Some text or interaction showing surprise at the dagger's powers.
Thanks in advance to any help or input!
1) a.weapons[0].id == ID of glass dagger
or use a custom weapon attack script
2) There are scripts that allow stacking states
or use a custom weapon attack script
2) There are scripts that allow stacking states
So just so I am clear on the syntax (I am very rusty) if my weapon id for the glass dagger is say 67 i would type "a.weapons[0].id == 67?
How can I make it so that a normal Attack deals exactly 1 more damage if afflicted with a specific state?
if the user is the one afflicted
if it's the target, just swap the a with b
Code:
if a.state?(id);strong_damage_formula;else;weak_damage_formula;end;
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-the-most-of-custom-formulae-part-1.1143/