Closed coldino closed 5 years ago
Interesting. A person here wrote some lua code that generates javascript that you can just paste in to a developer console.
I can run anything on the website that is necessary/helpful. So for example it can be set up to have a text box to paste output from your code to fill in the page. That output could be plain text, or json, or whatever format makes the most sense.
If you'd like to hash out specifics, send me a message on reddit (/u/xanthics) and I'll send you my discord handle.
I've converted mods.txt to mods.json. that is an array of dictionaries That should allow you to have a dynamic mods list so that I can add more mods later without needing to hardcode.
How does the standard of {"label": <something>
, "value": <something>
} as an export from your code sound? Also an array of dictionaries.
I've had a look at the the script provided by cm_pony on reddit. It's a great solution for those that like to tinker with code. Certainly nicer to use a flask to generate the options, but expecting a user to modify PoB isn't a good way forward. Here's my take on the solutions, in order of my preference:
1) Best-case: Re-implement all of your code in Lua with PoB and attach it to a simple UI that allows selecting tags/classes/etc, then launching the search in a browser. If accepted by the PoB team this would be ideal for all users. 2) Extension of my external Lua script that runs with PoB's runtime and takes you direct to your website, pre-filled. No Lua/Python runtime required by the user, but still a separate download. 3) Extension of cm_pony's script to generate the site link directly in PoB. Better than copy/paste into the dev console, but still requires editing PoB's source and the associated issue with its update system.
For any solution involving your site you'll need to handle the values as a query parameter. Would a simple format such as this work for you?
http://gw2crafts.net/pobsearch/modsearch.html?cast%20speed=0&...
...which your page could read very simply and auto-fill. It would also be a solution to "saving" data as it could be bookmarked. If you also allow tags to be specified an extension to the PoB interface might be able to provide those, later on.
2&3. Query parameters are easy to implement with Brython. If 1 doesn't gain any traction I can implement this soon.
I attempted to run your code and am having issues with "dofile("Launch.lua")" as the file doesn't appear to exist. Do I need to install something for that file?
Apologies... forgot about this for a few days.
The files have been re-arranged to be easier to run. I'll update within the next couple of hours with your newest mod lines. There's a testdps.bat
file in the root that shows how it needs to be run (and you can replace the LuaJIT.exe
we use with the full Path of Building.exe
- only downside is the annoying console window):
cd %POBPATH%
"Path of Building.exe" %SCRIPTPATH%\SearchDPS.lua CURRENT
I think it would be easiest if you go ahead and add the querystring processing to your website. I'll change the script to launch the browser directly then.
Edit: new modlines added, tested and committed.
http://gw2crafts.net/pobsearch/modsearch.html?Cold=True&flat%20accuracy=100
All of the table values accept numbers, all of the check boxes can be set with "True"
Also I am still unable to get your script to work. I have PoB installed via the exe from releases which does not create a launch.lua. If I download the PoB source then I get " module 'xml' not found".
I realized also that attaching the mods to a flask may not be the best approach because some of the mods will be affected by flask effectiveness(EG % cold damage) but I don't know if all the mods that are being used to get values will scale.
Great, I'll update my script to post to your page directly.
Sadly, it appears you are right about installing PoB from the setup exe. When extracting from the (binary) zip, there's a launch.lua
present. The xml
module is in the a subdirectory and requires LUA_PATH to be set correctly. Sorry, I missed that part of the bat file out of the snippet:
set LUA_PATH=%POBPATH%\lua\?.lua;%BASEDIR%\ItemTester\?.lua
I'm not sure how to solve the missing launch.lua
issue. Might be time to talk to the PoB team. It has to be built into the exe somehow, but I don't know if we can use it at all.
The flask issue seems likely to be true. A separate, detached jewel socket might be a better option and not require you to empty an existing socket, but I don't know how that might be possible.
Script updated. Adds all mod effects to the URL and launches it. For example a Whispering Ice build's output.
I haven't looked at ways to generate the flags/tags from the main skill yet, but it would never be complete or perfect anyway.
There's another problem with using flasks. With this Whispering Ice build damage scales from INT, yet INT doesn't seem to apply to a flask at all.
Found a way to avoid using a flask by using a pretend passive node and fixed +attr and +%attr stats. You were just missing the initial +
. See VolatilePulse/PoB-Item-Tester@949da6ccc76efb1fc9c2c8df1ec7e4fb741dda51.
You should be able to run it from the AHK script (as long as launch.lua
is present) by pressing Ctrl-Windows-D. Also, Ctrl-Windows-C runs a comparison on the PoE item currently on your clipboard.
Interesting on the +
. I took the mod description directly from the trade site api. Just means I'll have to add a translation layer.
Now added flag extraction from PoB directly. As it turns out this can be quite extensive.
A Molten Strike build Using your current flags breakdown we get: Tags: Attack Weapons: Sword, Two Handed Sword Tags: Melee, Area, Projectile, Fire, Elemental Hands: Two Handed Weapon Charges: Frenzy, Endurance Recently: Crit <- does not work You have/are: Flasked Enemy is: Taunted, Ignited, Intimidated. Burning, Blinded (most not supported by the website yet)
I've tested it on a few different types of build. Significant flags that are missing support on your end would be DamageOverTime and the various other enemy effects like burning. Setting Crit=True does not appear to work at all. I can open different issues for these if you would prefer.
Not tested with minion builds, yet.
There are currently 4 mods that should have support for 'crit recently'. In addition to fixing the 'too long' uri issue, I'm going to set up some tests so I can make sure all the mods are selectable.
I've added instructions to the page for your script(links/etc). I added a few mods today and will be adding some mods tomorrow(will be support for bleeding, poison, generic dot). After tomorrow, if you would like, make a new issue with mods that my page doesn't support.
You could replace those instructions with just "Run the AHK script and press Ctrl-Windows-D". Sadly it still relies on the zip-install of PoB, of course.
AHK FYIs:
I'm working on getting charge counts included.
Updated coldino script instructions to use the AHK script.
Charge counts, skill name and character (build) name included.
Added new mods:
Added new flags: enemy is
Added 👍
Updated mods.json for life/es mods. Going to add all the minion stuff tomorrow. With your script I guess I don't really have to worry too much about clutter.
Added, but I can't test as I haven't been able to get to pathofexile.com for a couple of days now.
I'll try to work out a way to get mods directly from your mods file.
When the AHK script is properly released it'll only be bundled with the Lua runtime and will download the required files on first use - so could download your mods.json
directly. Only problem is, there's no JSON reader available in PoB.
Not sure if it would be best to download your mods file directly or have a tested one checked in to the other repo.
I've made a script that allows PoB to calculate all of the DPS weights for GenerateSearch.py automatically. It can be run without PoB's UI showing for full automation. Unfortunately, with the need to copy/paste the output into GenerateSearch.py, the editing of the search terms, and the requirement to have Python installed, this can't really be considered usable by most people.
This would all be a lot more user friendly if you could add the facility to your webpage to allow this script to post data directly to it, to pre-fill all of the numerical fields. Maybe in future the PoB maintainer would accept a new button that fired off this script, taking you directly to your webpage.
At the moment I'm producing output designed to be pasted into the Python:
...but it could of course easily be full JSON or even URL-encoded query parameters if that is easier.
Script: https://github.com/VolatilePulse/PoB-Item-Tester/blob/master/ItemTester/SearchDPS.lua