ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
533
Reaction score
748
First Language
German
Primarily Uses
RMMV
@Indinera
I don't really like using ternary operator in my formulas, they look ugly and disorganized.
I rather use normal JS formatting

Your formula would look like this then:


JavaScript:
c=a.atk-b.def; if (a.hpRate() < 0.3) {250 + 4*c} else if (a.hpRate() < 0.5) {4*c} else {c}

If you really don't use the formula in this way, you can just use your own formula and test it out.
The numbers won't lie.
 

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,051
Reaction score
855
First Language
French
Thank you, saving this for future reference in case I bump into an issue.
Ternary formulas look ugly but they are very compact, which is something I like.
I don't like having to scroll through a long formula with a box so small it displays like 20% of it at once.
 

Flauschifluff

Warper
Member
Joined
Apr 19, 2021
Messages
1
Reaction score
0
First Language
German
Primarily Uses
RMMV
Hello. So, I can't seem toget the Variables working properly. The Formula is this:

60 + (a.atk * (a.level * 0.2) + a.luk) * (1 + v[2]) - b.def * 5

Everytime used the variable 2 will be changed, a random number between and including 0 and 9.
Could there be difficulties if the variable isn't defined yet?
While writing this edited the event slightly, it now works on the second use onward. Might be unlucky RNG rolls but it seems to be very close.
A normal Attack without the multiplication of 1 + v[2] deals around 50 damage and all rolls i got so far was just ranging between 50 and 70, that could be within the 20% variance couldn't it?
 

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
195
Reaction score
64
First Language
Spanish
Primarily Uses
Hello, it may be weird to ask, but is there an actual way to use, something like the Evation rate in the damage formula, I was thinking in something simple as a.eva, but I think is not a flat number but a percentage (if the system actually has a way of finding the eva value for actor and enemy), I dont0 want to to be a hit or miss just a suimple damage, is it possible?
 

ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
533
Reaction score
748
First Language
German
Primarily Uses
RMMV
@emelian65
You can use all parameters in the damage formulas.
However, most of them are not actually processed as % numbers, but rather decimals.

Basically,
100% evasion rate translates to 1.
50% evasion rate translates to 0.5.

So you could do something like

(a.hit * 100) to convert the decimal back to the % number.

Here is the list of all parameters you can use:

Base Parameters

mhp - max hp
mmp - max MP
atk - attack
def - defence
mat - magic attack
mdf - magic defence
agi - agility
luk - luck

Extra Parameters (Default Value is 0 -> 0%)

hit - Hit rate
eva - Evasion rate
cri - Critical rate
cev - Critical evasion rate
mev - Magic evasion rate
mrf - Magic reflection rate
cnt - Counter attack rate
hrg - HP regeneration rate
mrg - MP regeneration rate
trg - TP regeneration rate

Special Parameters (Default Value is 1 -> 100%)

tgr - Target Rate
grd - Guard effect rate
rec - Recovery effect rate
pha - Pharmacology
mcr - MP Cost rate
tcr - TP Charge rate
pdr - Physical damage rate
mdr - Magical damage rate
fdr - Floor damage rate
exr - Experience rate
 
Last edited:

arkantos

Villager
Member
Joined
Dec 22, 2014
Messages
17
Reaction score
1
First Language
Español
Primarily Uses
RMMV
Hi, Can anyone give me some guidance? I want to make a skill similar to the knights of FFT, where they broke parts of the equipment. (swords, armor, etc).

 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,159
Reaction score
634
First Language
English
Primarily Uses
RMMV
Hi, Can anyone give me some guidance? I want to make a skill similar to the knights of FFT, where they broke parts of the equipment. (swords, armor, etc).
This has nothing to do with a damage formula. This would be accomplished by placing a state on the target, or calling a common event, or using an action sequence (I'd do it there).

You'll get more luck posting your own thread to ask about it.
 
Last edited:

Corporal_Siva

Warper
Member
Joined
Mar 4, 2021
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
I'm trying to make an attack that deals more damage the less HP a user has, but it won't seem to work for me. This is the formula I'm using.



a.mhp/a.hp*30*a.atk/b.def < 200*a.atk/def ? a.mhp/a.hp*30*a.atk/b.def : 200*a.atk/b.def;
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
566
Reaction score
243
First Language
English
Primarily Uses
RMMV
For starters, you have one def that's missing the b. in front of it.

Even with that fixed, I think your formula does the opposite of what you want. If I recall correctly, there is a.hpRatio() which is just another way to write a.mhp/a.hp, but unless I'm missing something, what you actually need here is (1 - a.hpRatio()).
 

TheGentlemanLoser

"And when we fall, we will fall together..."
Veteran
Joined
Dec 30, 2020
Messages
238
Reaction score
273
First Language
English
Primarily Uses
RMMV
Hey, so this one's pretty tricky and I have no idea if it's even possible, honestly.

I'm using SRD's Timed Attack w/ the Timed Attack Arrows feature. The plugin created a new (variable? argument? what is the correct terminology for this I'm hopeless) for use in damage formulae, $gameTemp.tas_power which returns a result between 0 and 1, meaning an attack would deal full damage with a perfect input and 0% with a fail. I wasn't crazy about that but it was very easy to modify, I just used ($gameTemp.tas_power + 0.5) so that a failure does half damage and a success does 1.5x damage, easy peezy.

So that's better, but I have a feeling what I *really* want to do will be harder, if it's possible. Is there anything I can write in the formula bar to make it check if $gameTemp.tas_power = 1 and if it is, initiate a followup skill (also identified in the formula bar and probably the same skill)? So if you're "on beat" with the button presses, you can keep spamming the attack as long as you have the resources to activate the skill and don't miss an input.

I have VE_BasicModule and VE_FollowUpSkills installed but turned off and not yet config'd, because I'm not sure if VE_FollowUpSkills can be made to work with this weird idea I have.

Another question, would math.min(actualdamageformulahere, b.hp-1) result in a damage expression that can reduce the target to 1HP but not actually kill them, i.e. a "nonlethal" skill? Suppose that's easy enough to test, although that's for a different project I'm not actively working on atm so couldn't hurt to ask.
 

Latest Threads

Latest Posts

Latest Profile Posts

Man, this quick One Map game is causing unprecedented amounts of trouble.
I always end up having issues with things i'd never expect.

Capture.PNG

Those friggin mountains man xD
Time for my daily walk/jog ''Literally starts raining while I open the door''
I just discovered there's a giant jellyfish in the Ace RTP. My day is made.

Forum statistics

Threads
112,401
Messages
1,068,057
Members
146,052
Latest member
Prandom
Top