A python script to calculate the weapon attack ratings based on your stats, upgrade levels, and affinity for any weapon
python main.py --name "NAME"
[--affinity "AFFINITY"]
UPGRADE
STRENGTH
DEXTERITY
INTELLIGENCE
FAITH
ARCANE
python main.py --name "Dagger" --affinity "Flame Art" 10 20 30 10 15 40
The code is entirely based off the work from u/TarnishedSpreadsheet which uses game data files to figure out the formulas and coefficients. It makes extensive use of lookup tables as a result.
There are 5 Stats:
- Strength (stre)
- Dexterity (dext)
- Intelligence (inte)
- Faith (fait)
- Arcane (arca)
There are 5 Damage Types:
- Physical
- Magic
- Fire
- Lightning
- Holy
The typical flow is as follows:
- Choose Stats (allocate strength, dexterity, intelligence, faith and arcane).
- Choose Weapon Characteristics:
- Name
- Affinity (if applicable: Standard, Heavy, Keen, Quality, Magic, Cold, Fire, Lightning, Holy, Blood, Poison, Occult, etc)
- Upgrade Level (Up to +10 for uniques, or +25 for standard).
- Using the Name and Affinity, to determine the Weapon Info, for each damage type (Phys/Magic/:
- Formula Set : This is a group of four formulas and coefficients which caclulate a Scaling Factor given a Stat.
- Scaling Config: This is whether a DamageType is scaled by Stat (25 possible pairs, organized in a tuple of booleans)
- Once we know the Formula Set and Scaling Config, we can apply the formulas and compute the Scaling Factor for each DamageType-Stat pair.
- Using the Name, Affinity and Upgrade Level we can lookup:
- Attack Rating for each DamageType
- Scaling Rating for each Stat
- Using the Attack Rating, Scaling Rating, and Scaling Factor (for each Stat) we can compute the final Attack Rating of the weapon.
- Refactor
lookup_*.py
scripts for better naming:lookup_scaling_id_to_config
can be combined withlookup_weapon_info
- Change the names for the lookup table helpers to be less verbose
- Passive Effects like Blood, Frost, Poison, etc
- Sorcery and Incantation Scaling
All the formulas and calculation comes from the creators of this spreadsheet:
https://docs.google.com/spreadsheets/d/1JdkVb-llZHPhMD-IwO8d2o1jtHhiTIXbcJv0YzC8ZHY/copy
https://www.reddit.com/r/Eldenring/comments/tbco46/elden_ring_weapon_calculator/i0xlhi1/?context=3
u/TarnishedSpreadsheet