The ability to "stretch" placing any entity

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Johnson1893
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Oct 08, 2022 7:27 am
Contact:

The ability to "stretch" placing any entity

Post by Johnson1893 »

If you put a pole, and, without releasing the button, move the mouse - the poles are placed at a distance of the maximum distance of the wire. Not each right after previous.
At the moment, this only works with electric-pole entity type proptotype.
I propose to make this a general property of every entity proptotype.

For example, I would like to be able to place roboports like this, and make a mod in which the player could adjust the distance of the roboports placed in this way.

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 319
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: The ability to "stretch" placing any entity

Post by Stringweasel »

+1

I propose an additional an addiobal flag to most entites:
  • distance_between_drag_placing
This would be zero by default, but electric poles would default to the wire distance for example.

My use case is placing Fluidic Power electric poles, which are generators internally. If you click drag they are placed right next to each other. I would like to change that to be closer to how electric poles are placed.
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

mrvn
Smart Inserter
Smart Inserter
Posts: 5709
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: The ability to "stretch" placing any entity

Post by mrvn »

There is far more to this than wire distance though. The electric poles remember the last place they could be placed and the entities they would power. Then when next location either doesn't have the wire reach or doesn't power all remembered entities the previous location gets a pole.

So for your fluidic power electric poles you have to make the entity-to-place an electric pole prototype and then you can mess with it in the entity build events.

Note: undergound belts / pipes also have this but pairwise.

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 319
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: The ability to "stretch" placing any entity

Post by Stringweasel »

mrvn wrote:
Sat Oct 08, 2022 11:01 am
There is far more to this than wire distance though
For this interface request I do not care for the special electric pole placing behaviour. All I would like is be able to apart the placement of entities when dragging. And this might be a generic enough request to considered, whereas the pole placement logic is likely quite complicated.
mrvn wrote:
Sat Oct 08, 2022 11:01 am
So for your fluidic power electric poles you have to make the entity-to-place an electric pole prototype and then you can mess with it in the entity build events.
In Fluidic Power's case this would not work for other reasons.
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

User avatar
that_1_nerd
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Sep 29, 2022 9:15 pm
Contact:

Re: The ability to "stretch" placing any entity

Post by that_1_nerd »

You could make the interface work in this way.
It could accept 3 different values
Default to no spacing: i.g nill
Define maximum distance: i.g integer 5
Or you could pass in a function that executed on title_changed to allow more complex operations and check to be run and defined...
Trains make or break a man!

Post Reply

Return to “Modding interface requests”