Giter VIP home page Giter VIP logo

crop_planner's Introduction

Stardew Valley Crop Planner

A tool for planning crop schedules in the Stardew Valley game.

Reddit thread


New in v2

  • Multiple year planning
  • Import/export plans
  • Import existing plans from the old v1 planner
  • (only works if old plans are on the same browser)
  • Greenhouse plans separated from outdoor Farm plans
  • Improved planner design
  • Slightly improved responsive design for mobile devices
  • Crop info and Settings moved to pop-out sidebar
  • Improved Crop Info panel
  • More settings
  • More seasonal statistics
  • A few keyboard shortcuts:
  • Left/Right arrows = navigate seasons
  • ESC = open/close sidebar (opens to crop info)
  • ~ (tilde) = toggle between outdoor farm/greenhouse

I'll be leaving v1 of the planner up for anyone who's interested in accessing it, though I won't be updating it any further so it will only ever be up to date with Stardew Valley v1.07.


Crop Info

Crop info is stored in config.json. This data is retrieved from game files in [install dir]/Content/Data/, specifically Crops.xnb and ObjectInformation.xnb. I use XNBNode by Draivin to decompress these files and parse them with a Python script to save into the config.json file.


Development Utilities

If you are interested in contributing to the Crop Planner, I have included some Python utility scripts that I use in my development workflow. These are located in ./utils/, and require Python 3 to run. Each script has its own dependencies:

  • update-config.py - Updates crop data in config.json using data from decompiled game files
  • Dependencies:
  • Stardew Valley
  • XNBNode
  • xcompress32.dll (proprietary dll required by XNBNode, place in XNBNode folder)
  • watch-less.py - Watches style.less for changes and recompiles CSS using Less CSS
  • Dependencies:
  • less (Less CSS)
  • less-plugin-clean-css (for minifying the resulting CSS)
  • Install with npm

Item Prices

All items have a base price which the game uses to calculate the sell price (when you ship items) and buy price (when you buy items from stores) of that item. Buy price is simply Base Price * 2.

The calculation for sell price of an item (without added Profession bonuses) is below. The Quality of an item is used numerically as a multiplier: 0 for regular; 1 for silver; 2 for gold.

(int) Sell Price = Base Price * (1 + (Quality * 0.25))

Note: some items have sell/buy prices that deviate from the above formulas. These prices are likely hard-coded into the game.


Profit-per-day

Crop profits-per-day are calculated using the minimum sell price of a crop.
Profit per day: ((Total Yields * Sells For) - (Seed Price * Total Plantings)) / (Final Harvest Date - 1)

Example 1 - Parsnip
Parsnips take 4 days to grow after the day they are planted. In Spring, they can be planted 6 times and yield a total of 6 Parsnips, assuming replanting occurs on the same day of harvesting. The last harvest occurs on Day 25. Seeds cost 20g, and Parsnips sell for a minimum of 35g.

((6 * 35g) - (20g * 6)) / (25 - 1)
90g / 24
= 3.75g/day

Example 2 - Corn
Corn takes 14 days to grow after the day it is planted. In Spring and Fall, it is planted once and can yield a total of 11 Corn. The last harvest occurs on Day 55. Seeds cost 150g, and Corn sells for a minimum of 50g.

((11 * 50g) - (150g * 1)) / (55 - 1)
400g / 54
= 7.4g/day

All copyrighted content (images, textures, etc.) belong to their respective owners (ConcernedApe / Stardew Valley) and are not included under the MIT license of this project.

crop_planner's People

Contributors

exnil 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  avatar  avatar  avatar

crop_planner's Issues

ability to add custom crops

basicly as the title says, i use a ton of mods and would like to just have the ability to add in a custom plant. i am thinking is shoudl just be an option where i can input a name, grow time, if it regrows and how often, what seasons it grows in, and thats all i thing it needs

New crops

Hello! Not to bug but there has been a few new crops added in one of the previous updates (ex. Rice seeds). Will this eventually get added?

Cheers,
Squall

Planner does not account parsnips you start with in Year 1.

I am not sure if there is anything you can do about this, however you start the game with 15 parsnips in Year 1. This is not accounted for in the planner which in ends up making the profit incorrect as you are -300g for "buying" 15 parsnips you got for free.

I, and most others, can just do the maths in my head to figure what the actual profit will be. But if this can be corrected it will make the planner that much better. Sorry if this was the wrong way to submit this.

outdated

Hello, I love this code and want to use it more for my crops. I notice it does not have all crops. Also, it should have Preserves Jar and keg in the calculator. So please update it. I really love this code, so please update it.

Multiple suggestions (fertilizer, crop quality)

Hello I wanted to give a couple suggestions to make the planner actually usable endgame. I dont know if it was always like this or something broke.

  1. Fertilizer prize is not accounted for and it should.

  2. Crop quality is ignored for some reason. I find it strange given that the planner allow us to input our farming level to influnce the quality chances. Farming level plus fertilizer should influence the final sell value. This would be easy to do.

Opera Browser Issue

I just noticed there was an issue with loading while using Opera, turned off Opera Turbo but still had issues. Just bringing it to your attention.
EDIT: Not an issue any longer

Per season limited crops not working on Safari

Eg: On Summer, click on a day. Now choose a crop in the dropdown list. On Chrome, only the crops for Summer are available (normal behavior). On Safari (OS X and iOS) all the crops are available in the dropdown list.

Track artisan goods production times

Can we have a production time tracker for artisan goods?

I mostly use this tool to plan ahead my greenhouse production. It would be really useful to track artisan goods (preserves jar, keg, cask, etc)

Growth speed fertilizer math

I found a math issue related to growth speed fertilizers.

An example of this issue is visible when planting Ancient Fruit with Deluxe Speed-Gro. Say that you plant the seeds in 1st of any month. The website will say that the first batch will grow on 22nd, which is incorrect. The seeds will actually grow on 23rd (I checked ingame), so I suspect some sort of a rounding error.

I haven't tried combinations of other crops and fertilizers however.

Profit calculation is not working

Despite entering crop planting data for three seasons (Spring, Summer, and Fall) in Year 2, the profit value remains at 0g - > 0g. Screenshots are available here: http://imgur.com/a/Uvn6y as well as attached to this issue.

I am running on Windows 10 with Chrome Version 56.0.2924.87 (64-bit). I do have quite a few Chrome extensions installed but I've tested in an incognito session as well, which severely minimizes the number of extensions enabled, and experienced the same issue.

I've also included the JSON of the export of the plan with which I am experiencing this issue.

2_spring
2_summer
2_fall

{"plans":[null,{"farm":{"1":[{"crop":"cauliflower","amount":480}],"14":[{"crop":"strawberry","amount":480}],"29":[{"crop":"blueberry","amount":240},{"crop":"blueberry","amount":240,"fertilizer":"basic_fertilizer"}],"57":[{"crop":"cranberries","amount":240},{"crop":"cranberries","amount":240,"fertilizer":"basic_fertilizer"}]}}],"version":"2"}

Greenhouse doesn't flow over year-to-year

Crops planted in the greenhouse don't show up for subsequent years, even though they'd continue to grow. A cranberry planted in the greenhouse would continue to harvest out in perpetuity, while a single-harvest crop would still grow and be cut down on schedule if it was in the greenhouse, and the greenhouse planner doesn't reflect this.

Save to localStorage

It would be nice to have the crop planner data be saved to localStorage in addition to being exportable. This would allow the user to not have to export and reimport the data every time they want to use the application.

Add Crop Fairy

Simple suggestion: add an option to mark crops that have been grown by the crop fairy.

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.