Modding:Crop data

From Stardew Valley Wiki
Revision as of 18:14, 5 December 2017 by Margotbean (talk | contribs) (Created page with "← Index {{Stub|Index 6-7 need more explanation}} This page explains how the game stores and parses crops data. This is an advanced guide for mod develope...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Index

Axe.png
Article Stub

This article is marked as a stub for the following reason:

  • Index 6-7 need more explanation

This page explains how the game stores and parses crops data. This is an advanced guide for mod developers.

Raw data

Crops data is stored in Content\Data\Crops.xnb, which can be unpacked using XNB Extract. Here's the raw data (as of v1.2) for reference:

299: "1 2 2 2/fall/39/300/-1/1/false/false/false" #!String
301: "1 1 2 3 3/fall/38/398/3/0/true 1 2 6 0/true/false" #!String
302: "1 1 2 3 4/summer/37/304/1/0/true 1 2 6 0/true/false" #!String
347: "2 4 6 6 6/fall/32/417/-1/0/false/false/false" #!String
425: "1 4 4 3/fall/31/595/-1/0/false/false/true 187 0 255 119 137 255 71 227 255 255 127 144 205 178 255 140 119 255" #!String
427: "1 1 2 2/spring/26/591/-1/0/false/false/true 255 186 255 223 191 255 255 246 0 255 80 0 255 158 193" #!String
429: "1 2 2 2/spring/27/597/-1/0/false/false/true 35 127 255 109 131 255 112 207 255 191 228 255 94 121 255 40 150 255" #!String
431: "1 2 3 2/summer fall/30/421/-1/0/false/false/false" #!String
433: "1 2 2 3 2/spring summer/40/433/2/0/true 4 6 10 .02/false/false" #!String
453: "1 2 2 2/summer/28/376/-1/0/false/false/true 255 0 0 254 254 254 255 170 0" #!String
455: "1 2 3 2/summer/29/593/-1/0/false/false/true 0 208 255 99 255 210 255 212 0 255 144 122 255 0 238 206 91 255" #!String
472: "1 1 1 1/spring/0/24/-1/0/false/false/false" #!String
473: "1 1 1 3 4/spring/1/188/3/0/true 1 2 6 0/true/false" #!String
474: "1 2 4 4 1/spring/2/190/-1/0/false/false/false" #!String
475: "1 1 1 2 1/spring/3/192/-1/0/true 1 2 8 .2/false/false" #!String
476: "1 1 1 1/spring/4/248/-1/0/false/false/false" #!String
477: "1 2 2 1/spring/5/250/-1/1/false/false/false" #!String
478: "2 2 2 3 4/spring/6/252/-1/0/false/false/false" #!String
479: "1 2 3 3 3/summer/7/254/-1/0/false/false/false" #!String
480: "2 2 2 2 3/summer/8/256/4/0/true 1 1 6 .05/false/false" #!String
481: "1 3 3 4 2/summer/9/258/4/0/true 3 5 5 .02/false/false" #!String
482: "1 1 1 1 1/summer/10/260/3/0/true 1 1 5 .03/false/false" #!String
483: "1 1 1 1/summer fall/11/262/-1/1/false/false/false" #!String
484: "2 1 2 1/summer/12/264/-1/0/false/false/false" #!String
485: "2 1 2 2 2/summer/13/266/-1/0/false/false/false" #!String
486: "2 3 2 3 3/summer/14/268/-1/0/false/false/false" #!String
487: "2 3 3 3 3/summer fall/15/270/4/0/true 1 2 5 0/false/false" #!String
488: "1 1 1 1 1/fall/16/272/5/0/true 1 2 10 .002/false/false" #!String
489: "2 2 1 2 1/fall/17/274/-1/0/false/false/false" #!String
490: "1 2 3 4 3/fall/18/276/-1/0/false/false/false" #!String
491: "1 1 1 1/fall/19/278/-1/0/false/false/false" #!String
492: "1 3 3 3/fall/20/280/-1/0/false/false/false" #!String
493: "1 2 1 1 2/fall/21/282/5/0/true 2 6 5 .1/false/false" #!String
494: "1 1 2 2/fall/22/284/-1/0/false/false/false" #!String
495: "3 4/spring/23/16/-1/0/false/false/false" #!String
496: "3 4/summer/23/396/-1/0/false/false/false" #!String
497: "3 4/fall/23/404/-1/0/false/false/false" #!String
498: "3 4/winter/23/412/-1/0/false/false/false" #!String
499: "2 7 7 7 5/spring summer fall/24/454/7/0/false/false/false" #!String
745: "1 1 2 2 2/spring/36/400/4/0/true 1 1 5 .02/false/false" #!String

Format

Index Field Example Value
Key Seed Index (from ObjectInformation.xnb) 473 (Bean Starter) 455 (Spangle Seeds)
0 Days in each stage of growth 1 1 1 3 4 1 2 3 2
1 Growth Season(s) spring summer
2 Row in Sprite Sheet (Content\TileSheets\Crops.xnb) 1 29
3 Index of Harvest (from ObjectInformation.xnb) 188 (Green Bean) 593 (Summer Spangle)
4 Regrow after Harvest 3 -1
5 Harvest Method 0 0
6 Chance for Extra Harvest true 1 2 6 0 false
7 Raised Seeds true false
8 Tint Color false true 0 208 255 99 255 210 255 212 0 255 144 122 255 0 238 206 91 255

Regrow after Harvest

Either -1 for no regrowth, or number of days until regrowth.

Harvest Method

1 for Scythe, 0 for all others

Chance for Extra Harvest

If this value is true, then the numbers that follow are parsed as:

  1. Min Harvest
  2. Max Harvest
  3. Max Harvest Increase per Farming Level
  4. Chance for Extra Crops

Raised Seeds

Used in several places in the game code.

  • When adding tint color, if this value is true the game will add "Color.White". If false, it will parse the Tint Color field before adding tint color.
  • If true, the crops will "shake" less when walked across.
  • If true, the sound made when planting is "stoneStep" instead of "dirtyHit".

Tint Color

If Tint Color is true, a string of rgb() values follows. In the example above, Summer Spangle can be one of 6 different colors:

  • rgb(0, 208, 255)
  • rgb(99, 255, 210)
  • rgb(255, 212, 0)
  • rgb(255, 144, 122)
  • rgb(255, 0, 238)
  • rgb(206, 91, 255)