Modding Help Looking For .Json File & Modding The Keg and Preserves Jar

Discussion in 'Mods' started by SinisterVoid, Dec 27, 2018.

  1. SinisterVoid

    SinisterVoid Aquatic Astronaut

    I am looking for a .Json file for a vanilla keg and preserves jar containing their full item lists and other data.

    I'm searching for them because I came across the Upgraded Machines mod which adds iron, gold and iridium furnaces to the game. The .Json file contains code for the furnaces, but in the assets folder there are images which implies that the mod creator also intended to make similar versions for the keg and the cask. So, I thought I'd try my hand at it if I can get the .json files for the machines.

    Iron [​IMG] --- Gold [​IMG] --- Iridium [​IMG]


    So far the only .json file I've found for Keg & Jar are from Artisan Valley machines, the Hardwood Keg and the Glass Jar, which gives me a bit of an idea as to what I should do for.
    Code:
    {
          "id": 1,
          "name": "Hardwood Keg",
          "description": "A versatile keg made of hardwood. Can be used to make malted beverages and fermented milk products.",
          "category": "Crafting",
          "texture": "hardwoodkeg.png",
          "crafting": "335 1 334 1 725 1 709 20",
          "pulsate": true,
          "tileindex": 0,
          "production": [
            {
              "item": "Apple Cider",
              "time": 2360,
              "materials": [
                {
                  "index": 613
                }
              ]
            },
            {
              "item": "Cauim",
              "time": 2360,
              "materials": [
                {
                  "name": "Cassava"
                }
              ]
            },
            {
              "item": "Dark Ale",
              "time": 6000,
              "materials": [
                {
                  "index": 262
                }
              ]
            },
            {
              "item": "Ginger Ale",
              "time": 2360,
              "materials": [
                {
                  "name": "Ginger"
                }
              ]
            },
            {
              "item": "Hard Apple Cider",
              "time": 2360,
              "materials": [
                {
                  "name": "Apple Cider"
                }
              ]
            },
            {
              "item": "Kefir",
              "time": 2360,
              "include": [
                438
              ],
              "materials": [
                {
                  "index": 436
                }
              ]
            },
            {
              "item": "Kumis",
              "time": 2360,
              "include": [
                186
              ],
              "materials": [
                {
                  "index": 184
                }
              ]
            },
            {
              "item": "Lassi",
              "time": 2360,
              "materials": [
                {
                  "name": "Yogurt"
                }
              ]
            },
            {
              "item": "Perry",
              "time": 6000,
              "materials": [
                {
                  "name": "Pear"
                }
              ]
            },
            {
              "item": "Porter",
              "time": 2360,
              "materials": [
                {
                  "name": "Wheat Malt"
                }
              ]
            },
            {
              "item": "Pulque",
              "time": 2360,
              "materials": [
                {
                  "name": "Maguey"
                }
              ]
            },
            {
              "item": "Sake",
              "time": 6000,
              "materials": [
                {
                  "index": 423
                }
              ]
            },
            {
              "item": "Sparkling Wine",
              "time": 6000,
              "materials": [
                {
                  "index": 398
                }
              ]
            },
            {
              "item": "Stout",
              "time": 6000,
              "materials": [
                {
                  "name": "Barley Malt"
                }
              ]
            },
            {
              "item": "Umeshu",
              "time": 6000,
              "materials": [
                {
                  "index": 406
                }
              ]
            }
          ]
        },
    


    Code:
    {
          "id": 2,
          "name": "Glass Jar",
          "description": "A jar to ferment non-alcoholic beverages. Turns mushrooms and various teas into kombucha. ",
          "category": "Crafting",
          "texture": "glassjar.png",
          "crafting": "388 20 766 100",
          "pulsate": true,
          "tileindex": 0,
          "production": [
            {
              "item": "Barley Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Barley Tea"
                }
              ]
            },
            {
              "item": "Berry Fusion Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Berry Fusion Tea"
                }
              ]
            },
            {
              "item": "Black Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Black Tea"
                }
              ]
            },
            {
              "item": "Blue Mist Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Blue Mist Tea"
                }
              ]
            },
            {
              "item": "Breakfast Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Breakfast Tea"
                }
              ]
            },
            {
              "item": "Cranberry Pomegranate Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Cranberry Pomegranate Tea"
                }
              ]
            },
            {
              "item": "Chai Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Chai Tea"
                }
              ]
            },
            {
              "item": "Chamomile Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Chamomile Tea"
                }
              ]
            },
            {
              "item": "Chanterelle Kombucha",
              "time": 1600,
              "materials": [
                {
                  "index": 281
                }
              ]
            },
            {
              "item": "Earl Grey Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Earl Grey Tea"
                }
              ]
            },
            {
              "item": "Dandelion Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Dandelion Tea"
                }
              ]
            },
            {
              "item": "Green Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Green Tea"
                }
              ]
            },
            {
              "item": "Jasmine Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Jasmine Tea"
                }
              ]
            },
            {
              "item": "Kombucha",
              "time": 600,
              "materials": [
                {
                  "index": 404
                }
              ]
            },
            {
              "item": "Lemon Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Lemon Tea"
                }
              ]
            },
            {
              "item": "Mint Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Mint Tea"
                }
              ]
            },
            {
              "item": "Morel Kombucha",
              "time": 1600,
              "materials": [
                {
                  "index": 257
                }
              ]
            },
            {
              "item": "Oolong Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Oolong Tea"
                }
              ]
            },
            {
              "item": "Purple Kombucha",
              "time": 1600,
              "materials": [
                {
                  "index": 422
                }
              ]
            },
            {
              "item": "Red Kombucha",
              "time": 600,
              "materials": [
                {
                  "index": 420
                }
              ]
            },
            {
              "item": "Rose Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Rose Tea"
                }
              ]
            },
            {
              "item": "Spice Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Spice Tea"
                }
              ]
            },
            {
              "item": "Strawberry Grapefruit Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "Strawberry Grapefruit Tea"
                }
              ]
            },
            {
              "item": "White Kombucha",
              "time": 1600,
              "materials": [
                {
                  "name": "White Tea"
                }
              ]
            }
          ]
        },
    


    So I'd go about it like this:
    Code:
    {
          "id": (x),
          "name": "(GRADE) Keg/Jar",
          "description": "(IN-GAME ITEM DESCRIPTION)",
          "category": "Crafting",
          "texture": "(FILENAME).png",
          "crafting": "(ITEM ID) (QUANTITY) (ITEM ID) (QUANTITY) etc",
          "pulsate": true,
          "tileindex": 0,
          "production": [
            {
              "item": "(OUTPUT ITEM NAME)",
              "time": (TIME),
              "materials": [
                {
                  "index": 613 (ITEM ID ????? )
                }
              ]
            },
            {
              "item": "(OUTPUT ITEM NAME)",
              "time": (TIME),
              "materials": [
                {
                  "name": "Cassava" (CUSTOM MOD ITEM NAME ????? )
                }
              ]
            },
    

    I'd like to use the vanilla/complete .json files so that I have a complete list of items that can be produced by the machines and the time it takes to produce them, and then I'll go about changing them.
    I don't know whether the items that come out would have different grades (normal, silver etc) or just one type using this code.

    The .json file for the original furnaces includes this:
    Code:
               "id": 0,
               "name": "Iron Furnace",
               "description": "A efficient iron furnace, requires 2 coal and 20 pieces of ore",
               "category": "Crafting",
               "texture": "IronMachines.png",
               "tileindex": 1,
               "pulsate":true,
               "frames": 1,
               "crafting": "335 4 334 2 80 2",
               "starter":
               {
                    "index": 382,
                    "stack": 2
               },
               "showitem": "false",
               "itempos": [18,70],
               "itemzoom": 0.5,
               "production":
    

    I don't know what "tileindex", "frames", "starter" and the lines below, "showitem", "itempos" and "itemzoom" do. And, how would I be able to specify the pixels that I want, since the image contains a few sprites. I thought that this was what "itempos" did but the coordinates didn't match up.
    So if someone could help me with this as well I'd be grateful.

    Thanks.
     
      HopeWasHere likes this.
    • foggywizard

      foggywizard Big Damn Hero

      Tileindex indicates what index on the sheet the machine starts at. In the case of what you're wanting, you'd be wanting 0 for the keg, and 3 for the preserves jar (which is what that is, not the cask).

      Frames is how many frames it has for its working animations, in this case you'd go with 0 (1 in the context of the furnace is telling it to use the lit version when it's working).

      Starter is the item you have to put in to get it to work without taking into account other items. For the furnace, it's coal.

      Showitem basically tells you what you put into the machine (false in this case, so it doesn't tell you what's inside).

      Item position and item zoom are both additional conditions for show item, telling you the item's position relative to the machine, and item zoom is the size of the item. It *does* seem to be off for this, but that seems to be the point (since it's not showing it anyway, it was done haphazardly). You could figure out where it is by setting Showitem to true.

      The items the keg and preserves jar produce are hardcoded into the game, so you'd have to either decompile the game and find that data for yourself, or use the wiki, which does have a lot of the information you need.
      https://stardewvalleywiki.com/Preserves_Jar
      https://stardewvalleywiki.com/Keg

      One of the major issues with doing this is trying to make it the specialized versions of the items, since they all have the same item ID (all jams have the same id, all wines, all pickles, all juices, you get the idea), but you'll be wanting to make them the special version. In this case, you might need to make a SMAPI mod to supplement the CFR content pack so that it does that properly (which might be the very reason those weren't implemented by this mod to begin with).
       
        Last edited: Dec 29, 2018
      • SinisterVoid

        SinisterVoid Aquatic Astronaut

        Thank you for explaining the code to me.

        You're absolutely right about the specialised versions of the items and their ID's. I didn't really understand it at first - and I still don't tbh - because I thought that the ID's for most items could be attained from SMAPI's List_items command.
        When I tried coding it, I first went about it by using "Index" and the ID's from SMAPI for a few wine items, with the materials being their respective fruits. This didn't work, I wasn't getting the right items back. So, with "Index" & ID's not working, I tried using "item" and then "name". None of these worked either, again I don't really understand why but it's alright, I guess if it was this easy the mod creator would've done it themselves.
         

        Share This Page