Fiber Optics


Connects to the optical fibers in power lines to transfer red and green signals across power networks.

Content
6 days ago
1.1
117
Circuit network

b crash because get_unit_number returned nil

21 days ago

Looks like there's an interaction with another mod causing a crash.

Error while running event fiber-optics::on_entity_destroyed (ID 160)
fiber-optics/lib/context.lua:136: table index is nil
stack traceback:
fiber-optics/lib/context.lua:136: in function 'set_entity_context'
fiber-optics/lib/context.lua:146: in function 'cleanup'
fiber-optics/scripts/oc.lua:280: in function 'func'
fiber-optics/lib/tools.lua:50: in function <fiber-optics/lib/tools.lua:46>

13 days ago

Thank you for reporting. I think I have a fix for this already.

13 days ago

please try the 0.0.2 release. It is still a bit unpolished but should fix the problem.

12 days ago

The good news, it doesn't crash anymore. the less-good news, no signals seems to be getting through.

12 days ago

This implies that your OCs are connected to separate power networks. Weird, this is one of the pieces that has not given me grief so far.

Could you try this blueprint:

0eNrFmNluozAUht/F1wnCC2Cj0dz0MUYVIsRJLbHJmHaiiHcfQ1qy2cRuRupNJBP4zzm//Xk7gk3Z81aKWoH0CETR1B1I/xxBJ/Z1Xo7P1KHlIAVC8QqsQJ1XY+ut7dJds25aJYq8XOvPal6oRoJhBUS95X9BCofXFeC1Ekrwk+bUOGR1X2241C/Mal2Vl+W6zKtWR2ibTn/S1GNsLYNZEK3AAaRrHAeRltexlGzKbMPf8nehQ+r3CiGLXqhM/7edP94J2ansrpB3IVWvn5yjT2+sX8BJvFP5aAYNx1bV5jIf60rBbzCcXhgrFZNPRwDHH8m3l/UJ3ULD6qqNh9dhuHj25QFy84D+jAcQPWUCtBSNnYom4c8UTZ6s+brjia3nyZzGV2hNUbUR9RT1zg10HgLR5MZWyFM6II3N3uxEqbi04PzAjH7q/kuWLRbsJef1rQk606+OWRoH0Rx8ywux5dLVAXJdPzHX/yl6HhvdfyAivh0dv/QnTa/a3l+0PWST09lONlUmaq0BUiV7PviYTW5G3I35aOo6ZBmuBI2z9DOdGN+tCcVaNK2oMxgbZjINNYZo7sgAQZpEJt3ErhsZdSelT10csCmMSZhahRODLgxoxLCTMLMKx0bhiMTnjBecgKFVODIKX4jGJIzN2UJoVSVGVcxGqVmZWH2AyKqMjcrhtREJtQljqzAyDok4csyY2AebURgT7GZydLPU8VIzLUWxbpuSG6TRzSxfc7F/2zT9NI3D+NUUI/aMkSzGiIwxEj/KqSvlkPphTp0xh8yLc+bOOQq9QGfOoCPoBTpzAx0hL9CZO+gIe4HOnEFHxAt06gw6irxAp86go4VlkDxcBnEQJ9ZBsYAefjg54QBN3hiVF9h7PJ/iIIJWZTt7ED5eAnAAT3Y477rHbYz5qGFnFYaPl7mlIrGdVra8LC91CrbTSh/vIpYGEjbR2jYfetttWSjgrGrqi5ce3h1+dB4fel8+NcJp49l9CFW8ZXr7rHTkXV523JQb8cOHOuODIz98qDM+OPbDhzrjgxM/fNjT+NgOqZj64cM88GFe+DA3fEjohQ9zx4dAX3yYNz7xN/EhyG8LiM53ajDwGCd3R8vrkyditrsO7JffxdWPV3749tYtsSVEHt9k2ufD8frhPZciP/2pH6t8f7pcKEWbzXcmpsDRdwIz38D6TD/d16YX17v6Uy676UNEIUkYSmjMQhySYfgH++oO+w==

11 days ago
(updated 11 days ago)

Nope, no luck with the circuit in the blueprint

10 days ago

ok, thanks. Do the connector LEDs turn green? If not, do you happen to use the editor? If yes, you need to turn on time, there is a ticker process that updates the internal state that must run.

With the 0.1.0 release, you can turn on debug mode (mod settings / map), which will log into a logfile (factorio-home/script-output/fiber-optics/framework.log) information about the connectors and the network. If the LEDs turn green and time is passing and still no signals are moving, please turn on debugging mode, let it go for a few minutes and then send me the log file (as a github gist or so).

10 days ago
(updated 10 days ago)

I was testing the circuit in a creative save, so time was definately ticking with out the leds changing. I'll get a log capture shortly ... but I've found another issue that breaks my dedicated server which i need fix first before my friends turn on me :)
(edit: oh just noticed there's 0.1.0 release i'll have a look at that be first)

10 days ago
10 days ago

thanks, this is great. The interesting piece is that the log does not contain any lines like this:

24:48:46: Network Id: 1195/1, connected entities: 3
24:48:46: Entities: 14381, 44730, 44596
24:48:46: Network Id: 1169/1, connected entities: 2
24:48:46: Entities: 44686, 44730
24:48:46: Network Id: 1581/1, connected entities: 2
24:48:46: Entities: 44514, 44596
24:48:46: Network Id: 1784/1, connected entities: 0
24:48:46: Entities:
24:48:46: Network Id: 1785/1, connected entities: 2
24:48:46: Entities: 45929, 45919

which are emitted by the network ticker. Those show up only once a minute, so you may need to let this run a bit longer. It seems to me that somehow the OCs got disconnected from the internal network entities. I noticed that you use krasotorio, I will try with that as well.

Out of curiosity: Is this on nauvis or another planet?

9 days ago
(updated 9 days ago)

I deleted all the connectors and re-add the two needed for the circuit to ensure a "clean" state, still not working.
https://gist.github.com/badmonkey/2733c29ed8b93bda38c2a1857a90fbd7

it's a pretty mod heavy save (sek2bz+) and it was nauvis.
when i get some time i'll start a vanilla+fiber-optics save and see if that's different

9 days ago
(updated 9 days ago)

still occurs on a map with just fiber-optics.

debug-fiberoptics.zip is a minimal save with the issue (or itll just show where i messed up :-) )
https://drive.google.com/drive/folders/1xjIewJztt8WLFGV9qI64GrIgymN7Ubsj?usp=drive_link

6 days ago

I have a fix and the next version should also fix the existing maps.

6 days ago

ok, I think 0.1.2 fixes all the problems (0.1.1 does, too but the pin coloring is off)

Please try with this blueprint:

0eNrFWUuPozgQ/isjX5cg/OCp0V7msPfR3lYtRIjTscRLxnRPq5X/vrbTeRFDsBlpLq2GxPVVfVVUfSk+wbYaaMdZI0D2CVjZNj3I/vsEPXttikrdEx8dBRlggtbAA01Rq6tD12f7dtN2gpVFtZHHGlqKloOjB1izo79ABo+ewcwb42KQdy6WTt/YcLq7OYuszr5ySpub0/j44gHaCCYYPUWjLz7yZqi3lEvXLhZUvKJohIyg3rKmUCF4oGt7ebZtFLa0l2I/9MAHyDbEDyXMjnEZrP488pQJwdsq39JD8cbkeXlozypB+QSTU2H8UCGU7aBSAW9ofNG3NcFMp+cTQPXnFPZNeGwHslh+l/FyYEJfqtNHReaIAXQFr4uq2tBKWues3HRtRQ0MxPcMNJS9HrbtoEMkLwYAPAKoirp7tAuDC7WhNmwi8xyP/Gx3ObxnvBe5LbenZEtcFKjLuiu4TnkG/gZHG5qjCV6JHa8wQDPEIhOx4UJiwz9CLFnNq3d3TcgE0dFCGsgfoSFZSQMe0RBOsBBf/NjRku0oX9jH8H0XI2Zivmxeiel/w5MXjan5Lo+0g+gGe6PdR677Zb7nbZ2zRtoAmeADtSIbjsgetVCkGzBSx9WQGh0mSA2bNa04eRiq5Ya1eccaQwZlFWOIzln0EUxiVdaieNVBslYey8+TIzLBpXZwGuEEh/xUg0/ihSY8GDjHh/wong2QGAGhHSAm+BohisIIhRPVM5H+46R/2OgfsvNPe3T2L4Rf/pkBkREQ2wBGfkCim5zD+RRAIyJxR8R+nMwUmZnS0JlS7JPZojYzGk3i5W1Dn5UZ9iMSzKXRiBkbMLv2Xfb8Cc0WnVMYGwr6xwDHtSzr8l3OBP1/oJte/85Eechl6xYSd19UPTV5lthlG6fB8ooOjFykdogLn29jFyf4cRxMeZsapXZg52x49/jNd8DECAjtAJMwxUt7fGwERO4RPplhxhGGsFv6nz13xvmFiHt1P2suxvmFbJqZ/gG1UhGgyBJwtSZAsXuIbqIAJZaI61QBNkg/K5GAUkt/V6sEHFghkt8gEzBcAemiEzByZ9VJKGBsKRRGpeekFDCxVAqS2nmpEDwUuKNUwKFlxtdrBRxZQq4SC8RWHeDY0r3V8gAnloir9QFOV8ToIhBI4JhzJ4VA4IqidpIIxHZ9e9mCBb7FGHtYhNzvSeDURoNcu17BmTjUVEjX5jZTMAhO/sGFC/ar3XXbKVqUB7VL6qkyk1/3VNKftqO8OHkB/nJYUp1sH5fzjZLrqsm8qUqnGLfeO4fPK8LoQjgqAjy5CQ+fvyya/M2q9pNvMsdf9MPrw7GvWDc7/UjkgHuZgIuBX7zTG7Hs5gWaB6piS2VpgJ909+0fRd+3f2mvPnijvNcWUQJJnKI4idIAB/Lp/h9upPji

6 days ago

I havn't tried the blueprint but loading my previous debug save worked first time.

New response