nightpanda2810
Well-known member
Hey everyone! Been working on this since shortly after receiving my single D20 from https://gamewithpixels.com/ Kickstarter. I was already learning some Python, barely, when an idea to integrate these dice with HeroLab popped into my head. Now on the FOURTH version of this since I started.
Initially, I had a crude UI that grabbed the data from the HeroLab website to display on screen. Then I rewrote it, into a prettier UI, but still didn't really like it. I realized I could instead duplicate the modifiers on screen in the browser, and modify those. That's where V3 came from, using the Playwright browser automation library. I still wasn't very happy with it, but it worked, with poor performance.
Now for V4, it still does the same as V3 but instead of using Playwright, which uses a ton of system resources (not to mention huge battery life hit on my laptop) it uses a Chrome extension with a Python backend.
Public link coming soon! Still some things to work out to be ready for others to use. There is some discussion on this in the Pixels official discord under Community Projects, as well as a short video demonstrating it in action (the old method, but still works the same).
Works with Pathfinder, Pathfinder 2e, and Starfinder on HeroLab. Also works with the web-based pathbuilder for 2e, just not for weapon modifiers.
How it works:
This does NOT modify Hero Lab or your character in any way, it only modifies what you see when the page is loaded.
Chrome extension:
Initially, I had a crude UI that grabbed the data from the HeroLab website to display on screen. Then I rewrote it, into a prettier UI, but still didn't really like it. I realized I could instead duplicate the modifiers on screen in the browser, and modify those. That's where V3 came from, using the Playwright browser automation library. I still wasn't very happy with it, but it worked, with poor performance.
Now for V4, it still does the same as V3 but instead of using Playwright, which uses a ton of system resources (not to mention huge battery life hit on my laptop) it uses a Chrome extension with a Python backend.
Public link coming soon! Still some things to work out to be ready for others to use. There is some discussion on this in the Pixels official discord under Community Projects, as well as a short video demonstrating it in action (the old method, but still works the same).
Works with Pathfinder, Pathfinder 2e, and Starfinder on HeroLab. Also works with the web-based pathbuilder for 2e, just not for weapon modifiers.
How it works:
This does NOT modify Hero Lab or your character in any way, it only modifies what you see when the page is loaded.
Chrome extension:
- Finds any elements on the web page that match the specific items programmed element selector (filtered for modifiers, such as +2 or -1) and duplicates them.
- Then it takes those duplicates and modifies them to become the total of the die rolled, plus the original modifier. See below for how it gets this.
- Sometimes, the original modifier changes, which normally would make the duplicate no longer valid. Resolved in the next point.
- The duplicates are constantly getting deleted and recreated. Changes in the webpage layout, as well as changes in the original modifier, would normally break the integration or show incorrect values.
- Connects to the specified dice using die_id found in the Pixels app.
- Runs a web socket server to send the data to the Chrome extension.
- Logs die roll history in CSV and/or Excel files.
- Logs die roll history to MongoDB Atlas cloud database. I intend on doing something with this later.
- I only have one D20, and while I have built-in logic for multiple dice connections, that is all so far.
- Only works on PC. Android may be possible with a browser that supports extensions, however haven't figured out how to do this yet.