Add Path of Exile 2 (cross-platform WASM auto splitter) - #2878
Conversation
|
@wooferzfg I see the CI failed on the dictionary key from the XML; i imagine that two autosplitters for the same game are not allowed at the moment? |
Head branch was pushed to by a user without write access
5d59359 to
3f6a5aa
Compare
|
So after the CI fail, i dug into it a bit more. This exact situation - adding a WASM splitter while keeping an existing entry for the same game - was already discussed in Dandara #2516, where the suggestion was to add the WASM as an extra URL in the existing record and to relax the validation to check only the first URL. I also checked the pending LiveSplit One work (livesplit-one-druid #54 and livesplit-core #954) - it seems like it should work there too. I can do that, but it does have the downside of not being able to point the WASM users at the right readme. I would really appreciate your thoughts on this - happy to adjust the branch accordingly. |
|
Adding it as a second URL should work with the existing validations? |
|
What if there were 2 xml files, one for LiveSplit to use, containing autosplitters of all types as it is now, and a second xml file for LiveSplit One to use, filtered to just contain AutoSplittingRuntime autosplitters. Maybe with a CI-enforced constraint that if an AutoSplittingRuntime autosplitter exists in the main xml, it must also exist with the same data in the second xml file. But allow AutoSplttingRuntime autosplitters to exist in the second xml file for games that have non-ASR autosplitters in the main xml file. |
Resolve conflict in LiveSplit.AutoSplitters.xml: re-apply the Path of Exile 2 (WASM) entry on top of the current master list.
|
@wooferzfg @AlexKnauth if we assume the desktop side shouldn't be auto-downloading/discovering ASR splitters at all, then: short term, relax the validations to check only the first URL (they currently check every URL, which is why adding a second one fails today) and merge the wasm into the existing PoE2 record - desktop keeps the component as-is, the wasm gets downloaded but only used by One/OBS. longer term, the separate One-side list makes sense given the desktop-one type split assumption. just let me know and i'll do the test PR or adjust the branch. |
|
Or maybe it would be easier overall, in a Don't-Repeat-Yourself and Single-Point-Of-Truth kind of way, if this 2nd xml file only contained ASR autosplitters for games that have non-ASR autosplitters in the main xml file. LiveSplit One would have to search both xml files, but it would place much less of a maintenance burden on this repository. I know of two entries so far that that 2nd xml file would have: this PR's autosplitter for PoE2, and another that I would add for Hollow Knight. (Edit: three entries, with Dandara) |
|
That can also work - in a sort of "main" and "extras" buckets sort of thing like many package managers do. |
|
Just checking in if we want to take any action here from what was discussed or open the discussion elsewhere for wider audience, etc. |
|
So I haven't super deeply read through the thread here, but in my opinion, there probably should only be a single XML, and we should definitely allow an optional WebAssembly auto splitter for the auto splitters that have an ASL, simply because we cannot easily run ASL everywhere, and therefore the WASM auto splitter should definitely be allowed to exist as a fallback. In the future, we can then maybe let the user decide if they want the unsandboxed ASL or the safe WASM alternative. And then we will have to see in the future if eventually we maybe switch the default, where we recommend the WASM auto splitter over the ASL one because of safety or something. But then people can still fall back to it or something. I'm not 100% sure, but essentially having it all in a single "database" makes it easier for the different timers to choose whichever they can more easily and more safely execute and also potentially allow the user to choose. So I think that's the better approach. How we achieve that in terms of backwards compatibility of the XML file, I'm not 100% sure yet. I will have to look into it, or maybe someone else can look into it. |
|
If that's an agreed direction, I'll try and take a look and confirm again how LiveSplit Desktop Windows / livesplit-core frontends (druid/GTK?) and the OBS one look at the XML file to maintain backwards compat and open a PR to adjust the discovery/tests in each as needed. |
|
What about adding a new element to the existing ASL and Component auto splitter entries in the XML, with an AutoSplittingRuntime WASM URL? For example the Hollow Knight entry that currently looks like this: <AutoSplitter>
<Games>
<Game>HollowKnight</Game>
<Game>Hollow Knight</Game>
<Game>Hollow Knight Category Extensions</Game>
<Game>Hollow Knight Mods</Game>
</Games>
<URLs>
<URL>https://raw.githubusercontent.com/ShootMe/LiveSplit.HollowKnight/master/Components/LiveSplit.HollowKnight.dll</URL>
</URLs>
<Type>Component</Type>
<Description>Configurable Load Remover / Auto Splitter. (By DevilSquirrel)</Description>
<Website>https://github.com/ShootMe/LiveSplit.HollowKnight</Website>
</AutoSplitter>Would it work to extend it to look like this? <AutoSplitter>
<Games>
<Game>HollowKnight</Game>
<Game>Hollow Knight</Game>
<Game>Hollow Knight Category Extensions</Game>
<Game>Hollow Knight Mods</Game>
</Games>
<URLs>
<URL>https://raw.githubusercontent.com/ShootMe/LiveSplit.HollowKnight/master/Components/LiveSplit.HollowKnight.dll</URL>
</URLs>
<Type>Component</Type>
<Description>Configurable Load Remover / Auto Splitter. (By DevilSquirrel)</Description>
<Website>https://github.com/ShootMe/LiveSplit.HollowKnight</Website>
<AutoSplittingRuntime>
<URL>https://github.com/AlexKnauth/hollowknight-autosplit-wasm/releases/latest/download/hollowknight_autosplit_wasm_stable.wasm</URL>
<Description>Configurable Load Remover / Auto Splitter / Auto Hit Counter. (By AlexKnauth)</Description>
<Website>https://github.com/AlexKnauth/hollowknight-autosplit-wasm</Website>
</AutoSplittingRuntime>
</AutoSplitter> |
The separate top-level WASM block duplicated the Game key and failed
the ToDictionary duplicate check. Instead, keep the existing Component
block byte-identical for desktop (Type=Component, single dll URL) and
add the cross-platform WASM as an optional child:
<AutoSplittingRuntime>
<URL>.../poe2_autosplitter.wasm</URL>
<Description>Component by JakeDev/SavageOranges; WASM port by ransagy aka chaosblade</Description>
<Website>.../wasm/README.md</Website>
</AutoSplittingRuntime>
Old LiveSplit builds ignore the unknown child (safe), new builds and
LiveSplit One/druid/OBS can pick the wasm via the child. No duplicate
Game, no Type change for the primary.
|
Updated the branch to the single-block shape as per the suggestion:
Old builds ignore the unknown child, new builds (LiveSplit #2734, druid #56, obs #74) pick the wasm from the child. Let me know if you want anything adjusted. |
If you are adding or modifying an Auto Splitter, please fill out this checklist:
What does this PR do?
Adds a sandboxed Auto Splitting Runtime (WASM) auto splitter for Path of Exile 2 — a cross-platform port of JakeDev/SavageOranges' LiveSplit component, so it runs in LiveSplit One on Linux/macOS/Windows without Windows-specific tooling.
Details:
wasm/)Client.txtlog and splits on first entry into campaign areas; modes mirror the component's (Campaign 100%, Campaign Any%, Level), plus a Custom mode driven by the user's splits file.lsssplit files mirroring those modesThanks to JakeDev/SavageOranges for the original component this port is based on.