When the game is launched, ItemBags will load each .json file located in the assets\Modded Bags folder, and create a custom bag from each one. You can manually create these .json files, but the recommended steps are to create them are:

  • Start the game and load a save file.
  • In the SMAPI console window, use the command generate_modded_bag. This command will export a .json file to your assets\Modded Bags. The exported .json will use default settings, but makes for a good starting point.
  • Close Stardew Valley, then open the exported .json file in any text editor and fine-tune its settings as desired.

generate_modded_bag command:
Spoiler:  
Show
This command requires 2 parameters:

  • BagName - This is just the display name you want the exported bag to have. If the BagName contains spaces, you must enclose it in double quotes. For example: "Artisan Valley Bag"
  • ModUniqueID - This is the ModUniqueID found in the manifest.json of the mod that you want to create a bag for. The exported bag will, by default, be able to store every JsonAssets modded item that belongs to this mod. If a mod contains multiple manifest.json files, then use the ModUniqueID of the manifest.json that corresponds to the JsonAssets part of the mod. For example, if you download this mod, you'll see that it contains several subfolders, that each have their own manifest.json. [CP] Artisan Valley, [JA] Artisan Valley Machine Goods, [MFM] Artisan Valley Letters, [PFM] Artisan Valley. In this case we would want the manifest.json in the [JA] Artisan Valley Machine Goods since this is the one that defines the JsonAsset items.

Suppose we typed the following into the SMAPI console:

generate_modded_bag "Artisan Valley Bag" ppja.artisanvalleymachinegoods

That would export a file that looks like this:
Spoiler:  
Show
{
  "IsEnabled": true,
  "ModUniqueId": "ppja.artisanvalleymachinegoods",
  "BagId": "7a6fc755-19ce-b6e3-d6d7-445120a0fd45",
  "BagName": "Artisan Valley Bag",
  "BagDescription": "A bag for storing items belonging to ppja.artisanvalleymachinegoods mod",
  "IconTexture": "SpringObjects",
  "IconPosition": "{X:0 Y:0 Width:0 Height:0}",
  "Prices": {
    "Small": 2500,
    "Medium": 8000,
    "Large": 28000,
    "Giant": 85000,
    "Massive": 400000
  },
  "Capacities": {
    "Small": 30,
    "Medium": 99,
    "Large": 300,
    "Giant": 999,
    "Massive": 9999
  },
  "SizeSellers": {
    "Small": [
      "Pierre"
    ],
    "Medium": [
      "Pierre"
    ],
    "Large": [
      "Pierre"
    ],
    "Giant": [
      "Pierre"
    ],
    "Massive": [
      "Pierre"
    ]
  },
  "SizeMenuOptions": {
    "Small": {
      "GroupByQuality": true,
      "InventoryColumns": 12,
      "InventorySlotSize": 64,
      "GroupedLayoutOptions": {
        "GroupsPerRow": 5,
        "ShowValueColumn": true,
        "SlotSize": 64
      },
      "UngroupedLayoutOptions": {
        "Columns": 12,
        "LineBreakIndices": [],
        "LineBreakHeights": [],
        "SlotSize": 64
      }
    },
    "Medium": {
      "GroupByQuality": true,
      "InventoryColumns": 12,
      "InventorySlotSize": 64,
      "GroupedLayoutOptions": {
        "GroupsPerRow": 5,
        "ShowValueColumn": true,
        "SlotSize": 64
      },
      "UngroupedLayoutOptions": {
        "Columns": 12,
        "LineBreakIndices": [],
        "LineBreakHeights": [],
        "SlotSize": 64
      }
    },
    "Large": {
      "GroupByQuality": true,
      "InventoryColumns": 12,
      "InventorySlotSize": 64,
      "GroupedLayoutOptions": {
        "GroupsPerRow": 5,
        "ShowValueColumn": true,
        "SlotSize": 64
      },
      "UngroupedLayoutOptions": {
        "Columns": 12,
        "LineBreakIndices": [],
        "LineBreakHeights": [],
        "SlotSize": 64
      }
    },
    "Giant": {
      "GroupByQuality": true,
      "InventoryColumns": 12,
      "InventorySlotSize": 64,
      "GroupedLayoutOptions": {
        "GroupsPerRow": 5,
        "ShowValueColumn": true,
        "SlotSize": 64
      },
      "UngroupedLayoutOptions": {
        "Columns": 12,
        "LineBreakIndices": [],
        "LineBreakHeights": [],
        "SlotSize": 64
      }
    },
    "Massive": {
      "GroupByQuality": true,
      "InventoryColumns": 12,
      "InventorySlotSize": 64,
      "GroupedLayoutOptions": {
        "GroupsPerRow": 5,
        "ShowValueColumn": true,
        "SlotSize": 64
      },
      "UngroupedLayoutOptions": {
        "Columns": 12,
        "LineBreakIndices": [],
        "LineBreakHeights": [],
        "SlotSize": 64
      }
    }
  },
  "Items": [
    {
      "Name": "Absinthe",
      "IsBigCraftable": false,
      "HasQualities": true,
      "RequiredSize": "Small"
    },
    {
      "Name": "Affogato",
      "IsBigCraftable": false,
      "HasQualities": true,
      "RequiredSize": "Small"
    },
    {
      "Name": "Almond Butter",
      "IsBigCraftable": false,
      "HasQualities": true,
      "RequiredSize": "Small"
    },
    

The rest of the items have been omitted for brevity


  ]
}

As you can see, this file is massive. But it's not too complicated, so let's step through every piece of data defined in it and what they do.

Understanding the modded bag .json files
Spoiler:  
Show

  • "IsEnabled": true,
Possible values: true, false
This just tells ItemBags if the file should be loaded. Default value: true
  • "ModUniqueId": "ppja.artisanvalleymachinegoods",
Possible values: Empty string (""), Non-empty string
This tells ItemBags what mod must be installed for this file to be usable. With it's current value of "ppja.artisanvalleymachinegoods", this file will only be loaded if a corresponding mod with that manifest.json UniqueID is found. This is optional. If you changed it to an empty string, ("ModUniqueID": "",) then the file would always be loaded.
  • "BagId": "7a6fc755-19ce-b6e3-d6d7-445120a0fd45",
Possible values: Any valid GUID string
This is a GUID (Globally Unique Identifier) for the bag. You cannot have multiple bags with the same BagId. So if you generate multiple bags from the same ModUniqueID, then you will need to open the exported files, and make sure they do not have the same BagId. If they do, just go to this site: https://www.guidgenerator.com/, generate a guid, and use that as the BagId.
  • "BagName": "Artisan Valley Bag",
Possible values: any string
This is the display name of the bag, not including the bag's size.
  • "BagDescription": "A bag for storing items belonging to ppja.artisanvalleymachinegoods mod",
Possible values: any string
This is the tooltip description text when hovering over the bag, not including information about how many of each item it can store.
  • "IconTexture": "SpringObjects",
Possible values: "SpringObjects", "Craftables", "Debris", "Tools", "Cursors"
This is the name of the Game texture that will be used to draw an icon to the bottom-right of the bag.
"SpringObjects" refers to the texture at "Content\Maps\springobjects.xnb", "Craftables" is "Content\TileSheets\Craftables.xnb", "Debris" is "Content\TileSheets\debris.xnb", "Tools" is "Content\TileSheets\tools.xnb", and "Cursors" is "Content\LooseSprites\Cursors.xnb"
  • "IconPosition": "{X:0 Y:0 Width:0 Height:0}",
Possible values: Any Rectangle object that is part of the "IconTexture"
This is the position of the sprite within the "IconTexture" to use when drawing the icon. Typically this should be a 16x16 region of the texture.
Icon example:
Spoiler:  
Show
Here is what the Content\Maps\springobjects.xnb texture looks like:
Spoiler:  
Show


Suppose you wanted the bag's icon to be a Prismatic Shard. Prismatic Shard is located near the top-left corner of the texture. So, you would use these settings:

"IconTexture": "SpringObjects",
"IconPosition": "{X:32 Y:48 Width:16 Height:16}",

The top-left corner is X,Y = 0,0. The positive X-axis is to the right, and the positive Y-axis is down.

To open and view the textures in .xnb files, you need to use a program such as xnbcli to unpack the data first. More info at: Unpacking Game Files

  • "Prices": { "Small": 2500, "Medium": 8000, "Large": 28000, "Giant": 85000, "Massive": 400000 },
Possible values: Any non-negative integer
These are the default shop prices of each size of the bag. There MUST be a value for each size ("Small", "Medium", "Large", "Giant", and "Massive"). Note that these prices are also affected by various values in the config.json file, such as "GlobalPriceModifier". For example, if the config.json file has "GlobalPriceModifier" = 1.5, then the Massive bag would cost 400000*1.5=600000 gold.
  • "Capacities": { "Small": 30, "Medium": 99, "Large": 300, "Giant": 999, "Massive": 9999 },
Possible values: Any non-negative integer
These are the default maximum quantity of each item that can be stored in each size of the bag. There MUST be a value for each size ("Small", "Medium", "Large", "Giant", and "Massive"). Note that these capacities are also affected by various values in the config.json file, such as "GlobalCapacityModifier". For example, if the config.json file has "GlobalCapacityModifier" = 1.5, then the Massive bag would be able to store roughly 9999*1.5=15000 of each item inside of it.
  • "SizeSellers": { "Small": [ "Pierre" ], "Medium": [ "Pierre" ], "Large": [ "Pierre" ], "Giant": [ "Pierre" ], "Massive": [ "Pierre" ] },
Possible values: The expected shop names are "Pierre", "Clint", "Robin", "Willy", "Marnie", "Krobus", "Dwarf", "Marlon", "Gus", "Sandy", "TravellingCart", "Employee" (This is the JojaMart shop), "HatMouse", "Khadija" (this is the shop from PPJA - Khadija's Recipe Shop), and these shops from Stardew Valley Expanded: "Sophia", "Bear", "Alesia", "Isaac"
These are the names of the shops that will sell each size of the bag. There MUST be a value for each size ("Small", "Medium", "Large", "Giant", and "Massive"). The value for each size is a list of shop names. For example, you could use "Small": [ "Pierre", "Willy" ] to make the Small size of the bag sold by Pierre and Willy.
  • "SizeMenuOptions": { ...
These are settings that define how the bag's user interface should be laid out. There MUST be a value for each size ("Small", "Medium", "Large", "Giant", and "Massive"). Each size's corresponding value will look something like this:
Spoiler:  
Show
{
"GroupByQuality": true,
                "InventoryColumns": 12,
                "InventorySlotSize": 64,
                "GroupedLayoutOptions": {
                 "GroupsPerRow": 5,
                "ShowValueColumn": true,
                "SlotSize": 64
},
"UngroupedLayoutOptions": {
                "Columns": 12,
                "LineBreakIndices": [],
                "LineBreakHeights": [],
                "SlotSize": 64
}
},
  • "GroupByQuality": true,
Possible values: true, false (Default=true)
If true, then items inside of the bag that are available in multiple different qualities will be grouped together according to the "GroupedLayoutOptions" settings. Things like fish, fruits, and vegetables can have multiple qualities (Regular/Silver/Gold/Iridium). While items like seeds, artifacts, resources, crafted items etc do not have multiple qualities. If GroupByQuality=false, then even the items that do have multiple qualities will still be arranged according to "UngroupedLayoutOptions" settings.
  • "InventoryColumns": 12,
Possible values: Any non-negative integer (Recommended: 12)
The number of columns to use when arranging the items in the bottom half of the bag's interface. This bottom part is usually the player's inventory, but it could also be the contents of a chest (if the bag was opened from inside of a chest)
  • "InventorySlotSize": 64,
Possible values: Any non-negative integer (Recommended: Between 40 and 64)
This is the size, in pixels, to use when drawing an item slot in the bottom half of the bag's interface. Note that the actual pixel size might not be exactly the same due to the game's zoom options. If you're playing at 75% zoom, then an inventory slot rendered at 64x64 pixels would actually appear as 64*.75=48 pixels on your monitor.
  • "GroupedLayoutOptions": { ...
These are settings to use when arranging items inside of the bag that are available in multiple different qualities. These options are only relevant if GroupByQuality=true.
  • "GroupsPerRow": 5,
Possible values: Any non-negative integer (Recommended: Between 4 and 9. Possibly more if you're using an ultra-wide monitor at a high resolution)
A "Group" is a horizontally arranged set of the same item, in all 4 qualities that it is available in. So let's say your bag is displaying a Pufferfish. There would be 4 pufferfish slots next to each other, one for each quality (Regular/Silver/Gold/Iridium).
  • "ShowValueColumn": true,
Possible values: true, false (Default=true)
The "Value" column is just an extra column next to each group, that shows the summed value of all items in the group.
  • "SlotSize": 64
Possible values: Any non-negative integer (Recommended: Between 40 and 64)
The size, in pixels, of each slot in a group
  • "UngroupedLayoutOptions": { ...
These are settings to use when arranging items inside of the bag that are not being grouped by quality. (So either the item is not available in multiple qualities, or GroupByQuality=false).
  • "Columns": 12,
Possible values: Any non-negative integer (Recommended: Between 12 and 30)
The number of columns to use when arranging items inside of the bag that are not being grouped by quality.
  • "LineBreakIndices": [],
Possible values: A list of non-negative integers (Default = empty list)
A line-break just forces the next item to be placed in the next row. Suppose your bag has 13 different items in it, and 12 columns. Obviously, after the 12th item, the first row is full so the 13th item slot would be in the 1st column of the 2nd row. LineBreakIndices just lets you force a linebreak before a row is full. For example, if I used "LineBreakIndices:" [ 0, 5 ], then the 1st item gets its own row. Items #2-#6 are on row #2, and the other items are on row #3. Note that the linebreak indices use "zero-based indexing". So a line break at index = 0 means there is a linebreak right AFTER the first item. Index = 5 then means there is another linebreak right AFTER the 6th item.
  • "LineBreakHeights": [],
Possible values: A list of non-negative integers (Default = empty list)
This is just extra vertical padding (in pixels) between 2 rows that have a forced linebreak between them. Usually this would just be 0 for each linebreak.
  • "SlotSize": 64
Possible values: Any non-negative integer (Recommended: Between 40 and 64)
The size, in pixels, of each slot in the ungrouped portion of the bag interface.

  • "Items": [ ... ]
Possible values: A list of items
This list defines some basic data about each item that the bag should be capable of storing. Each entry in the list defines data that looks something like this:
Spoiler:  
Show
{
"Name": "Absinthe",
"IsBigCraftable": false,
"HasQualities": true,
"RequiredSize": "Small"
},
  • "Name": "Absinthe",
Possible values: Any non-empty string
This is the name of the item that the bag should be capable of storing. It doesn't even have to be a modded item, it can be an item that belongs to the vanilla un-modded game, or even an item that belongs to another mod. If the name of the item is not unique, but it has a stable item Id, then you should instead fill in the ObjectId value.
  • "IsBigCraftable": false,
Possible values: true, false
BigCraftables are basically just items that can be placed onto a tile of the game world, such as Mayonnaise Machines, Furnaces, Crab Pots, Recycling Machines etc.
  • "HasQualities": true,
Possible values: true, false
Whether or not the item is obtainable in multiple different qualities (Regular/Silver/Gold/Iridium). This is typically for items like fish, fruits, and vegetables, but not items like resources, crafted items, seeds, artifacts etc.
  • "RequiredSize": "Small"
Possible values: "Small", "Medium", "Large", "Giant", "Massive"
This is the minimum size of the bag that is required in order to hold this item. If "RequiredSize"="Small", then all sizes of the bag can hold the item. If "RequiredSize"="Giant", then only Giant and Massive sizes can hold the item.
  • "ObjectId":
Possible values: Any non-negative integer
OPTIONAL - only intended to be used by items with stable Ids that have ambiguous names, such as if you were trying to refer to the vanilla 'Large Egg' item, which could be Id=174 (White Egg) or Id=182 (Brown Egg). ObjectId is also useful when creating a bag that will work in multiple languages assuming the Id is unique.


You can also specify a value for the "ItemCategories" property to define a bag that can store any items belonging to specified category Ids (requires ItemBags v3.0.11 or later). This property expects a list of integers for each bag size. For example:

"ItemCategories": {
    "Small": [-5],
    "Medium": [-5],
    "Large": [-5, -6],
    "Giant": [-5, -6],
    "Massive": [-5, -6]
  }

This would allow storing all Eggs (category Id=-5) in small and medium bags, and all Eggs and Milks (cateogry Id=-6) in large, giant, and massive bags. (Category Ids can be found at: https://stardewvalleywiki.com/Modding:Items). If "Items" AND "ItemCategories" properties are defined, then the result set is unioned (it will include all items of the specified categories, and all items that were explicitly specified in the "Items" list)

EDIT: For even more control over the items the bag can store, you can use ItemFilters, described here


What items can I store inside modded bags?
Spoiler:  
Show
If you use the generate_modded_bag command, you'll notice that the exported file contains all JsonAsset "Objects" and "BigCraftables" items belonging to the mod that the export was created from. But modded bags can store more than just that.

You can store:
  • Json Assets - Objects and BigCraftables
  • Content Patcher - Objects and BigCraftables
  • Vanilla game content - Objects and BigCraftables

Basically, MOST items are "Objects", and "BigCraftables" and a sub-classification of "Object". So you can store almost any stackable items that exist in the vanilla game, or that were added through Content Patcher or Json Assets. Items that you CANNOT store are generally things like: Equippables (Hats, Boots, Rings, Weapons, Clothing) and Tools.

Here is the full item hierarchy used in Stardew Valley:
Spoiler:  
Show
Item
........Boots
........Clothing
........Hat
........Ring
........SpecialItem
........Tool
................Axe
................Blueprints
................FishingRod
................GenericTool
................Hoe
................Lantern
................MagnifyingGlass
................MeleeWeapon
................MilkPail
................Pan
................Pickaxe
................Raft
................Shears
................Slingshot
................Stackable
........................Seeds
................Sword
................Wand
................WateringCan
........Object
................BreakableContainer
................Cask
................Chest
................ColoredObject
................CrabPot
................Furniture
........................StorageFurniture
........................TV
................IndoorPot
................MiniJukebox
................Sign
................SwitchFloor
................Wallpaper
................WoodChipper
................Workbench

From the above list, any Item classified as "Object" (but not sub-types of Object (with the exception of ColoredObject)) can be stored inside modded bags. All you need is the name of the item, whether or not it's a "BigCraftable" (objects that can be placed on a tile of the game world, typically these are just machines like Furnaces, Recycling Machines, Cheese Makers etc, or other place-able objects like Scarecrows or Sprinklers), whether or not the item is obtainable in multiple different qualities (Regular/Silver/Gold/Iridium), and the size of the bag that you want to be required to store the item.

Sharing modded bags
User-created modded bags can be found here

Article information

Added on

Edited on

Written by

SlayerDharok

39 comments

  1. neelcat
    neelcat
    • member
    • 0 kudos
    Hello! I was wondering if there was any way to include an item category but exclude items from a specific mod? Or do I need to just add my desired items one by one? (example, I want to make an egg bag, but I have the mod Resource Chickens and want those eggs not to be included). Just double checking before I do the tedious solution lol
  2. Nes0520
    Nes0520
    • member
    • 0 kudos
    Hello! Thank you for creating such a useful mod. I use generate_category_modded_bag to categorize all items (both vanilla and mod) I receive but whenever I download a new mod with new items I will need to recreate the bag so all new items will be included in the categorized bag. I saw in the changelog that there's a new command that will be more efficient than what I'm doing but I'm not sure how to use it, please advise. Thanks again!
  3. DakotaChick
    DakotaChick
    • premium
    • 0 kudos
    I'm trying to make a new modded bag for the new items added by Pokemon Ranch (the geode-style chests, gummies, technical machines, eggs, etc).

    I have looked at the Pokemon Ranch manifest.json and determined that this information designates the modID as bees.pkr.
        "Name": "Pokemon Ranch",
        "Author": "plaidbees",
        "Version": "1.7",
        "Description": "Adds Pokemon as new farm animals.",
        "UniqueID": "bees.pkr",

    Using the console command line as described in the article, I came up with generate_modded_bag "PokeRanch Bag" bees.pkr

    However, when I put that into SMAPI, I get this outputgenerate_modded_bag "PokeRanch Bag" bees.pkr
    [Item Bags] ItemBags: Unhandled error while executing command: Object reference not set to an instance of an object.

    I've created/modified so many new bags for my mods and this is my first time encountering this. Any ideas?

    On a side note: is there a way to "disable" a default bag in the same way as shown in the modded bag options above, but it does not seem to actually work like that. Would I just need to remove those bags from the bagconfig.json (keeping an intact copy elsewhere, obviously)? Or is there a better way?
    1. SlayerDharok
      SlayerDharok
      • premium
      • 42 kudos
      I've uploaded a new beta version (ItemBags 3.0.8-beta2 (PC)) which should fix the issue with processing certain modded items from Pokemon Ranch mod.

      As for the default bags, no there isn't a way to enable/disable them. You'll have to edit the .json file and remove all relevant json data for whichever bags you don't want. Be very careful when doing so since if you have any save files which own any of the default bags you remove from bagconfig.json, then you could experience major errors (and possibly even be unable to load any save files). Make lots of backups.
    2. DakotaChick
      DakotaChick
      • premium
      • 0 kudos
      THANK YOU!!!! You, my dude, are awesome.

      I downloaded your update beta, ran the command again and got this:
      generate_modded_bag "PR Test Bag" bees.pkr
      [Item Bags] Failed to retrieve item metadata for bees.pkr_minccinoeg. ItemRegistry.ResolveMetadata("bees.pkr_minccinoeg") returned null. If this is a valid item, it will be skipped for processing. *[ERROR FOUND INSIDE THE MOD'S minccinodata.json FILE]* 
      [Item Bags] Failed to retrieve item metadata for bees.pkr_minkdrinktm. ItemRegistry.ResolveMetadata("bees.pkr_minkdrinktm") returned null. If this is a valid item, it will be skipped for processing. *[ERROR FOUND INSIDE THE MOD'S miltankdata.json FILE]*
      [Item Bags] Failed to retrieve item metadata for bees.pkr_lunatonesmayo. ItemRegistry.ResolveMetadata("bees.pkr_lunatonesmayo") returned null. If this is a valid item, it will be skipped for processing. *[ERROR FOUND INSIDE THE MOD'S sunmoondata.json FILE]*
      [Item Bags] Failed to retrieve item metadata for bees.pkr_gummi. ItemRegistry.ResolveMetadata("bees.pkr_gummi") returned null. If this is a valid item, it will be skipped for processing. *[UNABLE RESOLVE where this problem lies, but I have a suspicion that it's not actually an item. Each gummi is listed like "bees.pkr_[ColorNameHere]gummi."]*
      [Item Bags] File exported to: F:\SteamLibrary\steamapps\common\Stardew Valley\Mods\ItemBags\assets\Modded Bags\bees.pkr.json
      You will need to re-launch the game for this file to be loaded.

      I'm putting together a message to the mod's author to inform him/her of the typos that I was able to locate. I, also, plan to ask the author the correct syntax for pulling ALL gummi data at once vs having to put it together manually. If you have any insight for this unsolved issue, I'd love to hear it!

      Thank you again!
    3. SlayerDharok
      SlayerDharok
      • premium
      • 42 kudos
      Honestly I've never worked with Content Patcher before, so I have no idea what the correct syntax is or what item data is or isn't optional.

      As for the gummi issue, it's probably a typo with the goldgummi in assorted/miscdata.json:

      "{{ModId}}_goldgummi": {
      "Name": "{{ModId}}_gummi",
      "DisplayName": "{{i18n: goldgummi}}",
      "Description": "{{i18n: goldgummi.d}}",
      "Texture": "assorted/gummis",
      "SpriteIndex": 16,
      "Type": "Basic",
      "Category": -17,
      "Edibility": 15,
      "Price": 500,
      "ExcludeFromShippingCollection": "{{Treasure Box Items}}",
      "ContextTags": [
      "color_gold"
      ]
      },
    4. DakotaChick
      DakotaChick
      • premium
      • 0 kudos
      Thank you for the quick reply! I seem to have missed that reference to the "{{ModId}}_gummi" under the Golden Gummi. I'll see about working with that as a starting point.
    5. DakotaChick
      DakotaChick
      • premium
      • 0 kudos
      Oh no! My bags were working, but idk what I did to make this message happen, nor do I have any idea of how to fix it.[Item Bags] Loading Modded Bags type info
      [Item Bags] Failed to import modded bags. Error: Object reference not set to an instance of an object.
      System.NullReferenceException: Object reference not set to an instance of an object.
         at ItemBags.Persistence.ModdedBag.<>c__DisplayClass55_1.<OnJsonAssetsIdsFixed>b__1(ModdedItem x) in C:\Programming\Source\Personal\SDV\Public\ItemBags\ItemBags\Persistence\ModdedItems.cs:line 281
         at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
         at ItemBags.Persistence.ModdedBag.OnJsonAssetsIdsFixed(IJsonAssetsAPI API, BagConfig Target, Boolean RevalidateInstances) in C:\Programming\Source\Personal\SDV\Public\ItemBags\ItemBags\Persistence\ModdedItems.cs:line 281

      Full SMAPI log here: https://smapi.io/log/47f7f27ed6a5415ab4317adcc04217e8

      **EDIT** If its any help, it only seems to be affecting the bags with affinity to specific mods. My single modded bag that does not use a source mod (by way of item names not IDs) works perfectly. Every other modded bag that uses a source mod to search for the items included don't load properly.
    6. SlayerDharok
      SlayerDharok
      • premium
      • 42 kudos
      The log says you're using v3.0.7. Try switching back to the 3.0.8 beta maybe.

      You'll probably have to try disabling your modded bags and then slowly re-enabling them one-by-one to figure out which one is causing it to fail and narrow down the problem.
    7. DakotaChick
      DakotaChick
      • premium
      • 0 kudos
      Oh! I didn't realize I had somehow reverted to 3.0.7. Good catch!

      I essentially ended up grabbing all of the bags out and dropping them into a folder on my desktop. I put one bag back at a time and loaded the game. If it went fine, I added another, then another, etc. until I located the particular bag causing the trouble.

      It was indeed the Pokémon Ranch bag. I opened the .json to see where the issue might be, and as much as I hate to admit it, I spent an exorbitant amount of time looking for the issue, only to find there was an extra comma where it shouldn't have been.

      Here we are FIFTEEN (15) hours later and everything is working beautifully. Only making minor adjustments to the visual layout of the bags now.

      Thank you so very much for all of your help!
  4. causticwashername
    causticwashername
    • member
    • 5 kudos
    Aside from line breaks, is there a way to insert an empty space in the middle of a row?
    I'm trying to make myself a seed bag with all the vanilla and modded seeds I use. Sorting them by Season/Harvest-Type/etc. and while the Line Break makes for an easy way to spot the cut between categories it also enlarges the bag significantly.
    1. SlayerDharok
      SlayerDharok
      • premium
      • 42 kudos
      No, there isn't currently a way to do that other than to add some arbitrary erroneous item as a placeholder, but that would look pretty ugly in the UI. Actually I think modded bags have some logic to skip invalid items when initializing the data, so even that probably wouldn't work.
  5. Valkyrie897
    Valkyrie897
    • member
    • 4 kudos
    When I create an item bag (which I have only started since the 1.6 update), it generates the bag, but none of the mod's items are in the file for the bag.

    I have been putting them in by hand (copy, pasting, and adjusting) from the instructions on this page.

    Is that how it is supposed to work?
    1. SlayerDharok
      SlayerDharok
      • premium
      • 42 kudos
      It used to work for JsonAssets items but not Content Patcher items. But ever since the 1.6 update, I had to rework a lot of the logic for generating the bags since the JsonAssets API removed the functions I was using to get items belonging to a particular JsonAssets mod.

      Unfortunately, the game doesn't have a clean way of getting all items belonging to a particular mod, so I had to try to guess items from a mod by looking for ones whose Id began with the mod's UniqueId (since it's a somewhat common naming convention to use your mod's id as a prefix to an item's id). For example, Ridgeside Village (Mod id = "Rafseazz.RSVCP") has items such as "Rafseazz.RSVCP_Autumn_Drop_Berry", "Rafseazz.RSVCP_Bladetail_Sturgeon", "Rafseazz.RSVCP_Caped_Tree_Frog". If a mod doesn't follow that naming convention, it's unable to find the item when generating the bag, so the item would have to be added to the bag json file manually.
  6. wibbelkind
    wibbelkind
    • member
    • 0 kudos
    Is there a possibility to add additional sellers that are patched with STF? I am thinking Ridgeside Valley but also the Grampleton Makers Market...
  7. acearohippo
    acearohippo
    • premium
    • 79 kudos
    Hello! I love this mod so much and realise that editing/making modded bags is not as hard as I initially thought it would be!
    However, I was wondering if there is a way, on our end, to make a Museum counter bag, like how the Bundle bag functions? That way we can keep track of which items have and haven't been donated to the museum at a glance? :)
    1. SlayerDharok
      SlayerDharok
      • premium
      • 42 kudos
      No, sorry. A "Museum Bag" is a great idea! But unfortunately it wouldn't be possible as a modded bag because it would require it's own special logic. Modded bags are currently just treated as data - all of the logic is already part of the mod, and the modded bag just defines the items the bag can store. A museum bag would need new logic that would, for example, read the museum data from your file when a save is loaded, and detect when items are donated to the museum to keep that data updated, and possibly a custom menu similar to the bundle bag with check marks on the completed items. I don't play Stardew Valley anymore so I don't plan on adding new features, but the source code is public if anyone else wanted to

  8. jmsnexus
    jmsnexus
    • member
    • 1 kudos
    I love this  mod. Simply amazing. Thank you so much.

    I made some modded bags, but now I'm wondering is it possible to make a Gifts bag similair to the Community Center Bundle bag where you can have liked and loved gifts for each NPC. You can store 2 - 33 (week to year's  worth of gifts and a birthday gift) and also prioritise  higher quality items. This also means there has to be multiple instances of storing the same item.



    Not looking forward to making 31+ individual gift bags.
    1. acearohippo
      acearohippo
      • premium
      • 79 kudos
      Edit: I am so sorry, I just now realised I replied to someone instead of making a new post.
  9. Rara199202
    Rara199202
    • member
    • 0 kudos
    Can we make specific artisan goods bags like melon wine , ancient fruit wine , Apple wine , etc
  10. shashamoo
    shashamoo
    • member
    • 0 kudos
    Is there a way to use custom icons instead of ones from ?"SpringObjects", "Craftables", "Debris", "Tools", and "Cursors"?

    Thanks!
    1. SlayerDharok
      SlayerDharok
      • premium
      • 42 kudos
      Nope, sorry. Those texture paths are hardcoded enum values. So unless you used content patcher to modify one of those textures, you can't use your own sprites.
    2. shashamoo
      shashamoo
      • member
      • 0 kudos
      Ah, no problem. Thank you for your quick reply and for this amazing mod! It has definitely been a game changer.