Giter Club home page Giter Club logo

d4lf's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

d4lf's Issues

PR 250 removed import doc

#250 removed import documentation from README.md, I was pretty confused about the feature mentioned in the issues but nowhere else.

Minor improvements

Validate yaml against multiple keys of the same kind e.g. affixPool.

Make sure validation error are part of the log.

UnboundLocalError

Getting the following error:

Exception in thread Thread-7 (_wrapper_run_loot_filter):
Traceback (most recent call last):
File "threading.py", line 1045, in _bootstrap_inner
File "threading.py", line 982, in run
File "overlay.py", line 139, in _wrapper_run_loot_filter
File "loot_filter.py", line 86, in run_loot_filter
File "loot_filter.py", line 65, in check_items
File "item\read_descr.py", line 205, in read_descr
UnboundLocalError: cannot access local variable 'lines_to_add' where it is not associated with a value

It happens when scanning this item specifically:
Picture1

aspects & affixes below for reference.

# Necromancer
- [aspect_of_ultimate_shadow, 2900]
- [bloodsoaked_aspect, 1800]
- [aspect_of_grasping_veins]
- [blighted_aspect, 100]
- [aspect_of_shielding_storm, 5]
- [conceited_aspect, 25]
- [aspect_of_exposed_flesh]
- [splintering_aspect]
- [aspect_of_serration]
- Armor:
    itemType: [chest armor, pants]
    minPower: 750
    affixPool:
    - [damage_reduction_from_close_enemies, 10]
    - [damage_reduction_from_affected_by_shadow_damage_over_time_enemies, 3.5]
    - [damage_reduction, 10]
    - [maximum_life, 900]
    minAffixCount: 3

Obligatory Affixes

I see no way to add obligatory affixes.
Say for example we look for boots which have to have intelligence, but also movement speed + 1 resistance or 2 resistances.

It could be done using a dedicated tag, something like:

Affixes:

  • BootsTest:
    itemType: boots
    minPower: 700
    obligatory:
    - [intelligence]
    affixPool:
    - [movement_speed]
    - any_of:
    - [poison_resistance]
    - [cold_resistance]
    - [lightning_resistance]
    minAffixCount: 2

or - using the existing structure - multiple affixPools.
If the tool would parse multiple affix pools and discard an item as soon as the item does not fit a pool, we could do something like:

Affixes:

  • BootsTest:
    itemType: boots
    minPower: 700
    affixPool:
    - [intelligence]
    minAffixCount: 1
    affixPool:
    - [movement_speed]
    - any_of:
    - [poison_resistance]
    - [cold_resistance]
    - [lightning_resistance]
    minAffixCount: 2

I tried the latter but sadly it does not work, Items fitting the second affix pool are accepted ("greenlit") even if they don't sport intelligence, I guess the program either ignores the first affixpool or greenlights an item as soon as one affixpool fits the item.

Filter junking items incorrectly

Heya, this may well be user error, if so, very sorry!

I believe d4lf is junking some items that fit my profile, and can't see any immediate issues with my config that would cause the issue.

image

image

these two items I expect to be green instead of red.

I would expect the wand and helm to be green as as they have intelligence and maximum_life, therefore hits the minCount

My profile (C:\Users\user.d4lf\profiles\shadowNecro.yaml)

Affixes:
  - AwesomeHelm:
      itemType: helm
      minPower: 800
      affixPool:
      - count:
            - intelligence
            - cooldown_reduction
            - maximum_life
        minCount: 2
  - AwesomeChestArmor:
      itemType: chest armor
      minPower: 800
      affixPool:
      - count:
            - to_golem_mastery
            - maximum_life
            - armor
        minCount: 2
  - AwesomeGloves:
      itemType: gloves
      minPower: 800
      affixPool:
      - count:
            - to_skeletal_mage_mastery
            - attack_speed
            - critical_strike_chance
        minCount: 2
  - AwesomePants:
      itemType: pants
      minPower: 800
      affixPool:
      - count:
            - to_skeletal_mage_mastery
            - maximum_life
            - dodge_chance
        minCount: 2
  - AwesomeBoots:
      itemType: boots
      minPower: 800
      inherentPool:
      - count:
            - attacks_reduce_evades_cooldown_by_seconds
        minCount: 1
      affixPool:
      - count:
            - intelligence
            - dodge_chance
            - movement_speed
        minCount: 2
  - AwesomeAmulet:
      itemType: amulet
      minPower: 800
      affixPool:
      - count:
            - critical_strike_chance
            - movement_speed
            - to_hellbent_commander
        minCount: 2
  - AwesomeRing:
      itemType: ring
      minPower: 800
      affixPool:
      - count:
            - critical_strike_chance
            - attack_speed
            - maximum_life
        minCount: 2
  - AwesomeWand:
      itemType: wand
      minPower: 800
      affixPool:
      - count:
            - intelligence
            - maximum_life
            - critical_strike_damage
        minCount: 2
  - AwesomeFocus:
      itemType: focus
      minPower: 800
      affixPool:
      - count:
            - critical_strike_chance
            - cooldown_reduction
            - intelligence
        minCount: 2

my params.ini

[general]
; Which filter profiles should be run. All .yaml files with "Aspects" and "Affixes" sections will be used from
; config/profiles/*.yaml and C:/Users/USERNAME/.d4lf/profiles/*.yaml
profiles=shadowNecro
; Whether to keep aspects. Can be all, upgrade, none
keep_aspects=upgrade
; Whether to run vision mode on startup or not
run_vision_mode_on_startup=True
; Which tabs to check. Note: All 6 Tabs must be unlocked!
check_chest_tabs=1,2
; Transparancy of the overlay when not hovering it (has a 3 second dealy after hovering)
; The "shown" transparncy is 0.94
hidden_transparency=0.35
; In case you get a warning about the LocalPref file not being found, you can either ignore the warning,
; or specify the correct path for your system here
local_prefs_path=

[char]
; Hotkey to open inventory
inventory=i

[advanced_options]
run_scripts=f9
run_filter=f11
exit_key=f12
log_lvl=info
scripts=vision_mode
process_name=Diablo IV.exe

Lucky Hit Execute Incorrect in Affixes.json

Line 79 needs to be updated to below as it currently cannot read the affix

"lucky_hit_up_to_a_chance_to_execute_injured_nonelites": "lucky hit up to a chance to execute injured nonelites",

Import Build fails with all browser options

Initially I tried this with firefox, then tried chrome and edge, and for me none of them do anything on Windows 11.

I got firefox to open the window once, but it didn't do anything, and I can't get the window to open again.

No errors appear in the log, no window or tab opens whether the browser is open before pressing the hotkey or closed, just nothing; and on top of that, it locks up d4lf until I close it altogether, not even ctrl+C works quite right to end the process.


Here are some rather sparse Logs, despite log_lvl=debug
[5.1.1 2024-05-22 05:49:57,426] INFO Using WinAPI to search for window: diablo iv.exe
[5.1.1 2024-05-22 05:49:57,431] INFO Found Window Res: 3440x1440
[5.1.1 2024-05-22 05:49:57,659] INFO Adapt your custom configs in: C:\Users\Pwnjo.d4lf
[5.1.1 2024-05-22 05:49:57,664] INFO Loading profile sigils: Sigils
[5.1.1 2024-05-22 05:49:57,674] INFO Loading profile sminion-level: Affixes Uniques
[5.1.1 2024-05-22 05:50:01,673] INFO Paste maxroll.gg build guide or planner build here ie https://maxroll.gg/d4/build-guides/minion-necromancer-guide
My params.ini
[general]
; Which filter profiles should be run. All .yaml files with "Aspects" and "Affixes" sections will be used from
; config/profiles/*.yaml and C:/Users/USERNAME/.d4lf/profiles/*.yaml
profiles=sigils,sminion-level
; from C:\Users\Pwnjo\.d4lf

; Whether to keep aspects. Can be all, upgrade, none
keep_aspects=upgrade
; upgrade includes undiscovered aspects

; How to handle rares. Can be filter, ignore, junk
handle_rares=filter
; it's so cheap now

; Whether to run vision mode on startup or not
run_vision_mode_on_startup=False
; too slow

; Which tabs to check. Note: All 6 Tabs must be unlocked!
check_chest_tabs=1

; Transparancy of the overlay when not hovering it (has a 3 second dealy after hovering)
; The "shown" transparncy is 0.94
hidden_transparency=0.35

; Which browser to use to get builds, Chrome, Edge, or Firefox are currently supported
; Note: edge and firefox are not well tested, use chrome to be on the safe side
browser=firefox

[char]
; Hotkey to open inventory
inventory=g

[advanced_options]
; Run the filter
run_filter=f4
; Exit
exit_key=f6
; Open browser to import a build
import_build=f7

; Which scripts to run
scripts=vision_mode
; Run scripts, eg vision or potting
run_scripts=f1

; Debug level
log_lvl=debug
; Process to look for
process_name=Diablo IV.exe


Edit: see below

Always getting this error i need some help

2:43,615] WARNING Could not detect item_seperator_short.
[1.3.3 2023-11-05 14:32:43,645] WARNING Failed to read properties. Keeping it
[1.3.3 2023-11-05 14:32:50,058] ERROR Could not detect item descr. Timeout reached. Continue
[1.3.3 2023-11-05 14:32:53,792] INFO Stoping Filter process

unsupported resolution

just found out about this, and sadly my resolution isnt supported, any chance you can add support for 3840x1600, is there anything you need from me to do so?

Fails to properly recognize The Grandfather

Console showed this warning when I (very luckily) had The Grandfather drop:

[3.3.1 2023-12-19 05:35:55,124] WARNING    item.read_descr.read_descr: Could not find affix: ignores loss

Importing build guide error "validation error for AffixFilterModel"

Using this planner: https://maxroll.gg/d4/planner/yu4up0w5#1

[5.1.2 2024-05-23 12:02:44,406] INFO       Loading https://maxroll.gg/d4/planner/yu4up0w5
[5.1.2 2024-05-23 12:02:50,913] INFO       Importing Sorcerer The_Pit
[5.1.2 2024-05-23 12:02:52,914] WARNING    utils.build_importer._import_build: Skipping Tibault's Will unique importing currently unsupported
[5.1.2 2024-05-23 12:02:53,904] WARNING    utils.build_importer._import_build: Skipping Esadora's Overflowing Cameo unique importing currently unsupported
[5.1.2 2024-05-23 12:02:54,364] WARNING    utils.build_importer._import_build: Skipping Tal Rasha's Iridescent Loop unique importing currently unsupported
[5.1.2 2024-05-23 12:02:58,450] ERROR      utils.build_importer.import_build: An error occurred importing the build 1 validation error for AffixFilterModel
name
  Value error, affix attacks_reduce_evade's_cooldown_by_seconds does not exist [type=value_error, input_value="attacks_reduce_evade's_cooldown_by_seconds", input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/value_error. retrying```

https://i.imgur.com/ssZJVOP.png

support multiple languages

Please support multiple languages.
Could you add a language setting and separate the asset folder so that it can be used in languages other than English?
It seems like it would be up to the users of each language to fill in the actual data themselves.

Nightmare Sigils affixes broken after patch 1.3.1 (All Platforms)

With 1.3.1 monster levels are now included in Sigils, an need cleaned from the affix reads.

[4.1.2 2024-02-01 14:29:10,748] INFO Retry item detection
[4.1.2 2024-02-01 14:29:11,858] WARNING Could not find affix: [cleaned]: monster level �s, [raw]: monster level: 85 �dungeon affixes
[4.1.2 2024-02-01 14:29:13,072] INFO Retry item detection
[4.1.2 2024-02-01 14:29:14,036] WARNING Could not find affix: [cleaned]: monster level you deal more physical damage., [raw]: monster level: 86 you deal 15% more physical damage.
[4.1.2 2024-02-01 14:29:15,220] INFO Retry item detection
[4.1.2 2024-02-01 14:29:16,150] WARNING Could not find affix: [cleaned]: monster level you find more gold., [raw]: monster level: 88 you find 30% more gold.

Here are several logged failed sigils

Validation Errors from scraped profile

I had the tool scrape: https://maxroll.gg/d4/planner/qqvi0wdb

I get the following errors:
[5.1.1 2024-05-22 19:06:06,891] ERROR item.filter.load_files: Validation errors in C:\Users\CG.d4lf\profiles\shadowendgame.yaml
[5.1.1 2024-05-22 19:06:07,073] ERROR item.filter.load_files: 10 validation errors for ProfileModel
Affixes.0.NecromancerHelm.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
Affixes.1.NecromancerChestArmor.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
Affixes.2.NecromancerGloves.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
Affixes.3.NecromancerPants.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
Affixes.4.NecromancerBoots.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
Affixes.5.NecromancerAmulet.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
Affixes.6.NecromancerRing.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
Affixes.7.NecromancerRing2.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
Affixes.8.NecromancerScythe.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
Affixes.9.NecromancerFocus.affixPool.0.minGreaterAffixCount
Value error, must be at least 1 [type=value_error, input_value=0, input_type=int]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
[5.1.1 2024-05-22 19:06:07,076] ERROR item.filter.load_files: Errors occurred while loading profiles, please check the log for details

Changing every "minGreaterAffixCount" to 1 in the profile does solve the errors but that's hardly a solution. :)

Support for controller

Hi aeon0, thank you for the great app.
Is it possible to add support for xbox controllers?
Or you can point me to the direction, I can look into it as well.

Thanks,
Neil

Feature to create .json files based on online builds

Would be good to have something based on matching builds from websites, for example:

  • Use a link of d4builds or mobalytics and automatically generate .json files for it
  • Some UI to organize it, activate or disable builds to check for instead of messing up with json files

ValueError: zero-size array to reduction operation maximum which has no identity

[3.4.2 2024-01-08 13:02:34,295] INFO Items: 9 in Char_Inventory
Exception in thread Thread-5 (_wrapper_run_loot_filter):
Traceback (most recent call last):
File "threading.py", line 1045, in _bootstrap_inner
File "threading.py", line 982, in run
File "overlay.py", line 190, in _wrapper_run_loot_filter
File "loot_filter.py", line 108, in run_loot_filter
File "loot_filter.py", line 50, in check_items
File "item\descr\read_descr.py", line 92, in read_descr
File "item\descr\find_aspect.py", line 30, in find_aspect
File "item\descr\texture.py", line 69, in find_aspect_search_area
File "numpy\core_methods.py", line 41, in _amax
ValueError: zero-size array to reduction operation maximum which has no identity

On this item:
image
image

All leg slot items showing "red" - inherentPool

Leg slot is not matching whitelist. I am only using imported profiles from maxroll. Every other slot is recognized properly by the whitelist. I determined this is a result of inherentPool affix which is no longer on pants, only boots. Maxroll import profile will set the max/minCount to 1/1 by default. It should not generate this line at all.

    - count:
      - {name: while_injured_your_potion_also_grants_maximum_life_as_barrier}
      maxCount: 1
      minCount: 1```

Filter fails to detect affixes

Hello, I noticed that the program is not detecting many affixes.

Both critical strikes and overpower should be detected here.
image

Attack speed should be detected here.
image

Both movement speed and essence reduction should be detected here.
image

importing the build 1 validation error for AffixFilterModel

Thanks for fixing the connection issues to maxroll import. I am unable to import this build. have not tried another planner yet, but will.


DevTools listening on ws://127.0.0.1:60763/devtools/browser/b231114f-3d3c-4405-9d1b-f56263289f8c
[5.1.2 2024-05-23 12:01:05,249] INFO       Loading https://maxroll.gg/d4/planner/ailu5022#4
[23120:620:0523/120109.031:ERROR:device_event_log_impl.cc(195)] [12:01:09.031] USB: usb_service_win.cc:105 SetupDiGetDeviceProperty({{A45C254E-DF1C-4EFD-8020-67D146A850E0}, 6}) failed: Element not found. (0x490)
[5.1.2 2024-05-23 12:01:11,118] INFO       Importing Rapid_Fire_Endgame_Rogue RF_No_Swap_Pit_Boss_Build
[5.1.2 2024-05-23 12:01:11,978] WARNING    utils.build_importer._import_build: Skipping Scoundrel's Kiss unique importing currently unsupported
[5.1.2 2024-05-23 12:01:14,636] ERROR      utils.build_importer.import_build: An error occurred importing the build 1 validation error for AffixFilterModel
name
  Value error, affix attacks_reduce_evade's_cooldown_by_seconds does not exist [type=value_error, input_value="attacks_reduce_evade's_cooldown_by_seconds", input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/value_error. retrying```

Missing aspects of vampire skills

I wanted to ask if the missing vampire skills aspects will be added to the loot filter, that would still be worthwhile, since the new season is not coming until May :)

Kind regards

Screenshot 2024-03-21 003623

Request - Filter Rule Name

When a rule matches. Is it possible to have it display the rule name that matches with the box that surrounds the loot? Thanks!

Resistance

It would be great to be able to use "any_resistance" without specifying which one

Shop Items

It would be nice to have to see the evaluation as well on items in the shops

minCount of 0 not allowed on affixPool

Would it be possible to allow minCount of 0 on the affixPool?
That way I can have the profile with "inactive" affixPools where I have things I want, but not right now.
(I know it is possible to comment out the pool, but I don't see a reason to not allow minCount of 0)

Socketed Gems create false negative (on pants)

From the images you can see that if I socket gems into the pants, the filter indicates these pants are not good but fine with no socketed gems. Not a big deal but kind of annoying. I haven't seen this happen with anything but pants.

image
image

Exception in thread Thread-XX (vision_mode)

I get this error sometimes which removes the overlay from the vision mods script (in 3.4.0):

Exception in thread Thread-20 (vision_mode):
Traceback (most recent call last):
File "threading.py", line 1045, in _bootstrap_inner
File "threading.py", line 982, in run
File "scripts\vision_mode.py", line 144, in vision_mode
File "item\descr\read_descr.py", line 51, in read_descr
TypeError: 'NoneType' object is not subscriptable

Exception in thread Thread-24 (vision_mode):
Traceback (most recent call last):
File "threading.py", line 1045, in _bootstrap_inner
File "threading.py", line 982, in run
File "scripts\vision_mode.py", line 144, in vision_mode
File "item\descr\read_descr.py", line 77, in read_descr
File "item\descr\find_affixes.py", line 53, in find_affixes
TypeError: object of type 'NoneType' has no len()

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.