Image generated with Stable-Diffusion
The information for the equipment contained in this repository has been extracted from an official source. All rights to the data belong to Blizzard. This repository is provided for educational purposes only and should not be considered an official source of information. We are not responsible for any inaccuracies or errors in the data provided here. Please refer to the official source for updated and accurate information.
I used this document as reference to start thinking around the loot table.
# Install required libraries to work with the loot system
pip install -r requirements.txt
# Initialize the virtual environment
python -m venv venv && source venv/bin/activate
- The main file
loot.py
is where the functionalities are brought together to start a loot process using character and source information. - The module
character.py
allow us to build a new character along with the relevant class types and validations when assigning levels. - The
scrapper folder
, where the real game items from Diablo 3 official website are extracted for subsequent processing in json files. - The data folder contains all the information about the items that the loot will work with, as well as the master table
loot_table.json
that defines the generation rules.
Short Form | Long Form | Description |
---|---|---|
-l | --level | The level for your character between 1 and 70 |
-o | --output | Output file name in which you need to save the results in json format. |
-c | --character-class | Character class [barbarian,wizard,monk,witch doctor,crusader,necromancer,demon hunter] |
-h | --help | show the help message and exit. |
-s | --num-simulations | The number of simulations to run |
-v | --version | Shows the actual script version |
If you want to update the equipment list, simply run:
python scrapper/equipment.py
and it will update the .json files inside data folder except for loot_table.json
which is the master table and needs to be updated manually.
We can customize the inputs to generate loots for differente characters, levels and the number of simulations to made
# Make sure you are using the virtual environment before execute it
source venv/bin/activate
# Examples
(venv) ➜ python loot.py --level 61 -c monk
(venv) ➜ python loot.py -l 50 --character_class "witch doctor" # Wrap around quotes to allow whitespaces
(venv) ➜ python loot.py --level 2 -c wizard --num-simulations 10000