Red and Green Wire Connection Distances

Post all other topics which do not belong to any other category.
pruby
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Feb 28, 2017 9:40 am
Contact:

Red and Green Wire Connection Distances

Post by pruby »

Hi all,

Putting here as it doesn't quite belong anywhere else, and doesn't seem to be in any of the documentation (searched here, wiki, etc).

Does anyone have a precise definition of what distances red and green wires connect over, and where this is measured from? There seem to be different rules for different entities.

For example, do substations measure from the centre of the 2x2? Do decider and arithmetic combinators have a different point for input and output or are all measurements from one centre point? I could probably set up a series of experiments, but worried I might miss edge cases.

I'm trying to create some auto-generated blueprints with this tool viewtopic.php?f=8&t=27030 and want to check that the connection distances are legal.

Cheers
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3716
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Red and Green Wire Connection Distances

Post by DaveMcW »

Look in data/base/prototypes/entity for the max distance definitions.

In vanilla the values are:
7.5 - Small electric pole
9 - Medium electric pole
14 - Substation
30 - Big electric pole
10 - Power switch
7.5 - Everything else

Distance is measured from the center of the entity. When two entities have a different distance, use the smaller one.
Post Reply

Return to “General discussion”