Elin
Not enough ratings
ResidentsExcludedSharedContainers
   
Award
Favorite
Favorited
Unfavorite
Gameplay: QoL
File Size
Posted
Updated
49.129 KB
22 Dec, 2024 @ 5:22pm
12 Feb @ 12:31pm
12 Change Notes ( view )

Subscribe to download
ResidentsExcludedSharedContainers

Description
Block residents from taking items out of shared containers with certain names but still allow them to put items in, effectively creating a resident dumping container that's safe from other residents.

Works seamlessly with ResidentsShareFindings https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3389569673 and PetsTakeMoreItems https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3391034162 allowing residents/pets to put their findings or inventory in a container without worrying about other residents/pets taking items from it.

Note that due to how the game makes residents scan for food and how it bypasses the method used to retrieve items and uses something more hardcoded, residents and pets will still be able to access and eat food in shared containers even if they are filtered by this mod. To avoid this you should use NoResidentSharedFood https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3389359940 for now.

You can set the name or type of the containers to be considered for exclusion in the config and if pets should respect the exclusions or not (by default they do not). When filtering by type it filters all containers of that type.
By default anything named "NoResidents" or of the type "_container_magic" (intentional typo, remove the "_" to filter this type) will be excluded.

Additionally, you can also invert the filtering logic, making it so only containers with a certain name or of a certain type can be used by residents (if pets are set to respect the exclusions they'll also follow this setting for this filter).

Container types can be at https://docs.google.com/spreadsheets/d/175DaEeB-8qU3N4iBTnaal1ZcP5SU6S_Z
The container type is its ID (column A) or its name (column F).

You can also set specific rules for specific pets, for example:
Farris-NoFarrisContainer,NoFarris|Kitten-NoKittenContainer
This blocks Farris from the NoFarrisContainer and the NoFarris shared containers and kittens from NoKittenContainer.
This filter also supports container types and can be inverted.
Additionally, if using "All" as the pet names, it'll apply to all pets.

When making pets respect the filter set for residents, keep in mind that it's applied in order, so first the containers will be restricted down to what's on the resident filter and then the pet specific filter will be apply to get the final list of containers for the pets.

Character names can be found at https://docs.google.com/spreadsheets/d/1CJqsXFF2FLlpPz710oCpNFYF4W_5yoVn
Pet names can be by ID (column A), name (column D) or specific given name (only seen in game).
For example:
"Samany the little sister" (as seen on the hover text) can be filtered with "Samany" (given name, specific for her or other Samanys) or "sister" (specific for all little sisters).
For Older Younger Sister, both "olderyoungersister" and "older younger sister" work as shown in the spreadsheet.
Unique NPCs all have their unique names as shown on the spreadsheet but things like "a kitten" can't be specifically filtered and you have to filter all kittens at once.

None of the filters are case sensitive so don't worry if it's "olderyoungersister" or "OlderYoungerSister", although what you see on the spreadsheet should be the correct case sensitive namings.

Practical example #1:
- Wanting to filter out residents from accessing a container named "NoResidents" or of the type "container_magic"
- Wanting to filter out all pets from accessing the same containers as residents and an additional "NoPets" container and Farris from accessing "NoFarris"
ContainerNamesToExclude
NoResidents|container_magic
InvertExclusions
false
ExcludePetsFromContainer
true
SpecificExclusions
All-NoPets|Farris-NoFarris
InvertExclusionsPets
false

Practical example #2:
- Wanting residents to only access a container named "Residents" or of the type "container_magic"
- Wanting to filter out all pets from accessing the container named "Residents" and Farris from accessing containers of the type "container_magic"
ContainerNamesToExclude
Residents|container_magic
InvertExclusions
true
ExcludePetsFromContainer
false
SpecificExclusions
All-Residents|Farris-container_magic
InvertExclusionsPets
false

Practical example #3:
- Wanting residents to only access a container named "Residents"
- Wanting all pets to only access a container named "Pets" and Farris to also access a container named "Farris"
ContainerNamesToExclude
Residents
InvertExclusions
true
ExcludePetsFromContainer
false
SpecificExclusions
All-Pets|Farris-Farris
InvertExclusionsPets
true

Practical example #4:
- Wanting residents to only access a container named "Residents" or "Residents2" or "Residents3", etc
- Wanting all pets to only access the same containers as residents but restrict Farris to only "Residents"
ContainerNamesToExclude
Residents|Residents2|Residents3
InvertExclusions
true
ExcludePetsFromContainer
true
SpecificExclusions
Farris-Residents
InvertExclusionsPets
true

Settings can be adjusted in the config file that appears on Elin\BepInEx\config after the first launch of the game with the mod enabled or by using https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3379819704 (allows changing the settings without restarting the game).
Popular Discussions View All (4)
2
15 Feb @ 3:48am
Residents/Pets taking items out of shared containers
Question
1
31 Jan @ 2:46am
English Explanation
虛無_鬼王
1
31 Jan @ 2:45am
日本語説明
虛無_鬼王
62 Comments
NPOu  [author] 4 Mar @ 4:42am 
@Zuleyus
I can try to look into that over the next week/weekend.
Zuleyus 2 Mar @ 8:37pm 
@NPOu
Regarding
> I understand some people might want residents to eat some food from select containers so I can work on a different method to accomplish this if requested.

I realize nobody actually requested it yet, but I'd very much like to see that included. :D
NPOu  [author] 15 Feb @ 4:09am 
Just to note what was commented on https://gtm.steamproxy.vip/workshop/filedetails/discussion/3389898370/592889031515208646/ :
Currently residents (or pets) will scan for food independently of the filters set in this mod, this is due to the game introducing a new method for them to search for food.
Note that for pets they'll scan the shared containers you're carrying more frequently so it's less likely for them to take food from placed containers if you're already carrying food for them to eat.
Currently the solution to stop all resident (or pet) from taking food from containers is to use NoResidentSharedFood https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3389359940 , which will make them only eat food they generate automatically or you place in their inventory.
I understand some people might want residents to eat some food from select containers so I can work on a different method to accomplish this if requested.
NPOu  [author] 14 Feb @ 4:59pm 
And unfortunately the names of the variables are not great at this point because of the extended functionality of the filter but are needed for compatibility and it's complicated to properly describe tbe entire thing in some short sentences.
NPOu  [author] 14 Feb @ 4:58pm 
@Zuleyus
"ExcludePetsFromContainer=true" is just telling the pets to use the output of the "ContainerNamesToExclude", be it an inclusion or exclusion filter.
Then "SpecificExclusions" works with that result to do another inclusion or exclusion filter on top. Generally if you're going for something more specific like tou want it's better to keep them separate even if you have to write the container names on both filter (or use the partial matching to save you some trouble). For example, I can't know if you want to follow the current logic or if you want to do what you intended without adding more settings, and while not necessarily that big of deal on the code it adds more complexity to using the mod. Ideally the filtering system could be a bit more versatile too but maybe for another time...
Zuleyus 14 Feb @ 1:37pm 
@NPOu
The intent was to have a hierarchy of access, not separately exclusive ones. Many boxes in the base, residents can take from some of them, pets can take from the same ones plus some reserved for them specifically, rest is for my personal use. The way your logic flows doesn't seem to do that just from using ExcludePetsFromContainer=true.

That being said, I can get it to do what I want by putting
ContainerNamesToExclude=ForResidents
SpecificExclusions=all-ForPets|all-ForResidents
, as in replicating the residents filter for the pets. Not as elegant, and not what the descriptions for the bools seem to suggest, but functional.

Thanks again for your suite of mods, they really make the game so much more enjoyable!
NPOu  [author] 14 Feb @ 5:01am 
@Zuleyus
If
ExcludePetsFromContainer=true
Then they follow the residents' filter and then apply their own on top, disable that and it should be fine for you.
Zuleyus 13 Feb @ 2:13pm 
@NPOu
Thanks for the partial matching, way easier now to check if my filters are working. Which in turn showed me that the pet specific filters for placed containers aren't working while resident exclusions are inverted.

General setup I'm going for:

ContainerNamesToExclude=ForResidents
InvertExclusions=true
PartialMatching=true

SpecificExclusions=ForPets
ExcludePetsFromContainer=true
InvertExclusionsPets=true // or false, doesn't make a difference to the debug output
PartialMatchingPets=true

I've tried all permutations of the bools I could think of, but the most I can see my party pets say they can access in the debug output are my ForResidents boxes.

On a side note, might be helpful to add a distinction to the debug output for placed vs carried containers.
Question 13 Feb @ 6:38am 
It was a blessed corgon burger taken from container_magic, not a randomly generated food item. Im going to testthe mod you linked next and see if it works.