Skip to main content

Save contacts from your terminal

Project description

d2vs

what is this

diablo 2 vision system is a library to assist with the automation of d2, using only pixels, keyboard and mouse

installation

$ pip install d2vs

NOTE: this can run via CPU, but via GPU is far superior. You must install CUDA and the appropriate python jazz to get that working, for me with CUDA10.1:

$ conda install torch torchvision cudatoolkit=10.1 -c pytorch

usage

image

(586_gold.png)

import numpy as np
from d2vs.ocr import OCR
from PIL import Image

# Initiate OCR
ocr = OCR()

# Load an Image
img = Image.open("586_gold.png")

# Scan the image
bounds, text, item_type = ocr.read(img)

# Print out the data for demo purposes
top_left, top_right, bottom_right, bottom_left = bounds
print(top_left, top_right, bottom_right, bottom_left)
# ([2, 2], [158, 2], [158, 32], [2, 32])

print(text)
# '586 Gold'

print(item_type)
# 'Normal'

project goals

  • Have fun automating single player! Not for profit
  • OCR with near 100% accuracy
  • Visually determine where you are in game, area level and world coordinate system
  • Click from world coords to screen coords
  • Path through unexplored areas to a goal
  • Facilitate complete d2 bot from lvl 1 to 99
  • Pick it

image

an example map reading from d2vs of black marsh

image

nodes for the static map Harrogath

development

setup

$ git clone ...
$ pip install -r requirements.dev.txt

running tests

$ pytest

distributing

$ python setup.py sdist bdist_wheel
$ twine upload dist/*

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

d2vs-0.0.3.tar.gz (14.0 MB view hashes)

Uploaded Source

Built Distribution

d2vs-0.0.3-py3-none-any.whl (14.0 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page