Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://polarstoat.github.io/stardew-crop-profits/

πŸŒΏπŸ’° Calculate and visualise the profitability of crops in Stardew Valley
https://polarstoat.github.io/stardew-crop-profits/

javascript stardew-valley webapp

Last synced: 2 months ago
JSON representation

πŸŒΏπŸ’° Calculate and visualise the profitability of crops in Stardew Valley

Awesome Lists containing this project

README

        

# [Stardew Crop Profits](https://polarstoat.github.io/stardew-crop-profits/)

A tool to calculate and visualise the profitability of crops in Stardew Valley

**[Open application β†’](https://polarstoat.github.io/stardew-crop-profits/)**

#### What's accounted for

* The current in-game date
* The ratio of gold:silver:regular quality crops, as determined by farming level and fertilizer used
* The 'Tiller' and 'Agriculturist' professions
* The growth speed of a crop, as determined by fertilizer and 'Agriculturist' profession
* Which shops the player chooses to buy from, and the cost of seeds only from the players chosen shops
* The minimum yield for each crop, and the chance for extra crops when harvesting
* Whether the player buys seeds, or uses the Seed Maker
* Whether seeds are planted on the farm or in the greenhouse

#### What's NOT accounted for

* The cost of fertilizer, including how long it remains for
* Selling harvested produce as [Artisan Goods](https://stardewvalleywiki.com/Artisan_Goods), by using Kegs, Preserves Jars and Casks
* Daily luck levels
* Giant crops

### The calculations

Different calculations are used depending on which 'Show profit as' option is chosen: minimum profit, or average profit.

#### Minimum profit

This is the absolute minimum profit possible to be made, assuming that no quality crops are harvested, and only the minimum yield for each crop is harvested (no extra crops):

( Harvests βœ–οΈ Yield βœ–οΈ Sell price ) βž– Seed price

This calculation is identical to that on the [Stardew Valley Wiki](https://stardewvalleywiki.com/Crops#Gold_per_Day).

#### Average profit

( Harvests βœ–οΈ ( Yield βž• Chance for extra crops ) βœ–οΈ ( ( Normal quality sell price βœ–οΈ Chance for normal quality ) βž• ( Silver quality sell price βœ–οΈ Chance for silver quality ) βž• ( Gold quality sell price βœ–οΈ Chance for gold quality ) ) ) βž– Seed price

## Development

### Requirements

* [Node.js](https://nodejs.org/) >= 11.9.0
* [npm](https://www.npmjs.com/get-npm) >= 6.9.0
* [gulp-cli](https://www.npmjs.com/package/gulp-cli) >= 2.0.1

> This project has only been tested with the above requirements, but there is a good chance that it will work with earlier versions

### Setup

1. Clone this repository

```bash
git clone https://github.com/polarstoat/stardew-crop-profits.git
```

2. Change into the new folder

```bash
cd stardew-crop-profits/
```

3. Install dependencies

```bash
npm install
```

### Usage

1. Run the default gulp task (an alias for the `serve` task) for development to watch files in the `app/` folder and live reload/inject changes with [Browsersync](https://browsersync.io)

```bash
gulp
```

2. Run the `serve:dist` task to preview a full build before deploying

```bash
gulp serve:dist
```

3. Run the `deploy` task to publish to [GitHub Pages](https://pages.github.com)

```bash
gulp deploy
```

### Project structure

```
.
β”œβ”€β”€ .tmp/
β”‚Β Β  β”œβ”€β”€ css/
β”‚Β Β  └── js/
β”œβ”€β”€ app/
β”‚Β Β  β”œβ”€β”€ img/
β”‚Β Β  β”œβ”€β”€ js/
β”‚Β Β  β”œβ”€β”€ scss/
β”‚Β Β  └── index.html
β”œβ”€β”€ dist/
β”‚Β Β  β”œβ”€β”€ css/
β”‚Β Β  β”œβ”€β”€ img/
β”‚Β Β  β”œβ”€β”€ js/
β”‚Β Β  └── index.html
β”œβ”€β”€ .eslintrc.js
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE.md
β”œβ”€β”€ README.md
β”œβ”€β”€ gulpfile.js
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ package.json
└── stardew-crop-profits.sublime-project
```

File | Purpose
--- | ---
`.tmp/` | A temporary folder automatically created during development with the `serve` gulp task. Contains compiled Sass and JavaScript
`app/` | Source code of the application. The contents of this folder are compiled and minified by gulp, and then copied to `dist/`
`dist/` | Compiled and minified, distribution code. The contents of this folder are pushed to GitHub Pages. As this contains entirely 'built' code, this folder is ignored by Git
`.eslintrc.js` | Configuration for the [ESLint](https://eslint.org) JS linter
`.gitignore` | Specifies what files Git should ignore ([documentation](https://git-scm.com/docs/gitignore))
`LICENSE.md` | License information about the project
`README.md` | Information about the project
`gulpfile.js` | Tasks to be run by [gulp](https://gulpjs.com) for automating Sass compilation, JS minification, GitHub Pages deployment, etc.
`package-lock.json` | Automatically generated by npm to manage the `node_modules/` tree ([documentation](https://docs.npmjs.com/files/package-lock.json))
`package.json` | Manages project dependencies ([documentation](https://docs.npmjs.com/files/package.json))
`stardew-crop-profits.sublime-project` | Project file for Sublime Text ([documentation](https://www.sublimetext.com/docs/3/projects.html))

### Contributing

Contributions to the project are very much welcome. Please [open issues](https://github.com/polarstoat/stardew-crop-profits/issues) to discuss features and report bugs. If you would like to submit a pull request, please do so, but adhere to the conventions of the project.