TohnoCoding / fgochecklist

Just another FGO Servant checklist with NP count.
MIT License
5 stars 1 forks source link

Filter for servants not yet released in NA #6

Closed MaxLSR closed 5 days ago

MaxLSR commented 1 month ago

Hi Tohno,

Your checklist is great but as a NA player of FGO, it feels a bit frustrating to read stats based on an amount of servants that is just not available in the game. Do you think you could add a boolean property "in_na" for the servants in the servants.json file and add a filter checkbox in the main page to display only the servants available in NA?

If you don't have the time to do it, would you consider a merge request?

Thanks for your excellent work anyway,

Max.

TohnoCoding commented 2 weeks ago

Sorry for the late reply, I honestly haven't checked here in a while because real life sucks. If you can get it to work in a local environment, then I'd be open to a merge request, sure. I'm not too versed in the underlying code since I essentially inherited the project from Nechi and haven't really had the time to sit down to sift through the code and understand it line by line.

TohnoCoding commented 2 weeks ago

Your checklist is great but as a NA player of FGO, it feels a bit frustrating to read stats based on an amount of servants that is just not available in the game. Do you think you could add a boolean property "in_na" for the servants in the servants.json file and add a filter checkbox in the main page to display only the servants available in NA?

The issue with your approach is that every time a new Servant is released in NA, it'd need an update in addition to any updates from new characters in JP. At this point, it'd be technically easier to just ping an Atlas Academy endpoint that can give me the latest Servant ID released in NA and anything above that number would have an additional property that would hide it if the "Is NA only" checkbox was checked.

const threshold = await fetch("https://api.atlasacademy.io/export/NA/basic_servant.json").then(r => r.json())).map(s => s.collectionNo).at(-1);

Throwing ideas out there.

MaxLSR commented 2 weeks ago

I didn't know about the API, this definitely is a much simpler way to check availability in NA! I'll give it a go locally sometime soon and come back to you then.

TohnoCoding commented 1 week ago

@MaxLSR, you might want to fetch the latest code if you're mucking around with a local copy. I've made a metric crapton of improvements in the last two or three days.

TohnoCoding commented 5 days ago

Aaaaaaaaaaaaaaaaaand I've fully implemented this feature now. #YoureTooSlow 🤣