lensvol / fl-small-mercies

Small collections of patches and fixes for Fallen London UI.
MIT License
9 stars 7 forks source link

Add the ability to track any qualities, not just favours #25

Open AnteIndustrial opened 2 months ago

AnteIndustrial commented 2 months ago

I like your favour tracker feature, and I want to extend that to track anything. This can be useful in carousels (in Port Carnelian, tracking Striped Delights, Silver Horseheads, Imperial Legitimacy, and Time Passing in Office), and in longer term grinds (tracking Estimable Trophies when going for Defender of Public Safety).

I've made this change myself, and I've been using it for a few months, it's been really helpful for me. I'll add it as a pull request. I'm not very familiar with github and contributing to open source software, so hopefully this is the way you'd like me to do this.

image image

I'll list all the shortcomings I can think of with my current solution, so you can say if you want me to fix it, if you can fix it, or if it's fine and not worth fixing. I've been using it myself for months, though, so I think it's good enough to be useful.

AnteIndustrial commented 2 months ago

Sorry, I thought I could link a pull request to an issue, but I don't see how to do that. The pull request is here: https://github.com/lensvol/fl-small-mercies/pull/26

lensvol commented 2 months ago

Awesome! I knew that procrastinating enough on that feature would force someone to start implementing it 🤣 On a more serious note, I will take a look at your PR as soon as possible and will provide feedback.

Concerning the points that you've raised:

I will leave further comments on the PR itself, but I am grateful already for the work that you've done!

lensvol commented 2 months ago

One other concern that I have is that it does not play well with the current Favour Tracker, in the sense that it replaces it completely with no option to switch to it. Either this feature should be its replacement (with a Favours being a default pre-set of tracked qualities), or a way to switch between different tracker panes should be established.

AnteIndustrial commented 2 months ago

Does it not work with Favours for you? I haven't seen a problem, what happens when you try?

image

fynngodau commented 2 months ago

Hey everyone,

I really like the idea, in fact I already worked on something similar where the qualities are shown below the main text body but above the storylets / branches. My intention was to hardcode a few wheel-tracking qualities and add more later on this way. I'll share screenshots once I'm back from vacation. Excited to see you working on this!

lensvol commented 2 months ago

@AnteIndustrial You misunderstood, I was talking about how this feature will conflict with the existing Favour Tracker. It is not removed in your PR, so I assumed that was intentional. In its current form, both features will add their tracker panels in the same space and it does not make sense since your tracker technically supersedes mine.

I would suggest you remove the existing FavourTrackerMixin and set the Favour list as the default one. In this way people will still get the experience they are used to, but with an option to customize it.

fynngodau commented 2 months ago

Here's screenshots of my proposal:

image image image

You can find the branch with my proposed changes in https://github.com/fynngodau/fl-small-mercies/tree/top-qualities.

As you can see in https://github.com/fynngodau/fl-small-mercies/blob/3edc85b52fb7ec05ae384cc3ed4d086e6021e75e/src/fixers/top_qualities.ts#L52, I hardcoded the wheel-tracking qualities for some wheels. They can either have a progress bar if there's some reasonable maximum value (for instance, maximum payout), or simply indicate the number. They can also either be shown only when the quality is larger than 0 and hidden otherwise; for instance, "Disappearing..." is not shown in the scandal reduction wheel in the cabinet noir if quality is zero.

For some of the qualities it works quite nicely. I also wanted to show the development progress of the stations as you can see in the "Ealing Gardens Commercial Development" line, but in my opinion this does not work so well.

What I find annoying is when I show a linear bar from start to finish that shows overall progress, but progression of the quality is inherently non-linear because of the rising amounts of CP required to achieve the next level. I have so far neither implemented showing the CP instead, nor a way to linearize the progress by showing CP / CP required for max (the latter would be my preferred solution).

lensvol commented 2 months ago

@fynngodau While I like the idea itself, moving trackers on top of branches eats up a lot of useful space IMO. Moving them into the right sidebar like the Favours will make more sense, as they fulfill the same function.

Would you mind if I implement this feature in the form mentioned above? With full attribution to you as the author of the idea, of course.

AnteIndustrial commented 2 months ago

That is cool, and it's the sort of thing I was thinking of doing. However, it seems like the devs may be adding that sort of thing to the game officially. They've added a tracker for zeefaring, lab research, Naga advertising, and a couple of other areas.

lensvol commented 2 months ago

@AnteIndustrial I think that is not actually the same and may have advantages over the native solution:

Time will tell if they will extend first-class support for things such as Moulin expeditions and Hearts' Game, but adding support for them here would be easy enough once the initial framework is laid in place.

@AnteIndustrial I will probably create the necessary scaffolding for a more streamlined usage of the right sidebar in the coming days, so you are free to play with it. Or I can take this over and credit you as the author of the initial version. Your call :)

AnteIndustrial commented 2 months ago

Typescript, UI, and Chrome extensions are all outside my usual comfort zone, so if you want to take over that's fine with me. I've been having some headaches moving the setup into the settings menu.

fynngodau commented 2 months ago

@lensvol I agree that the official implementation on the left sidebar increases the clutter there. It's not a place to keep an eye on constantly due to the many qualities that tend to stay the same most of the time. Let me share some more thoughts regarding the right sidebar:

…but if it's not viable to have it at the top, we can of course put all this on the sidebar as well. Naturally, you are free to use the above suggestions and the code I linked (it contains some extensions to matchers.ts that may be of interest to you, as well), though I would be happy to hear your thoughts and further collaborate with you as well.

AnteIndustrial commented 2 months ago

Or I can take this over and credit you as the author of the initial version. Your call :)

So, I said you could take over... but I've been working on a different change, and it required me to go into settings, and after mucking around with that for a day or two I felt confident enough to move this lot into settings too. I've updated my pull request with that commit. I should be clear: it's a bit messy, and there's a good chunk of code duplication, because now misc_tracker.ts and settings.ts have to do similar things, but it's just slightly different enough that I couldn't easily remove all duplication. Also, if I removed duplication and just had one, eg, private createTracker(title: string): HTMLElement, I'm not sure whether that should go in misc_tracker or settings, and I thought I'd leave that decision up to you.

I dunno, let me know what you think about the current state. I think it's all working, I tried to break it a few ways, but it seems functionally good, it's just messy and duplicated.

lensvol commented 2 months ago

@AnteIndustrial Cool! I've been away on vacation without my laptop for a week, so no work got lost on my end. :)

I will take a look a bit later and see how it looks.