[Fluidic Power] I need help supporting diagonal poles in 2.0

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 319
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

[Fluidic Power] I need help supporting diagonal poles in 2.0

Post by Stringweasel »

Hello!
What
One of the annoying caveats of Fluidic Power is that you can only place poles in cardinal directions. This limitation is because the poles need a underground fluid connection to each other, and these connections are only in straight directions.

However, in Factorio 2.0 we will have linkable fluidboxes! Therefore poles can be connected regardless of where they are, meaning you will be able to place them anywhere. But utilizing this feature will be hard to implement to be intuitive to the player, as well as being idiot proof. I can't think of a way to implement it robustly yet.
My goals
  • When the pole is in the player's cursor it should be clear to the player if it will connect to other poles. (Only sollution I think would be using copper-wire)
  • The player should be able to place circuit wires on poles, and when selecting a pole should show the circuit signals in the tooltip.
  • Player should not be able to break fluidbox connections by manually changing copper wire connections
My current best idea
  • Player holds power pole enity in cursor when placing. It will draw a copper wire to power poles it will connect to.
  • Upon placing the pole I remove the visible copper connections and replace it with linked fluidbox connections.
  • (Not ideal) Player can still only see current connections of existing poles with manually drawn overlay.
  • (BAD?) Can I prevent player from manually creating/removing copper connections? Or at least detect such events reliably?
    Play
Help
Ideally I would like to still draw copper connections, so that it looks like vanilla, but I can't think of a way this would be possible. I can't manually draw copper connections because I don't know the poles rotation. I could possibly add another force's pole underneath my poles, but that that seems clunky and unreliable. Don't know how the different forces will interact.

Any ideas?
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

Post Reply

Return to “Modding help”