Giter VIP home page Giter VIP logo

d4inv2img's Introduction

d4inv2img

This is a utility for Diablo 4 that saves all items in your stash as images. gif

It uses mss for screen capture, OpenCV for detecting the item, and pyautogui for mouse movement.

How to use

  1. Source: Install requirements.txt & run main.py. Precompiled Binary: Unzip main.7z, run main.exe.
  2. Hover over the first item in your stash and press 'F2' (default)
  3. The script will go through each item and save the images to the "Inventory" subdirectory.

Diablo 4 Settings

  1. Font scale medium
  2. Advanced Tooltips Enabled
  3. Hud Centered
  4. Colorblind off
  5. Designed for fullscreen 1920x1080 monitor, but I've included a function to try to compensate for differing resolutions

"Will this get me banned?"

  • This program does not read the memory of the game. It does not click or otherwise interact with the game in any way other than moving the mouse across the screen. It uses computer vision to detect the items, and uses the pyautogui module to move the mouse. Use at your own risk.

Troubleshooting:

  1. Item not detected: You can try altering the min_width, max_width, min_height, max_height parameters of crop_image() which are what determines the size of the item box it is looking for. My default values are designed to account for resolutions of up to 1920x1080, but bigger monitors may need to manually adjust this. Also, it's possible for the mouse movement to fail to highlight the item. I've added a 'jiggle' mechanic to mediate this, but you can try adjusting the duration of the mouse movements as well.
  2. Antivirus Note: This program uses a keyboard hook to listen for "f2" and "f3" to start and stop the script, respectively. Some antivirus programs may warn you about this or require you to run the script with admin rights.
  3. Image not of item: I tried to prevent erroneous item detection by using color thresholding to detect if the cell is empty, but this is unreliable by nature. If the image only partially contains the item box, try adjusting the parameters of crop_image and make sure your settings match what is listed above.

d4inv2img's People

Contributors

zappybiby avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.