-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion - query language for seed search #247
Comments
That's how the current search behaves: the AND OR and NOT are boolean operations. The rules return |
Maybe that's my programmer background speaking, but it does not seem like this for me. Or it rather hard to construct the query, at least from my perspective.
|
How do you envision this query language? AND (
perks: [1st: has these 3],
lottery(not implemented): [...],
OR (
perks: [2nd: has one of ...],
perks: [3rd: has one of ...]
),
AND: (
OR: (
perks: [2nd: has repulsion_field],
perks: [3rd: has repulsion_field],
perks: [4th: has repulsion_field],
perks: [5th: has repulsion_field],
perks: [6th: has repulsion_field],
perks: [7th: has repulsion_field],
)
OR: (
OR: (
perks: [2nd: has concentrated_spells],
perks: [3rd: has concentrated_spells],
perks: [4th: has concentrated_spells],
perks: [5th: has concentrated_spells],
perks: [6th: has concentrated_spells],
perks: [7th: has concentrated_spells],
),
OR: (
perks: [2nd: has hungry_ghost],
perks: [3rd: has hungry_ghost],
perks: [4th: has hungry_ghost],
perks: [5th: has hungry_ghost],
perks: [6th: has hungry_ghost],
perks: [7th: has hungry_ghost],
)
)
),
) Not sure about 5, though |
There can be optimizations of the perk serch to reduce the ORs to a single rule |
Well as you can see from your own example - that would take quite a bit of hopping in-between different windows wouldn't it?
Just for the sake of simplicity I tried to use JS (even though I do not really know the language very well, as you can probably tell). IMO, just allowing user to write the code and then evaluating it is probably the easiest and fastest overall (not the safest though) option. However, arbitrary query language can be defined like JQL of Atlassian. |
🤔 Thanks, this is interesting. I'm dissatisfied with the search as well, so I have the desire to redo it somehow, but don't have that many ideas as to how to make it both simpler and handle more complex scenarios. I'll think about it after I finish the map gen stuff. |
Oh it definitely is intuitive, you did great job on that front :) Well, I don't think "redoing" is necessary really. Current version is really good for simple searches and those will be used by majority of users I'm pretty sure. I do believe the best option would be to just add a "advanced mode" on top of current search functionality. From my experience it's pretty common for search features that are UI-based to have a fallback with query language of some sort. Aforementioned JQL is a good example. Ye, I don't think it's super critical. The way I do it now is that I just pick the perks I need in the first mountain and manually check seeds to make sure fungal shifts and everything else is good. It's a little bit tedious, but since those seeds are meant for super long runs - it doesn't really matter in the end IMO. |
I wouldn't say it was the primary focus – I intentionally gather a very limited amount of info on usage, but do know that tablets are not that small of a % of users, so I had usability in mind there. Coding will definitely be unreasonable there, but hiding it behind an I'll leave this ticket open to track progress on implementing something like JQL (I'll need to think hard about how to implement something like this client-side) and the |
This issue is gold. I was about to open a similar request feature because I too would enjoy advanced query (I didn't even realize that I needed a query language until I read this). I'll leave my 5 cents here instead of opening a new issue: it would be delightful if this feature included some kind of "have to have X somewhere". For example, I wish I could have a run with 4 more love perks, but today I don't have a way to query "the seed have to have 'more love' perk in the first 5 rolls in distinct levels in the holy moutain" (or at least, don't know how to query it), so this feat would be pretty neat. One last point. As a noita addicted and open source lover, I'm looking foward to start to colaborate in this project. I'm frequently taking a look at the open issues, if there is some "good first issue" around here, let me know :) |
Cool! Thanks @denis-rossati |
Problem
While the current search is pretty good I would like to be able to specify conditions in more precise and flexible way.
Describe the solution you'd like
I think the best solution would be to introduce an advanced search mode with query language to be able to test seeds against logical rules directly. For all I care, even JS code directly might be used with reference to the seed object which shall return a boolean.
Describe alternatives you've considered
None
Additional context
I tend to use search feature to find a good seed for long(ish) runs like 33 orb, all sun achievements etc.
Obviously, I would rather not spend 4 hours searching for a teleport bolt to then die from electric shock in water from my own "Electricity" perk because there was a pixel of poly in the pool of water (true story).
The text was updated successfully, but these errors were encountered: