I have a mod that expands bag space and chest space. The expanded portion is accessible via scrolling. If a bag is in a slot towards the bottom of the chest that needs to be accessed via scrolling, then the bag won't open and will act like a regular item jumping between the bag and the chest on both right and left click.
If a bag is at the top of the chest and I scroll down and then click the slot where the bag previously was, it opens the bag, instead of picking the item in that slot.
Please let me know if a bug has already been filed for this. And also if you need an SMAPI log.
// Check if they clicked a Bag in the inventory part of the chest interface bool Handled = false; for (int i = 0; i < IGM.inventory.inventory.Count; i++) { ClickableComponent Component = IGM.inventory.inventory[i]; if (Component != null && Component.bounds.Contains(CursorPos)) { Item ClickedInvItem = i < 0 || i >= IGM.inventory.actualInventory.Count ? null : IGM.inventory.actualInventory[i]; if (ClickedInvItem is ItemBag IB && ValidateBag(IB)) { IB.OpenContents(IGM.inventory.actualInventory, Game1.player.MaxItems); } Handled = true; break; } }
One more question: can Auto fill be toggled to give an entire bag priority or do I have to go individual item by individual item? Example: I caught a largemouth bass, a common CC item. I want to be able to conduct my fishing day without worrying about making sure the bundle bag gets first pick of the fish over the fishing bag, without having to manually denote fish by fish that the bundle bag gets priority. Is this possible, like maybe within the GMCM?
Autofill priority is hardcoded in the following manner:
Spoiler:
Show
-First it looks for omni bags inside your inventory and tries to autofill into bags inside the omni bag -Then it looks for bags in your inventory and tries to autofill into those bags
When processing the bags in an omnibag, or the bags in your inventory...
-First it tries to autofill into the bundle bag -Then tries to autofill into rucksacks whose autofill priority is set to 'high priority' -Then tries to autofill into regular bags like mining bag, forage bag, fish bag etc -And lastly tries to autofill into rucksacks whose autofill priority is set to 'low priority'
It sounds like the example you listed wouldn't be a problem since bundle bags already have highest priority (unless you had a bundle bag in your inventory, and the rest of your bags in an omni bag.)
Yes, a single modded bag can store stackable modded items from multiple mods. However, each modded bag can only have one value for the the "ModUniqueId" property, which dictates which mod must be loaded in order for that modded bag to be loaded. You can't configure a modded bag to do something like 'only load this bag if Mod A AND Mod B are installed'. So if the modded bag contained items from both Mod A and Mod B, it's up to the user to ensure they have all necessary requirements installed to avoid erroneous items when loading that bag.
I was able to create three modded bags for Cornucopia More Crops and one for Cornucopia More Flowers. Thank you very much.
I would like to make some more bags that hold artisan craftables (Jelly, Honey, Wine, etc) for vanilla and these mods.
I have tried using the in-game name, and the console command name, as well as the ID, but it keeps returning with that each item can't be added because it can't find the items.
Some artisan goods have variable item data for the same item Id, such as Honey which could be regular honey (100g), blue jazz honey (200g), fairy rose honey (680g) etc. In these cases, you can't store them in regular bags since the same Item would need separate item slots for each unique set of item data. In regular bags, this mod only supports items whose Id uniquely identifies the item data. (Rucksacks will let you store them though)
Could you possibly share these bags via the article provided by the mod author for user-created mod bags? https://www.nexusmods.com/stardewvalley/articles/370
Thank you for explaining that. I thought I would be able to make a honey bag, because under List_Items for Cornucopia.MoreCrops, each honey has a unique name, but now I understand that the IDs are subsets of the honey (340) ID.
Hello, could you please share these bags via the article provided by the mod author for user-created mod bags? https://www.nexusmods.com/stardewvalley/articles/370 I tried creating them for myself, but apparently I'm not mod savvy enough to do it ;_; I would really love to have those bags.
How exactly do I remove all the default bags that came with the mod? I removed all the lines except the line with the mod version in the bagconfig.json, some are gone but some of the bags still remain in the shop. Are they hardcoded into the mod? I only want the rucksacks from the mod and would like to remove the rest of the default bags because I created my own versions already.
Remove all of the entries from the "BagTypes" array in the bagconfig.json (backup the file before editing). Instead of entirely removing BagTypes, it should just be an empty list. Something like this: { "BagTypes": [], "CreatedByVersionString": "3.0.5" }
Alternatively, you can set these settings in the config.json to true (can also be edited in-game with Generic Mod Config Menu mod):
What I did was remove everything except the CreatedByVersionString line. I also toggled all the bags to be hidden, and some bags still remain. I will try to add "BagTypes": []," back into the bagconfig file and see what happens. Thank you!
Does the bundle bag support mods that increase the number of bundles? Specifically Every Single Bundle: https://www.nexusmods.com/stardewvalley/mods/23138?tab=description
Just encountered in a modded bag I made a bug like the "torches can't be placed in the bag" one that just got fixed. Any known info on how to try to fix this would be appreciated.
The torch issue was because torches aren't regular objects, they're a sub-type of object. So that could be the problem with whatever item you're trying to use, in which case there is no workaround. A fix would require additional special-case logic (like torches have) to allow them to be added to bags.
Thank you for the response! It's a fish actually so that's not the case but I guess that does help me know something wonky is going on. I suspect that it's because I modified an older bag to create it, since a new one couldn't be made. So I'm going to see if going through and fixing up the code to match newly made bags helps fix the weirdness. edit: Didn't :( Oh well, it's probably still a good idea anyway...
Nope, this mod's items are completely unique objects with custom logic so CJB item spawner isn't capable of spawning them. I'm not sure how to make it compatible so for now you'd just have to use this mod's built-in console commands such as player_additembag, player_addrucksack, player_addbundlebag.
875 comments
If a bag is in a slot towards the bottom of the chest that needs to be accessed via scrolling, then the bag won't open and will act like a regular item jumping between the bag and the chest on both right and left click.
If a bag is at the top of the chest and I scroll down and then click the slot where the bag previously was, it opens the bag, instead of picking the item in that slot.
Please let me know if a bug has already been filed for this. And also if you need an SMAPI log.
All I'm doing to detect a clicked bag is this:
// Check if they clicked a Bag in the inventory part of the chest interface
bool Handled = false;
for (int i = 0; i < IGM.inventory.inventory.Count; i++)
{
ClickableComponent Component = IGM.inventory.inventory[i];
if (Component != null && Component.bounds.Contains(CursorPos))
{
Item ClickedInvItem = i < 0 || i >= IGM.inventory.actualInventory.Count ? null : IGM.inventory.actualInventory[i];
if (ClickedInvItem is ItemBag IB && ValidateBag(IB))
{
IB.OpenContents(IGM.inventory.actualInventory, Game1.player.MaxItems);
}
Handled = true;
break;
}
}
-Then it looks for bags in your inventory and tries to autofill into those bags
When processing the bags in an omnibag, or the bags in your inventory...
-First it tries to autofill into the bundle bag
-Then tries to autofill into rucksacks whose autofill priority is set to 'high priority'
-Then tries to autofill into regular bags like mining bag, forage bag, fish bag etc
-And lastly tries to autofill into rucksacks whose autofill priority is set to 'low priority'
It sounds like the example you listed wouldn't be a problem since bundle bags already have highest priority (unless you had a bundle bag in your inventory, and the rest of your bags in an omni bag.)
I would like to make some more bags that hold artisan craftables (Jelly, Honey, Wine, etc) for vanilla and these mods.
I have tried using the in-game name, and the console command name, as well as the ID, but it keeps returning with that each item can't be added because it can't find the items.
Is it possible to accomplish this?
I tried creating them for myself, but apparently I'm not mod savvy enough to do it ;_; I would really love to have those bags.
I also made these for my style of play, so I won't be making changes to them.
https://www.nexusmods.com/stardewvalley/articles/370
{
"BagTypes": [],
"CreatedByVersionString": "3.0.5"
}
Alternatively, you can set these settings in the config.json to true (can also be edited in-game with Generic Mod Config Menu mod):
HideSmallBagsFromShops
HideMediumBagsFromShops
HideLargeBagsFromShops
HideGiantBagsFromShops
HideMassiveBagsFromShops
I will try to add "BagTypes": []," back into the bagconfig file and see what happens. Thank you!
It's a fish actually so that's not the case but I guess that does help me know something wonky is going on. I suspect that it's because I modified an older bag to create it, since a new one couldn't be made. So I'm going to see if going through and fixing up the code to match newly made bags helps fix the weirdness.
edit: Didn't :(
Oh well, it's probably still a good idea anyway...