[B18]Furiously Efficient Mods - Advanced Stocking - RimFridge/ASAR support

Started by FuriouslyEloquent, May 29, 2018, 05:22:02 PM

Previous topic - Next topic

FuriouslyEloquent

Advanced Stocking

Description
Enables additional features for shelving storage, including max shelf weight. Allows overstacking and racking items up to 20x depending on the storage settings.

License
MIT License. Go wild and blame me for it.

Updates

  • Bugfixes
  • Steam release

Feature List - v0.7

  • Ability to stack larger than normal stacks on shelfs. Stack sizes do not change but are bypassed for shelves
  • Ability to rack multiple items on the same cell
  • Weight capacity stat, uses quality, shelf stuff, and floor type
  • FULLY CUSTOMIZABLE stackLimits by slider
  • Overstack/rack limits based on storage filter and weight capacity
  • Forbidden mode. Auto-forbid any item placed on this shelf, and allow it be stocked with forbidden items
  • Updated Storage copy/paste for stocking. Will also allow copying StorageSettings between zones and shelves
  • Compatible with RimFridge, with a special modified release

Dependencies

  • SaveGamePatches - for compatibility with existing saved games
  • ZoneInspectData - not a true dependency, but is very nice when you have 16 items on your shelf ... all my screenshots are taken with it
  • RimFridge! - Not a dependency, but grab this modified version to having Advanced Stocking features on your RimFridges.

Download
https://github.com/CBornholdt/AdvancedStocking/releases

If you need body parts to live


You too can have shelves with stacks of guns.
Someone should be cropping their images ... but I'm not

FuriouslyEloquent

#1
Composite Area Manager

Description
Allows the dynamic composing of areas, either as a combination of other areas or via some cell based property. Access via the right click manage zone menus, or via a button in the manage area dialog.

License
MIT License. If you hurt yourself with this, please let me know. Even better if you have video ...

Feature List - v0.3 - Available Operations

  • Union/OR
  • Intersect/AND
  • Invert/NOT
  • Another Area
  • RoomType
  • Growing_Zone
  • Building or BuildingCategory (via DesignationCategoryDef)
More to come I am sure. If you have a request let me know. I can work from any cell based property.

Dependencies

  • Harmony - included
  • Work Area Priority Manager - has additional functionality if present. Load order does not matter

Download
https://github.com/CBornholdt/CompositeAreaManager/releases



Someone should be cropping their images ... but I'm not

FuriouslyEloquent

#2
Work Area Priority Manager

Description
Enables the assignment of intra-work priorities based upon Area. Counterpart to the composite area manager. Accessed via the manage zones right click menu, or as an injected button to the work tab.

License
MIT License.

Feature List - v0.2

  • Settings for High Priority, Low Priority, and Avoid
  • Invert area settings

Dependencies

  • Harmony - included
  • Composite Area Manager - has additional functionality if present. Load order does not matter

Download
https://github.com/CBornholdt/ManageWorkAreaPriorities/archive/v0.2.0.1.zip

Someone should be cropping their images ... but I'm not

FuriouslyEloquent

Someone should be cropping their images ... but I'm not

FuriouslyEloquent

Someone should be cropping their images ... but I'm not

Canute

FuriouslyEloquent,
glad these mod's made it out of WiP status finaly ! :-)
But should the version number be 1.0 once you release it ?
And maybe just link to the Release Tab at Github instead to the latest archiv, then you don't need to change the link every release.

Btw. i just saw at the pic, you didn't store chunk/slag into a shelf. I bet many people would be happy for a storage solution for chunk/slag's.

WolfgangPolska

Are modded shelves working with advanced stacking?
I'm going to find out by myslef anyway, but just curios :p
I have no idea how, but it works!!!

Canute

Ok FuriouslyEloquent,
some big error's show up just from installing and activating the Advanced Stocking mod.
https://git.io/vhsZl


FuriouslyEloquent

Quote from: Canute on May 30, 2018, 03:28:44 AM
Ok FuriouslyEloquent,
some big error's show up just from installing and activating the Advanced Stocking mod.
https://git.io/vhsZl
Fixed, sorry about that. The assembly wasn't loading for some reason.
Someone should be cropping their images ... but I'm not

Canute

Nice solution with the shelf's, a bit work intensive through the manual stocking but still nice work.
It works fine with stackable, weapon and appareal.
But it didn't work with chunk's or corpse.
And execp. wood shelf got a stock weight of 267 Kg, so it should carry 10 chunks. But i can't stack them up.
Same to corpse.

And i notice the max. stock weight only depend on the quality.
Maybe the material should affect the max. stock weight too.
If you don't want ad an extra resource modifierer just use the "Work to build" one.
Since steel is 100%, wood is with 70% lower and plasteel is 220% it would reflect the material in a good way.

FuriouslyEloquent

Quote from: Canute on May 30, 2018, 04:00:25 PM
Nice solution with the shelf's, a bit work intensive through the manual stocking but still nice work.
It works fine with stackable, weapon and appareal.
But it didn't work with chunk's or corpse.
And execp. wood shelf got a stock weight of 267 Kg, so it should carry 10 chunks. But i can't stack them up.
Same to corpse.

And i notice the max. stock weight only depend on the quality.
Maybe the material should affect the max. stock weight too.
If you don't want ad an extra resource modifierer just use the "Work to build" one.
Since steel is 100%, wood is with 70% lower and plasteel is 220% it would reflect the material in a good way.
To be candid, my limits for various things are a mess. Plus, it seems some folk actually want to REDUCE the maximum stack size on a shelf ... so I will probably be making some adjustments.

For the meantime, let me add Chunks and Corpses to a new overstack (25x overstack, no overlay) strategy. At least I put all of that into a Def. I'll probably end up placing a chart or such on the main posting.
    <AdvancedStocking.ShelfOrganizeModeDef>
        <defName>ChunksCorpseOverstack</defName>
        <label>ChunksCorposeOverstack</label>
        <order>5</order>
        <overlayLimit>1</overlayLimit>
        <overstackRatioLimit>25</overstackRatioLimit>
        <allowedThingCategories>
            <li>Chunks</li>
            <li>Corpses</li>
        </allowedThingCategories>
    </AdvancedStocking.ShelfOrganizeModeDef>


As to the stats, I did not see a StatPart for material and I thought the stat effects for a material in vanilla is located in the material's ThingDef. My plan is to actually have floor settings impact storage weight, so when I get to that I'll explore material effects.
Someone should be cropping their images ... but I'm not

sumghai

Just had a play around with Advanced Stocking - neat mod! I've been looking for a way to more efficiently manage my colony's armories for some time, as I've never been happy with a single knife or pistol taking up a whole shelf space.

That being said, I'm trying to set up some shelves to act like weapon racks, but I haven't been able to get things working exactly the way I want to.

At the moment, I have a standard 1x2 shelf set to store steel knives and autopistols, and I assumed that Advanced Stocking would keep both weapon types in separate piles/squares on the same shelf. Instead, both the knives and autopistols are mixed in with each other.  I'm not fully familiar with all the settings in the Stock menu, so some pointers would be greatly appreciated.

Failing that, I've also downloaded the Single Shelf mod, and have been trying to edit the patches for Advanced Stocking to enable stock management for those shelves too (defName = SmallShelf), but the Stock tab doesn't seem to show up. Any ideas?

Patches\shelf_patch.xml
<?xml version="1.0" encoding="utf-8" ?>
<Patch>
  <Operation Class="PatchOperationSequence">
    <success>Always</success>
    <operations>
      <li Class="PatchOperationTest">
      <xpath>/Defs/ThingDef[defName='Shelf' and thingClass='Building_Storage']</xpath>
      </li>
      <li Class="PatchOperationAdd">
      <xpath>/Defs/ThingDef[defName='Shelf' and thingClass='Building_Storage']/inspectorTabs</xpath>
      <value>
      <li>AdvancedStocking.ITab_Stock</li>
      </value>
      </li>
      <li Class="PatchOperationReplace">
      <xpath>/Defs/ThingDef[defName='Shelf' and thingClass='Building_Storage']/thingClass</xpath>
      <value>
      <thingClass>AdvancedStocking.Building_Shelf</thingClass>
      </value>
      </li>
<li Class="PatchOperationTest">
      <xpath>/Defs/ThingDef[defName='SmallShelf' and thingClass='Building_Storage']</xpath>
      </li>
      <li Class="PatchOperationAdd">
      <xpath>/Defs/ThingDef[defName='SmallShelf' and thingClass='Building_Storage']/inspectorTabs</xpath>
      <value>
      <li>AdvancedStocking.ITab_Stock</li>
      </value>
      </li>
      <li Class="PatchOperationReplace">
      <xpath>/Defs/ThingDef[defName='SmallShelf' and thingClass='Building_Storage']/thingClass</xpath>
      <value>
      <thingClass>AdvancedStocking.Building_Shelf</thingClass>
      </value>
      </li>
      </operations>
    </Operation>
</Patch>


SaveGamePatches\shelf_patches.xml
<?xml version="1.0" encoding="utf-8" ?>

<Patch>
  <Operation Class="PatchOperationAttributeSet">
    <xpath>//thing[def='Shelf']</xpath>
    <attribute>Class</attribute>
  <value>AdvancedStocking.Building_Shelf</value>
  </Operation>

  <Operation Class="PatchOperationAttributeSet">
  <xpath>//innerList/li[def='Shelf']</xpath>
  <attribute>Class</attribute>
  <value>AdvancedStocking.Building_Shelf</value>
  </Operation>
 
  <Operation Class="PatchOperationAttributeSet">
    <xpath>//thing[def='SmallShelf']</xpath>
    <attribute>Class</attribute>
  <value>AdvancedStocking.Building_Shelf</value>
  </Operation>

  <Operation Class="PatchOperationAttributeSet">
  <xpath>//innerList/li[def='SmallShelf']</xpath>
  <attribute>Class</attribute>
  <value>AdvancedStocking.Building_Shelf</value>
  </Operation>
</Patch>




FuriouslyEloquent

Quote from: sumghai on May 30, 2018, 07:30:43 PM
Just had a play around with Advanced Stocking - neat mod! I've been looking for a way to more efficiently manage my colony's armories for some time, as I've never been happy with a single knife or pistol taking up a whole shelf space.

That being said, I'm trying to set up some shelves to act like weapon racks, but I haven't been able to get things working exactly the way I want to.

At the moment, I have a standard 1x2 shelf set to store steel knives and autopistols, and I assumed that Advanced Stocking would keep both weapon types in separate piles/squares on the same shelf. Instead, both the knives and autopistols are mixed in with each other.  I'm not fully familiar with all the settings in the Stock menu, so some pointers would be greatly appreciated.

Failing that, I've also downloaded the Single Shelf mod, and have been trying to edit the patches for Advanced Stocking to enable stock management for those shelves too (defName = SmallShelf), but the Stock tab doesn't seem to show up. Any ideas?
Thanks for the kind words. I too have yet to get things working as I want to, so its nice to be in good company ;).

The problem with a single celled shelf and my mod is that my mod works by having a normal cell that will be filled, and having custom organization jobs to either overstack or overlay items from 1 cell to another. Thus hauling operates normally, and I've created a secondary system (Stock) that does not directly interact.

The fundamental problem is conceptual, in that I am attempting to make a specific exception to a core RimWorld concept; all stackable items are limited by stack size. I am violating this but trying to do so as minimally as possible, hence why I am making the pawns perform distinct jobs when violating them. However, it seems several people want to have LESS items on the shelves than stack size, so I might be patching things a little deeper.

As to your patch issues, I think the issue is with the shelf_patch.xml. Instead of extending the existing sequence with the new DefName, you need to copy the original <Operation Class="PatchOperationSequence"> node and change the defName to SmallShelf. You should have 2 PatchSequences that each start by testing for the Defname and ThingClass.
Someone should be cropping their images ... but I'm not

sumghai

Sounds good, looking forward to seeing things get fleshed out!

Quote from: FuriouslyEloquent on May 30, 2018, 10:17:05 PMAs to your patch issues, I think the issue is with the shelf_patch.xml. Instead of extending the existing sequence with the new DefName, you need to copy the original <Operation Class="PatchOperationSequence"> node and change the defName to SmallShelf. You should have 2 PatchSequences that each start by testing for the Defname and ThingClass.

Following your advice, I believe I managed to get the Stock tab to show up in for the third-party SmallShelf. However, it appears that the weapon stack sizes have defaulted to one per cell:

Patches\shelf_patch.xml
<?xml version="1.0" encoding="utf-8" ?>
<Patch>
  <Operation Class="PatchOperationSequence">
    <success>Always</success>
    <operations>
      <li Class="PatchOperationTest">
      <xpath>/Defs/ThingDef[defName='Shelf' and thingClass='Building_Storage']</xpath>
      </li>
      <li Class="PatchOperationAdd">
      <xpath>/Defs/ThingDef[defName='Shelf' and thingClass='Building_Storage']/inspectorTabs</xpath>
      <value>
      <li>AdvancedStocking.ITab_Stock</li>
      </value>
      </li>
      <li Class="PatchOperationReplace">
      <xpath>/Defs/ThingDef[defName='Shelf' and thingClass='Building_Storage']/thingClass</xpath>
      <value>
      <thingClass>AdvancedStocking.Building_Shelf</thingClass>
      </value>
      </li>
      </operations>
    </Operation>
<Operation Class="PatchOperationSequence">
    <success>Always</success>
    <operations>
      <li Class="PatchOperationTest">
      <xpath>/Defs/ThingDef[defName='SmallShelf' and thingClass='Building_Storage']</xpath>
      </li>
      <li Class="PatchOperationAdd">
      <xpath>/Defs/ThingDef[defName='SmallShelf' and thingClass='Building_Storage']/inspectorTabs</xpath>
      <value>
      <li>AdvancedStocking.ITab_Stock</li>
      </value>
      </li>
      <li Class="PatchOperationReplace">
      <xpath>/Defs/ThingDef[defName='SmallShelf' and thingClass='Building_Storage']/thingClass</xpath>
      <value>
      <thingClass>AdvancedStocking.Building_Shelf</thingClass>
      </value>
      </li>
      </operations>
    </Operation>
</Patch>


FYI, this is the third-party mod containing the SmallShelf def:

https://steamcommunity.com/sharedfiles/filedetails/?id=1204763016


FuriouslyEloquent

Quote from: sumghai on May 31, 2018, 01:31:57 AM
Following your advice, I believe I managed to get the Stock tab to show up in for the third-party SmallShelf. However, it appears that the weapon stack sizes have defaulted to one per cell:
This goes back to what I had said previously, my mod does not actually change stack sizes. There are 2 special jobs; one that will take 2 stackable things and combine them past their stackLimit, the other will overlay a single item in a cell onto another cell with multiple items. In essence, I treat 1 cell of the shelf normally and 1 cell as a stockpile. With a single celled shelf there are not two stackable things to combine.

With my mod you can see pawns organizing the shelf as it is not instantaneous, with increasing time as shelf stock increases.
Someone should be cropping their images ... but I'm not