diff options
author | Starfall <us@starfall.systems> | 2024-02-07 17:54:47 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2024-02-07 17:56:03 -0600 |
commit | 482794473972a1265308fcb89069066483bbdda0 (patch) | |
tree | 5dc3ea5306a5a2648a4815442643ddf2ebf1571f /dropcalc/dropcalc-notes | |
parent | f06167b79397b425272fd4843d599d5f5c372fb6 (diff) |
dropcalc: Median XL .txt parser
Was intended to eventually become a drop calculator. Might work for other Diablo II mods without changes, I don't think there are any MXL-specific fields involved in this. Abandoned due to lack of organizational structure on the project and ... creative differences with one of the lead devs.
Diffstat (limited to 'dropcalc/dropcalc-notes')
-rw-r--r-- | dropcalc/dropcalc-notes | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dropcalc/dropcalc-notes b/dropcalc/dropcalc-notes new file mode 100644 index 0000000..b334e43 --- /dev/null +++ b/dropcalc/dropcalc-notes @@ -0,0 +1,61 @@ +TreasureClassEx.txt +tab-separated +Picks +Unique, Set, Rare, Magic +NoDrop +Item{1-10} : can be a TC name, Weapons/Armor/Misc/Gems code, UniqueItems index, maybe even SetItems index +Prob{1-10} + +group/level can upgrade tc but that's skippable for now until we need to deal with monsters + + + +for generic TCs: +read Weapons.txt, Armor.txt code, rarity +use name for now, deal with namestr & string tbls later + + + +NoDrop adjustment: +fundamentally it just retries once per (close, partied) player until an item is hit. +far and/or unpartied players count half + + +item quality: +ItemRatio.txt +Unique, UniqueDivisor, UniqueMin... etc + +chance = 128 * (Unique - (ilvl-qlvl)/Divisor) +eMF = (MF * factor) / (MF + Factor) like basically all diminishing returns +chance = chance * eMF +cap to minChance +chance = chance - (chance * tcUnique / 1024) + +roll 0 to chance-1, if less than 128 then success +which means lower "chance" is better + +unique is picked with rarity / total rarity of uniques for base that have the right ilvl as expected + +game rolls unique - set - rare - magic - superior - normal in order + + + +affixes the fuckening: +rares have 2+d4 affixes, 50/50 for each to be prefix or suffix until 3 +crafts have 4 affixes (or 0.4/0.2/0.2/0.2 for 1-4 at ilvl 1), otherwise the same +generate in order, exclude by group + +alvl of item is: +tmplvl = min(ilvl, 99) +tmplvl = max(qlvl, tmplvl) +if magic_level: + alvl = tmplvl + magic_level +else if tmplvl < (99 - qlvl/2): + alvl = tmplvl - qlvl/2 +else: + alvl = 2 * tmplvl - 99 +return min(alvl, 99) + +should likely monte carlo simulate crafts rather than try and calculate them + +need to fuck around with Itemtypes, MagicPrefix, MagicSuffix to get all the possible affixes |