|
1 | | -# D4 Loot Filter |
| 1 | +#  |
2 | 2 |
|
3 | | -## Linting |
4 | | -The CI will fail if the linter would change any files. You can run linting by with: |
| 3 | +Filter items in your inventory based on affixes, aspects and thresholds of their values. For questions join the [discord]() or use github issues. |
| 4 | + |
| 5 | +@Blizzard, please dont take this away from us. I can not bear to look at another affix... |
| 6 | + |
| 7 | +## Getting Started |
| 8 | + |
| 9 | +### Game Settings |
| 10 | +- Supported resolutions: 1920x1080 |
| 11 | +- Font size must be set to small in the Gameplay Settings |
| 12 | + |
| 13 | +### Run |
| 14 | +- Execute d4lf.exe |
| 15 | +- When ingame and you want to filter items in your inventory. Press F11 |
| 16 | +- All items that do not match any of your filter configs will be marked as junk |
| 17 | + |
| 18 | +Note: If the item description doesnt show while hovering and is very laggy, try to move to another area without any events and less people around. |
| 19 | + |
| 20 | +### Configs |
| 21 | +The config folder contains: |
| 22 | +- __filter_aspect.yaml__: Filter settings for aspects. |
| 23 | +- __filter_affix.yaml__: Filter settings for affixes. |
| 24 | +- __params.ini__: Different hotkey settings. Mainly you want to adjust your hotkey to open the inventory. |
| 25 | +- __game.ini__: Settings regarding color thresholds and image positions. You dont need to touch this. |
| 26 | + |
| 27 | +## How to filter |
| 28 | +### Aspects |
| 29 | +In [config/filter_aspect.yaml](config/filter_aspect.yaml) any aspects can be added in the format of `[ASPECT_KEY, THERSHOLD, CONDITON]`. The condition can be any of `[larger, smaller]` and defaults to `larger` if no value is given. |
| 30 | + |
| 31 | +For example: |
| 32 | +```yaml |
| 33 | +Aspects: |
| 34 | + # Filter for a perfect umbral |
| 35 | + - [aspect_of_the_umbral, 4] |
| 36 | + # Filter for any umbral |
| 37 | + - aspect_of_the_umbral |
| 38 | +``` |
| 39 | +Aspect keys are lower case and spaces are replaced by underscore. You can find the full list of keys in [assets/aspect.json](assets/aspects.json). If Aspects is empty, all legendary items will be kept. |
| 40 | +
|
| 41 | +### Affixes |
| 42 | +Affixes have the same structure of `[AFFIX_KEY, THERSHOLD, CONDITON]` as described above. Aditionally it can be filtered by `itemType`, `minPower` and `minAffixCount`. See the list of affix keys in [assets/affixes.json](assets/affixes.json) |
| 43 | + |
| 44 | +```yaml |
| 45 | +Filters: |
| 46 | + # Search for armor and pants that have at least 3 affixes of the affixPool |
| 47 | + - Armor: |
| 48 | + itemType: [armor, pants] |
| 49 | + minPower: 725 |
| 50 | + affixPool: |
| 51 | + - [damage_reduction_from_close_enemies, 10] |
| 52 | + - [damage_reduction_from_distant_enemies, 12] |
| 53 | + - [damage_reduction, 5] |
| 54 | + - [total_armor, 9] |
| 55 | + - [maximum_life, 700] |
| 56 | + minAffixCount: 3 |
| 57 | +``` |
| 58 | + |
| 59 | +Note: If an itemType is not included in your filters, it will keep all of the items of that type. Thus, if you do not specify anything for itemType=gloves, all gloves will be kept. |
| 60 | + |
| 61 | +## Develop |
| 62 | + |
| 63 | +### Python Setup |
| 64 | +- Install [miniconda](https://docs.conda.io/projects/miniconda/en/latest/) |
| 65 | +```bash |
| 66 | +git clone https://github.com/aeon0/d4lf |
| 67 | +cd d4lf |
| 68 | +conda env create environment.yaml |
| 69 | +conda activate d4lf |
| 70 | +python src/main.py |
| 71 | +``` |
| 72 | + |
| 73 | +### Linting |
| 74 | +The CI will fail if the linter would change any files. You can run linting with: |
5 | 75 | ```bash |
6 | 76 | conda activate d4lf |
7 | 77 | black . |
|
0 commit comments