Skip to content

BananaHolograma/diablo3-loot-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disclaimer

diablo3_logo

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.

Getting started

I used this document as reference to start thinking around the loot table.

Python virtual env

# 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

General overview

  • 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.

Usage

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

Update the equipment .json files

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.

Starting a loot

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

loot.py

About

This is an approximation of how Diablo III loot tables could be implemented written in python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages