[B18] While You're Up

Started by klou, December 08, 2017, 08:40:35 PM

Previous topic - Next topic

klou

(By popular non-zero demand...)
While You're Up

Description:
"So long Bob, I'm heading back home for some food!"
   
"OK Jim.  Hey, while you're heading over there, mind hauling some of this wood we chopped?"
   
"Can't do it Bob, I'm cooking now.  More important than hauling."
   
"But Jim, you're literally walking from the forest back to where this wood needs to go.  Can't you just carry some of it while you're up?"
   
"Sorry Bob, I don't know the meaning of 'while you're up.'"
   
-------------------------
   
Before starting most jobs, your colonists will look for nearby objects that need to be hauled someplace near wherever they're already going.  If they can haul something useful without going out of their way, they'll do it, even if hauling is a low-priority task.

Requires HugsLib.  Doesn't require a new save.
No known compatibility issues with other mods, but new job types added by other mods may not get the "haul first" treatment.

Keep in mind:

- Opportunistic hauling only happens at the start of a job.  If your colonist must make a long trip in the middle of a job, they'll just make the trip like they always have.

- By the time a colonist has completed an opportunistic hauling job, someone else may have started doing the work they were going to do... which means it may no longer be important for them to be wherever they are.

- After completing their hauling job, colonists will attempt to resume their previous work. If they can't for any reason, you'll get an error message in Developer Mode. As far as I can tell these are ignorable, but there's a mod setting you can use to turn it off.


Download
Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=1161112205
Github: https://github.com/kevlou/RimWorld_WhileYoureUp

License
MIT License (see Github)
Go ahead and use it in modpacks and so forth with credit.

Ozymandias

Yes! I have a cim mining plasteel half-way across a giant map. She'll spend the entire friggin day mining and at the end return to sleep leaving everything she's mined there.

Crow_T

This could be a life changing mod....

Seriously though, this is one of those things if it works well is a pretty huge QoL improvement, thanks for coding it up!
(regarding dead man's apparel)
"I think, at the very least, the buff should go away for jackets so long as you're wearing the former owner's skin as a shirt."
-Condaddy20

VeeCee

Quote from: klou on December 08, 2017, 08:40:35 PM
(By popular non-zero demand...)

No, I'm pretty sure this is popular demand. This is downright bloody genius.

I mean, this is something that nags me every game I play, and it's... fixed!

I love this modding community. :)

Vlad0mi3r

Following this one for next moded run.
Mods I would recommend:
Mending, Fertile Fields, Smokeleaf Industries and the Giddy Up series.

The Mod you must have:
https://ludeon.com/forums/index.php?topic=40545.msg403503#msg403503

Canute

Gratz klou,
you made a wish possible since Rimworld exist.
I think every release at last one people suggest this feature at the suggestion forum.

But to speak about your github release, i notice you arn't familar with Github and just use it as non-steam distribution.
But you should create an own zip-file and place it at the releases.
And when you made the master branch the right file structure, you can even try to add Modsync
https://ludeon.com/forums/index.php?topic=34447.0

Chibiabos

Any chances this could be more generalized?  I will sometimes overbuild beyond, say, my available stock of stone blocks and will de-construct a pre-built structure and floor, but the problem is my builders will go out (after exhausting all the current blocks), deconstruct one block from the pre-built building, then decide "Oh! I have four more blocks I can build with!" and walk alllllll the waaaaaaay over to the building blueprint, build that one block, be out of blocks again and repeat.

It would be a great QoL improvement if, instead of this, they'd deconstruct all the blocks at that prebuilt building before going back to put them into building the blueprint.
Proud supporter of Rimworld since α7 (October 2014)!

terrordrone_nl

Quote from: Chibiabos on December 09, 2017, 04:29:50 AM
Any chances this could be more generalized?  I will sometimes overbuild beyond, say, my available stock of stone blocks and will de-construct a pre-built structure and floor, but the problem is my builders will go out (after exhausting all the current blocks), deconstruct one block from the pre-built building, then decide "Oh! I have four more blocks I can build with!" and walk alllllll the waaaaaaay over to the building blueprint, build that one block, be out of blocks again and repeat.
That's how the game works at the moment. Building stuff has a higher priority than deconstructing stuff. If they can build they'll drop deconstruction. A mod like Fluffy's Worktab would allow you to change that up and have deconstructing at a higher priority. If you wanted something like what you're describing you'd probably end up checking for nearby jobs that are similar to the one you just did everytime you finish a job and then either forcing the pawn to do it or dynamically altering priorities to make them do it.
I presume that would eat CPU cycles that are better spend elsewhere, considering these checks would also happen after building that one solar-panel on the other side of the colony where you've not built anything yet. Unless you're building/deconstructing walls the mod is just eating CPU time for no gain.

doomtrout

IDK If this is a normal thing or w/e but I keep getting the error popup that the mod isn't set to the correct targetVersion. I'm not adept enough with mod creation to know how to fix it so I just thought you should know

Shotgunfrenzy

#9
Quote from: doomtrout on December 11, 2017, 12:35:52 AM
IDK If this is a normal thing or w/e but I keep getting the error popup that the mod isn't set to the correct targetVersion. I'm not adept enough with mod creation to know how to fix it so I just thought you should know

Mod folder/about folder/about.xml
"targetversion"  should be 0.18.0

TryB4Buy

non-zero demand? You mean raving, "HOLY CRAP I NEED THIS QUALITY OF LIFE MOD SINCE THE BEGINNING!!!!!!!!!"

Ahem, thank you.

TryB4Buy

If a colonist was stabbed but dressed the wound, do they count as "bleeding" even though blood loss is going down rather than up?

Crow_T

This brings a tear of joy to my eye as I watch a colonist who was mining carry steel back with them *sniff* it's so beautiful
(regarding dead man's apparel)
"I think, at the very least, the buff should go away for jackets so long as you're wearing the former owner's skin as a shirt."
-Condaddy20

Merv

Does this mod conflict with BritsUIAI - WorkFlex? Could you take a look and explain the difference?

Harry_Dicks

Any idea how much this mod affects performance? It's so damn great, but I've really got to trim down the most intensive processes.