Speaax / Farming-Helper

Helps with farming
BSD 2-Clause "Simplified" License
0 stars 4 forks source link

New UI suggestion #23

Open Speaax opened 11 months ago

Speaax commented 11 months ago

https://github.com/Speaax/Farming-Helper/assets/28015430/ad4926c4-014a-4402-ad37-82c95949be92

Concept art ^ It would replace this: image

I find swapping settings to be a small hassle. While I have favorited Lazy Farming so it's at the top of my plugins I'm still not a huge fan of it.

And if we track patch growth we can skip patches that is not ready yet, so if you want to include Fruit tree when doing Catherby herb run it would skip it until it is ready to be harvested.

I would like to have the 3 runs we have currently as a default included setups(Herb, Tree, Fruit tree), and the option to add new custom runs.

If we add in lets say Birdhouse "patches" as well, users could create a custom run with birdhouse and hardwood trees, and only being guided to bring farming supplies for hardwood whenever the hardwood patches are ready.

I have tried making something like this a few times with no luck, so if the UI part of this code is something @othyn you are capable of I would greatly appreciate it. This is not something I'm in a rush to get as Leagues 4 will be released in 7 days as of writing this(15th sept). This game mode will last for 2 months, and I always go hard x) I can try and change to code myself to work with the new interface if you make it. I'm honesty not sure if this is a lot to ask, not sure how hard it is to create new UI like this, so I feel a little bad for asking. Do as you please with this one.

othyn commented 11 months ago

Really like the mockup, being able to define all the major parts of the run on the main UI would be better UX.

Maybe... took me a while to get my head around how Java handles its auto layout system. Still not sure I've really grasped it 😂

It would be a major piece of work, as we'd also need to migrate all of the config references to new UI elements, and also store the state of the UI. Not sure what RuneLite has in terms of persistent storage for the plugin UI's vs. that of the config that it seems to auto handle quite nicely.

This is not something I'm in a rush to get as Leagues 4 will be released in 7 days as of writing this(15th sept). This game mode will last for 2 months, and I always go hard x)

😂 fair play

othyn commented 9 months ago

Just to say I've been working on this today as I got bored and wanted to give it a go. I have a solid working foundation in my feature/dynamic-ui-rework branch which at the moment is simplistic (just mirroring existing functionality) but paves the way for a lot more, which is sat on top of my (WiP) feature/refactor branch. Not really much more to add at this point, but its there and working, in moving the checkboxes from the config to the main panel UI.

The only downside is that you lose user persistence, as RuneLite has no nice way of just storing data, like HashMaps. The only way to retain persistence from what I can gather from the docs and ChatGPT/Google is to mirror the main panel checkboxes with config checkboxes which just smells really bad. So I've left them as non-persistent for now, to be reviewed later.

Speaax commented 9 months ago

Hey! Leagues are pretty much done for me now and I have achieved what I wanted there.

I checked it out just to see what you had done, seems to be a step in the right direction for sure.

I was trying to map it out and describe a possible solution but ended up hitting a lot of walls. Short version that could work and give us more options in the future could be a system like "Inventory Setups" plugin.

https://github.com/Speaax/Farming-Helper/assets/28015430/f1f6de64-a42a-4a38-8e99-1c31fc7f3e96

(I'm thinking just the tiles/buttons within the Farming sections, as I don't think there would be any need to structure the Runs into multiple sections)

Replace the inventory/equipment with my initial UI suggestion, and using json files for storing and changing the values? If the Herb/Tree buttons are loaded in by using json files in a folder "Herb run.json, Tree run.json, etc" to generate the buttons, we could use that to allow for custom runs in the future maybe?

So:

Not sure how well this would work, but having everything stored in json files and using those decide how a run is done could simplify and unify the codes to only require one way of running through a farm run, instead of the current way its kind of split into multiple classes depending on what run you choose.

Short term solution to storing the user preference right now could just be a json file structured something like this?

Herb run.json |- Locations |- Ardougne : true |- Catherby : false |- //more locations

Clicking any checkboxes can take all the current values and saving them, and when loading the plugin we can check for the states and update them based on the values? Idk if thats the best way, but thats probably how id try doing it xD

I have also seen a lot of plugins storing values in .properties files, no experience with those, so I wouldn't know how its done properly.

Not sure if anything here is helpful, but I'll just comment it just in case as always. I will try and get a little back into the coding again, but at the moment I'm a little fatigued.

BrickPotato commented 7 months ago

I'm REALLY looking forward to this