[1.2] Better Workbench Management (QoL mod)

Started by falconne, May 30, 2017, 06:16:40 AM

Previous topic - Next topic

DariusWolfe

Quote from: falconne on June 22, 2017, 03:39:19 AMIf so I could just add a mod setting to change the default for new bills.

While I'm not the person who requested the original feature, the ability to change default settings for new bills would make me very, very happy; I rarely to never create "Do X Times" bills, so having that as a default is a minor annoyance. If I could set it to default to "Do Until You Have X", even if I then have to set the number, that'd save me dozens of clicks. Add to that the ability to set drop on floor as a default (which I do with a variety of bills, but not all) and I'd be a very happy crafter.

AngleWyrm

Quote from: falconne on June 22, 2017, 03:39:19 AM
As for adding an option to "take to nearest stockpile" in addition to "take to best stockpile", what are the use cases where the nearest stockpile isn't the best stockpile?
Place a stock pile near a salt mine, quarry, crop zone or any other place where a pawn will spend time generating/producing something.

The near stockpile separates tasks so the producer specializes in production and a hauler specializes in delivery of items to their best storage.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Antaios

If the use case for "take to nearest" stockpile is enough to push for it, might I suggest a "take to named stockpile" instead?
Give the bill a stockpile name, and if it exists that's the destination. It's a feature that would include the same use cases, plus a bunch more obscure ones.
If you were going to check through a list of stockpiles to find the closest anyway, it shouldn't be any more difficult to check the name (I think, haven't looked at stockpile code).

BlackSmokeDMax

Quote from: Antaios on June 22, 2017, 10:43:49 PM
If the use case for "take to nearest" stockpile is enough to push for it, might I suggest a "take to named stockpile" instead?
Give the bill a stockpile name, and if it exists that's the destination. It's a feature that would include the same use cases, plus a bunch more obscure ones.
If you were going to check through a list of stockpiles to find the closest anyway, it shouldn't be any more difficult to check the name (I think, haven't looked at stockpile code).

Heading closer and closer to DF settings/setups, and in this particular case it would be a great thing!

BlackSmokeDMax

Very minor request. When packaging any new versions could you rename the folder in the zip from "ImprovedWorkbenches" to the new name? Just a thing for making it quicker for comparing what is in my mods folder to what is on my spreadsheet of mods to install. LOL, who knows, it might even be some minor OCD thing.

Like I said, not really a big deal, and I usually remember to rename it myself.

falconne

#50





I have a new version which, as usual, I'd like to get some play testing from some folk before I update it on Steam. It is compatible with any existing saves. If you are able to, please try the new version from here and let me know how it goes: https://github.com/Falconne/ImprovedWorkbenches/releases/tag/v17.6

You don't need to use the new features if you don't need them. I just want to make sure there are no regressions after some play testing.

The changelog is:

  • When renaming a bill the default name is now pre-populated in the rename dialog.


  • Added ability to copy and paste ingredient filter configurations between compatible bills. The filter types must match exactly for the paste button to appear, so there are limited recipes between which you can use this, e.g. between certain apparel or cooking bills.


  • Ingredients filter in bill details windows now shows current stock level of that ingredient. This can be disabled in the mod settings.

  • Bills that are set to resume production when stock falls to a certain level now show that level in brackets on the workbench overview (see second image). This was requested by Kiame Vivacity who is maintaining the A17 Enhanced Crafting mod so this mod can reach feature parity with that one.

  • Navigation arrows added to bill details window to navigate between bills in that workbench.

  • Improved performance of product counting routine.





falconne

Quote from: BlackSmokeDMax on July 05, 2017, 01:37:05 PM
Very minor request. When packaging any new versions could you rename the folder in the zip from "ImprovedWorkbenches" to the new name?

I would like to do this, but I don't know what effect it would have on the Steam Workshop release of the mod. I'm worried it might not delete the old directory automatically, causing load errors. I'd like to find out first if anyone's already tried that and if it's safe.

faltonico

Quote from: falconne on July 07, 2017, 08:19:57 AM
Quote from: BlackSmokeDMax on July 05, 2017, 01:37:05 PM
Very minor request. When packaging any new versions could you rename the folder in the zip from "ImprovedWorkbenches" to the new name?

I would like to do this, but I don't know what effect it would have on the Steam Workshop release of the mod. I'm worried it might not delete the old directory automatically, causing load errors. I'd like to find out first if anyone's already tried that and if it's safe.
Don't rename the folder, it will count as a new mod.
Rename the compressed file and let the folder unmodified (if you ever decide to do that).

BlackSmokeDMax

Quote from: falconne on July 07, 2017, 08:19:57 AM
Quote from: BlackSmokeDMax on July 05, 2017, 01:37:05 PM
Very minor request. When packaging any new versions could you rename the folder in the zip from "ImprovedWorkbenches" to the new name?

I would like to do this, but I don't know what effect it would have on the Steam Workshop release of the mod. I'm worried it might not delete the old directory automatically, causing load errors. I'd like to find out first if anyone's already tried that and if it's safe.

Ah, stupid Steam! ;)

As I said, it was minor, so I'll just keep manually renaming it.

Newest update looks great, hope to give it a try late tonight or tomorrow.

wwWraith

Thanks for the update :)

The minor issue may be possible when the numbers in "pausing"/current/desired quantities are big enough so they don't fit in the available space (screenshot attached).

[attachment deleted by admin due to age]
Think about it. Think around it. Perhaps you'll get some new good idea even if it would be completely different from my words.

falconne

#55
Quote from: wwWraith on July 07, 2017, 11:32:52 AM
The minor issue may be possible when the numbers in "pausing"/current/desired quantities are big enough so they don't fit in the available space (screenshot attached).

Oh that's no good. Hmm, an easy way to fix it would be to make the text in "Do Until You Have X" shorter. Would it be confusing if it said "Do Until X"?

I'll make the resume level display an option you have to turn on in the mod. That way when those who want it go to turn it on I can say in a tooltip that it's going to shorten the button label.

stigma

Quote from: falconne on July 07, 2017, 06:23:18 PM
Quote from: wwWraith on July 07, 2017, 11:32:52 AM
The minor issue may be possible when the numbers in "pausing"/current/desired quantities are big enough so they don't fit in the available space (screenshot attached).

Oh that's no good. Hmm, an easy way to fix it would be to make the text in "Do Until You Have X" shorter. Would it be confusing if it said "Do Until X"?

I'll make the resume level display an option you have to turn on in the mod. That way when those who want it go to turn it on I can say in a tooltip that it's going to shorten the button label.

I find "do until X" very reasonable. I don't think there is much room for misunderstanding there - especially not for any player who is advanced enough to use/want this sort of deep functionality mod. Those players have played before and recognize this from vanilla instantly even if it is shorter.

Hey - quick question:
Is it fine to upgrade from your old version to this new one in an existing save?
I'd assume it's probably fine since this just adds more display info mostly, but it would be really nice if you gave your expert opinion so I don't need to have this nagging feeling about hidden future errors lurking in my precious savefile :D

I think all the changes look very good. I can't currently really think of anything that is missing and could be better - not unless you could somehow include the "i" (information about item) in the drop-down list (at the end of the name maybe) somehow so you don't have to actually set up the bill to see what the items stats are. It's a very minor gripe - but it's a persistent source of unnecessary clicks for me since I like to doublecheck stats and compare before committing.

-Stigma

falconne

Yep, it's compatible with existing saves.

I will look at adding an info button to the bill drop down, but that might have to wait for the next update due to being a bit tricky.

faltonico

I really like the way all of the new features look.. But now i'm worried about performance.
How hard is this mod on the CPU now?

falconne

#59
Quote from: faltonico on July 07, 2017, 08:42:56 PM
I really like the way all of the new features look.. But now i'm worried about performance.
How hard is this mod on the CPU now?

Actually this update improves performance overall as I did some work on that.

The item counts on the ingredients filter is only shown when the bill details are open, which pauses the game so you won't see an impact.

As for the output product counting filters, they will do as little as possible as needed. If you create a bill but don't change any of my filters (i.e leave hitpoints at 0-100%, quality to all, etc), my counting routine doesn't even run, it just defers back to the vanilla counting routine. If you do change one or more of my filters, it does as little extra work as possible: say you put a limit on the hitpoints filter but don't change the quality sliders or enable "match input ingredients", then the counting routine only tests each item for hitpoints, it won't bother with quality or materials.

Basically, if you don't change anything, the performance will be the same as vanilla. Every real change you do to the filters will add a bit of extra CPU work but it's pretty trivial compared to everything else that goes on.