Tool for retrieving information from Diablo 2 data files
Project description
d2lib is a tool for retrieving information from Diablo 2 data files. These files contain info about the character, items and their properties.
Supported files:
.d2s - Diablo 2 save files;
.d2x - PlugY personal stash files;
.sss - PlugY shared stash files.
Installation
Prerequisites
Python 3.6+
You can install d2lib using pip:
pip install d2lib
Usage
from d2lib.files import D2SFile, D2XFile, SSSFile
d2s_file = D2SFile('tests/data/test_d2s.d2s')
d2x_file = D2XFile('tests/data/test_d2x.d2x')
sss_file = SSSFile('tests/data/test_sss.sss')
# Character attributes.
print(d2s_file.char_class)
print(d2s_file.char_name)
print(d2s_file.char_level)
print(d2s_file.is_died)
print(d2s_file.last_played)
print(d2s_file.attributes)
print(d2s_file.skills)
# Get all unique items.
for item in d2s_file.items:
if item.is_unique:
print(item.level)
print(item.name)
print(item.base_name)
print(item.magic_attrs)
# or for stash files
for page in d2x_file.stash: # there may also be a SSSFile instance
for item in page['items']:
if item.is_unique:
print(item.level)
print(item.name)
print(item.base_name)
print(item.magic_attrs)
Acknowledgments
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
d2lib-0.0.1.tar.gz
(17.1 kB
view hashes)
Built Distribution
d2lib-0.0.1-py2.py3-none-any.whl
(46.9 kB
view hashes)
Close
Hashes for d2lib-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93149f26e304575bd6f903a6d8f536eaac62fef6f2319ca6d2194e5ee8d114c3 |
|
MD5 | bfa7b62a63a173c7f9c4c1c4782e104a |
|
BLAKE2b-256 | fd2aec65e85840438edb58f510b941c011bbe8942d1bcfe66c49103a3802158e |