[1.0] The Many Mods Of Mehni [Updated "daily!"]

Started by Mehni, September 26, 2017, 03:49:12 PM

Previous topic - Next topic

Harry_Dicks

WOW!!!! I can't wait to try this out, won't be until tomorrow though. So what are the limits, stack size, stacks, mass, anything? Are there mod options to change any of this stuff? Man holy hell this looks so crazy.

Do we have any information on how this affects performance? I ask because I thought that hauling/pathfinding was one of the biggest users of CPU cycles. So I'm curious if anyone has any information. My PC is older, and I'm at around 170 mods now, but anything that will further significantly use processing power means it might be a no go for me, because I'm right at that breaking point of how much lag or slow down I'm willing to tolerate.

I was also thinking about how this could possibly help performance? Maybe if you only have like 20% of the hailing jobs, it won't be as much load on your system as they all get taken care of a lot faster.

Last question, this should work fine with While You're Up, right? Will pawns be able to haul multiple things on their way to their next job? I would imagine that throwing that into the mix could make the amount of compute cycles for hauling quickly spiral out of control, no?

Canute

Ok, the first comment to the haul mod.
There are 4-5 small stacks of wood, total 90 logs.
Previously, when i would force someone to haul he would grab 75 and haul them back.
With the mod, he just take the stack i order to haul and ignore the other stacks and doing some other higher priority job.

Would be nice if he could collect these other haulable objects too, before he return to he work.

And another thing i notice, the hauler drop sidearm weapons the pawn pickup for simplesidearm too. These should be excluded from the droping.

Edit:
And i got some errors now
https://gist.github.com/af584ef32339333ffa3bd7cf404e115a

And i think the mod got difficults with chunks. A pawn got ordered to haul a chunk, he picked it up into the inventory and isn't be able to drop it anymore.

Hauling robots don't work well anymore too.
They carry a chunk at their inventory, and then he stand forever.
After deactivate the mod, the chunk came out and the robot haul it away.

Mehni

RE: Chunks - fix is on its way.

RE: Robots - I'd need an output log. There are a couple dozen robot mods out there. Which one specifically?

RE: Simple Sidearms: I'll look into it.

RE: force hauling - this mod doesn't do anything when forced. It's only when hauling voluntarily. I won't to hook deep into the hauling behaviour for the sake of compatibility (and my sanity). If you want to micro, this mod gives you the manual option to tell colonists to pick up something and drop it elsewhere.

RE: performance: No idea. It's more than likely an increased load, but I can't tell you by how much.

edit: fix is sent out.

wwWraith

Quote from: Canute on January 23, 2018, 01:52:03 PM
With the mod, he just take the stack i order to haul and ignore the other stacks and doing some other higher priority job.
I confirm this issue. When forced to haul the pawn gets "Taking to the inventory" job instead of "Hauling" or "Picking up", and doesn't try to drop it anywhere. However forced hauling items marked for "haul urgently" works better, at least with single items/stacks, as I saw my pawns sometimes picking other items nearby and going to the stockpile to drop one type of them (which was carried "in hands") - but keeping other items in their inventory. I tried "pick up" orders, but the pawns also took only single stack/item.
Think about it. Think around it. Perhaps you'll get some new good idea even if it would be completely different from my words.


Canute

Quote from: Mehni on January 23, 2018, 03:17:38 PM
RE: Robots - I'd need an output log. There are a couple dozen robot mods out there. Which one specifically?
Hmm you are not familar with the hugslib report ?
The link contain modlist and error log.
But i think the chunk-fix let the robot works fine too.

pinguin42

Just installed this mod on a save with 100+ mods and run into an issue: Colonists will pick up stuff into their inventory, but then start another job. This causes colonists to walk around with dozens of items in their inventory. They only seem to unload when they reach their carry weight maximum.
It's really noticeable with low weight items, had a colonist walking around with the entire harvest of smokeleaf leaves for 3 days (500+ leaves). He's not a dedicated hauler (priority 8 ) but apparently found the time between cooking jobs for this single hauling job and then went straight back to cooking.
Mods related to hauling in my loadout; allow tool (though this wasn't a haul+ order), Bmartin's improved caravan formation and improved load transports, hand me that brick, stack merger, work tab, stack xxl.

I will try and troubleshoot some more tomorrow (mess around with priorities to see whether it's the carry weight maximum or another job taking priority that's causing this), just wanted to report this and see if there are more people with this issue.

Mehni

You're not alone, and that is a fault in my mod. I'm working on a fix.

It's an issue with the Job logic I wrote that frees up the pawn for a new job too soon (before they dump their inventory). I didn't estimate it to be as big of a problem as it was as pawns tend to self-unload anyway but I was wrong on that.

Canute

Try to force unload when a pawn is at the homezone.
But this can cause trouble with very large (outdoor) homezones.
Maybe you can modify "going for a walk" "relaxing society" so pawn unload their inventory as a joy task.

Mehni

Thank you for your suggestion.

I'm not resorting to hacky fixes though. I'm doing it proper.

Sarge

Quote from: Mehni on January 25, 2018, 11:41:19 AM
Thank you for your suggestion.

I'm not resorting to hacky fixes though. I'm doing it proper.

I like this guy.

Dingo

Hey Mehni, glad to see you tackling hauling! I think it's definitely one of the more frustrating/cumbersome parts in RW for most players. If I can make a couple of suggestions for your code:

1) You can inherit WorkGiver_HaulGeneral instead of WorkGiver_Haul if you want to be slightly more efficient.

2) This snippet is probably causing you issues:

            if (MassUtility.EncumbrancePercent(pawn) >= 0.90f)
            {
                Job haul = HaulAIUtility.HaulToStorageJob(pawn, t);
                pawn.inventory.UnloadEverything = true;
                return haul;
            }

            if (pawn.inventory.UnloadEverything == true)
            {
                return new Job(JobDefOf.UnloadYourInventory);     
            }

pawn.inventory.UnloadEverything = false;
...


I don't think the game or your mod ever set UnloadEverything to false other than on pawn exiting map or when the game handles cleanup. You're probably looping here, unless I'm missing something (totally possible!).

3) Out-of-the-loop question: when the pawn takes to inventory, does the Thing they take get properly removed from the map's listerHaulables? If not, that might be an issue to preemptively handle.

Kori

Pick Up And Haul looks incredible!
Any ETA on CE and Simple Sidearms compatibility?

Mehni

@Dingo
Thanks for the feedback and the chat on Discord! I think we talked about all except point 3: Verse.AI.Toils_Haul.TakeToInventory handles the despawning with a call to Thing.SplitOff. Was a good thing to look into, so ty.


@Kori
No ETA, sorry. Simple Sidearms is coming first as a bug an unintended sidefeature I'm removing will also add compatibility with that mod. This shouldn't take me much longer.

CE is expected in a later release.