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

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

Previous topic - Next topic

FuriouslyEloquent

Quote from: Canute on May 30, 2018, 04:00:25 PM
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.
Added a stuff based factor to my Stat, as well as a floor based component. The floor component works even if the shelf is not on only 1 floor type ...
<li Class="AdvancedStocking.StatPart_StuffDef_Fallover">
        <stuffCategoryFactors>
          <Metallic>2.0</Metallic>
          <Woody>0.75</Woody>
          <Stony>1.5</Stony>
        </stuffCategoryFactors>
      </li>
      <li Class="AdvancedStocking.StatPart_Floor">
        <wetFactor>0.5</wetFactor>
        <roughFactor>0.5</roughFactor>
        <metalFloorFactor>1.2</metalFloorFactor>
        <stoneFloorFactor>1.1</stoneFloorFactor>
        <fabricFloorFactor>0.8</fabricFloorFactor>
        <woodFloorFactor>0.8</woodFloorFactor>
      </li>
Someone should be cropping their images ... but I'm not

sumghai

Quote from: FuriouslyEloquent on May 31, 2018, 08:47:26 AMThis 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.

Ah, I see! Apologies for the misunderstanding.

Canute

Quote
With my mod you can see pawns organizing the shelf as it is not instantaneous, with increasing time as shelf stock increases.
That would maybe an addition for extra research and building.
Automated shelf, that stacks up the stuff self. Ofcouse it need power.

And maybe some extra research to modify the max. stock weight or stacking.
Without research a shelf just should have the half value of the current possible. And end up with double value after a hard research.

temple_wing

Looks like GenPlace_TryPlaceDirect is throwing exception on my machine. It's reproducable, just install advancedstocking, then butcher.


JobDriver threw exception in initAction. Pawn=Lucky, Job=DoBill (Job_9360794) A=Thing_TableButcher72889 B=Thing_WildBoar_Corpse2768853 C=(126, 0, 115), Exception: System.ArgumentException: SplitOff with count <= 0
Parameter name: count
at Verse.Thing.SplitOff (int) <0x0021e>
at Verse.ThingWithComps.SplitOff (int) <0x00018>
at (wrapper dynamic-method) Verse.GenPlace.TryPlaceDirect_Patch0 (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.Thing&,System.Action`2<Verse.Thing, int>) <0x00095>
at Verse.GenPlace.TryPlaceThing (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.ThingPlaceMode,Verse.Thing&,System.Action`2<Verse.Thing, int>) <0x00138>
at Verse.GenPlace.TryPlaceThing (Verse.Thing,Verse.IntVec3,Verse.Map,Verse.ThingPlaceMode,System.Action`2<Verse.Thing, int>) <0x0003a>
at Verse.AI.Toils_Recipe/<FinishRecipeAndStartStoringProduct>c__AnonStorey2.<>m__0 () <0x0064c>
at Verse.AI.JobDriver.TryActuallyStartNextToil () <0x002e9>
lastJobGiver=RimWorld.JobGiver_Work, curJob.def=DoBill, curDriver=Verse.AI.JobDriver_DoBill
Verse.Log:Error(String)
Verse.AI.Pawn_JobTracker:StartErrorRecoverJob(String)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.<DoRecipeWork>c__AnonStorey1:<>m__1()
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick_Patch1(Object)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


Doesn't throw this exception on newly created game.
Is your SaveGamePatches mod a one-time-use mod? I loaded game multiple times with that mod activated. Does that damaged my saved file?
Looks like thing.def.stackLimit is being less than 0, how can it be?

Canute

If you don't overwrite your old safegame, it keep intact and you can allways revert your modlist to that safegame (Modswitch mod can help you with that).

You just could try to enable the mod, load the safegame, safe into a new file and load this new safegame.
Then check if these error still happen, or just was an one time error because of the new mod.
For further reports, If you got Hugslib installed please press CTRL-F12 or press the Share log button, the link include your modlist and a more complete error log.

FuriouslyEloquent

Quote from: temple_wing on June 04, 2018, 11:03:14 PM
Doesn't throw this exception on newly created game.
Is your SaveGamePatches mod a one-time-use mod? I loaded game multiple times with that mod activated. Does that damaged my saved file?
Looks like thing.def.stackLimit is being less than 0, how can it be?
My save game patches should only apply upon loading a game that did not have that mod, it will log a short message when doing so. However, the changes it makes will be persistent if you save. I would follow Canute's advice, otherwise I intend to write an equivalent component to safely unload a mod from a save game; but that may be a few weeks coming. If you are familiar with modding and RimWorld XML Def patching, it simply extends that method to the save game file itself upon load.

As to the stackLimit question, my mod changes how the game accesses the stackLimit in certain places, and it most certainly was returning 0 occasionally due to a bug. I've just tested butchering on a pre existing game and it now works correctly. Thanks for the heads up.

As a note you should be able to remove my mod and besides some red logs, you'll lose your shelves. Once again, I should have a solution for this at some point in the future.
Someone should be cropping their images ... but I'm not

makute

Hi FuriouslyEfficienty, my fridges dissapear after being constructed, just like explained here: https://ludeon.com/forums/index.php?topic=32980.msg407256#msg407256

Your RimFridge! loads after Advanced Stocking and I got Blueprints disabled, like you advised to Box20, but they keep dissapearing.

This is the error log: https://drive.google.com/file/d/1VbyBLp4__NWg_x_BJt18eXX5_43PUZLI/view?usp=sharing

Edit: I tried with Kiame's RimFridge and it works flawlessly.

temple_wing

Exception thrown out when trade ship coming:

System.IndexOutOfRangeException: Array index is out of range.
at (wrapper managed-to-managed) object.ElementAddr_3_4 (object,int,int,int) <0x000a2>
at RimWorld.SlotGroupManager.SlotGroupAt (Verse.IntVec3) <0x00023>
at RimWorld.StoreUtility.GetSlotGroup (Verse.IntVec3,Verse.Map) <0x0003c>
at AdvancedStocking.ThingUtility_TryAbsorbStackNumToTake.TransformStacklimitIfOnShelf (int,Verse.Thing) <0x00062>
at (wrapper dynamic-method) Verse.ThingUtility.TryAbsorbStackNumToTake_Patch0 (Verse.Thing,Verse.Thing,bool) <0x00030>
at Verse.ThingWithComps.TryAbsorbStack (Verse.Thing,bool) <0x0003b>
at (wrapper dynamic-method) Verse.ThingOwner`1<Verse.Thing>.TryAdd_Patch1 (object,Verse.Thing,bool) <0x00303>
at Verse.ThingOwner.TryAddOrTransfer (Verse.Thing,bool) <0x0005b>
at Verse.ThingOwner.TryAddRangeOrTransfer (System.Collections.Generic.IEnumerable`1<Verse.Thing>,bool,bool) <0x00165>
at RimWorld.TradeShip.GenerateThings () <0x00121>
at RimWorld.IncidentWorker_OrbitalTraderArrival.TryExecuteWorker (RimWorld.IncidentParms) <0x00264>
at RimWorld.IncidentWorker.TryExecute (RimWorld.IncidentParms) <0x0001b>
at RimWorld.Storyteller.TryFire (RimWorld.FiringIncident) <0x00062>
at RimWorld.Storyteller.StorytellerTick () <0x0009a>
at Verse.TickManager.DoSingleTick () <0x003c2>

Verse.Log:Error(String)
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


---------------------------------------------------------------------------------------
Got this exception 274 times within 1 second.

AdvancedStocking.GetStackLimit Could not find Emu leather custom stacklimit. Returning 1
Verse.Log:Warning(String)
AdvancedStocking.Building_Shelf:GetStackLimit(ThingDef)
AdvancedStocking.Building_Shelf:GetStackLimit(Thing)
AdvancedStocking.ThingUtility_TryAbsorbStackNumToTake:TransformStacklimitIfOnShelf(Int32, Thing)
Verse.ThingUtility:TryAbsorbStackNumToTake_Patch0(Thing, Thing, Boolean)
Verse.ThingWithComps:TryAbsorbStack(Thing, Boolean)
Verse.ThingOwner`1:TryAdd_Patch1(Object, Thing, Boolean)
Verse.ThingOwner`1:TryAdd(Thing, Int32, Boolean)
Verse.Pawn_CarryTracker:TryStartCarry(Thing, Int32, Boolean)
Verse.AI.<StartCarryThing>c__AnonStorey0:<>m__0()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:Notify_PatherArrived()
Verse.AI.Pawn_PathFollower:PatherArrived()
Verse.AI.Pawn_PathFollower:StartPath_Patch1(Object, LocalTargetInfo, PathEndMode)
Verse.AI.<GotoThing>c__AnonStorey0:<>m__0()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:JumpToToil(Toil)
Verse.AI.<CheckForGetOpportunityDuplicate>c__AnonStorey2:<>m__0()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:Notify_PatherArrived()
Verse.AI.Pawn_PathFollower:PatherArrived()
Verse.AI.Pawn_PathFollower:StartPath_Patch1(Object, LocalTargetInfo, PathEndMode)
Verse.AI.<GotoThing>c__AnonStorey0:<>m__0()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.Pawn_JobTracker:StartJob_Patch1(Object, Job, JobCondition, ThinkNode, Boolean, Boolean, ThinkTreeDef, Nullable`1, Boolean)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:EndCurrentJob_Patch1(Object, JobCondition, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick_Patch1(Object)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

Happens when a pawn trying to put some emu leather into a shelf.

FuriouslyEloquent

Quote from: makute on June 11, 2018, 07:23:39 AM
Hi FuriouslyEfficienty, my fridges dissapear after being constructed, just like explained here: https://ludeon.com/forums/index.php?topic=32980.msg407256#msg407256

Your RimFridge! loads after Advanced Stocking and I got Blueprints disabled, like you advised to Box20, but they keep dissapearing.

This is the error log: https://drive.google.com/file/d/1VbyBLp4__NWg_x_BJt18eXX5_43PUZLI/view?usp=sharing

Edit: I tried with Kiame's RimFridge and it works flawlessly.

From your error log
QuoteLoading game from file Autosave-1 with mods Core, HugsLib, JecsTools-1.0.9.12, SaveGamePatches-1.1, WorkTab, StackMerger, Rimworld-Hand-and-Footware-master, ResearchTree, ReplaceWalls, RelationsTab, RBSE - Lite Edition 1.83, QOLTweaksPack, PrisonLabor, SmartMedicine - Release, Pharmacist, OHU-Dropships-1.57, No Mood Loss Prisoner Sold or Died, Miniaturisation-0.18.0, Mending, MedicalTab, Locks, KK_MovableSandbags, KK- Corrected WorkgiversB18, Zombieland, GiddyUpCore-18.7.8, GiddyUpRideAndRoll-18.1.11, GiddyUpCaravan-18.3.2, battlemounts-18.7.2, FollowMe, FluffyBreakdowns, FlagstoneCheaper3perA18, Doors-Expanded, CombatExtended, CombatExtendedGuns, SimpleSidearms-1.2.5, RunAndGun-0.18.3.4, ColonyManager, Clutter Furniture, Campfires-Can-Cremate-Corpses, Blueprints, AvoidFriendlyFire, AreaUnlocker, AnimalTab, Ancient Crashed Ships Drop Components, AllowTool, MiningCo. AlertSpeaker, MiningCo. SpotlightTurret, ImprovedAnesthetic, ParasiteTendsMatter, PlantCuttingIsForGrowers, ShipPartsRefactored, ShootingSkillEnhanced, SkillOverhead, TableDiner_Simple, VanillaFriendlyBatteryExpansion, ViableWeaponTrading, VisiblePants, RT_Fuse-B18-1.1.1, AdvancedStocking-0.5, Cooks Can Refuel, ExtendedInspectData-1.1.18.5, Grenade Fix Rearmed, Hand Me That Brick, Notifications Archiver, and rimworld-rimfridge-A18-shelf
I see BluePrints right after CampFires-Can-Cremate-Corpses. Per that forum link you posted, I would disable that mod and try again. Thanks
Someone should be cropping their images ... but I'm not

FuriouslyEloquent

Quote from: temple_wing on June 13, 2018, 01:26:39 AM
Exception thrown out when trade ship coming:

System.IndexOutOfRangeException: Array index is out of range.
at (wrapper managed-to-managed) object.ElementAddr_3_4 (object,int,int,int) <0x000a2>
at RimWorld.SlotGroupManager.SlotGroupAt (Verse.IntVec3) <0x00023>
at RimWorld.StoreUtility.GetSlotGroup (Verse.IntVec3,Verse.Map) <0x0003c>
at AdvancedStocking.ThingUtility_TryAbsorbStackNumToTake.TransformStacklimitIfOnShelf (int,Verse.Thing) <0x00062>
at (wrapper dynamic-method) Verse.ThingUtility.TryAbsorbStackNumToTake_Patch0 (Verse.Thing,Verse.Thing,bool) <0x00030>
at Verse.ThingWithComps.TryAbsorbStack (Verse.Thing,bool) <0x0003b>
at (wrapper dynamic-method) Verse.ThingOwner`1<Verse.Thing>.TryAdd_Patch1 (object,Verse.Thing,bool) <0x00303>
at Verse.ThingOwner.TryAddOrTransfer (Verse.Thing,bool) <0x0005b>
at Verse.ThingOwner.TryAddRangeOrTransfer (System.Collections.Generic.IEnumerable`1<Verse.Thing>,bool,bool) <0x00165>
at RimWorld.TradeShip.GenerateThings () <0x00121>
at RimWorld.IncidentWorker_OrbitalTraderArrival.TryExecuteWorker (RimWorld.IncidentParms) <0x00264>
at RimWorld.IncidentWorker.TryExecute (RimWorld.IncidentParms) <0x0001b>
at RimWorld.Storyteller.TryFire (RimWorld.FiringIncident) <0x00062>
at RimWorld.Storyteller.StorytellerTick () <0x0009a>
at Verse.TickManager.DoSingleTick () <0x003c2>

Verse.Log:Error(String)
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


---------------------------------------------------------------------------------------
Got this exception 274 times within 1 second.

AdvancedStocking.GetStackLimit Could not find Emu leather custom stacklimit. Returning 1
Verse.Log:Warning(String)
AdvancedStocking.Building_Shelf:GetStackLimit(ThingDef)
AdvancedStocking.Building_Shelf:GetStackLimit(Thing)
AdvancedStocking.ThingUtility_TryAbsorbStackNumToTake:TransformStacklimitIfOnShelf(Int32, Thing)
Verse.ThingUtility:TryAbsorbStackNumToTake_Patch0(Thing, Thing, Boolean)
Verse.ThingWithComps:TryAbsorbStack(Thing, Boolean)
Verse.ThingOwner`1:TryAdd_Patch1(Object, Thing, Boolean)
Verse.ThingOwner`1:TryAdd(Thing, Int32, Boolean)
Verse.Pawn_CarryTracker:TryStartCarry(Thing, Int32, Boolean)
Verse.AI.<StartCarryThing>c__AnonStorey0:<>m__0()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:Notify_PatherArrived()
Verse.AI.Pawn_PathFollower:PatherArrived()
Verse.AI.Pawn_PathFollower:StartPath_Patch1(Object, LocalTargetInfo, PathEndMode)
Verse.AI.<GotoThing>c__AnonStorey0:<>m__0()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:JumpToToil(Toil)
Verse.AI.<CheckForGetOpportunityDuplicate>c__AnonStorey2:<>m__0()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:Notify_PatherArrived()
Verse.AI.Pawn_PathFollower:PatherArrived()
Verse.AI.Pawn_PathFollower:StartPath_Patch1(Object, LocalTargetInfo, PathEndMode)
Verse.AI.<GotoThing>c__AnonStorey0:<>m__0()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.Pawn_JobTracker:StartJob_Patch1(Object, Job, JobCondition, ThinkNode, Boolean, Boolean, ThinkTreeDef, Nullable`1, Boolean)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:EndCurrentJob_Patch1(Object, JobCondition, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick_Patch1(Object)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

Happens when a pawn trying to put some emu leather into a shelf.

First issue should definitely be fixed, I noticed that orbital traders were organizing their stock on the map but outside the map bounds. The second should be as well, but I will need to confirm.
Someone should be cropping their images ... but I'm not

Nightliss

Hi Furious,

I have a bit of a problem with Advanced Stocking. Whenever I go to its mod options a cannot exit them. Neither close nor 'x' in the right top corner work. I downloaded the mod today from github not via releases tab, but green button clone or download. Attached ss from log there are no errors as far I can see.

Also does Advanced Stocking works with OgreStack? Can the stack of the items on the shelf be restricted independently of main item stack?

[attachment deleted due to age]

temple_wing

racks does not save.
I have a self stacklimit of corn is 75, then I set racks from 10 to 1, then stacklimit increased to 750, then I save and quit. After I load, racks returned to 10 and stacklimit returned to 75.

-----------------------------------------------
When I move the shelf away, then load. Because corn's stacklimit is 75, and 2 racks of 450 and 300 units of corns is detected, system has truncated my corn.
Scatter them or move them with the shelf or change the stacklimit permantly.
-----------------------------------------------


Please scribe your data. I have to change rack number every time I load the game.
Just watched source code, looks like it only scribe when saving, loading part is commented out.
Is that intended? I have to reconfigure stack number after load?

-------------------------------------------------------------------------------
Unable to close setting window.
In mod setting window, no matter pressing "close" button or click "X" button, I just can't close setting window, then I have to alt-f4.

temple_wing

Would you please provide B18 version? I tried change

AccessTools.Method(typeof(RimWorld.StorageSettings), "set_Priority")

to

AccessTools.Property(typeof(RimWorld.StorageSettings), nameof(StorageSettings.Priority)).GetSetMethod()

It doesn't work. Depressive.
I won't go to new version until combat extended update to new version.

Should be a very easy thing for you.

WolfgangPolska

I have no idea how, but it works!!!