[A17] PeteTimesSix's QOL tweaks pack (1.0.2)

Started by PeteTimesSix, May 25, 2017, 08:02:03 AM

Previous topic - Next topic

PeteTimesSix


Description:
I think just about everyone that plays Rimworld has their own personal list of gripes and annoyances, little irksome things that don't really detract from the game as a whole but still result in a little bit of frustration when encountered.

Had to work around colonist stupidity      -2

Well, this one is mine, only I was looking for an excuse to crawl through the Rimworld codebase to familiarize myself with it and making these little tweaks was a great way of going about it. Reports that I'm drunk on the power of the Harmony library are greatly somewhat a little bit not at all exaggerated.

Features include, and are limited to:
Butchering storage efficiency
Butchering one animal can often result in more than one stack worth of meat. When you have freezers with limited space and a sudden influx of corpses (hello, manhunter pack of muffalo!), this leads to annoying micromanaging (as you disable your butcher table and then forget to turn it back on, or forbid individual corpses as soon as they get hauled in). So this tweak teaches butchers to temporarily stop butchering when they run out of storage space for the meat butchering would produce. They do look for animals with less meat on their bones first though, so your freezers won't end up filled with chick corpses.


Meal equivalency
I like keeping a steady supply of meals. I also like not making simple meals when I could be making fine meals. This tweak makes both of these goals possible to accomplish without micromanaging, as cooks will now consider both simple meals and fine meals when counting meals in storage.


New orders
When holding shift, pawns will now have a few new orders on offer.

Move to: Like you'd expect, tells a pawn to go somewhere.


Carry/Drop: Pick up a specific item (or stack of items) and carry it to a specific spot.


Trading stockpiles
Allows setting of individual stockpiles as trading stockpiles. Everything in a trading stockpile will be automatically marked to sell whenever a trading dialog is opened. It'll still require confirmation though, so if you're trading with a passerby you won't accidentaly hand them your entire stock for their two hundred silver.


Surgery estimates
Doctors are pretty good at assessing the odds of success when it comes to surgeries. Its high time they got around to telling you, too. That random guy you told to strap a peg leg to your only actual doctor can take a guess too, but they won't be nearly as accurate. And uh, don't rely too much of the estimates of your local pessimist.

More details in this Imgur album

The threshold for how good a doctor you have to be to give accurate estimates is customizable, and the innacuracies introduced by the surgeon's personal neurosies decrease as their medical skills go up (professional doctors won't let a little psychopathy ruin their reputation, after all).

EDIT: Two noteworthy things I forgot. One: since this uses a calculation based on Rimworld's surgery failure calculations, the results will be innacurate if you're using a mod that alters that system. I'm looking into options for compatibility with surgery mods, but if any modders wanna chime in I'd appreciate it. Two: does not factor in the medicine used, since at the moment, neither does Rimworld. If/when that's fixed, I'll re-enable that part of the calculation. So remember to use herbal medicine for your operations, children!

Customization
Speaking of customization, you can turn off any of these tweaks individually if you don't like them, or if you have the same functionality from a different mod. There's also a few options to futher specify how the tweaks work.



Walking off bruises
Doctors will no longer waste medicine on injuries that have no risk of permanent effects.

Note the three glitterworld medicines that were NOT wasted on bandaids.

Download

Can be found at:
GitHub (source)
Steam Workshop

How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.

OR

-Subscribe to the mod on the Steam Workshop.

is required.

License
As far as I'm concerned you can go ahead and post a copy of this mod that differs only by a single extra space in the about file as long as you mention me somewhere or link back to this thread along the way.
Mods: SimpleSidearms | QOLTweaksPack
Check them out, feedback and suggestions are welcome.

kaptain_kavern

Awesome work! Nice ideas !

I want to try it

Thank you for your work  ;)

deathstar

When using your QOL-Tweaks, I am getting the following order when using the stonecutters table to queue up the "make any stoneblocks"-bill, then qualifying "Do until you have..." for the quantity:



I am using Cupro's Stones, but after removing the mod I still got a similar error. Works fine without QOL-Tweaks.

Love

QOL Tweaks is extremely bugged ATM and actually seems to be causing a memory leak as well, I don't recommend using it.

Bobylein


PeteTimesSix

#5
Quote from: deathstar on May 28, 2017, 07:10:07 AM
When using your QOL-Tweaks, I am getting the following order when using the stonecutters table to queue up the "make any stoneblocks"-bill, then qualifying "Do until you have..." for the quantity: /snip

Just fixed that, actually. Still looking into the memory leak thing - Ive removed some debug log spam I forgot to comment out last time that *might* have something to do with it, but I havent been able to reproduce it yet (probably because I'm yet to play a proper-length game). Throwing up an update anyway - one fix is better than none, after all.

Also, because I dont enjoy bugfix-only releases, I threw in a new tweak:

Walking off bruises
Doctors will no longer waste medicine on injuries that have no risk of permanent effects.

Note the three glitterworld medicines that were NOT wasted on bandaids.
Mods: SimpleSidearms | QOLTweaksPack
Check them out, feedback and suggestions are welcome.

faltonico

Quote from: PeteTimesSix on May 28, 2017, 12:33:53 PM
Doctors will no longer waste medicine on injuries that have no risk of permanent effects.

Note the three glitterworld medicines that were NOT wasted on bandaids.
Yeti will thank you greatly.

PeteTimesSix

Quote from: Love on May 28, 2017, 07:14:12 AM
QOL Tweaks is extremely bugged ATM and actually seems to be causing a memory leak as well, I don't recommend using it.

Right, I think that I *may* have fixed it. Tell me if its still an issue.
Mods: SimpleSidearms | QOLTweaksPack
Check them out, feedback and suggestions are welcome.

Oken

I'm having a big problem with the "consider storage when butchering" option and stonecutting. I can't cut any stone unless I uncheck that option. When I try to force it it says "need materials"

here is the log.

QuoteException in BreadthFirstTraverse: System.Exception: Corpse marble chunk isnt a corpse
at QOLTweaksPack.tweaks.WorkGiver_DoBill_TryFindBestBillIngredientsInSet_Postfix.TryFindBestBillIngredientsInSetButchery (bool&,System.Collections.Generic.List`1<Verse.Thing>,RimWorld.Bill,System.Collections.Generic.List`1<RimWorld.ThingAmount>) <0x00636>
at QOLTweaksPack.tweaks.WorkGiver_DoBill_TryFindBestBillIngredientsInSet_Postfix.TryFindBestBillIngredientsInSet (bool&,System.Collections.Generic.List`1<Verse.Thing>,RimWorld.Bill,System.Collections.Generic.List`1<RimWorld.ThingAmount>) <0x000c5>
at (wrapper dynamic-method) RimWorld.WorkGiver_DoBill.TryFindBestBillIngredientsInSet_Patch1 (System.Collections.Generic.List`1<Verse.Thing>,RimWorld.Bill,System.Collections.Generic.List`1<RimWorld.ThingAmount>) <0x00061>
at RimWorld.WorkGiver_DoBill/<TryFindBestBillIngredients>c__AnonStorey2B3.<>m__15E (Verse.Region) <0x001d6>
at Verse.RegionTraverser/BFSWorker.BreadthFirstTraverseWork (Verse.Region,Verse.RegionEntryPredicate,Verse.RegionProcessor,int,Verse.RegionType) <0x000be>
at Verse.RegionTraverser.BreadthFirstTraverse (Verse.Region,Verse.RegionEntryPredicate,Verse.RegionProcessor,int,Verse.RegionType) <0x000b9>

Verse.Log:Error(String)
Verse.RegionTraverser:BreadthFirstTraverse(Region, RegionEntryPredicate, RegionProcessor, Int32, RegionType)
RimWorld.WorkGiver_DoBill:TryFindBestBillIngredients(Bill, Pawn, Thing, List`1)
RimWorld.WorkGiver_DoBill:StartOrResumeBillJob(Pawn, IBillGiver)
RimWorld.WorkGiver_DoBill:JobOnThing(Pawn, Thing, Boolean)
RimWorld.WorkGiver_Scanner:HasJobOnThing(Pawn, Thing, Boolean)
RimWorld.<TryIssueJobPackage>c__AnonStorey2A9:<>m__14E(Thing)
Verse.<ClosestThingReachable>c__AnonStorey5FE:<>m__C00(Thing)
Verse.GenClosest:ClosestThing_Global(IntVec3, IEnumerable, Single, Predicate`1)
Verse.GenClosest:ClosestThingReachable(IntVec3, Map, ThingRequest, PathEndMode, TraverseParms, Single, Predicate`1, IEnumerable`1, Int32, Int32, Boolean, RegionType, Boolean)
RimWorld.JobGiver_Work:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_PrioritySorter:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Tagger:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Subtree:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
RimWorld.ThinkNode_Conditional:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.Pawn_JobTracker:DetermineNextJob(ThinkTreeDef&)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:EndCurrentJob(JobCondition, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

PeteTimesSix

#9
Quote from: Oken on June 01, 2017, 10:13:50 PM
I'm having a big problem with the "consider storage when butchering" option and stonecutting. I can't cut any stone unless I uncheck that option. When I try to force it it says "need materials"

here is the log.
*snip*

Welp. I know what the problem is, actually, I just apparently forgot to fix it. I'll fix it first thing in the morning (or later today, anyway), once Im awake enough to read code again.

EDIT: And done.
Mods: SimpleSidearms | QOLTweaksPack
Check them out, feedback and suggestions are welcome.

Thirite

Awesome! I have always wanted a direct way to tell a pawn to pick up an object and put it at a specific spot. It's often either incredibly annoying or impossible in base game trying to make them do this in some circumstances. Almost like you have to trick the game to make your pawns do what you want them to.

Zeth22

is there a way of adding modded food to the meal equivalency permanently? its kind of a pain to have to remember it every time i turn the game on

Spdskatr

Hey, great mod! Being drunk on harmony leads to great things amirite :P

Just a little bug, Auto-trade seems to trade items that the trading caravan cannot accept. The way I know this is because upon opening the dialog for a slaver, the top bar says "+500 silver" when nothing on the interface has been traded, and when I conduct the trade, I suddenly find myself short of cloth :P

I've analysed the bug and it appears in line 39 of TradingStockpile.cs:
                                if (tradeable.CanAdjustBy(-tradeableThing.stackCount).Accepted)
                                    tradeable.AdjustBy(-tradeableThing.stackCount);


I'm proposing to change it to:
                                if (tradeable.CanAdjustBy(-tradeableThing.stackCount).Accepted && tradeable.TraderWillTrade)
                                    tradeable.AdjustBy(-tradeableThing.stackCount);

Sorry for ruining the fun of debugging ;P
My mods

If 666 is evil, does that make 25.8069758011 the root of all evil?

PreDiabetic

I wish you can release each patch separate.

Draconicrose

Quote from: Spdskatr on June 18, 2017, 06:26:46 AM
Just a little bug, Auto-trade seems to trade items that the trading caravan cannot accept.

This also happens to animals too! Almost sold my warg twice because it was roaming around on top of a trade stockpile!
I have a Rimworld Let's Play for you -> Let's Play Rimworld Playlist