Item Search
     
BG-Wiki Search
+ Reply to Thread
Results 1 to 18 of 18
  1. #1
    Cerberus
    Join Date
    Oct 2007
    Posts
    433
    BG Level
    4
    FFXI Server
    Cerberus

    So let's say you're writing a program to calculate ideal damage gearsets...

    How would you program it to choose the optimum?

    (if you don't care about the programming question but want to help me with basic info on average pdif and crits skip to next post in the thread plz

    The basic conundrum is that the value of stats change in light of other stats. Like there always needs to be a certain amount of attack and acc before haste becomes desirable. Attack is a lot more desirable if you're in the zone where you're hitting for 0 than it is if you're in the middle of cratio. Etc. Of course you could set artificial preconditions (certain PDIF is needed from gearset, certain acc needed) but that I don't like the assumptions that would involve.

    As it is right now, I'm planning on coding it so that it starts from naked (which is as I prefer, since I feel starting with a certain set of gear then deciding which pieces would improve would lead to too many assumptions. Plus it would be too simple and take the game out of coding).

    Then from there it would change to the optimum piece for the slot that provides the least overall benefit. I'd do this because

    a) it would disrupt the stability of the other equipment changes the least.

    b) it would naturally go back and check previous pieces. With this method it would go: put in optimum from weakest slot.>> Put in optimum for 2nd weakest slot.>> Either change first slot in light of second slot (since it would be picking optimum in the slot with the weakest overall improvement) or assign 3rd weakest slot. And so on, until the program can't see any improvements.

    The biggest thing I'm worried about with this method is whether it would make the jump from acc/atk builds to haste builds, but I'm going to test this and see what it would do. I think it will make the leap since the cutoff at which haste begins to dominates other options isn't that high.

    And yes I plan on programming food and buffs as "slots".

    So what would you code the program to look for? How would you have it operate?

    I guess the most straightforward way would be to calculate every possible permutation...but what fun would that be......

    Plus I think there might be something insightful in a slot-by-slot approach, to see how the equip set evolves.

    Anyways, any comments on this are appreciated. I just figure since I'm doing this project, I should get feedback on what would be the best way to go about it.

    And before anyone gets their hopes up, this program will probably be in a format no one will bother to use, since it's going to be MUSH code. Which will be simple enough to use but involves getting a telnet-type client and logging on to a server. It's a bit of an obscure form (especially nowadays) but eh, I've forgot most of my lolPascal and don't feel like learning more Java for this project.

  2. #2
    Cerberus
    Join Date
    Oct 2007
    Posts
    433
    BG Level
    4
    FFXI Server
    Cerberus

    average PDIFs: It's obvious enough in certain cratios that average PDIF isn't just the average of min and max pdif. Like it seems logical enough to me that when min pdif gets capped to 0 it rolls into the negative area then gets capped off. So if cratio's where 0 is the midpoint between max and min pdif (before cap) that half of what you get will be 0. But for the rest of the cratio range, do you think actual average is just the average between min and max pdif? This seems sensible enough to me (past 0 min pdif) except the zones where max is flat at 1 or min is flat at 1.

    Crits: what's the most up-to-date research on crits? Really, info in this area seems lacking to me. The only data I really know of is searain's, but it's pretty incomplete since the only really clear data is on colibri. Like, there's no way to tell if crits work the same on extremely high agi mobs. I know gobli says crits cap at 50 dex over agi but there isn't much to say whether 25 dex over agi will always yield the same crit %.

  3. #3
    Salvage Bans
    Join Date
    May 2006
    Posts
    825
    BG Level
    5

    I believe that pDIF is always random within a 0.8 range; in the middle sections of the graph where the gap between min and max is not 0.8, the missing range is mapped to pDIF=1. I posted formulas for average pdif based on this theory at Maximizing Physical Damage Guide - FFXIclopedia - a Wikia Gaming wiki

  4. #4
    Relic Shield
    Join Date
    Dec 2006
    Posts
    1,704
    BG Level
    6
    FFXI Server
    Asura

    You can use DP as for the algorithm

    Code:
    Optimum[n][i] = Pick_Optimum ( Optimum[n-1][1] + Pick_Best(Equip[1][...]),
                                   Optimum[n-1][2] + Pick_Best(Equip[2][...]),
                                   ...,
                                   Optimum[n-1][n-2] + Pick_Best(Equip[n-2][...]),
                                   Optimum[n-1][n-1] + Pick_Best(Equip[n-1][...]))
    Optimum[n][i] = Optimum setup for n slot filled, with slot i opened
    Equip[i][...] = Array equip for slot i
    Pick_Optimum() = pick the best Optimum[n][i]
    Pick_Best() = pick the best damage improvement from the equip array

    Maybe someone can correct me with the notation, I'm not too good making notation for DP.

  5. #5
    Salvage Bans
    Join Date
    Jan 2007
    Posts
    766
    BG Level
    5
    FFXI Server
    Ragnarok

    The best gear when you're not using all slots is different than when you are using all slots. Therefore you cannot build it up from 0 slots and add one slot at a time. If you are going back and looking at previous slots, then it actually has a worse run time than brute-force because for each slot you add you must recompute everything. I doubt you can use DP to solve this the way described above. You're probably just best off brute-forcing it. There are only like 1-6 real items for a slot anyways.

    There is probably a better way of doing it, like using a variation of the Alpha-beta levels chess programs use, but on a good machine brute-force will compute it fast enough.

    BTW, use C or python for this.

  6. #6
    Cerberus
    Join Date
    Oct 2007
    Posts
    433
    BG Level
    4
    FFXI Server
    Cerberus

    Quote Originally Posted by Valyana View Post
    I believe that pDIF is always random within a 0.8 range; in the middle sections of the graph where the gap between min and max is not 0.8, the missing range is mapped to pDIF=1. I posted formulas for average pdif based on this theory at Maximizing Physical Damage Guide - FFXIclopedia - a Wikia Gaming wiki
    Why do you think that tho?

    And ty for that excellent guide, didn't know who did it before.

    Also...do you think the range stays the same after 2.0 cratio? Right after the 2hand update (before the 2hand re-nerf) it seemed like it kept count after 2.0 cratio, although upper pdif remained capped min pdif kept creeping up past 2.0 cratio until it matched max pdif, resulting in the same number over and over on weak enough monsters.

  7. #7
    Melee Summoner
    Join Date
    Feb 2006
    Posts
    44
    BG Level
    1
    FFXI Server
    Alexander
    WoW Realm
    Tichondrius

    Well, I realize it's probably taboo but there's a WoW program that does this and its open source if your interested. Stats definitely scale differently but the priority system is there (like, you need x hit[accuracy] before worrying about anything else etc) as is loading in equipment data from the web (in this case the armory).

    If nothing else, it might give you ideas on how to code it in notMUSH.

    http://www.codeplex.com/Rawr

    (If that's not the case, I'm sorry. I have virtually zero programming experience.)

  8. #8
    Salvage Bans
    Join Date
    Aug 2005
    Posts
    866
    BG Level
    5
    FFXI Server
    Lakshmi

    The biggest problem I see, when writing such a program, is that in FFXI, everything is situational :/

    But if you add some sort of specific constraints to the computation (something like "best damage gearset for _job_ for _purpose_ on _mob_ taking into account _mob_weakness_ and _food_ and _weather_ and _whatnot_"), it may just work and be useful.

  9. #9
    Salvage Bans
    Join Date
    Jan 2007
    Posts
    766
    BG Level
    5
    FFXI Server
    Ragnarok

    Considering he was talking about pDIF I'm quite certain he is comparing this on a mob-to-mob basis.

    I.E. bestgear <job>/<sub> <mob>
    bestgear WAR/SAM "Greater Colibri"
    OUTPUT:
    whatever weapon, sub, range, ammo, etc. etc.

  10. #10
    Salvage Bans
    Join Date
    Aug 2005
    Posts
    866
    BG Level
    5
    FFXI Server
    Lakshmi

    Quote Originally Posted by Tubbers View Post
    Considering he was talking about pDIF I'm quite certain he is comparing this on a mob-to-mob basis.
    My bad...slapping my own reading comprehension right now.

    Well that being straightened in my mind, the non-optimized but most efficient method would probably be, taking a specific mob, to :

    - compute the sums of the stats/bonus/effects of every gear combinations.
    - calculate your pDif with each combination
    - use delay+haste to calculate a theoric Damage Per Second rate
    - take into account the possible mob's damage reduction, weapon type (slashing, blunt, piercing) bonus/malus, abilities bonus/malus (hasso, kick attacks, ...)
    - use accuracy and mob's evasion to get a realistic DPS rate

    That "realistic DPS rate" is probably a good hint at the damage efficiency of each of your gear sets. Last thing is to compare these and sort out the one who gets the highest value. I'm probably forgetting things here, but you see the logic, which is basically how people think about their gear sets in their head.

    There are a few things that can make the computation somewhat false or inacurate, like the fact people use (well they should) different sets for TP and WS, so you probably want to calculate an optimal set for both phases, and tweaken your "realistic DPS rate" taking into account the TP and WS phases. But then you will need to assume you WS every x TP hits, and then maybe your mob is dead by now so you need to take into account the mob's HP and your party friends realistic DPS rate and the length of the fight. Or maybe you started the fight with TP > 0, and then you can WS earlier than you thought, etc etc...Yes there are many things that make the method inacurate, but it's a pretty good start.

  11. #11
    Salvage Bans
    Join Date
    Jan 2007
    Posts
    766
    BG Level
    5
    FFXI Server
    Ragnarok

    I agree with most of that, but TBH that's pretty much obvious. I disagree with the need to track HP, or other party members DPS, or length of a fight, because it honestly doesn't really matter. In an ideal party you always have another mob to attack immediately after one dies, and it isn't like putting magical pauses and theoretical waiting on TP if a mob is going to die is going to really make any significant difference on the results anyways. It's a waste of time to implement, and it adds waaaaaay to many conditions.

  12. #12
    Salvage Bans
    Join Date
    Aug 2005
    Posts
    866
    BG Level
    5
    FFXI Server
    Lakshmi

    Quote Originally Posted by Tubbers View Post
    It's a waste of time to implement, and it adds waaaaaay to many conditions.
    That's pretty much what I mean in the last paragraph of my post ^^v

  13. #13

    I've been trying to figure this out myself actually...

    No matter what gear I macro in I hardly see any differences in my weapon skills.

    Maybe I'm equipping my gear and then wsing to soon, do I need to pause in between gear equip and ws?

  14. #14
    A. Body
    Join Date
    Oct 2006
    Posts
    4,003
    BG Level
    7
    FFXI Server
    Cerberus

    Is it just me or is it everytime I see something necro'd it is by someone who is just shy of their 10 posts?

  15. #15
    Sea Torques
    Join Date
    Feb 2005
    Posts
    699
    BG Level
    5
    FFXI Server
    Asura

    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.

  16. #16
    CoP Dynamis
    Join Date
    Feb 2009
    Posts
    295
    BG Level
    4
    FFXI Server
    Bismarck

    It is kind of weird that a post got necro'd after nearly a year, but programming logic questions are fun :D

    Essentially you're just comparing marginal changes of gear, which the same thing can be done in a spreadsheet. If I have these net stats (mine+buffs-enemy's-debuffs), I can expect my damage to change by X if I increase Y at the cost of Z. If it were a program, it would just iterate all the gear combos available.

    Within a spreadsheet you could easily gauge changes on an item by item basis. Switching from a w. turban to an askar helm could immediately show the difference in DPS due to attack speed, expected damage, and accuracy. And similarly you could change the mob (like a g. colibri to a chariot) and figure out how the two compare. So if you can manually find the optimal item per slot than a looping program could do the same thing for an entire gear set.

    Also an interesting feature for the average player would be if you could limit what combos of gear. Not having certain pieces of gear can completely make or break some combos. Any set that was aiming at breaking a tier (fstr, crit, w/e) it could be helpful to see if the options available to the player would even make it worthwhile.

    There definitely are job combos that would be it a pain to calculate, thief in particular. You would need to account for the time wasted setting up SA/TA, or if you were waiting on a timer/tp, and then trying to calculate the amount of time ambush is active, and not to mention at what frequency you're using SA/TA on a normal attack while (not) wearing heca (haste gear). At least the other melee jobs would be significantly easier.

  17. #17

    Quote Originally Posted by Meian View Post
    Is it just me or is it everytime I see something necro'd it is by someone who is just shy of their 10 posts?
    just shy of 10 posts

  18. #18
    Sea Torques
    Join Date
    Feb 2005
    Posts
    699
    BG Level
    5
    FFXI Server
    Asura

    ugh so this was another necro >,<. lots of those this week