GithubHelp home page GithubHelp logo

thorinair / stardew-profits Goto Github PK

View Code? Open in Web Editor NEW
147.0 7.0 71.0 525 KB

A Stardew Valley crop profits calculator and visualizer. Link: https://thorinair.github.io/Stardew-Profits/

License: MIT License

HTML 22.42% JavaScript 71.65% CSS 5.93%

stardew-profits's Introduction

Stardew Profits

Stardew Profits is a calculation and graphing tool designed to help the players of the popular game "Stardew Valley" to easily calculate and compare their profits from planting different crops under different conditions.

Usage

The tool is split up to two sections: graph box and options box. The options box lets the user quickly change the parameters which are then reflected on the graph.

Graph Box

The graph box displays a live rendered graph based on the options that the user has set. The number of bars changes based on the set conditions (like different seasons). The profit in gold can be viewed on the side as a scale. The graph shows both profit and loss. Additionally, if the seed buying loss is selected, the loss will be shown in orange, and if fertilizer buying loss is selected, the loss will be shown in brown. Hovering the mouse over a crop will show a tooltip with information about profits, loss and more. Pressing on a crop will open the official Wiki page for that crop, or you can disable this feature selecting the "Disable Links" option.

Options Box

The following table describes all the options and how they affect the graph.

Option Description
Season Changes the season of the crops. This will affect list of the crops shown in the graph, as only some crops grow at certain seasons. Additionally, all seasons have a limit of 28 maximum days for calculation. The Greenhouse season doesn't have such limitations, shows all crops and allows for a duration of up to 100 thousand days.
Cross-Season If this is checked, the calculations will take into account the crops that don't die when there's a season change.
Current Day The current date within the selected season. This is almost the same as "Number of days", but instead of specifying how many days are left, as a convenience you can just input the current in-game date.
Number of Days Designates the number of days to be used in the calculation. The shorter the duration, the less crops will have time to grow. Some crops might not have time to grow even once if a too low value is set.
Number of Crops This controls the number of crops that the player has planted.
Produce Type Designates the type of produce to be sold after harvesting. By default, all crops are harvested and sold as raw. This option accounts for Normal/Silver/Gold ratios, Farming skill level, and some additional skills. Other options let you select the two different artisan goods.
Equipment Specifies how many Jars or Kegs you plan to use. This acts as a hard limit to the number of harvested crops on each harvest and ignores the time duration. Value is ignored when set to 0.
Non-existent In case there is no available produce of the selected type, use the Raw crop sell price.
Aging Can only be changed if Keg produce type is selected. Specifies the level of aging in a Cask for the final produce. Does not take in account how long it takes to age. This means that Hops might not necessarily be the best option as they would require a new additional Cask each day.
Profit Display Changes how the graph is organized. ROI is calculated by dividing the profit by the expenses. Daily is calculated through the number of days set earlier.
Max Seed Money The maximum amount of money available in player's savings. This will limit how many crops can be planted when buying seeds.
Seed Sources Seeds can be obtained at different locations and different locations always have different costs too. This option lets you check which sources the graph should be looking for. Note that the cheapest option will always be shown on the graph. Unselecting certain locations might hide no longer obtainable crops.
Pay For Seeds Selecting this means that the player is buying the seeds from one of the sources, instead of producing the seeds themselves (like using the Seed Maker). An orange bar will be shown for every crop, showing the seed loss if selected.
Process & Replant Whether half of the harvest should be processed in a Seed Maker and replanted. Only affects crops which don't have a regrow time. Enabling this option also forces even number of planted crops. In case of Raw crops, ones with lower value will be reused for seeds first.
Use Next Year Whether harvest should be processed for use next year. This will lower the profit of regrowing plants, as one harvest should be used to reserve seeds for next year. Can only be enabled if Process & Replant is enabled, and if Season is not set to Greenhouse.
Fertilizer Different fertilizers can either speed up growth or increase the Normal/Silver/Gold ratios. The type of fertilizer can be selected here.
Pay For Fertilizer Selecting this means that the player is buying the fertilizer from one of the sources, instead of producing the fertilizer themselves (like crafting). A brown bar will be shown for every crop, showing the fertilizer loss if selected.
Speed-Gro Source Sandy sells Deluxe Speed-Gro in the Oasis cheaper than Pierre. This option allows selecting the price used. This option is disabled unless the Pay for Fertilizer is selected and Deluxe Speed-Gro is selected.
Farming Level The level of the player's Farming skill. This has direct impact to the Normal/Silver/Gold ratios, but does not affect artisan goods.
Farming Level 5 Skill The Tilling skill is available once the player reaches level 5 in Farming. This option is disabled unless the correct level is set.
Farming Level 10 Skill Specific skills available once the player reaches level 10 in Farming. This option is disabled unless the correct level is set and unless Tilling is enabled under Level 5 skills.
Foraging Level The level of the player's Foraging skill. This has direct impact to the Normal/Silver/Gold ratios, but does not affect artisan goods.
Foraging Level 5 Skill The Gatherer skill is available once the player reaches level 5 in Foraging. This option is disabled unless the correct level is set.
Foraging Level 10 Skill The Botanist skill is available once the player reaches level 10 in Foraging. This option is disabled unless the correct level is set and unless Gatherer is enabled under Level 5 skills.
Farming Food Buff The consumable buff active on the player.
Show Extra Info Selecting this will show additional detailed info about every crop on the tooltip.
Disable Links Selecting this will disable opening the Official Wiki when the bar graph is clicked.

Contact

You may contact me on the following locations: Twitter | Reddit | YouTube | deviantArt

stardew-profits's People

Contributors

brendanlong avatar carpeliam avatar coopermor avatar davidmcguiredesign avatar direct91 avatar dooart avatar doodlebunnyhops avatar finaldoom avatar frenchiveruti avatar gabrielbarker avatar guilhermeportela avatar iduelzz avatar jonfoster avatar kalisjoshua avatar mekkanik avatar polarstoat avatar samatary avatar tenebrosful avatar thorinair 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  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  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

stardew-profits's Issues

Ask what's the current day instead of number of days left

I think it is much easier if you input the current day because then you'll just need to look at the HUD. I know it is very simple math but isn't indulging laziness the whole point of computers?

If you think it's fine I'll make a PR. :)

Wine aging in casks x2 wine value

In summer with kegs, Hops seem as the most profitable crop. But if you consider aging the starfruit wine it doubles. So it would be the most profitable.

Add "max seed money" to README.md

From what I can tell, this info was added to help.html in #28, but not to README.md.

I was thinking of making a PR with this myself, but I'm still not completely sure I understand what it means. After thinking about it for a while and trying some things, I think it means that "max seed money" will be used instead of "number of crops" when a player pays for seeds. That's my best guess. If so, having both "number of crops" and "max seed money" active is a bit confusing since only one of them matters at any given time.

Limited number of kegs/jars?

For example, here's profits for Fall with Kegs:

image

As you can see Cranberries are much more "profitable" than pumpkins.

However, this is only because Cranberries produce in so much greater numbers, so unless you have a matching number of Kegs, you'll quickly have a surplus of Cranberries that won't go through the Kegs, thus changing the profits.

An option to limit the Keg throughput might provide more accurate results.

Casks

It would be useful to add support for Casks, which can increase the value of alcohol and cheese.

Ancient Fruit not working

Hi. I stumbled upon your awesome calculator but somehow the ancient fruit seems not to work. Regardless of my setting it's shown with 0.
image

Thanks in advance
Stefan

Add ability to choose multiple crops for harvest

This is an excellent tool! One thing I think would add a lot of value is having the ability to evaluate the cost-benefit of multiple crops for the same harvest. For example, I don't want to JUST plant pumpkins, say I want to plant 3 total crops within 100 total spaces. I want to get some good profit, so I'll plant 50 Pumpkins, but what are other two crops should I pick with the remaining 50 that would still maximize my profit for the scenario? I know that there is a way to do this in the current application, but having a built in functionality to choose number of squares, and number of crops would be really cool!

Average profits per day wrong for cross season crops

The average profits per day calculation is wrong for cross season crops. It does correctly calculate the profits over multiple seasons, bet then divides only by 28 days, instead of 28 days times number of seasons. For example for coffe beans: It calculates correctly 23 harvests (9 harvests in Spring and 14 in Summer) and calculates the profits for that. But it only shows a duration of 28 days in the tooltip (it should be 56 days) and it also uses 28 days for the average per day calculation, which means that value is by a factor 2 too big.

Wild Seeds + Botanist

It would be nice if wild see profits were shown as well, including the guaranteed iridium status with botanist.

Number of harvest doesn't appear to be accurate

I suspect this bug impacts more than just starfruit, but that is the example I noticed.

Here are the important setting to re-create
Season: Summer (28 Days)
Current Day: 1
Ensure that you have not selected the "Agriculturalist" Level 10 Skill perk

If you configure things this way it will report that you can get 3 harvests out of starfruit. I don't think this is correct. From my testing Deluxe Speed-Grow will only reduce harvest time to 10 days which would still only be 2 harvests for the month.

I think the bug is in the harvests(cropID) function. (relevent part shown below.)

if (options.skills.agri)
	day += Math.floor(crop.growth.initial * (fertilizer.growth - 0.1));
else
	day += Math.floor(crop.growth.initial * fertilizer.growth);

I think you want to use Math.ceil instead of Math.floor. This way when you do the calculation for starfruit it will increment day by 10 instead of by 9.

Math.floor(13 * 0.75) = 9
Math.ceil(13 * 0.75) = 10

I should say I have very little java script experience so someone who knows better than I should probably verify what I'm saying here.

Fertilizer Ratios

As seen in the data.js file, when there is fertilizer, it just takes the ratio of the fertilizer and apply it to ratioN, ratioS, ratioG respectively, and it doesn't bother with player level. Is this how it is or am I not seeing something? On the wiki page, there is a whole table for fertilizer crop quality ratios.

suggestion: Add seed maker option under "Produce type"

A lot of crops yield a lot more than their raw value if first put though a seed maker. for example:
Corn 50G raw or 150G as 2 packages of seeds
Cranberry: 75G raw or 120G as 2 packages of seeds.
Jars/kegs are often ultimately better if you don't consider processing capacity, but the far shorter processing time (20minutes or 4000 minutes) can make a distinct difference with crops with high number of crop yields.
as another bonus, you also get a decent amount of mixed and ancient seeds.

especially those people who use the Automation mod get a lot of mileage out of using a few seed makers.

Keg value is not calculated for most crops

When hovering over crop data I noticed that for almost all (Hops, Coffeee and Wheat being exception - most likely because they produce unique products from kegs) Keg value is not being calculated at all (please see example screenshots below). It seems that it makes the chart to show completely wrong data - no matter what kind of filter I add. Could you please check and fix the issue?

image
image
image

Query String Options

All options should be, additionally, stored in the querystring of the page so that the links could be shareable and back/forward buttons work.

Wrong total fertilizer cost

On function fertLoss the return should be loss * planted(crop), using the actual number of crops planted, instead of loss * options.planted, using the maximum number of crops to plant.

Seed loss when Pay for seeds is off

When "Pay for seeds" is enabled, the profit is calculated from the number of fruits that can be harvested and the seed loss to buy the seeds. When it is disabled, the same number is used but the seed loss is zeroed. So where do the seeds come from?

Instead, I think when "Pay for seeds" is disabled, it should reduce the number of harvested fruits by the number of fruits that are necessary to make the same number of seeds in the seed maker.

Suggestion for coffee bean seed price

I think you shouldn't use the travelling cart price of 2500 for the seeds. In contrast to all other crops, coffee beans can be used as seeds themselfes. Coffe beans only have a value of 15, so you effectively only lose that much money if you use a coffe bean as seed instead of seling it. As coffe beans have a regrow time of 2 days and drop 4 beans, you can very quickly build up a large stock. Currently i alway turn off "pay for seeds" and memorize this value, then i turn it on again to compare it with all other crops. I suggest to to add 15g as "seed price from stock" to the seed price list.

1.6 Crops Missing

Carrot is there, but Summer Squash, Broccoli, and Powdermelon are missing. Likely due to missing assets in img.

Setting for seed maker profit loss

Hey, would be nice to have a setting that considers produce "not sold" due to having to make seeds again.

Would make a more useful comparison vs pay for seeds.

(Wiki says about 51% of harvest would need to be sacrivived, but that sure gets more complicated with crops that can be havested multiple times and/or give multiple items)

Ancient Seeds are no longer purchasable

In SV 1.6.3, Ancient Seeds cannot be purchased. The only way to get them now is from the Ancient Seed item or the seed maker. I'm not sure what the best way to handle this is. If you simply remove the Traveling Cart purchase option from the crops.js file, then they can no longer show up. However, as one of the most profitable crops in the game, I think it's still worth including them somehow.

Update to crops Broccoli etc

Hi after the new stardew patch update we have some new crops in the works.

Would you be adding them to the project anytime soon ? Thanks

GitHub Pages (hosting)

Since this is a static site - nothing server-side necessary - you should turn on the GitHub Pages option so that people can use it without cloning/downloading it. I'd be happy to help if you would like it.

Raw tea leaves value wrong

Tea leaves monetary value is not accurate when viewed as raw

Value per leaf should be 50, but it's set at 0.75
And when you look at the percentage chance of getting each quality of crops, it shows : (Normal) (0%) instead of (100%)

Price issue not present when showing Keg or Jar value

1

I can't code, just wanted to bring that to your attention.

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.