[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


Mehni

v0.18.1.4

- It's now possible to kill Wandering Caravans.
- Fixed a nasty bug with ridiculously long queues.
- Bit of a code cleanup.
- Reduced stack fragmentation caused by picking up partial stacks when the colonist could've picked up more.

Kori

Hey Mehni,

could you please add a download for Ship Chunks to github, please? Only Transpiler is available at the moment.

Mufflamingo

Pick up and haul was great. At first. Then my colonist decided to keep that new butchered meat in his storage for at least a day. I kept on wondering where somethings were and viola they are in the inventory. Is this a normal behavior? I mean its annoying if I really need that meat and I need to micromanage and drop it in the freezer to be used by the cook.
Bleeeee. . . . .

Mufflamingo

Quote from: Mufflamingo on February 06, 2018, 07:02:48 AM
Pick up and haul was great. At first. Then my colonist decided to keep that new butchered meat in his storage for at least a day. I kept on wondering where somethings were and viola they are in the inventory. Is this a normal behavior? I mean its annoying if I really need that meat and I need to micromanage and drop it in the freezer to be used by the cook.

Nevermind. That behavior was not present when I updated to the latest ver.
Bleeeee. . . . .

Harry_Dicks

Didn't Mehni add in a flag for things that rot anyway in an update? I remember asking this question.

Canute

Did you mean
QuoteColonists will now quickly unload if they have items that are about to rot.
?


SzQ

I still find pawns hauling around whole colony 40 meals in their pockets but it's very rarely.


Usually contemplating my personal spacetime reality at
stream

Mehni

@Mufflamingo
Glad it's fixed :)

@SzQ
Sometimes the pawn doesn't store what they pick up, or neglect to drop it when I delete the reference to it. I have one solution to this, and that's to tell the pawn to drop everything. That includes meals, simple sidearms, whatever other practical thing they may have in their inventory. I only do that when Pick Up and Haul has detected a problem: when it can't recover from a null reference exception, or when a pawn thinks they have picked up more items to their inventory then they actually have. I could introduce a functionality where a pawn will drop everything once every ~x couple of days, but I think that has the potential to disturb gameplay more than it benefits. I'd love to get some feedback on this.

Mehni

In other news, I just released v0.18.1.5

Stockpiles seamlessly merge in and out of inventory. No more dozens of tiny stacks.

GitHub: https://github.com/Mehni/PickUpAndHaul/releases
Steam: http://steamcommunity.com/sharedfiles/filedetails/?id=1279012058

Harry_Dicks

If we have Fluffy's Stack Merger, is it essentially not needed anymore? In his mod description, it is very interesting in how he states how the mod works for combining smaller stacks and CPU load, compared to how a different stack merging mod handles it. Could you tell us anything about your mod in a similar fashion, and how it stacks up (bwahaha) against Stack Merger and the other mod that Fluffy mentions? Here is the quote from his description:

QuoteWhen I was playtesting this, Stockpile Efficiency was brought to my attention. These mods do pretty much exactly the same thing (in fact we both use the same vanilla methods for the actual hauling). The main difference is in how we keep track of what can be merged. Stockpile Efficiency searches for stacks that can potentially be merged whenever a pawn is looking for something to merge. Stack Merger keeps a permanent cache of stacks that can be merged. I haven't run any benchmarks, but I expect my mod to have a mostly constant, relatively low cpu load. Stockpile Efficiency will have no load as long as pawns don't have time to do the hauling jobs, but when they search for things to merge the cpu load will most likely be considerably larger.

Also, is the amount of things a pawn can carry limited by the mass of the objects and a pawn's carrying capacity? Not sure if I read it somewhere else, but when testing it, I wanted a pawn to carry more stacks, but the context menu was grayed out and said something about weight. If this is the case, there is a new mod that just came out, Fallout Traits, I think it adds 25+ new traits. There is a handful of them that are things like "Strong Back" with different tiers of various increases to carrying capacity. So if we have a pawn that can carry say 300kg, will Pick Up and Haul be able to take advantage of this? In that one gif you showed of the 4 pawns all decimating a big pile of stuff, if one of these pawns has this super carrying trait, would we see in that gif this one pawn going on to pick up more stacks than all the other pawns?

Mehni

Sure.

In v0.18.1.4 and before, pawns would pick up stacks as they were and keep them as they were in their inventory. No problem if the pawn picked up a full stack. However, if you just harvested your potatoes, the pawn would have about 20 stacks in their inventory, each containing anywhere between 6 and 30 potatoes each.

Pawns would then unload 20 stacks, each containing 6~30 potatoes. Some might end up on the right spot, but others wouldn't. End result, a lot of stack fragmentation - worse than in vanilla even. I did this because, well, it was a lot easier to keep track of.

If you have Stack Merger installed, the old behaviour would just cause a lot of extra work for your pawns. The new version of Pick Up and Haul prevents the excessive stack fragmentation I previously caused, bringing it back to vanilla levels.

TL;DR: It's mostly a bug fix, not necessarily a new feature.

I might look into Fluffy's Stack Merger or Haul To Stack and optimise the unload behaviour for a future release, but honestly I don't think it's that big of a problem.

Mehni

In reply to your sneaky edit:

QuoteAlso, is the amount of things a pawn can carry limited by the mass of the objects and a pawn's carrying capacity?

Yes.

QuoteSo if we have a pawn that can carry say 300kg, will Pick Up and Haul be able to take advantage of this?

Yyyes. Pick Up and Haul by itself can be called overpowered, but if you were to combine it with that, it would be downright game-breaking. Note that "Carrying Capacity" from the Fallout mod isn't the same as "mass carried". Carrying capacity refers to what they can keep in their hands. Mass Carried is linked to bodysize, 35 kg per unit of bodysize. Humans have a bodysize of 1.0, so a limit of 35 kg.

Harry_Dicks

Quote from: Mehni on February 07, 2018, 08:31:19 AM
In reply to your sneaky edit:

Pffft you're just too quick!

Quote from: Mehni on February 07, 2018, 08:31:19 AM
Note that "Carrying Capacity" from the Fallout mod isn't the same as "mass carried". Carrying capacity refers to what they can keep in their hands. Mass Carried is linked to bodysize, 35 kg per unit of bodysize. Humans have a bodysize of 1.0, so a limit of 35 kg.

Wait, what? How does vanilla use carrying capacity refer to "what they can keep in their hands." What does that mean, if you would explain further? Mass Carried, I have never seen this anywhere, can this be increased via traits or anything? Sorry but this is confusing :)

Also, I still can't decide if I should leave Stack Merger on or not,even after your comment ::) Main number one concern right now is cutting down on my mods. It's slowly crept back up... almost to 180 "listed" now :-\

Below are a few traits from the Fallout Traits mod to show an example.

  <TraitDef>
    <defName>FT_FrailBack</defName>
    <commonality>0.1</commonality>
    <degreeDatas>
      <li>
        <label>frail back</label>
        <description>NAME has a frail back so HE can't carry as much as the average person.</description>
        <statOffsets>
          <CarryingCapacity>-25</CarryingCapacity>
        </statOffsets>
      </li>
</degreeDatas>
<conflictingTraits>
  <li>FT_StrongBack</li>
</conflictingTraits>
  </TraitDef>

  <TraitDef>
    <defName>FT_StrongBack</defName>
    <commonality>0.85</commonality>
    <degreeDatas>
  <li>
        <label>strong back</label>
        <description>NAME has a strong back which allows HIM to carry more than most people.</description>
        <degree>1</degree>
        <statOffsets>
          <CarryingCapacity>+50</CarryingCapacity>
        </statOffsets>
      </li> 
      <li>
        <label>very strong back</label>
        <description>NAME has a very strong back or is part mule or something. HECAP can carry twice as much as a normal person.</description>
        <degree>2</degree>
        <statOffsets>
          <CarryingCapacity>+75</CarryingCapacity>
        </statOffsets>
      </li> 
    </degreeDatas>
<requiredWorkTags>
  <li>ManualDumb</li>
  <li>Hauling</li>
</requiredWorkTags>
<conflictingTraits>
  <li>FT_FrailBack</li>
</conflictingTraits>
  </TraitDef>
 

Mehni

Quote from: Harry_Dicks on February 07, 2018, 08:37:20 AM
Wait, what? How does vanilla use carrying capacity refer to "what they can keep in their hands." What does that mean, if you would explain further?



It's what they can carry and haul. This guy is missing a finger, so instead of 75 he can only carry 69 of an item. Conversely if you have something that increases the stacksize limit, someone with increased manipulation or the strong back trait you showed could carry more than 75.

Quote from: Harry_Dicks on February 07, 2018, 08:37:20 AM
Mass Carried, I have never seen this anywhere, can this be increased via traits or anything? Sorry but this is confusing :)



Traits could change it, but that'll probably require more than XML.