Just a word of general advice for the scope of a program like this. With enough (every factor) accounted for, you can get accurate DPS/utility comparisons for many DD's.
But for some other jobs (thief for example) it's almost impossible to make stunningly pin-point-accurate comparisons. For example, haste and accuracy, among other things, affect TP gain. However the contribution of TP gain to our total damage is often very ambiguous. It's not just situational in the sense of "what type of event are you at, and what is your party setup/buffs etc?", but very particular circumstances that can and do easily change within said events/situations. It mostly has to do with the relationship w/ our ja's. Sometimes you'll go over 100 tp because you're waiting (a short time) on your ja to come up. Sometimes you go over 100 because people or the mob keeps moving and you take time to line up correctly. Sometimes you use it straight at 100. The frequency of unstacked, ta+ws, and sa+ws can vary greatly from one time to another. Our JA timers continue to tick even between fights. So a pre-sa/ta is 'stored' extra damage. But if our timers sit at 0 between fights, a sort of opportunity cost is incurred. With this, the relationship between TP gained and overall damage dealt over time becomes impossibly hard to map in mathematic accuracy (for thf). And with that, the corresponding value of haste, accuracy, etc, in your TP set will also change.
This kind of scenario applies or doesn't apply to various degrees for other jobs. So for some jobs a calculator will be "a good attempt" at best. Here's some stuff I did on comparing warrior builds recently, but even given how much I took into account, it is still most certainly lacking,
Man/Ridill vs GA vs Swordchucks
Code:
Ridill/Joy
DoT Variables
Atk: [(74+15)str/2 +8+20+(10trait) + 271(sword)*0.9] +23gear =
350 ,*add aurum, 355
1.25(zerk)*72% = 1.18
** (*1.18 + 0.1771)+55 ??
536
Acc tot: dex/2 +20 +combat skill(sword=271)*0.9 + equip +aggressor(25*0.72) ))*food11%
319+equip48+aggressor25 *1.11 = 435
319+equip48 *1.11 = 407
fStr: 1.25
BD: main(40), off(35)
acc%:
high95%,low86%,avg= (95*0.72 + 86*0.28) = 92.48%
pDif: 1.239
swing vol(joy): wiki 55:45, 10% da, 49.5 : 50.5 = 1.505
swing vol(ridill): wiki30:50:20, 10% da, 27 : 55 : 18 = 1.91
crit%: 12.5%
fBD(BD + fStr): main(41.25), off(36.25)
end delay/round (sec): (236+224)*0.8*0.44 = 161 = 2.68sec
dmg/round: 168.2
ridill 41.25*1.91*0.9248acc*(1.239*0.875 + 2.239*0.125) = 99.4
joytoy 36.25*1.505*0.9248acc*(1.239*0.875 + 2.239*0.125) = 68.8
dot dps: 172.8 / 2.68 = 62.76
WS Variables
-Rate Variables-
TP/hit: 5.2
tp/round: 5.2*(1.91 + 1.505) = 17.7
ws tp return (/nin = 5hit): 13
rounds(not w/ ws) -> 100+: 5
ws pause(constant): 3?
ws rate (sec -> 100+): 5*2.68/acc-avg(0.9248) = 14.49
-Spike Variables-
Atk: [(74+54)str/2 +8+20+(10trait) + 266(sword)*0.9] +40gear =
381
1.25(zerk)*72% = 1.18
** (*1.18 + 0.1771)+55 ??
572
Acc tot: dex120/2 +20 +combat skill(sword=266)*0.9 +10(gorget) +equip23 +aggressor(25*0.72) ))*food11% =
319+equip33+aggressor25 *1.11 = 418
319+equip33*1.11 = 390
ftp(constant): 1.1
BD: 40, 35
fStr: 11
acc%: high91.5%,low77.5%,avg= (91.5*0.72 + 77.5*0.28) = 87.6%
pDif: 1.308
avg #hits: 1.15 + 1.15 + 2 = 4.3
crit%: 17%
wsc: (74+54)*0.3*0.83 = 31
ws dmg: 0.876acc*
[(40 + 11 + 31)*1.1ftp*(1.308*0.83 + 2.308*0.17) + (40+11+31)*3.15*(1.308*0.83 + 2.308*0.17) + (35+11+31)*1.15*(1.308*0.83 + 2.308*0.17)]
= 0.876*(133.3 + 381.8 + 130.9) = 565.9
Total Formula
DPS =
(Dmg/Round * #Rounds(ws->100) + WSdmg)
/ (wsRate + wsPause)
(168.2 * 5 + 565.9) / (14.49 + 3) = 1406.9/17.49 = 80.4
Some (majorish) edits need to be made, and this may be a bit sloppy to be worth looking at, but still this breakdown went into a fair level of complexity. There are numerous problems though so I'll name a few. Doesn't account for varying aggressor up/down builds etc (such sets would actually be interdependent on each other as far as determining their individual value, so to speak). Truncation was a problem. Usually I know how the game truncates, but I'm not always sure. Not only that, but w/ comparisons (since when we make them we want to make general prescriptions) it's actually probably best to avoid truncation as much as possible (theoretically speaking). Various multi-hit scenarios towards accumulation of 100tp not accounted for. Taking the "average # of hits to 100" doesn't do enough justice. Likewise I didn't account for varying TP returns from WS. "WS pause" appeared to function differently than I'd imagined. And a major problem is that we don't know the precise length of the pause and even if/when it will become a problem for some lower delay builds. I didn't account for TP surplus and reduction of maneater/perdu dmg, tho it prolly doesn't matter. The crit rates used are still theoretical. The fStr function I'm not sure on, since otherwiki describes the (str - vit+4)/4 as being the case when "the difference between the two is high." Likewise we're currently unsure of 2hander pDif values. Hell, even 1hander pDif values is currently in question. By this I mostly mean the tier point locations and capped max/mins. I of course couldn't account for KJ's rumored unknown critical-like spike damage. If such exists, it would increase ws dmg, which would increase the value of tp-gaining stats for tp sets.
In How to Maximize Sa/Ta Damage, I tried to capture the interdependent value of certain stats for affecting overall "sa/ta act" damage (much more important than the actual spike damage done by the JA's crit itself). This is closish to the fully expanded formula, but of course not quite. And there are important things missing from this comparison as well. Number one likely being the value of TP gained off of an sa/ta act towards overall damage over time.
Code:
Actual SA/TA "act" damage =
(SA/TA round Dmg) - (TP round opportunity cost)
=
(Initial Critical Hit)+(Extra Swings) - (dDelay Function)*(TP round Dmg)
=
{(Mainhand +fStr'a +Dex/Agi)*(pDif'a +1) + [(Mainhand +fStr'a)*Dbl./TripleAttacks + (Offhand + fStr'a)*(1 + Dbl./TripleAttacks)]*(pDif'a function)}
- ((delayTP - delaySA)/delayTP)*(TP round Dmg)
=
{(Main. +fStr'a +Dex/Agi)*(pDif'a+1) + [(Main. +fStr'a)*Dbl./Trip.Atks + (Off. + fStr'a)*(1 + Dbl./Trip.Atks)]*(CritRate'a*(pDif'a+1) + NonCritRate'a*pDif'a)}
- ((delayTP - delaySA)/delayTP)*[(Main. + Off. +2fStr'b)*(CritRate'b*(pDif'b+1) + NonCritRate'b*pDif'b)*(1 + Dbl./Trip.Atks)*Accuracy
Why am I offering this wall of text? Not to discourage you, but just to offer a few things to think about if you are to embark on a possibly long and frustrating quest to try and capture exactly what you want for your program. If I've pointed out any perspectives that may be new(ish) to you, hopefully it will be of some aid.
On the topic of how to calculate certain values, I use some generally self-established guidelines for things like pDif and crit. There hasn't been enough/much testing/sampling into the nature of the (if any) curve/distribution between pDif max and min. Same with crit rate. But what I do so far is,
*for pDif I avg the min and max together. Part of my logic is that in the absence of knowing of such a curve between the two, it is as likely that the curve is even distributed as it is that it leans towards either the max or the min. The probabilities cancel out, and thus to the best of our knowledge the avg (which will be the same as the midpoint here) is best to use.
*for Crit, I use the general rule of 1dex=0.5% crit within the region of efficacy. The region of efficacy being between 20-50 d(dex-agi). That spread of 30 attribute points accounts for the 15% spread in min/max crit rate. 0-20 and anything under is the "placebo" region of inefficacy. 50 is cap. I know this guy in this thread reached the same general rule independently of me. Idk if anyone else currently uses this.