about summary refs log tree commit diff
path: root/dropcalc/dropcalc-notes
blob: b334e43350616f755678803132da0a6613b25c8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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