Git Product home page Git Product logo

slimmmo.github.io's Introduction

slimmmo.github.io

AdVenture Capitalist calculator to greedily optimize your purchases. Made with Next.js, zustand, TanStack Tables, and Tailwind CSS.

Why the update?

I need a new job so I used this to learn React.

Somethings wrong/broken!

Let me know with an issue or in the Reddit thread. Please include as much information as possible so I can recreate it.

Running Locally

  1. Clone or download the repo.
  2. Install the dependencies
npm i
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 with your browser to see the result.

How did you deploy a Next.js app to GitHub Pages?

Next.js GitHub Pages

slimmmo.github.io's People

Contributors

61352151511 avatar bobbysue avatar denilsonsa avatar dr-ishmael avatar idevid avatar jasontwong avatar jimbly avatar justinpealing avatar kerzyte avatar mattias-joelson avatar metoxys avatar nicholasrbowers avatar nutty69 avatar paulirish avatar ricardopetrere avatar rogerdc avatar scrotty avatar skupr avatar slimmmo avatar slimmmounsw avatar throne3d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slimmmo.github.io's Issues

offline app?

It be cool to have an offline version so u can do calculations on the go
without internet
i mean this all run by scripts right?
is there some way to convert this into an app for iOS and android

Wrong costs for Gravity Booth and for Giant Laser

It seems the formulas for Gravity Booths and Giant Lasers are incorrect. Look at the following screenshots:

Adventure Capitalist in-game screenshot

Adventure Capitalist Calculator screenshot

My save is copy-pasted below:

{"earth": {
  "levels": {
    "Lemon": 7300,
    "Newspaper": 4000,
    "Carwash": 4100,
    "Pizza": 4300,
    "Donut": 4600,
    "Shrimp": 4800,
    "Hockey": 5000,
    "Movies": 5500,
    "Bank": 6200,
    "Oil": 7000
  },
  "numAngels": 1.1293300000000001e+101,
  "upgradeIndexUpTo": 305,
  "upgradeIndexBonus": [
  ],
  "angelUpgradeIndexUpTo": 142,
  "angelUpgradeIndexBonus": [
  ],
  "managersBought": [
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    13,
    14,
    15,
    16,
    17,
    18,
    19
  ], 
  "noSingles": true,
  "noTens": true,
  "triples": 0,
  "flux": 0,
  "bonusAngelEffectiveness": 0,
  "bonusMultiplier": 0,
  "megaTicket": [
    4,
    8,
    9
  ]
},
"moon": {
  "levels": {
    "Moon Shoe": 4100,
    "Gravity Booth": 1030,
    "Payday Clone": 2880,
    "Moon Express": 1100,
    "Oxygen Bar": 2400,
    "Helium-3 Farm": 1400,
    "Cheese Mine": 1500,
    "Amusement Park": 1200,
    "Werewolf Colony": 1800,
    "Giant Laser": 480
  },
  "numAngels": 3.0842e+43,
  "upgradeIndexUpTo": 130,
  "upgradeIndexBonus": [
    131,
    132,
    133,
    136,
    137,
    138
  ],
  "angelUpgradeIndexUpTo": 12,
  "angelUpgradeIndexBonus": [
    17,
    18,
    19,
    20,
    21,
    22,
    23,
    24,
    25,
    26,
    27,
    33,
    34,
    35,
    36,
    37,
    38,
    39,
    40,
    41,
    42,
    43,
    48,
    49,
    50,
    51,
    52,
    53,
    54,
    55,
    56,
    57,
    58,
    59
  ],
  "managersBought": [
  ], 
  "noSingles": true,
  "noTens": false,
  "triples": 0,
  "flux": 0,
  "bonusAngelEffectiveness": 0,
  "bonusMultiplier": 0,
  "megaTicket": [
    4
  ]
},
"mars": {
  "levels": {
    "Red Dirt": 66000,
    "Marsies": 22000,
    "Men": 13300,
    "Buggles": 9500,
    "Heck Portal": 6000,
    "Ambassadors": 15900,
    "Brain-cation": 9100,
    "LIFE Pod": 7100,
    "Terrorformer": 2600
  },
  "numAngels": 5.547000000000001e+138,
  "upgradeIndexUpTo": 123,
  "upgradeIndexBonus": [
  ],
  "angelUpgradeIndexUpTo": 77,
  "angelUpgradeIndexBonus": [
  ],
  "managersBought": [
  ], 
  "noSingles": true,
  "noTens": true,
  "triples": 0,
  "flux": 0,
  "bonusAngelEffectiveness": 0,
  "bonusMultiplier": 0,
  "megaTicket": [
    2,
    3,
    4
  ]
}}

"Recommendation: Buy All Profit 1 Cash Upgrade."

In the Making It Rain event, although the 50-quintillion "Angel Investor effectiveness + 1%" cash upgrade is listed as "Angel Investor 1" in the Cash Upgrades section, it is listed in the Upgrades table (below the Recommendation: line) as "All Profit 1".

Late game Mars calculations error (False Zero Calculation)

I've completed everything on Mars and am now just playing through to farm Mega Bucks. If I start with 2500 of everything and all cash/angel upgrades purchased, it seems there is a lower threshold for "Increase in $ / second," where being below that threshold just counts the increase as a flat zero. I understand that certain purchases will have an insignificantly small calculation for the "Upgrade Score" statistic to the point where it never makes sense to buy it, but with the increase statistic being incorrect how can I be sure that those purchases aren't actually useful and the calculator is simply ignoring them?

Multiplier has to be manually corrected to match $/s values

Here is the output save file:

{"earth": {
  "levels": {
    "Lemon": 1300,
    "Newspaper": 664,
    "Carwash": 670,
    "Pizza": 700,
    "Donut": 700,
    "Shrimp": 700,
    "Hockey": 800,
    "Movies": 900,
    "Bank": 900,
    "Oil": 1000
  },
  "numAngels": 0,
  "upgradeIndexUpTo": 59,
  "upgradeIndexBonus": [
  ],
  "angelUpgradeIndexUpTo": 5,
  "angelUpgradeIndexBonus": [
    17
  ],
  "managersBought": [
    0,
    2,
    4,
    6,
    8,
    10,
    12,
    14,
    16,
    18
  ],
  "triples": 0,
  "flux": 0,
  "bonusAngelEffectiveness": 5,
  "bonusMultiplier": 13746142000000000,
  "megaTicket": [
  ]
},
"moon": {
  "levels": {
    "Moon Shoe": 1,
    "Gravity Booth": 0,
    "Payday Clone": 0,
    "Moon Express": 0,
    "Oxygen Bar": 0,
    "Helium-3 Farm": 0,
    "Cheese Mine": 0,
    "Amusement Park": 0,
    "Werewolf Colony": 0,
    "Giant Laser": 0
  },
  "numAngels": 0,
  "upgradeIndexUpTo": 0,
  "upgradeIndexBonus": [
  ],
  "angelUpgradeIndexUpTo": 0,
  "angelUpgradeIndexBonus": [
  ],
  "managersBought": [
  ],
  "triples": 0,
  "flux": 0,
  "bonusAngelEffectiveness": 0,
  "bonusMultiplier": 0,
  "megaTicket": [
  ]
}}

As you can see, I had to set a multiplier of 13746142000000000 to match the cash per second values to the ones displayed in game. In reality, it should only have to be a x2 multiplier from watching an add on Android.

Collapsing several similar recommendations

If there are multiple recommendations one after another for the same production item (lemonade stand, newspaper, etc.), such as "Moon Shoe: 2" and then (directly afterwards), "Moon Shoe: 10", it would probably be a good idea to collapse it into a single "Moon Shoe: 10" value.

Example:
http://puu.sh/kcoyb/747aa71ef9.png
Could become:
http://puu.sh/kcoI8/6edb22859a.png

Similarly, if (when you apply a recommendation), another recommendation for the same stand would appear right after it, it would be a good idea to simply calculate the value of the highest upgrade for the item which would still have the highest upgrade score.

Instead of, upon clicking "Apply this row", the 'To' number incrementing by one:
http://puu.sh/kcoR3/14eb6cb1c5.pnghttp://puu.sh/kcoSc/1ca9fc9dd4.pnghttp://puu.sh/kcoTa/ead10dbdaa.png
Like suggested earlier, collapsing it into:
http://puu.sh/kcpAG/7197139ca5.png (with the values calculated, though)
Or at least collapsing the top value, like such:
http://puu.sh/kcpLE/fd183387de.png

Unfortunately, I'm not sure how easy this would be to implement - it seems as though you're currently checking +1, +10, and up to the next multiplier value; perhaps you could use a while loop to find the top continuous value and just perform it on the first instance of each suggested upgrade, so if you have "Moon Shoe: 12" at one point, and later on "Moon Shoe: 21", it only checks for "Moon Shoe: 12" (and gives a suggestion of like "Moon Shoe: 14", if applicable), and not "Moon Shoe: 21" (which would otherwise become "Moon Shoe: 22" or something). Or, if that's still too bad, just collapsing the top value. Hopefully it will be doable, though I can see it being difficult.

Request: display which suit is most beneficial

I imagine this could be shown as a table with each suit and the corresponding increase in production. It could be worth showing the ratio of production increase divided by the cost in gold bars too.

Wrong costs for event cash upgrades

I see this in-game:

  • 314 quintillion
  • 32.5 sextillion
  • 3.36 septillion

The calculator shows:

  • All Profit 13.37 ($3.03 Quintillion)
  • All Profit 13.37 ($3.14 Sextillion)
  • All Profit 13.37 ($325 Sextillion)
  • All Profit 13.37 ($3.36 Octillion)
  • All Profit 13.37 ($34.7 Nonillion)

I haven't checked all the numbers, but it seems most/all cash upgrades are of by a factor of 10.

Angel investor calculation for w/o sacrificed is wrong

"moon": {
  "levels": {
    "Moon Shoe": 4857,
    "Gravity Booth": 1273,
    "Payday Clone": 3410,
    "Moon Express": 1375,
    "Oxygen Bar": 2676,
    "Helium-3 Farm": 1633,
    "Cheese Mine": 1794,
    "Amusement Park": 1451,
    "Werewolf Colony": 2058,
    "Giant Laser": 571
  },
  "numAngels": 1.24704e+50,
  "upgradeIndexUpTo": 156,
  "upgradeIndexBonus": [
  ],
  "angelUpgradeIndexUpTo": 76,
  "angelUpgradeIndexBonus": [
  ],
  "managersBought": [
    0,
    2,
    4,
    6,
    8,
    10,
    12,
    14,
    16,
    18
  ], 
  "noSingles": false,
  "noTens": false,
  "triples": 1,
  "flux": 0,
  "bonusAngelEffectiveness": 0,
  "bonusMultiplier": 0,
  "megaTicket": [
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9
  ]
},

Angel calculations:
Lifetime earnings: 16.646 Sextrigintillion
Angels Sacrificed: 548 Quindecillion

image

The values and screenshot come from a brand new reset. It's improbable for the doubled w/o to be at 0 right after a reset. Based on the image, you can see the double without sacrificed isn't calculating properly. I think what's happening is that the calculator isn't taking the sacrificed angels into consideration.

Doubled w/o sacrificed should be 2 * (current angels) + sacrificed

Currently, Doubled w/o sacrificed is calculating as simply 2 * (current angels), which isn't accurate.

In my case, my total angels for doubled w/o sacrificed should be 797.408 quindecillion, which would equate to 28.260 sextrigintillion lifetime earnings rather than the displayed 2.285 sextrigintillion, which only covers doubling without taking into consideration my already sacrificed angels.

It's late and I might be a bit drunk from all the Super Bowl mayhem, so let me know if any of this is nonsense. Once I've sobered up tomorrow, I'll look through the code and see if I can't help identify the issue further.

Moon : Error Calculation

I had all upgrade for cash and angel on Moon
Cost of upgrade 10 Amusement Park is 2.408Novemsexagintillion instead of $24.705 Septsexagintillion

screen shot 2015-11-26 at 4 28 14 pm
screen shot 2015-11-26 at 4 28 57 pm
screen shot 2015-11-26 at 4 29 06 pm

Multiple glyphs show in sortable column headers.

When clicking on the sortable column headers in the recommendations table quickly, up to five arrow glyphs are shown before they slowly disappear.

Not sure why this glyph switch is somehow tied to time instead of click events.

Earth math is broken

I have 9200 Lemons. Calculator says lemon 9201 costs $138.167 Octooctogintillion. Game says lemon 9201 costs $1.243 Septoctogintillion.
The same goes for everything else.

Suggestion: Only show upgrades and unlocks, not +1, +10, +100

I am at a stage where I really don't care about the 0.001% profit increase from buying 100 Hockey teams even though the buy cost is only zero seconds. I just like to have all my businesses exactly at unlock levels.
As I will only buy businesses in batches of 100/200/250 to achieve the next unlock, I would like to have an option to hide all +1, +10, +100 buy options in the recommendations. Showing only cash upgrades and unlocks would be perfect.
The above is meant especially for Earth but I can see it as a nice feature for all planets/events.
Thanks for you consideration.

As a side note, I believe that the "Filter recommendations" (the time and percentage settings) options are not saved. Besides, the percentage box only takes integers; floats would be nice as well, e.g. 0.1%

777 Buggels on mars

This seems to return 10x the income per sec than what the game itself is giving me.
Please check it out :)

Mars

Mars seems to have very different approach on ROI of investments, indicating that investing in some items isn't worth it until you have 200 or 300 of it.

Lets consider this to the be tracking issue for Mars support in the calculator?

Earth manager costs should not be mutually exclusive

On Earth, when I select the 99.999%-cost-reduction manager for a given investment, the calculator automatically deselects the 10%-cost-reduction manager for that investment. (The reverse is also true.)

However, I've noticed that after this, the listed cost for the next level of that investment is inaccurate. For example, I currently have Donut Shops at 2,999, with both managers, and the calculator lists the cost of upgrading it to 3,000 as 666.59 trequadragintillion - but the game itself lists the cost of upgrading to 3,000 as 599.931 trequadragintillion. This is exactly 10% less than the figure listed by the calculator.

As a result, the calculated time till the next upgrade is inaccurate, and presumably the calculated upgrade scores (which are based on minimizing those times) can be as well.

Please make it possible to select both types of managers at once, with the cost-reduction percentages multiplying appropriately.

handling of x3 multipliers is wrong

I'm playing Adventure Capitalist on Android. I bought two x3 upgrades (so the game says "x6"), and I usually have the x2 multiplier from watching an ad. When I put these into the calculator with a 2 under "Gold multipliers" and a 2 in "x multiplier" under "other bonuses", the calculator gives numbers that are too high; I can get the correct numbers by returning "Gold multipliers" to 0 and setting "x multiplier" to 8.

So I think what the game is doing is considering each 3x multiplier to be +300%, and (inconsistently) considering the 2x multiplier to be +100%; but instead of multiplying them like your calculator does: (1 + 2 * 300%) * (1 + 100%) = 14
the game actually adds them:
(1 + 2 * 300% + 100%) = 8

infinite loop in calculator

I was trying to figure out whether there was any point in putting money into anything besides oxygen bars on the moon, so I loaded the calculator, switched to the moon, put 2800 into each of the ten "number" slots, and didn't make any other changes (in particular, I left the number of angels as 0). Then, when I pushed the "Calculate" button, the browser froze for a few seconds and then put up a warning message about a script taking too long.

When I clicked on "Debug script", the backtrace shows that the script is looping in the "while (!isFinite(overflowPotential)) {" loop on line 512 of main.js, with unlockCost being Infinity.

Suggestion: "Profiles"

I have games running on my tablet, phone, and steam. While I could export each save file every time a change is made and try to keep track of them, another great option would be to have profiles. A drop down list choosing which profile you are currently calculating, with a New Profile and Delete Profile option. This way you could easily calculate what's best for all your games one after the other, without having to export and import a bunch of save files.

New upgrades for Earth after July 19th update

http://store.steampowered.com/news/externalpost/steam_community_announcements/251457560635885604

  • There is one Super Badge that you can collect at each event that applies a wicked profit bonus to your main game when it’s equipped! Check out your gallery of badges in the “Career” section to see if you’ve collected any already!
  • The late game on Earth has been rebalanced to make it more excitingly paced!

Screenshot of my game:
image

There might be other changes that I haven't checked yet.

Suggestion: Display time to restart

It would be nice if there was some kind of display showing that with the current income when will the planet reach the standard restart point (when the total AI number is doubled).

I got to the point where often there's nothing to do on the Moon than to wait days for my Angels to accumulate, so it would be handy to know when to check the game next. It could even be a row on the Recommendation table, displayed similarly to purchases and upgrades, though I guess the app would need to know when I restarted last time. I guess it could be somehow tied to when the user clicks on Reset Planet.

(Btw just fyi it's not possible to comment on your Reddit thread any more, it's been archived.)

Adding the Megabucks upgrade ability

Since they have added the ability to increase profits by using the megabucks we collected, can you make an easy way to add that calculation to the calculator, I tried adding that to the other bonuses, but it doesn't come out right. Thanks

Earth Angels

Shown profit is 1000x bigger. There might be some bug with angel profit computation. I play the version from Steam.
For example 7000 oils shows profit:
in calculator: $5.366 Novemsexagintillion / sec
in game: $5.366 Octosexagintillion / sec

Special recommendations for newspaper? Why?

As I was making pull #69 , I noticed that, at lines 414-420, inside 'calcRecommendations', there's a special treatment to newspaper, showing more than 1 unlock (3, I think).
I wonder why this exists. Why specifically the newspaper investiment?
PS: I think it would be nice if there was an option like "show next X unlocks", where you input a number, and it shows the next X unlocks of all investiments. I coded it locally, but didn't commit it until I understand this original behavior.

(suggestion) "the wake up/aka lump sum suggestion"

When you open the game after a while, your cash reserves are massive.
I would expect that in that scenario, there is a more optimal purchase that's based strictly on multipliers and not on immediate return.

If I may make this suggestion further - perhaps a couple of rows - 1 hour, 4, 8, 24, 48, 96 simply starting count at 0$ using current values.

ah, found an example:
There is an "everything bonus". So, for example, if I have everything at 50, and oil company at 1. Upgrading oil company from 1 to 25 not only boosts its own profits & speed, but also boosts speed of all other items by 2x

ps: I love reverse engineering games like this, just got it last nigh and I'm already here looking at the code....

Suggestion: save currently active tab

I think it would be nice if the page automatically loaded the last active tab instead of the event tab (which is useless 70% of the time when there is no active event).
For instance if I have the Earth tab open, close the page, open it again, it should load Earth by default.

Cost rebalancing

For Earth and Moon, the costs of upgrades are significantly different than those listed. It appears the developers have done some rebalancing. It does not appear to be an issue early in the game.

But at Lemon 7777, the calculator has the cost of +1 as $212.466 Quattuorseptuagintillion and the game has it as $1.912 Treseptuagintillion, for example. On the Moon, the Werewolf Colony at 4500 costs $252.833 Octosexagintillion for +1 according to the game and $46.664 Novemsexagintillion according to the calculator.

Thank you for this calculator. It is very useful!

Bug in Angel Upgrade

Hi Slimmmo,

I notice a problem in angel upgrades.

In the picture, you notice, I should buy the 2 green + on the 2nd column.

But I can't since it only display 15 items (the first one) and these 2 are after the 15 first items.

So in that case, I think you should recommand buying the 2-3-4 (?) not-so-bad items to show the item you recommand.

I hope that I'm clear enough

image

Issues when importing a lower-levelled save with higher-level values currently in calculator

When the calculator has a high(er?) number of cash upgrades, angel upgrades, and managers, and then you import a save file with these not selected / activated, it doesn't seem to clear the check boxes properly, and also seems to calculate the times for the upgrades to be available according to the check boxes being ticked, despite what the save file seems to indicate.

In case the specific JSON saves in question are required:
Higher level: https://gist.github.com/Nineza/5b903ad090f943c9fed0
Lower level: https://gist.github.com/Nineza/45ef3de995c0d484b7c5

Suggestion

Increment by 10 or 100 the numeric input thanks to step="value"

A way to import save file on windows mac and linux

Another thing that be cool (goes along with my accessing ios app idea) would be to load the save file on your computer that puts in all the info for all planets
And it can automatically update every minute or so

Suggestion: guess lifetime earnings

It would be nice if the page automatically guessed the amount of lifetime earnings (Angel calculations section) immediately after being loaded. This should be possible IMO as there is a direct relationship between the lifetime earnings and total AI. The calculator could assume e.g. 1% angels sacrificed (which should be okay-ish taking into account that the 'Quick buy' feature spends up to 1%). If someone spends 40% of their AI, which is a viable choice sometimes, they could adjust the 'Lifetime earnings' field in the calculator manually.
This way, after resetting and inputting my new AI count, I could immediately see how long it would take to double/triple/... my angel investors.

Calculator completely broken after last update :X

Seeing things like this all over the http://slimmmo.github.io/ page:

{{ref.investments[$index][0]}}

{{rUC[5] | time:raw}

{{ref.totalMoneyPerSecond | num}})
Total $ / minute : {{ref.totalMoneyPerSecond * 60 | number}} ({{ref.totalMoneyPerSecond * 60 | num}})
Total $ / hour : {{ref.totalMoneyPerSecond * 3600 | number}} ({{ref.totalMoneyPerSecond * 3600 | num}})

Instead of the actual numbers and things. Last update borked something :)

Option for alternative upgrade score calculation

I suggest giving the option of using an alternative way, other than Upgrade Score, to calculate a preference order of upgrades to be purchased.

The suggestion I have in mind is the "efficiency" calculation implemented in the Cookie Clicker add-on Frozen Cookies.

The formula is as follows (lower = better):

               cost         cost
    1.15 * ----------- + ---------
           current $/s   delta $/s

After a quick test, it produces different results than the Upgrade Score formula which is in use now.
For example, for my current Moon progress, the given recommendation order would be as follows:

  1. All Profit 9 (754.591 trillion upgrade score)
  2. Oxygen Bar (731.265 trillion)
  3. Amusement Park Profit 3 (703.621 trillion)
  4. Cheese Mine (693.737 trillion)

These 4 would have a different order using the "effiency" calculations:

  1. Oxygen Bar (1,367,569 efficiency)
  2. Amusement Park Profit 3 (1,421,220)
  3. Cheese Mine (1,441,468)
  4. All Profits 9 (1,501,916)

The efficiency method recommends purchasing investments in spite of longer waiting periods (Upgrade Score would make me wait almost 2 weeks for the next recommendation) and it would be cool if we had the option to switch between methods/algorithms.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.