[MOD 0.17] HandyHands - Autocrafting - v1.2.2 ammo & pause

Topics and discussion about specific mods
Post Reply
Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

[MOD 0.17] HandyHands - Autocrafting - v1.2.2 ammo & pause

Post by Qon »

HandyHands
  • Name: HandyHands
  • Version: 1.7.0
  • Factorio-Version: 0.17
  • Description: Automatically start handcrafting 1 item that is filtered in your quickbar whenever your crafting queue is empty.
  • License: GPLv3
  • Release: 2016-08-05
  • Download-Url: @ Mod portal
  • Website: This thread
  • Category: Helper, Convenience. What's the difference?
  • Tags: Automatic, Handcrafting, Filter slots
This is a discussion thread for the mod since the mod portal forums don't have any kind of notification system.
Slightly outdated Long description
Changelog and more and the latest info is @ the mod portal.
Last edited by Qon on Fri Mar 15, 2019 5:19 pm, edited 10 times in total.

Yehn
Fast Inserter
Fast Inserter
Posts: 111
Joined: Tue Jul 12, 2016 3:45 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting

Post by Yehn »

Hi

Quick question... can this be turned off for specific items, while still keeping them filtered on my quickbar? For example, if I automate belt production, I don't want to hand craft them anymore, but I still want them filtered on my quickbar since they're used so much... but maybe I want to keep splitters automatically hand crafting because I haven't automated those yet, and so on.

Anyways, really neat mod idea for early game

Thanks!

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting

Post by Qon »

Not really, but things you can do right now that might help:
  • It only crafts up to 1 stack. For belts and other things you are going to want to automate early even with this mod you will likely carry many stacks so that you don't have to go fetch new ones all the time. Then this mod will only activate when you get low. When you get logistics slots and your bots supply you with items you will not get below 1 stack if they can supply you fast enough. It's simple to be supplied with raws too so if you handcraft some items it won't hurt.
  • Blue belts can't be handcrafted. The slow to handcraft stuff requires advanced circuits/plastic so if you want to avoid that simply don't carry plastic/advanced circuits. Not much that you want to handcraft that requires those anyways.
  • If you are strongly opposed to handcrafting anything you have automated even when it doesn't complicate your gameplay then HandyHands might not be the best fit since it is made for people who are heavy handcrafting abusers.
Do you have any suggestions how this could be implemented? Here are some thoughts of mine:
  • A GUI is kind of a bit too much for this, would take more time to write than the entire mod. And I would rather avoid clogging up your screen with another fairly useless button if possible.
  • A config file is maybe an option, depends on your use case. Not very dynamic. Clunky if you want to install updates.
  • Or a hotkey that is pressed when the item you want to turn off handcrafting for is in your cursor. But then you can't really see which items are turned off and on any more. Another hotkey to print the ignore list might work, the list will be fairly short and limited to a subset of your quickbar filtered slots anyway. I could also have a hotkey to set the max crafting for that stack to 0%,50%,100%,200%,400% instead of just turning it on/off. I think I like this idea the most. Might go with 1 key for increasing the amount and another for decreasing if I decide to implement this idea. I could reduce the hotkeys further if I just print the whole configuration every time you change the amount of for some stack but that could quickly be too much printed for something you click several times in a row. And I want it to be visible what you changed also. Maybe just printing the amount for the one you just changed is enough?
  • I could also scan the logistics slots and see if you have any items there requested and not craft whatever is there at all or less/more depending on request amount. Not sure if you have requests slots and how you would want this to work though.
  • If you have a less than a stack as limit for autotrash and that is causing you problems I suggest you first change your auto trash limits and requests to 1 stack and no less. I might be able to do some specific compatability update with auto trash and just use it's configuration for what limits I should stop handcrafting at. Depends on how you use my mod and if you use auto trash though if this would help.
Anyways thanks for your suggestion!

Yehn
Fast Inserter
Fast Inserter
Posts: 111
Joined: Tue Jul 12, 2016 3:45 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting

Post by Yehn »

I think a hotkey would be easiest. I kind of plan to uninstall the mod once I get logistics, at least until I start another new map-- what I'm really liking this for is early game, it's just so convenient.

Also, I found a little bug, in this case if I filter fish on my quickbar. I think maybe, check if a recipe for the item exists first..? Since this might happen on other things that aren't craftable too.. x.x

Image

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting

Post by Qon »

Yehn wrote:Also, I found a little bug, in this case if I filter fish on my quickbar. I think maybe, check if a recipe for the item exists first..? Since this might happen on other things that aren't craftable too.. x.x
Thought I had done sufficient checks for this :3
Next release (coming soon) has this bug fixed together with some tweaks for cheat_mode.
Edit: 1.0.1 is up on the mod portal now which fixes this error. Thanks for reporting.
Yehn wrote:I think a hotkey would be easiest. I kind of plan to uninstall the mod once I get logistics, at least until I start another new map-- what I'm really liking this for is early game, it's just so convenient.
Yes it's not really needed when you have logistics. Can still be useful though in some cases. I hope I can do some small tweaks so that it's not in the way. Better that you don't feel that you have to disable it in case you have multiple saves and so on.

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting

Post by Qon »

Yehn wrote:Quick question... can this be turned off for specific items, while still keeping them filtered on my quickbar? For example, if I automate belt production, I don't want to hand craft them anymore, but I still want them filtered on my quickbar since they're used so much... but maybe I want to keep splitters automatically hand crafting because I haven't automated those yet, and so on.
Yes it's possible! HandyHands 1.1.0 is now released :)

zebediah49
Fast Inserter
Fast Inserter
Posts: 119
Joined: Fri Jun 17, 2016 8:17 pm
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by zebediah49 »

I originally posted this on the mod portal, but it is a sub-par discussion space at the moment (lack of notifications), so I'm reposting it here --

Comment before 1.1.0
zebediah49 wrote:I tried this mod out, and overall really liked it. However, I found that in most cases it would make every item used take an extra slot. This is because either a) you accidentally place and remove an extra item, or b) the item is crafted in units of two.

Personally I solved this by having it craft when less than 80% full, rather than 100%. It works nicely, and suggest considering either adjusting it by default (maybe 90%?), or putting in an option for this.
Qon wrote: Try out 1.1.0 :)

Didn't read your post before I released it (No notifications at this forum, that's why I recommend the homepage/thread at the factorio forums). So for now 0.5 stacks is the smaller-than-one stack size limit available. Try it and tell me what you think. I will consider another setting between 0 and 1 at about 0.8-0.9 stacks once I have figured out how to do migrations correctly ;)
zebediah49 wrote:I had to double-check the timestamps, because I actually noticed the update, and read the changelog on my way to re-do that change. I like it, although something larger and smaller within a single stack would be nice. I noticed myself wanting to use it, for (for example) assembly machines in early game, when affording 25 of them is still an excessive proposition. Perhaps like 5 or 10 (or both, if it's easy). 0/5/10/25/45.

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by Qon »

zebediah49 wrote:I had to double-check the timestamps, because I actually noticed the update, and read the changelog on my way to re-do that change. I like it, although something larger and smaller within a single stack would be nice. I noticed myself wanting to use it, for (for example) assembly machines in early game, when affording 25 of them is still an excessive proposition. Perhaps like 5 or 10 (or both, if it's easy). 0/5/10/25/45.
I think the settings between 0 and 1 stacks will very quickly become obsolete and then having a lot of them will be a big annoyance when you want to turn off autocrafting of a specific items when you have to scroll past all the tiny sizes. Probably bigger annoyance than manually starting your crafting of a few assembly machines before you can afford 25 which is a brief period. I want to keep the interface minimal and the amount of hotkeys to a minimum too since it's a hassle to keep track of set up many of them while also avoiding collisions. 25%, 50% and 75% already seems a bit excessive to me. 20% and 80% (removing 50%) might work well. Tell me what you think of this once you've had a stack of 50 assemblers for a while ;)

I'm qonsidering allowing autocrafting of items that are not filtered on your quickbar, probably prioritised last. Then you can have autocrafting of your axe, ammo, repair packs and maybe some intermediates and other things that you don't want on your quickbar but still want to have a supply of. But that would mean that items with an individual setting will keep being crafted when you deselect their filter unless you also remove their individual setting. I could try to detect this and flag settings which are set while the item is quickbar filtered and which aren't. But then I would also have to communicate this to the user somehow so that they aren't confused why some item is or isn't autocrafting when they expect the opposite.

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by binbinhfr »

Qon wrote:HandyHands v1.1.0 now allows you to change autocraft stack amount (default and for individual items) with hotkeys. [0, .5, 1, 2, 3, 4] stacks are possible but I might change the 0.5 to instead have 0.2 and 0.8 or similar. Would this help in the very early game? 0.2 stacks would be 10 items for all the stack size 50 items.]
Nice thing this autocraft stack amount. The fact is that I (and other users I know) are using a mod that increase stack size very much. So a percentage remains big... In early stage, I would be much interested by hotkeys fixing an absolute autocraft stack size, like 0,5,10,25,50 but not a percentage.
My mods on the Factorio Mod Portal :geek:

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by Qon »

binbinhfr wrote:
Qon wrote:HandyHands v1.1.0 now allows you to change autocraft stack amount (default and for individual items) with hotkeys. [0, .5, 1, 2, 3, 4] stacks are possible but I might change the 0.5 to instead have 0.2 and 0.8 or similar. Would this help in the very early game? 0.2 stacks would be 10 items for all the stack size 50 items.]
Nice thing this autocraft stack amount. The fact is that I (and other users I know) are using a mod that increase stack size very much. So a percentage remains big... In early stage, I would be much interested by hotkeys fixing an absolute autocraft stack size, like 0,5,10,25,50 but not a percentage.
Hmm. I rely on stack size to prioritise which item to craft first. If you have 4 roboports (80% of a stack) and 10 inserters (20% of a stack) then I want HandyHands to craft inserters first because the amount you need buffered in your inventory is fairly related to stack sizes. You use 10 inserters very quickly but 4 roboports is a big amount. And if I used absolute values then you would need individual settings for every stack instead of it being like it is now where the default of 1 stack (or change default and it changes for every item) is a good amount for everything so the hotkeys are not needed for it to work well, less hassle.

I think the real problem is that you want infinite stack size in your inventory without changing the actual stack size everywhere else. At least that's what I want. I've been thinking about this before but now that HandyHands exists I might go ahead and make a "Compression Inventory" mod to solve that problem. It would work like Compresion Chests mod but for you main inventory instead. Would you use vanilla stack sizes if you had infinite stack sizes in your inventory only (amount of items saved in memory as a number and inventory would only keep about 1 stack)?

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by binbinhfr »

Qon wrote:Would you use vanilla stack sizes if you had infinite stack sizes in your inventory only (amount of items saved in memory as a number and inventory would only keep about 1 stack)?
I'm curious to see how you will do this, but yes, it could be great. In the other hand, large stack sizes are useful for trains, chests, etc...
My mods on the Factorio Mod Portal :geek:

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by Qon »

binbinhfr wrote:
Qon wrote:Would you use vanilla stack sizes if you had infinite stack sizes in your inventory only (amount of items saved in memory as a number and inventory would only keep about 1 stack)?
I'm curious to see how you will do this, but yes, it could be great. In the other hand, large stack sizes are useful for trains, chests, etc...
Buffers are bad you know q: I've avoided stack size modifying mods because I don't want chests and trains to store more. Just a hassle to deal with and doesn't increase production which is my bottom line.
And you can just add more wagons (no practical limits really) to your trains to increase their capacity. Planning for huge train stations is part of the fun imo.

zebediah49
Fast Inserter
Fast Inserter
Posts: 119
Joined: Fri Jun 17, 2016 8:17 pm
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by zebediah49 »

Could you order by percentage of order filled, rather than by stack size? Possibly reverting to stacks if the request is more than one?

So, score = (number_available)/min(number_requested, stack_size), lowest score wins.


Also, it looks like popular demand is for a second set of adjusted hotkeys for manipulating items rather than stacks; possibly by 5's for speed. That would solve my issue (I could go one-stack -5 items for case (a) or zero-stacks +5 items for case (b)), as well as the other issue of people with enormous stack sizes, by just setting it to (zero-stack + 50 items).

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by Qon »

zebediah49 wrote:Could you order by percentage of order filled, rather than by stack size? Possibly reverting to stacks if the request is more than one?
So, score = (number_available)/min(number_requested, stack_size), lowest score wins.
It is ordered by percentage of order filled.
So, score = number_available/number_requested, lowest score wins. (Except when you hold something in your cursor with less available than requested.)
Why "min(number_requested, stack_size)" instead of just "number_requested"? If you need 4 stacks of something you obviously think those are pretty important.
zebediah49 wrote:Also, it looks like popular demand is for a second set of adjusted hotkeys for manipulating items rather than stacks; possibly by 5's for speed. That would solve my issue (I could go one-stack -5 items for case (a) or zero-stacks +5 items for case (b)), as well as the other issue of people with enormous stack sizes, by just setting it to (zero-stack + 50 items).
I think Big Bags and similar are popular mods, but it doesn't work well with HandyHands since it works with stack sizes which are altered by those other mods to silly levels. (Well I changed concrete and landfill stack size to 1M with another mod but still q:). So popular demand is smaller autocraft limits and better compatability with stack size changing mods. I'm considering absolute amounts but it's not clear how that would work combined with stack size amounts. How to switch between them when there's only 2 hotkeys? And having absolute amounts only is not that good because then you can't have a default amount that works pretty well for everything. I want the hotkeys to be optional if possible.

But maybe all individual settings should be in absolute values and the default in stacks. If you want absolute values you have to set individual amounts for pretty much everything anyways since there's no longer any stack size to rely on. And if you have no stack size to rely on then absolutes what's left. That could work pretty well. I might go with powers of 2 for the absolute amounts. Seems pointless to have a precision of 5 when you want about 200. 128 and 256 are then close enough imo. Maybe I can try to keep them somewhat to stack sizes if the numbers are close enough. Less clicking to cycle through all the amounts. Who wants to increment by 5, 40 times in a row to get to 200. Thoughts?

zebediah49
Fast Inserter
Fast Inserter
Posts: 119
Joined: Fri Jun 17, 2016 8:17 pm
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by zebediah49 »

With only two hotkeys -- harder. It would be easier with four, for 'coarse' and 'fine' (i/k and shift-i/k, for example).

You could use a discretized logarithm pattern -- human-friendly multiples of things.

For example, rather than powers of two, you can split it again to get powers of sqrt(2), but round so that instead of 1.41*1.41 you have 1.5*1.33 ---- 1, 1.5, 2, 3, 4, 6, 8, ...

I would propose one of the base-10 ones, such as --
1, 3, 10, ...
1, 2, 5, 10, ....

Or, specifically for Factorio,
0, 1, 2, 3, 5, 10, 20, 40, 50, 75, 100, ...?

mindmix
Inserter
Inserter
Posts: 25
Joined: Wed Nov 04, 2015 9:06 pm
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by mindmix »

Errors when the player doesn't have a character, like when playing in god mode. Easily fixed by adding a check on line 42 (in version 1.1.0), like so:

Code: Select all

if p.character and p.auto_trash_filters[item] then

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by Qon »

mindmix wrote:Errors when the player doesn't have a character, like when playing in god mode. Easily fixed by adding a check on line 42 (in version 1.1.0), like so:

Code: Select all

if p.character and p.auto_trash_filters[item] then
Oh thanks. I had done quick god mode testing before and thought it worked. Thought today "I really should do some proper god mode testing and other edge cases." but then I didn't do it because I remembered that it didn't crash on char nil before. So I read your post and thought "Ouch, I should have done god mode tests again". So I did now. Result: v1.1.1 released q:

Edit:
Aww... released too soon. Ok v1.1.2 coming soon with proper fixes and tests for god mode. Sorry!

Edit 2:
And when I was done making 1.1.2 and was going to rename the mod folder I accidentally deleted it. FFS. (And no trashbin...)

v1.1.2 released.... sigh....
And someone had to download v.1.1.1 5 seconds before I uploaded 1.1.2... :x

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by Qon »

zebediah49 wrote:With only two hotkeys -- harder. It would be easier with four, for 'coarse' and 'fine' (i/k and shift-i/k, for example).
Yeah. But I think coarse only is 'fine' ;)
No one cares if they autocraft 43 or 44 inserters. Increments of 1 is not helping in any way (not saying you suggested increments of 1, just making a point). If you have an autocrafting system then that is funda-mentally a way to say that you do not care, because you have already given up control to some degree. You just want enough but not so much that it fills up your inventory or uses up all your resources on a buffer bigger than you need that you had planned to use for something else later. But actually setting your autocraft limits for each item is manual work. Going through a lot of clicking gets annoying if you have to do it for every item.

I don't want something with too much fine control so that people get frustrated clicking through the values. Then people will demand more hotkeys and a GUI. And then people will complain that there's too many hotkeys to keep track of or too many GUI buttons on their screen. It should be simple and easy so that you don't have to think about it and so that you don't need more hotkeys and settings. Just filter it and HandyHands got your back and will make sure you have enough, don't even think about it any more. Before I found out that autotrash mod had an option to autotrash everything above logistics slots request amount I was annoyed that I had to do a double setup of all the items I wanted, and 2 GUIs to manage. Now I don't interact with the autotrash buttons any more, just enable it once for all items and enjoy it. I might even request/make a light version without the GUI buttons for less clutter on my screen.
zebediah49 wrote: You could use a discretized logarithm pattern -- human-friendly multiples of things.

For example, rather than powers of two, you can split it again to get powers of sqrt(2), but round so that instead of 1.41*1.41 you have 1.5*1.33 ---- 1, 1.5, 2, 3, 4, 6, 8, ...

I would propose one of the base-10 ones, such as --
1, 3, 10, ...
1, 2, 5, 10, ....

Or, specifically for Factorio,
0, 1, 2, 3, 5, 10, 20, 40, 50, 75, 100, ...?
Yeah powers of 2 might not be the best. Exponentials grow a bit too quickly above 100 while having quite alot of steps among the smaller numbers. Stack sizes in factorio are mostly [5,10,50,100,200] so those are good candidates with maybe some numbers inbetween. Would be something like [2,5,10,20,35,50,80,100,150,200,300,400]. Relying on stack sizes is so much simpler though...

Maybe I should just skip absolutes by default, add some more fractionals <1 and then use absolutes for anything with a stack size bigger than 200 and assume you don't want stacks of those. So if you have 500 as stacks for everything you get the absolute numbers I listed above.

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by Qon »

My new idea is to treat all stack sizes > 500 (or maybe 200) as if they were actually 10 times smaller. So if a stack is 500 and HandyHands default is 1 stack then it will create 50 items instead of 500. Maybe as a config option.

https://mods.factorio.com/mods/andhagg1 ... ack%20Size doesn't make stacks so big that 0.2 stacks is going to be too much.
https://mods.factorio.com/mods/sl/Bigge ... ck%20Sizes basically multiplies all stack sizes by 10.
https://mods.factorio.com/mods/JohnRipley/StackSize changes all stack sizes to 1000. Minimium would then be 1000/10*0.2 = 20 items which is not than many exept for roboports. But if you have those then you can have roboports delivered by robots anyways.
https://mods.factorio.com/mods/binbinhfr/BigBags changes stack sizes to 500 (can be changed in config) and that would also work well if I treated all stack sizes as 50.

Arumba
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Sat Aug 29, 2015 6:46 pm
Contact:

Re: [MOD 0.13] HandyHands - AutoHandcrafting - v1.1.0 hotconfig

Post by Arumba »

Hey, I was hoping to suggest an addition to your mod that would be really useful to me! Right now the mod works great for items on your toolbelt. In addition, I would love it if you could automatically craft ammo for your equipped weapons. Most notably regular firearm magazines, pierce rounds, and shotgun shells.

My suggestion would be to only autocraft the type of ammo that is already in the ammo slot. So if you have say 5 rounds of regular ammo, i would autocraft up to 100 regular ammo. If you have 5 piercing ammo, it would autocraft up to 100 piercing, etc.

Would something like this be possible?

Post Reply

Return to “Mods”