GithubHelp home page GithubHelp logo

polarstoat / stardew-crop-data Goto Github PK

View Code? Open in Web Editor NEW
22.0 2.0 4.0 175 KB

Parses Stardew Valley data files, extracting crop and seed data as JSON for use in web apps

License: MIT License

JavaScript 100.00%
stardew-valley parser json stardew-valley-mods stardew-mods

stardew-crop-data's People

Contributors

polarstoat avatar

Stargazers

 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

stardew-crop-data's Issues

Coffee Bean's seed is itself

The crop.seed property for Coffee Bean contains the same data as crop, as the Coffee Bean crop is its own seed.

Should the crop.seed property somehow point to it's parent, or should the duplicated data be left?

{
  "433": {
    "name": "Coffee Bean",
    "description": "Plant in spring or summer to grow a coffee plant. Place five beans in a keg to make coffee.",
    "id": 433,
    "category": "Seeds -74",
    "cropsTilesheetIndex": 40,
    "seasons": [
      "spring",
      "summer"
    ],
    "growthStages": [
      1,
      2,
      2,
      3,
      2
    ],
    "regrowTime": 2,
    "sellPrice": 15,
    "healthRestored": -300,
    "scythe": false,
    "trellis": false,
    "yield": {
      "minimum": 4,
      "maximum": 6,
      "levelIncrease": 10,
      "extraChance": 0.02
    },
    "seed": {
      "name": "Coffee Bean",
      "description": "Plant in spring or summer to grow a coffee plant. Place five beans in a keg to make coffee.",
      "id": 433,
      "category": "Seeds -74",
      "sellPrice": 15,
      "healthRestored": -300
    },
    "flowerColors": []
  }
}

Support multiple languages

It could be useful to support extracting the data in languages other than English. This could be as simple as changing which ObjectInformation.xnb file is loaded, as the other translations appear to be in the same Data directory with localisation information appended to the filenames:

ObjectInformation.de-DE.xnb
ObjectInformation.es-ES.xnb
ObjectInformation.fr-FR.xnb
ObjectInformation.hu-HU.xnb
ObjectInformation.it-IT.xnb
ObjectInformation.ja-JP.xnb
ObjectInformation.ko-KR.xnb
ObjectInformation.pt-BR.xnb
ObjectInformation.ru-RU.xnb
ObjectInformation.tr-TR.xnb
ObjectInformation.xnb
ObjectInformation.zh-CN.xnb

This could be a good feature for major version v2, which may also include a CLI.

Add checks to ensure Crops.yaml and ObjectInformation.yaml format have not changed

Implement checks to ensure that the format of the Stardew Valley data files is exactly as expected. This way users can be sure that the data they receive is valid, despite whether stardew-crop-data has been confirmed to work with a particular version of Stardew Valley.

The checks should include the length and types of data that is parsed.

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.