Skip to content

Apply d4lf patch#627

Open
chrizzocb wants to merge 16 commits intod4lfteam:mainfrom
chrizzocb:feature/d4lfpatch
Open

Apply d4lf patch#627
chrizzocb wants to merge 16 commits intod4lfteam:mainfrom
chrizzocb:feature/d4lfpatch

Conversation

@chrizzocb
Copy link

Release notes — Paragon Import/Export + Integrated Paragon Overlay

This patch adds full Paragon JSON export to D4LF’s build importers and integrates a Paragon overlay directly into D4LF (no separate overlay executable needed). It also improves naming consistency across sources and restores live file logging.

What’s new

Paragon Import / Export (to overlay-compatible JSON)

Export boards with rotation (0/90/180/270), glyph slug (if present), and a 21×21 node map (441 nodes) per board.

Export location defaults to ~/.d4lf/paragon (or your configured user dir).

Integrated Paragon overlay

Overlay module is now shipped inside D4LF and can be launched as a dedicated mode of the same app.

Multi-JSON folder loading

Overlay can load a single JSON file or a folder containing multiple *.json builds, with a build selector.

Configurable global hotkey toggle

New hotkey setting to start/stop the overlay (default F10).

CLI support

d4lf.exe --paragon-overlay ""

Importer improvements

Mobalytics: exports stable, “friendly slug” names.

Maxroll: exports friendly slugs instead of internal IDs and fixes missing helper references that could crash export.

D4Builds: fixes Paragon navigation logic and improves board naming; adds class-prefixed slugs for consistency.

Fixes

Live logfile writing restored

Fixes a regression where D4LF stopped updating live logs under d4lf/logs by preserving the file handler during GUI initialization.

Overlay reliability

Startup stability improvements and easier diagnostics via overlay-side logging.

Adds a practical recovery for “off-screen” overlay placement (delete d4_overlay_config.json next to d4lf.exe to reset).

New / used configuration keys

advanced_options.toggle_paragon_overlay (default: F10)

advanced_options.paragon_overlay_source_dir (set via the “Paragon Folder” button; defaults to ~/.d4lf/paragon)

Notes / limitations

Overlays typically won’t render over exclusive fullscreen; use borderless windowed in Diablo IV.

Website DOM changes can break scrapers (importers may need selector updates over time).

Copy link
Contributor

@cjshrader cjshrader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for your work here, this is a good start and will be a cool feature.

Beyond the comments I've left, can you also make sure you've run prek and resolved any issues it might report?

https://github.com/d4lfteam/d4lf/blob/main/README.md#formatting--linting


Output format is a JSON list with a single entry, so it can be consumed by tools that expect a list.
"""
out_dir = IniConfigLoader().user_dir / "paragon"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can discuss more in discord because I'm open to discussion, but right now I'm not entirely sold on having a separate file for paragon points. Why can't we just have it be part of the imported yaml profile? And then the active one is decided a lot like profiles, we have a property that they set for which profile should be used for paragon? But let's discuss.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats your name at discord ? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you not Stillwater? No way two people were independently working on this exact same feature?

Copy link
Author

@chrizzocb chrizzocb Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE-I agree with the concern about a separate Paragon points file.
I updated the implementation so the imported Paragon payload is embedded directly into the generated/updated YAML profile under a top-level Paragon key.

The overlay still keeps the build/profile switcher, because users can have multiple D4LF profiles “active” and need a quick way to choose which Paragon payload is currently displayed. To avoid requiring manual config edits, I also persist the last selected profile/build so the overlay can reopen in the same state.

@@ -0,0 +1,639 @@
# Integrated into D4LF as src.paragon_overlay
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is very inconsistent with our existing code base. There is a lot here that I have no idea what it's doing or if it's needed. We're able to draw on the screen just fine in other code without 100 lines of constants, and it makes it difficult to evaluate what this code does. In vision_mode_with_highlighting and vision_mode_fast we use tkinter for drawing, can we not use tkinter here? And note we have things like Cam and ResManager to help us manage resolution changes, I think you'll be setting yourself up for errors if you're not using those.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll aim to: (1) replace the Win32 overlay with a tkinter canvas overlay, (2) route all coordinate/scaling through Cam/ResManager, and (3) remove the large constants/proc boilerplate. If you’d like, I can do this as a separate PR to keep review scope small.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR is fine, all the changes will be to this code anyway which is new code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE -I refactored the new paragon_overlay to match the existing codebase style: the Win32/ctypes layered overlay and constant boilerplate are removed and replaced with a tkinter Canvas overlay (similar to the vision modes). Window sizing is now driven via Cam.window_roi where available and ResManager().resolution for resolution/scaling, avoiding custom DPI/screen calculations. Also ran prek to ensure ruff passes.

@chrizzocb chrizzocb requested a review from cjshrader February 1, 2026 21:32
from src.utils.process_handler import kill_thread, safe_exit
from src.utils.window import screenshot

if sys.platform == "win32":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can assume we're running on Windows

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE — removed the sys.platform == "win32" guard and treated Windows as the default runtime

@@ -0,0 +1,639 @@
# Integrated into D4LF as src.paragon_overlay
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR is fine, all the changes will be to this code anyway which is new code

README.md Outdated

Each window gives further instructions on how to use it and what kind of input it expects.

- Paragon overlay does not appear / does nothing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fine in common issues, just below the GUI closing with no error

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — moved the overlay troubleshooting item back under Common issues, directly below “GUI closes with no error”.

I updated the overlay to load Paragon data from the current profiles/*.yaml format (top-level Paragon written by paragon_export.py), while keeping legacy .json support for older exports. Also updated the default source directory and README references from ~/.d4lf/paragon/*.json to ~/.d4lf/profiles/*.yaml to match the new workflow
Update importer checkbox label and description

Align README wording with new Paragon workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants