I'm looking for a mod that creates a hot key and allows you to create groups of items. For example, if you have a small electric pole selected you can hit the key and it will cycle to the medium and large electric pole.
Does anyone know if this exists or can be made?
Looking for a simple mod that creates a hot key that cycles through similar items
Re: Looking for a simple mod that creates a hot key that cycles through similar items
I don't think such a mod exists but it could be easy to code such.
I imagine a script which cycles through the current cursor stack item.type prototypes and if the next exists in inventory change cursor stack.
I imagine a script which cycles through the current cursor stack item.type prototypes and if the next exists in inventory change cursor stack.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Looking for a simple mod that creates a hot key that cycles through similar items
Allowing the user to create custom item groups requires some kind of user interaction, i.e. a GUI or console command, which makes the mod request quite a bit more complex than i.e. using a fixed list of items (i.e. splitter/belt/underground of the same color). Though without custom groups it would be mostly useless for modded items.
TL;DR: Is it possible? Sure. Is somebody gonna make it for you? Unsure.
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Looking for a simple mod that creates a hot key that cycles through similar items
I would dump the create groups idea because power poles have already a 'group' https://wiki.factorio.com/Prototype/ElectricPoleeradicator wrote: Sat Sep 29, 2018 12:55 pmAllowing the user to create custom item groups requires some kind of user interaction, i.e. a GUI or console command, which makes the mod request quite a bit more complex than i.e. using a fixed list of items (i.e. splitter/belt/underground of the same color). Though without custom groups it would be mostly useless for modded items.
TL;DR: Is it possible? Sure. Is somebody gonna make it for you? Unsure.
Maybe I have time to steel together some code snippets from other good mods
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Looking for a simple mod that creates a hot key that cycles through similar items
That link doesn't mention any groups. If you're talking about fast-replace groups they're not an adequate choice because you don't want to swap between different belt colors etcpp.steinio wrote: Sat Sep 29, 2018 1:09 pm I would dump the create groups idea because power poles have already a 'group' https://wiki.factorio.com/Prototype/ElectricPole
I made a demo/prototype mod:
Default is ctrl+r/alt+r to rotate to the next/previous stack (can be changed in control options). Default groups are:
Code: Select all
['yellow-belt'] = {'transport-belt','underground-belt','splitter'},
['red-belt'] = {'fast-transport-belt','fast-underground-belt','fast-splitter'},
['blue-belt'] = {'express-transport-belt','express-underground-belt','express-splitter'},
['poles'] = {'small-electric-pole','medium-electric-pole','big-electric-pole','substation'},
['pipes'] = {'pipe','pipe-to-ground','pump','storage-tank'},
['trains'] = {'locomotive','cargo-wagon','fluid-wagon','artillery-wagon'},
['flooring'] = {'stone-brick','concrete','hazard-concrete','refined-concrete','refined-hazard-concrete','landfill'},
['solar'] = {'solar-panel','accumulator'},
['heat'] = {'heat-pipe','heat-exchanger'},
['signals'] = {'rail-signal','rail-chain-signal'},
['inserters'] = {'long-handed-inserter','fast-inserter','stack-inserter'},
See what groups exist:
Code: Select all
/stackrotate list
Code: Select all
/stackrotate remove groupname
Code: Select all
/stackrotate add {groupname = {item1,item2,item3}}
Code: Select all
/stackrotate tell
Code: Select all
/stackrotate reset
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Looking for a simple mod that creates a hot key that cycles through similar items
Pseudocode:eradicator wrote: Sat Sep 29, 2018 3:00 pmThat link doesn't mention any groups. If you're talking about fast-replace groups they're not an adequate choice because you don't want to swap between different belt colors etcpp.steinio wrote: Sat Sep 29, 2018 1:09 pm I would dump the create groups idea because power poles have already a 'group' https://wiki.factorio.com/Prototype/ElectricPole
Code: Select all
On init, on change:
global = {}
For i, prototype in game.entity_prototypes do
If not global[prototype.type] then
global[prototype.type] ={}
End
table.insert(global[prototype.type], prototype.name)
End
Re: Looking for a simple mod that creates a hot key that cycles through similar items
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser