ryunp wrote:MedianUV wrote:The way you constructed the GUI, especially ... well played
I've failed to update this app many times in the past because I would get caught up building a framework for UI components. This time everything is statically defined and while not being completely satisfied with the approach, it works fine. I've tried to at least separate concerns into their own files.
MedianUV wrote:One thing that I rely heavily upon that you don't seem to do is ImageSearch
I was not able to get ImageSearch to perform correctly despite using variations in parameters, image croppings, and image types. I would love to know how you get it to work properly. Hit me up in Discord, we can collab and both learn some stuff!
My next major update is to add a Crafting tab to support moving over the item being rerolled and automatically placing crafting materials in cube. I've prototyped logic for this before, but couldn't get the image detection working. A big concern is different resolutions/renderers may cause matching issues.
1. full screen and windowed mode colors are different iirc. I solved it by using 2 sets of cropped images, one for each. might have used disable desktop composition.
2. your image has to be cropped so that it doesn't include the background square (0 pixels from it), while still being unique to the item. so what MedianUV did is not good, as it will only work for him and maybe a few other people. you can check my crops in my script/images.
3. i used tolerance 10 it seems. I remember testing this a bunch.
4. im probably forgetting something else, since I did this a long time ago. brightness/gamma/video mode also probably affects the images.
5. i used cropped images of each square (they are all a bit different due to the background) to detect empty ones, so I could make the script move items from stash<->inv, etc.
this doesn't mean this is the best approach, it's just something that worked for my script and people that used it.
a much better approach would be to look at d2stats item handling code and use it for this.
aerial wrote:Another useful feature would be reopening gambling screen with press of 1 button.
this one is a bit tricky, it's hard to get it to work 100%, at least when I tried it. clicking on the npc keeps it from moving though, that helps. but using image search is harder since the npc is animated, and might move if not clicked on constantl/often enough.
again, reading the npc from the game's memory would be a better approach.