Silverfeelin / SkyGame-Planner

Sky:CotL unlock planner/tracker
Other
27 stars 3 forks source link

Enhancement: Estimated Total cost of cosmetic closet #143

Closed SympathyTea closed 2 months ago

SympathyTea commented 2 months ago

Hi! This is a feature request

I would like some sort of menu or option that estimates the total cost of your closet in terms of candles, hearts, AC and real money.

Alot of friends of mine that I introduced to the game are curious on how much it has cost me for my closet (IAPs specifically) and I honestly don't know since I haven't seen a tool that calculates such a thing

I feel like this should be introduced into the Sky Planner since its a fun little novelty to see how much you've spent in total (for better or worse)

If this is already in the planner, I haven't been able to find it and you can close this issue if its an idea that has been discussed before and rejected

Silverfeelin commented 2 months ago

I think this is a good idea for consideration when implementing #141. I've been wanting to make a page dedicated to keeping track of your in-game currencies so adding a page there that shows how much you've spent and in what categories could be a cool feature.

For now you can use the snippet in the README by running that code in your console (F12) to get a quick overview.

https://github.com/Silverfeelin/SkyGame-Planner?tab=readme-ov-file#data

// Select all items unlocked through spirit trees.
var unlockedItems = skyData.itemConfig.items.filter(item => item.unlocked && item.nodes?.length);
// Select the unlocked nodes from these items.
var unlockedNodes = unlockedItems.map(item => item.nodes.filter(n => n.unlocked)).flat();
// Add up the currencies spent on these nodes.
var spent = CostHelper.add(CostHelper.create(), ...unlockedNodes);
// Log the results.
console.log('Spent currencies on items:', spent)
// > Spent currencies on items: {ac: 1, c: 18, ec: 0, h: 8, sc: 0, sh: 0}

// Select all bought IAPs
const spentIap = skyData.iapConfig.items.filter(a => a.bought).reduce((a,v) => a+v.price, 0);
console.log('Spent (USD) on IAP:', spentIap.toFixed(2));
// > Spent (USD) on IAP: 29.99

The meaning of the currencies can be found in the diagram, here's the relevant section: image

Silverfeelin commented 2 months ago

@SympathyTea I've added an extra page with detailed information to the new currency page. It shows your total as well as letting you see exactly which items you got in every season and event.

image