Smarter adding of modules to assembling machines

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

trold
Inserter
Inserter
Posts: 45
Joined: Fri Jul 31, 2015 1:07 pm
Contact:

Smarter adding of modules to assembling machines

Post by trold »

This might be a niche request, but I think it would be an improvement.
When using Ctrl+click to add efficiency modules to assembling machines 3 or mining drills, I often have to open the machine and remove some of the modules again, because of the cap on effect. I think it would be a good idea to limit the number of inserted modules, based on whether additional modules would an effect.

Example 1:
Empty assember 3, ctrl+click with efficiency 1 (30%).
Current behavior: 4 modules inserted, for a total effect capped at 80%
Desired behavior: 3 modules inserted, for a total effect capped at 80%

Example 2:
Empty electric mining drill, ctrl+click with efficiency 2 (40%).
Current behavior: 3 modules inserted, for a total effect capped at 80%
Desired behavior: 2 modules inserted, for a total effect exactly at 80%

Example 3:
Assember 3 with 1 efficiency 3 module, ctrl+click with efficiency 1 (30%).
Current behavior: 3 modules inserted, for a total effect capped at 80%
Desired behavior: 1 modules inserted, for a total effect exactly at 80%

Alternatively, the ctrl+click behavior for modules could be modified to only insert a single module at a time. While this would lead to more control, it could as much as triple the amount of clicking needed.
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Smarter adding of modules to assembling machines

Post by orzelek »

I'd really like this too.
It gets annoying when you need to exchange dozen of assemblers to better versions and then do a lot of insert/remove modules on them.
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Smarter adding of modules to assembling machines

Post by oLaudix »

ctrl + shift + left click to remove all modules from the AM would be even better.
Image
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Smarter adding of modules to assembling machines

Post by orzelek »

oLaudix wrote:ctrl + shift + left click to remove all modules from the AM would be even better.
It helps with removal - inserting is still a problem then. And I think we could remove modules with a hotkeys+click.. but it doesn't work now.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Smarter adding of modules to assembling machines

Post by ssilk »

ßilkbot says:

https://forums.factorio.com/forum/vie ... =6&t=13942 Ctrl-Click on machine with modules replaces current modules
https://forums.factorio.com/forum/vie ... f=6&t=4888 Copy Setting for Modules
https://forums.factorio.com/forum/vie ... f=6&t=2160 Fast replace of modules (old)

And related:
https://forums.factorio.com/forum/vie ... f=6&t=8175 Mass insert/removal of modules
https://forums.factorio.com/forum/vie ... f=6&t=7904 Copy-paste modules (in addition to settings)
Especially: https://forums.factorio.com/forum/vie ... ing#p62396

The basic idea there is, that we have some configuration (low energy, high speed, just names) and depending on that you can set the module-config on a device. The resulting setting of modules depends on that and the bots try to deliver/exchange the modules into the devices automatically.

The set config can be switched by the circuit network (I think they can simply switch between 3 configurations) and that enables to switch the setup automatically, depending on the needs.


Far Related:
https://forums.factorio.com/forum/vie ... =6&t=12586 ON/OFF Button on buildings.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
trold
Inserter
Inserter
Posts: 45
Joined: Fri Jul 31, 2015 1:07 pm
Contact:

Re: Smarter adding of modules to assembling machines

Post by trold »

Thank ssilk!

I actually like the referenced idea better of including module configuration into the cut'n'paste behavior, if you have the correct modules in your inventory.
JasonC
Filter Inserter
Filter Inserter
Posts: 449
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Limit efficiency module insert to -80% power usage

Post by JasonC »

The maximum power usage bonus that efficiency modules can give is -80%.

This limit is reached with:
  • 3x level 1 modules
  • 2x level 2 modules
  • 2x level 3 modules
  • Various mixed combos (one L1 + one L3, for example)
Many buildings have 3 or 4 module slots, meaning that when efficiency modules are batch inserted (with ctrl+click) often too many modules are inserted and thus wasted. This means that to not waste efficiency modules, you still have to open each building individually and insert one module at a time.

I would like to see ctrl+click not insert additional efficiency modules if the power usage bonus is already capped at -80%. So, for example:
  • Holding L2 efficiency modules, assembler 3, no modules: inserts 2
  • Holding L2 efficiency modules, assembler 3, contains one L2 module: inserts 1
  • Holding L1 efficiency modules, assembler 3, contains one L3 module: inserts 1
  • And so forth...
This would make quickly equipping large numbers of buildings with efficiency modules much more convenient. You should still be able to insert extra efficiency modules if you want by opening the building dialog and inserting them one at a time.

In other words: Right now ctrl+click inserts extra modules and you have to do it manually if you don't want to. This change makes ctrl+click not insert extra modules and you have to do it manually if you *do* want to. Assuming not wanting to put unnecessary efficiency modules in a field of buildings is the more common case, this makes the common case the more convenient one.

Note that the logic is "insert one only if current bonus is smaller than -80%" (since e.g. three L1 modules is -90% capped to -80% but is still OK and should go in the building).

As a "workaround" right now, assuming you have construction robots, you can sort of make things more convenient by copying and pasting a building that already has the desired module setup (although this is not useful if the building is already placed).
Last edited by JasonC on Thu Jan 23, 2020 9:01 pm, edited 1 time in total.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3024
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by BlueTemplar »

Or whatever is the actual limit if it can be modded.

Also, another workaround would be using upgrade planner to change the number of modules ?
(Vanilla or the mod, if vanilla doesn't support this yet.)
BobDiggity (mod-scenario-pack)
netmand
Filter Inserter
Filter Inserter
Posts: 302
Joined: Wed Feb 22, 2017 1:20 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by netmand »

JasonC wrote: Thu Jan 23, 2020 4:49 pm for example:
  • Holding L2 efficiency modules, assembler 3, no modules: inserts 2
  • Holding L2 efficiency modules, assembler 3, contains one L2 module: inserts 1
  • Holding L1 efficiency modules, assembler 3, contains one L3 module: inserts 1
  • And so forth...
Sorry I'm not on board with this. When I want to fill that's my go-to. As you said, When I want a particular configuration, I copy or use a blueprint.
Maybe someone has made a mod for this sorta thing?

If this was implemented how would it be learned? I'm guessing an inexperienced player might think ctrl+click is broken until someone explains it.

Can you expand the "And so forth..."? How many L1 modules (-30) into an empty assembling-machine-3? two for 60? three for 90 cut down to 80? What if I wanted it one way for one scenario and a different way for another scenario? What if there were beacons nearby? would they count? what if they were not powered? If it considers beacons now I have to lay them down (and maybe power them up) first?

This ask just seems to add way too much complexity to an otherwise simple feature of the game.
JasonC
Filter Inserter
Filter Inserter
Posts: 449
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by JasonC »

netmand wrote: Thu Jan 23, 2020 6:01 pm When I want to fill that's my go-to.
What advantage do you see in putting four L1 efficiency modules in a structure?
If this was implemented how would it be learned? I'm guessing an inexperienced player might think ctrl+click is broken until someone explains it.
This is almost never a concern.

First, we know that people learn things, as evidenced by people learning how the rest of this game works. Second, if you attempt to reinsert it could just pop up the standard little floaty explanatory message.

This makes learning this behavior just as difficult as learning why you can't pick something up if your inventory is full -- i.e. not difficult: you'll figure it out right away the first time.
Can you expand the "And so forth..."?
No, I will not enumerate every combination of modules whose efficiency bonus is greater than the game's 80% cap, but you can do it on paper as a fun math exercise if you're bored.
This ask just seems to add way too much complexity to an otherwise simple feature of the game.
Not inserting efficiency modules that have no effect is not a lot of additional complexity; it's even simpler because then you don't have to remove unnecessary modules or open the things individually. It just lets you hold down control, drag the mouse over like you do with everything else, but now without wasting modules.

I wonder if I was unclear in my description.
Last edited by JasonC on Thu Jan 23, 2020 8:01 pm, edited 3 times in total.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.
JasonC
Filter Inserter
Filter Inserter
Posts: 449
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by JasonC »

Just to be clear, the -80% cap (or whatever cap for non-vanilla mods that change it) already exists in the game, it has always existed. A fourth L1 efficiency module has never had an effect. This isn't a request to change any rules, only to change insert behavior.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.
User avatar
DanGio
Filter Inserter
Filter Inserter
Posts: 398
Joined: Sat May 10, 2014 6:22 pm
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by DanGio »

I'm usually really OK with removal of useless complexity and QOL features, but I feel like this would be a hazardous step.
JasonC wrote: Thu Jan 23, 2020 7:56 pm
netmand wrote: Thu Jan 23, 2020 6:01 pm When I want to fill that's my go-to.
What advantage do you see in putting four L1 efficiency modules in a structure?
There's plenty of "mistakes" the game let you do. You can put prod modules in pumpjacks, you can place 200 boilers feeding on one offshore pump, offset your nuclear plants and lose all the neighboring bonus if you want to. I don't think the game should prevent any of these including OP situation (too many efficiency modules)
JasonC
Filter Inserter
Filter Inserter
Posts: 449
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by JasonC »

DanGio wrote: Thu Jan 23, 2020 8:26 pm I'm usually really OK with removal of useless complexity and QOL features, but I feel like this would be a hazardous step.
What's the hazard?

You could insert extra modules if you want by opening the building dialog and inserting them one at a time.

Right now ctrl+click inserts extra modules and you have to do it manually if you don't want to.

This change makes ctrl+click not insert extra modules and you have to do it manually if you *do* want to.

Seems to make sense. It's almost certainly the more common case, it should be the more convenient option.

Plus it could just be an interface option that you can turn off if for some reason you do want to insert unnecessary modules as fast as possible.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by eradicator »

Your understanding of the "limit" only applies for setups that use no other modules or beacons. Because the limit is on the total effect. For example an assembler with 3xEff3 and 1xProd3 does not hit the 20% consumption lower-limit.

Also any sort of "smart" solution will just make it fail in other situations. What you propose is therefore just shifting the non-problem elsewhere. And it's therefore better to keep behavior consistent.

Here's an example command that gives you back modules based on the current consumption of the machine. Feel free to make a mod of it if you care enough.

Code: Select all


/c

function is_effect_maxxed(obj)
  if obj.effects and obj.effects.consumption then
    if (1 + obj.effects.consumption.bonus) <= 0.2 then return true end
    end
  end

script.on_event(defines.events.on_player_cursor_stack_changed,function(e)
  local p = game.players[e.player_index]
  local s = p.selected
  local modules = s and s.get_module_inventory() or nil
  if modules then
    if is_effect_maxxed(s) then --[[below min consumption]]
    
      local refund_count,lname = 0 --[[naively use last seen modules name]]
      
      for i=#modules,1,-1 do
        local m = modules[i] 
        if m.valid_for_read
         and m.prototype.module_effects.consumption.bonus < 0
         and (not m.prototype.module_effects.speed        )
         and (not m.prototype.module_effects.productivity )
         and (not m.prototype.module_effects.pollution    ) then
          local name = m.name
          lname = m.prototype.localised_name
          m.clear()
          if (not is_effect_maxxed(s)) or (p.insert{name=name, count=1} == 0) then
            m.set_stack{name=name, count=1}
            break
          else
            refund_count = refund_count + 1
            end
          end          
        end
        
      if refund_count > 0 then
        p.create_local_flying_text{
          text = {"","+",refund_count,' ',lname},
          position = s.position,
          speed = 2.8,
          time_to_live = 150,
          color = {g = 1},
          }
        end
        
      end
    end  
  end)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
JasonC
Filter Inserter
Filter Inserter
Posts: 449
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by JasonC »

eradicator wrote: Thu Jan 23, 2020 9:00 pm Your understanding of the "limit" only applies for setups that use no other modules or beacons. Because the limit is on the total effect. For example an assembler with 3xEff3 and 1xProd3 does not hit the 20% consumption lower-limit.
That's a good point; the behavior I'm imagining is it just stops when the combined effect of only the building (non-beacon) you are inserting into hits the cap, including the current effect of any beacons. For inserting in beacons, it probably makes sense to have no limit here. I think this would be useful still; I mean, it's always what I'd be trying to do anyways.

Place your beacons, stick the modules you want in them, then do a run by efficiency module insert on the buildings to cap them off.

Changed the beacon setups and have room for more efficiency? No problem, just do another quick run-over with the mouse to max out efficiency again.

Loaded up buildings before building beacons or whatever? Oh well, now you've got extra modules, no big deal.

It still seems like a convenient behavior.

Of course later in the game when you've got modules stockpiled in the thousands wasting them isn't a big deal; but even then it's sometimes handy to conserve when you're dropping 100+ mining drills in a field and you only have so much inventory space for modules.

All I'm saying is, criticize all you want in theory, just think of me every time you open a building dialog and insert efficiency modules manually. :lol:

Plus like I said:
Right now ctrl+click inserts extra modules and you have to do it manually if you don't want to.

This change makes ctrl+click not insert extra modules and you have to do it manually if you *do* want to.
PS Thanks for the snippet that's handy.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.
netmand
Filter Inserter
Filter Inserter
Posts: 302
Joined: Wed Feb 22, 2017 1:20 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by netmand »

JasonC wrote: Thu Jan 23, 2020 7:56 pm No, I will not enumerate every combination of modules whose efficiency bonus is greater than the game's 80% cap, but you can do it on paper as a fun math exercise if you're bored.
This is the crux of my objection. I have to ask, Why are you asking for a feature that already exists via copy and/or blueprinting? You give a handful of examples that apply to you but nothing that substantiates it when asked. This is not a good way to get devs to value your request.

"if you're bored" ... while I avoid doing things on paper (yuk) I have plenty of spreadsheets and notes. I get it, you're in contrast to me and want the game to figure these things out for you. I'm okay with that if done through a mod.

While you scoff at my L1 scenarios, how about a L3 example then? ctrl-click fill assembling-machine-3 with L3 efficiency, then replace one with a L3 speed. It's two clicks, which can then be copied. Your suggestion if implemented would only place one since 2 would go over the limit right? Then there's no difference between ctrl+click and click... which seems silly.
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3024
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by BlueTemplar »

I would add an additional request :
Ctrl + right click would prevent "wasting fractions of modules" :
One well-known use case is electric drills where a third efficiency module would be "partially wasted" (which usually happens much earlier than bots) : ctrl + right click would only fill them with 2 modules.

Alternate, simpler (?) option :
Keep Ctrl + left click like it is, and add Ctrl+right click in a manner "similar" to how it works for other items :
Fills half of module slots (rounded up?) :
Let's check what happens :
- First pass on vanilla electric drills with eff1 modules would fill them with 2 modules. Check !
- First pass on vanilla assemblers mk3 with eff2 modules would fill them with 2 modules. Check !
- First pass on vanilla assemblers mk3 with eff1 modules would fill them with 2 modules. Check for "no waste" ! Now, if what the code does is to look at remaining free slots, the second pass would fill them with an additional eff1 module, resulting in 3 eff1 modules total. Check for "maximum efficiency" !
Want to only half-fill module slots for one reason or another, like combining half/half distinct modules, for one reason or another, maybe modded games ? Check !

Of course, all of these requests might be kind of moot of one remembers about the 0.17-introduced "drop a single item using "Z"" feature. But it is slightly fiddlier to use than ctrl+left/right click !
DanGio wrote: Thu Jan 23, 2020 8:26 pm There's plenty of "mistakes" the game let you do. You can put prod modules in pumpjacks[...]
AFAIK this is not necessarily a mistake for non-depleted oil fields ?
BobDiggity (mod-scenario-pack)
JasonC
Filter Inserter
Filter Inserter
Posts: 449
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by JasonC »

netmand wrote: Thu Jan 23, 2020 9:19 pm
JasonC wrote: Thu Jan 23, 2020 7:56 pm No, I will not enumerate every combination of modules whose efficiency bonus is greater than the game's 80% cap, but you can do it on paper as a fun math exercise if you're bored.
This is the crux of my objection. I have to ask, Why are you asking for a feature that already exists via copy and/or blueprinting? You give a handful of examples that apply to you but nothing that substantiates it when asked. This is not a good way to get devs to value your request.
A fair portion of UI feature requests are to make things that you can already do more convenient, so I'm not sure what to tell you.

I substantiated my request by providing a handful of examples that apply to me. The forum is where others who aren't me can provide additional input, I don't speak for anybody else. If my examples don't convince you, that's OK too.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.
JasonC
Filter Inserter
Filter Inserter
Posts: 449
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by JasonC »

BlueTemplar wrote: Thu Jan 23, 2020 11:25 pm Of course, all of these requests might be kind of moot of one remembers about the 0.17-introduced "drop a single item using "Z"" feature. But it is slightly fiddlier to use than ctrl+left/right click !
I had no idea you could do that into buildings! I'll take it! It's easier than opening the dialog and is good enough that I'm less in need of this request. Thanks!!

So, that gives me an alternate idea, but I think it's different enough to warrant a new post (it's here).
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Limit efficiency module insert to -80% power usage

Post by eradicator »

BlueTemplar wrote: Thu Jan 23, 2020 11:25 pm I would add an additional request :
Ctrl + right click would prevent "wasting fractions of modules" :
One well-known use case is electric drills where a third efficiency module would be "partially wasted" (which usually happens much earlier than bots) : ctrl + right click would only fill them with 2 modules.
That's just more thought-reading magic. How should the engine know when you think that wasting fractions is ok and when you think it's not? And why should the engine be engineered for your thought pattern? It's not realistic. And overloading the game with more shortcuts every time anyone comes up with a new edge case isn't the solution.

Imho the easiest would be to simply introduce a "module planner". Drag a frame around the relevant machines → a gui pops up and asks you what modules you want. Ofc that's pretty similar to the already existing blueprint solution but more overpowered because it doesn't require bots or time.

Btw, the devs have already stated that (paraphrased from memory) "making pre-bot building easier" isn't something they have much interest in. See the upgrade planner for example.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Ideas and Suggestions”