aeon0 / d4lf Goto Github PK
View Code? Open in Web Editor NEWDiablo 4 Loot Filter
License: MIT License
Diablo 4 Loot Filter
License: MIT License
#250 removed import documentation from README.md, I was pretty confused about the feature mentioned in the issues but nowhere else.
[3.2.4 2023-11-22 22:39:18,943] INFO Using WinAPI to search for window: Diablo IV.exe
[3.2.4 2023-11-22 22:39:18,945] INFO Found Window Res: 1920x1017
[3.2.4 2023-11-22 22:39:18,946] ERROR The resoltuion: 1920x1017 is not supported.
I am new to python :)
Could you please share the command to build the .exe ?
Validate yaml against multiple keys of the same kind e.g. affixPool.
Make sure validation error are part of the log.
I am using this conf.
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:
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
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:
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:
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.
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.
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
Is it possible to add autobuy on filter match at vendor?
it should be
git clone https://github.com/aeon0/d4lf
cd d4lf
conda env create -f environment.yaml
conda activate d4lf
python src/main.py
you are missing the -f parameter and it's environment.yml instead of environment.yaml
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",
d4lf is unable to process Vault Sigils.
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.
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
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
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
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?
unique "rainment_of_the_infinite" should be "raiment_of_the_infinite"
Hi, is there any way to filter only the affixes without aspects?
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
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
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.
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.
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. :)
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
Would be good to have something based on matching builds from websites, for example:
[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
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```
Says:
No premission to check
should say:
No permission to check
is there a way to show all the matching rules for an item affixes ?
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```
When a rule matches. Is it possible to have it display the rule name that matches with the box that surrounds the loot? Thanks!
Underscores in the value for the life_on_hit affix definition is causing parsing issues:
d4lf/assets/lang/enUS/affixes.json
Line 272 in c425732
Legendaries with imprinted aspects should not be shown green for an aspect check, but only for affixes
Currently this shows green, the same as items matching whitelist. Would be nice if this was changed to yellow/orange or something to quickly ID it.
It would be great to be able to use "any_resistance" without specifying which one
It would be nice to have to see the evaluation as well on items in the shops
It would be nice if we could also filter sigils based on dungeons and affixes.
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)
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()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.