Question...
How I want my Hit Formula is sort of
add together the Hit Rate and a custom stat I call "Perception" (The Hit Rate serves as an added bonus given by special skills and states)
then subtract the targets Evasion along with its Agility stat but divide the Agi value by two.
In other words, I'm thinking hit + per - eva + agi / 2.
Is this the correct formula for that?
Thanks.
Congrats on another great plugin, Victor. Is is possible to add custom formulas?
Like, I want to default my hit formula by the plugin parameter, but notetag in a skill a <hit formula> that alters it for, like, a magic attack or an attack easier to hit but that deals less damage?
While in the mood, what about a <miss> tag for attacks that deal damage or apply a state even on a miss? This could greatly improve your (already great) plugin!
I'm gonna threadomancy a bit, i tried posting on your website, but for some odd reason, your submit button didn't work (part of me thought that very funny to have a script problem for a scripter's forum)
Here's the pasta !
This plugin might make all my fantasies come true, and i thank you fondly for that !
I tried copying a example you gave in a comment, and pasting it into the plugin but every attack made, no matter whom from, misses
<hit formula>result = (Math.randomInt(20) + 1 + Math.floor((a.atk – 10) * 0.5) >= b.def) ? 100 : 0 </hit formula>
I tried putting every "core" Parameter to 0 (in case of interference from standard hit calculation, or evade, both for the actor and the ennemy but nothing changed.
I tried using a very low number as "def" but still only misses
I do have your core plugin (tried without, it asked for variable)
I tried putting the line on the "attack skill" as well, to no avail
I'm saying all that to show that i tried, i really tried to make it work and not have to bother people about my inadequacies, but after an hour, it was all in vain
Any idea what i could have failed ?
EDIT : Wait a minute ! Can i add those formulas to individual weapons ? .. it says skills and items, but it you could be referencing to the "item" category
I had used the </hit formula> tags in the plugin, and there is an error in my code
It all works now ! Thanks again for your work and your time
A month later, and your plugin is at the core of my project, i thank you for that !
I had the desire to add a variable dependant on my player's level, i initially though of maybe adding a +hit bonus tag to your plugin, but after a month of Js, this is still miles above my brain power...
I thought about using on my skills :
<hit formula>
if (Math.randomInt(20) + 1 + Level + Math.floor((a.atk-10) * 0.5) >= b.def) {
result = 100
} else {
result = 0
}
</hit formula>
But since skills are a general entity, it conflicts with ennemies trying to use them, and basically excludes any bonus diversity
(I cant have actor 1 as a warrior have +1 hit/level, and actor 2, as a mage have +1/2levels)
(This is basically BaB from the D20 system)
I tried playing with a Var, but since the attack skill is still gloabal... everyone would use it
I can envision an If clause, checking for actor/ennemy, and adding a Var bonus depending on the class... but it seems overly complicated
Is there a simpler way ? would it be hard for me to code in class tags (the most elegant and simple solution) ?
Thanks for your time
There are some plugins that add level to enemies, unless they do things that are too fancy, they shouldn't have any issue with this plugin.
Otherwise you will need a more complex condition, where you will need to check if the battler is a enemy.
for example:
<hit formula>
if (a.isActor() && Math.randomInt(20) + 1 + Level + Math.floor((a.atk-10) * 0.5) >= b.def) {
result = 100
} else if (a.isEnemy() && Math.randomInt(20) + 1 + Math.floor((a.atk-10) * 0.5) >= b.def) {
result = 100
} else {
result = 0
}
</hit formula>
(or add something else to replace the Level)
I'll try and make it work with your formula and vars ;
Thanks for your quick answers, once more !
I made it work ! thanks for the different perspective !
I'm kinda sorry for coming back with more...
Your plugin allows us to determine accuracy of a physical skills, by ignoring Eva, yet not setting its value to 0.
Exemple : i can have a hit-eva formula and the core program won't check that hit against Eva a second time.
Is it possible to make it work with MEV as well ? If not, any plans to modify it, or ideas for me to make it work ?
(i tried using hit-Mev, but Mev gets applied afterward, if i'm not mistaken
Edit : Still not in a hurry, but still interested
Edit : Added it as a plugin request, if anyone else is interested
Edit : 11/12/16 : Still interested