FuryoftheStars wrote: ↑Thu Jan 25, 2024 2:42 pm
SupplyDepoo wrote: ↑Thu Jan 25, 2024 9:20 am
Technically the signals
would be flipped across the axis of reflection (the horizontal or vertical line that divides the blueprint in half) along with the rails. I can see why you might think of it as "not flipping the signals" but I am thinking about it in a technical sense (see image below).
Yes, I'm fully aware of that. I'm referring to in relation to the tracks. Obviously if the track is not the axis of flipping, you can't just leave the rail signal where it was, the rail signal has to come over with it.
Regardless, I think the work they'd have to put into double-checking the rail signals for collisions or circuit wires exceeding their maximum reach, or other edge cases we're not thinking of, isn't that worth it. Separating the entities from the track and just flipping the entities around the track and reconnecting those couple of circuit wires is a pretty simple task to do. I mean, I wouldn't be
against it, per-se, if the devs wanted to do it, but I'm certainly not going to be for advocating for it, either.
Fair enough. But it would definitely be a lot of work to change signals and train stops by hand for a large subfactory like I showed, which is why I would wager that no one has ever been mad enough to attempt to flip a blueprint of such scale. But the community seems to have become resigned to the idea that such blueprints are not meant to be flipped, and I think that can change -- if only we would obtain the power.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
I fear i'm going to repeat myself there but i disagree with your operations and conclusion about symmetry here, the left most junction in your picture is broken to me, not just "very suboptimal", it will cause 4 train arriving at the same time to deadlock, in any case it's something not working the same as original. And then between the middle and right most version, you made the junction go from LHD to RHD doing more than just flipping.
You might be right about the symmetry thing, because to be honest I didn't understand the last part of the FFF and maybe you did, but I would probably need some good illustrations or something for me to understand (I have never played that mod, which I know is a popular mod, so it's possible there is some implicit knowledge about that building's rotation behavior that I am missing).
It is beside my main point though, which is that flipping rail signals and train stops like I showed would be possible and useful in many cases. Maybe less for dual track blueprints, because it would always change LHD to RHD and vice versa, or it would simply not be possible (like your 32x32 junction, and anything 0-spaced and most other tightly spaced which can only be RHD).
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
In one case from original to left version, you multiply every "x" or "y" coordinate by -1, aka you "flip" the blueprint, take its reflexion, the mirror version, but in doing so you "destroy it", "naive" approach is not enough for rails with signal attached unlike the current things we are allowed to flip. ( i mean today, not including refineries and chemplants and boilers when expansion is realeased ).
Yep, agreed on that.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
In one other case from the middle version to the right version, you apply different rules to some chain signals based on your human understanding. the game couldn't tell why you decided to pair some chain signal with some regular signal for a swapping that make sense.
Nope, everything was flipped with the exact same logic I described. There is no guess work or complicated algorithm, just "mirror that signal, move it to the other side of rail, rotate it", rinse & repeat.
I made a fancy animation of it:
- flip.gif (9.05 MiB) Viewed 1526 times
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
You know it's at the entrance and exit, and it's logical to do given what you as human try to do but if you select part of the blueprint, or if your blueprint is not symetrical /properly signalled in the first place, the game couldn't be expected to perform such pairing and swap properly into LHD -RHD "effortlessly". ( imo)
No, the game truly can do it. It is a straightforward algorithm.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
I feel the first case is a problem you can infer from the absence of folding symetry inside the junction similar to hands or foot not having one for most people, even though it was originally used to talk about fluid input/output on entities. The second case is your effort to circumvent and propose alternative ways of handling it for the game, which i salute, i agree with the operation you describe for swapping RHD-LHD. I disagree somehow on the nature/description/name you give them.
Hmm, again I admittedly don't know about the symmetry so I will reserve my opinion on it. I have tried to think of better names but I have not found anything better than "adjust/swap signals" yet. Originally I thought of the word "unflipping signals" but it's not quite accurate I think.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
To me there is no hope for this being possible for whole junction, because that would mean considering the whole junction can have a mirror version. Is is even possible ? that was like the questionning described in the FFF for a larger blueprint to have a mirror version, it require every single piece to also have one, which wasn't the case with refineries or chemplants, since those only existed accross different rotations but no reflection/folding because there was no symmetry for the input/output. The announced change is that there will be such possibilities in the future because the entities were given a mirror version in game.
Not sure, but I would suggest to focus less on the signals as physical entities. Like I said yesterday, I would think of the signals as a setting/"mod" for the rails, just not with any GUI (like splitter, filter inserter, etc). Instead of opening a GUI like this:
Rail
Segment direction:
- [_] No change
- [X] Forward
- [_] Reverse
- [_] Both
You configure the rail by placing another entity. It applies a direction rule and also splits the block, leaving one block on each side of it. Even though these two things are tied together in the game when you use signals, they are separate concepts. So the GUI could also look like this:
Rail
Split block:
Segment direction:
- [_] No change
- [X] Forward
- [_] Reverse
"No change" to segment direction would be like not having any signals attached to that rail (direction would be determined by signals elsewhere along the track), or having two paired signals attached. "Forward" and "Reverse" is like the choice of which side of the rail you place a single signal (and choosing the direction you want is a lot clearer with physical rail signals instead of a GUI because "Forward" would depend on the rail's direction, which is impossible to see, and with physical signals the rail's direction doesn't matter, only the relative positioning between the two entities).
A rail that splits the block would allow trains to stop and wait behind each other at that point, but have no effect on path finding.
A rail that sets a specific direction without splitting the block would affect only train path finding/routing, without changing where trains could stop and wait behind each other.
This is very tangential (and not anything I'm proposing, just to be clear), but I hope it might be useful to draw attention away from rail signals as a thing with any importance of its own. It's just a modifier on rails, vaguely like how splitters can filter items and prioritize inputs and outputs. A rail signal on its own is completely non-functional, but rails on their own are useful.
Another way to think about it is that if, in an alternate reality, rail signals simply didn't have any collision with other entities (and in that case they would probably have to be positioned closer to the rail to remain visible), then rails could be flipped like belts with no collision issue (let's forget about circuit connections wire max reach also for this). The intuition about flipping would probably come a lot easier.
I think what I'm trying to say is, that normally it would be bad if the game rearranged things inside your blueprint, because it would break the functionality, but in the case of rail signals it is the opposite because by rearranging them it actually preserves the functionality, which is the directionality.
So maybe the question is less "can we find a symmetry to flip this", and more "can we ignore symmetry and then rearrange signals to restore the functionality"?
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
Now for "larger blueprint" with "train stop or rail signal attached to the train", it is not the case that there would be a possibility to "create the mirror version", the same thing that is possible to do for refineries and chemplants. As the functinnality are altered using one way to do, and it's not always possible to circumvent.
I understand. What I'm saying is that the absence of a perfect solution should not be the enemy of a good solution. Being able to flip rail signals and train stops (with the adjustments to preserve directionality) would be useful in many cases even if it would not work in others. Overall nothing would be taken away, and we would have a tool that is more powerful than it was before.
The only valid concerns that I can see would be:
- "It would be too difficult for players to know when they can and cannot flip rails." or "It would be too confusing for players to keep in mind flippability when designing rail stuff". My response: there are merely two concerns and they are straightforward to understand: collision of rail signals and wire reach. I have suggested unobtrusive ways to help players keep it in mind (a small graphic on the ground, a highlight-box when placing entities, and additional wire reach indicators).
- "I don't want to be able to flip station blueprints or to convert LHD to RHD and vice versa. I want to be able to flip dual track junctions, and this feature won't/can't do it." My response: anything involving dual track is a higher level concept which would require more advanced features like embedded blueprints (books) inside of blueprints. Either that, or a built-in notion of dual track rail infrastructure (some algorithm, possibly AI, to recognize parallel tracks, and to create appropriate junctions automatically, possibly with options for players to customize this). I think that would be neat, but it will surely not come before Factorio 3.0 or something like that, and I am not concerned with this desire. I just want to make the basic blueprint flip a bit more capable.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: ↑Thu Jan 25, 2024 9:20 am
That's why I'm saying that, after a simple coordinate transform, each signal (and train stop) should be rotated and moved to the opposite side of the rail to which it is attached. This step does not care about symmetry, only about available space (and circuit wire reach).
This step after the simple coordinate transform is necessary because there is no folding symetry in the junction, that's what i got from the FFF, i think this step DOES care about symmetry !
Hmm, if I understand you correctly, then it's because rail signals' effect on track direction is inherently tied to the side of the track it's placed on, with signals always having to be on the right side from the perspective of approaching trains?
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
Not sure if i'm just being needlessly insistant on just semantics, or if you actually disagree, or maybe it's just too obvious for you that you don't really care and try to go past that directly. I think it's kind of a simple thing but hard to explain when you don't have the proper wording. "if you see "any" item and you can't draw an imaginary line for a folding symmetry on this item, then it means its mirror version is chiral ". That apply for train junctions incidentally. ( every 5 year old know this about his hands, hardly no-one knows about dihedral groups, "chirality" is an intermediate way to refer to this ).
Sorry, I don't follow. Would it make a difference if you consider only the rails? Is there any difference (in terms of the math/geometry you are talking about) between your 32x32 junction WITHOUT signals, and your 32x32 junction WITH signals?
I would like to understand it better, but I don't expect to be able to, and it probably won't affect my stance behind the proposal, so I'm not dwelling on it. But if it's important to you, carry on, and I will listen.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: ↑Thu Jan 25, 2024 9:20 am
Yes, we agree on that, but I think you're misapplying the concepts shown in FFF to this topic. I think the FFF is dealing with prototype definitions, which can impose some limitations, but blueprints are really just an array of entities and their positions and rotations, and they can always be changed independently of each other.
I am not sure the concept is misapplied, although i do agree it's not the exact same application, indeed the FFF is dealing with prototype definitions. Because for larger blueprint including refineries or chemplants, being able to "flip" them, would mean having a mirror version of the entity itself which did not exist. But signals and train stop are always "placed on the right side of the track". There is no mirror here. It act like an unflippable entity if that is a word. It still doesn't exist.
I am more and more getting the sense that you're right, and that I misunderstood because I was ignoring the rail signals? Because to me the positioning of signals is not in-and-of-itself important, only the effect on the track is. I look at the symmetry of exclusively the rails and the rail signals is more of a secondary detail, which is why I'm not fussed about repositioning the signals.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: ↑Thu Jan 25, 2024 9:20 am
Yes, and my motivation for adding the ability to flip rail stuff in the way I described is because I think there are many situations where you would not encounter that problem and you would benefit from the feature. I don't care that there is a subset of cases where it doesn't work, even if the player might be a bit negatively surprised the first few times because they have not yet developed an accurate intuition about the flipping operation.
I agree with that somehow, but also i have no hope for it too happen because i feel that's like an intermediate solution which has drawbacks, and i think but that's just personnal opinion that if the ability to flip blueprint with train was deemed necessary in the factorio game it would be a full feature with mirrored train stop , or a way to place signals on the left side, or have them collision less with a new visual to make sense or something that wouldn't create negative surprise or unintuitive situations for player that would undoubtedly proopose to go a step further to solve it otherwise.
Well, there are two aspects to this. The easier problem is the collideability of rail signals, and you're right that removing that aspect would solve it. I don't know if I personally like that idea, because despite what I said about signals being "secondary", "useless on their own" etc, they are kinda cute things. Generally I prefer to have more puzzle pieces than fewer, which is why I am not a huge fan of the combinator 2.0 changes for example, and I hate the suggestions that some have put forward to encapsulate all of the arithmetic and decider logic within one super-combinator. Also, there's the wire reach problem, but that's even less of an issue. Simply allowing the wires to overextend by ≈3 tiles (for rail signals only) would not be hugely game-breaking or visually problematic.
The much more challenging issue is dual track stuff, because the game has no built-in notion of "dual track highway" the same way it has no notion of "mainbus" or "furnace row". The game only knows about individual entities (and how they interact directly with other entities, like inserter → belt). How they're combined into bigger structures by players is basically AI territory.
As I previously suggested, something along the lines of embeddable blueprints, or a "dual track planner" (with options to make it interesting, otherwise it would just be the game forcing a certain design on players), would be the answer to this. But this can always be added later. I am proposing something more basic, analogous to how transport belts are flipped.
Yes, it won't always work due to collision/wire issues, that's fine. Yes, if one puts dual track junctions and station together in one blueprint, they would not be able to flip it without messing up LHD/RHD at the junction. One can learn to use the tools in the manner in which they are useful. When I make a mainbus I still have to manually tap the belts depending on which side of the bus I'm working on (depending on where iron / copper / etc is). I could make separate blueprints for each variant, or I could always build it the same way. It's up to me to decide that, and the same would be true for blueprints with rail signals and train stops. My goal is to be able to flip stations, just like I can flip an electronic circuit production blueprint. I can then connect the pieces together by hand.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: ↑Thu Jan 25, 2024 9:20 am
I hope you don't misinterpret me as saying that you should not be able to do 32x32 junctions or that they are not cool or whatever, but this is just a little FYI that Factorio 2.0 (or 2.1) will do away with the current rail shapes and the new rail ships won't allow you to construct 32x32 junctions with a circle in the middle anymore, as shown in FFF #377 (you probably know about it, I'm just mentioning it for readers who missed the news). Also, chunk-aligned blueprints provide a mostly esoteric benefit, as even the devs have stated that there is little to no performance benefit or any other significant benefit to it (I can't remember who said it, but it might have been Rseding91).
I meant it as a visual example that could be used for illustration/discussion. the 32x32 was a little challenge in its own, not for performance as ups but for the sake of chunk-aligned blueprint and performance in train per minutes / footprint . There are several ways of fitting a junction inside a single chunk, but some only have enough room for signal with certain traffic direction RHD/LHD and couldn't be mirrored. The new rails in 2.0 will change the rules of the puzzle for the size of the box.
The benefit is not only esoteric, it allowed for different players to start building at the same time in disconnected locations and still end up aligning when joining using the in game grid. There was not always a feature to align the blueprint to the grid or in absolute coordinate but it only expanded the challenge. The other benefit i heard discussed was the way it look and the satisfaction of having a full set of blueprint ready to use, "solving trains forever" with a standardized system which seemed significant enough for the users to spent time attempting to do so
I do appreciate the junction's compactness!
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
See the under image of the top scoring junction from the forum sticky post in show your creation about rails in the non-buffered 2 lane, pardon me but it is not that easy either. You could try to make a LHD version, and submit for scoring, or propose your RHD version of the posted one, those are not in the list yet !
WHOA! That's something. I will have to check it out.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
SupplyDepoo wrote: ↑Thu Jan 25, 2024 9:20 am
It seems surprisingly difficult to convey the concept of adjusting rail signals after flipping, but I have tried my best to explain why the objections are wrong, or at least founded on a bad understanding. Please review my illustrations above if it's still unclear to you what I mean, because I'm not sure what else I could do to explain it better (except more pictures/examples, which is a bit time-consuming for me to create).
LOOK AT YOUR PICTURE !
the "G" flip , you don't flip the rails signals and train stop, they literally do not move, you only flip the belt.
the "F" flip is not a flip it's a 180° rotation except for the belt this one is flipped.
Yes, and that's the best way to do it. Don't we agree on that?
"naive" approach is not enough for rails with signal attached unlike the current things we are allowed to flip
^ This is the non-naive approach.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
i understand the way you describe thing, but it end up not being the same for a single piece and larger piece, in one case you literally do no move the signal at all when flipping, while in another case you expect some LHD RHD swappings, certain signals should be put in the opposite side of the track and the game doesn't have to guess which one it's not that hard and so on...
It's counterintuitive, but trust me, it's the same procedure for flipping the signals, and it gives the most sensible result. It looks wrong when it's a small example like that, but just remember that huge subfactory I showed a screenshot of in map view. It can be flipped, which could be useful sometimes. All that needs to be done is to connect the IN and OUT rails to the mainline, either by hand or with separate blueprints.
Swapping LHD with RHD might be less useful (but I personally would still find it useful in multiplayer), but it would be optional anyway. Right now we don't have the option.
mmmPI wrote: ↑Thu Jan 25, 2024 3:05 pm
Sorry but what in this case ?
This one maybe makes it more clear what i think your rules can't solve. what i called "inconsistent / not working". I know those takes a lot of time to make, rules , pictures , time to think of it and write the long posts, i'm respecting that, i don't want to downplay your genuine attempt at proposing ideas to solve those problems, when maybe it's just me that is not seeing it. It's the worst case i could think of based on the discussion that i tried to picture, you have explained well enough the good cases. I'm not trying to make a trap, i can understand how it cannot be flipped ( i think), that's why i'm showing it, it's a counter example to me. And why such thing makes me think the flipping as shown in the FFF to be translated to rails would require being able to place signals on the left side too, and having them be directionnal or something so that it could exist mirror version of the attachement of a signal and rail without chirality.
It's not flippable because of the lack of space in the center. That's the only reason. Everything else (signals and train stops) would swap places.
I am working on a mod that performs the operation I want, and I hope to publish it
very soon*, so everyone can see exactly how it works! Just need to fix some rough edges with it first.
*
There has been a delay with my mod, because I decided that, instead of releasing an MVP, I want to polish it, and that has turned out to be quite time-consuming! Aiming to have it finished some day in March April.