[2.0.55][modded] Train limit unpredictable when replacing stop

This subforum contains all the issues which we already resolved.
Camusensei
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Oct 06, 2023 5:20 pm
Contact:

[2.0.55][modded] Train limit unpredictable when replacing stop

Post by Camusensei »

This is with the "Logistic Train Network" (LTN) mod enabled.

When quick-replacing or force-replacing a "Train Stop" with a "Logistic Train Stop", the train limit it gets is unpredictable, sometimes not changing, sometimes being copied from another station with the same name.

Example:
1. Create two or more train stops with the same name
2. Set one of the stop's "train limit" to "4"
3. Quick-replace or force-build ANOTHER train stop with a "Logistic Train Stop"
4. The newly built "Logistic Train Stop" now has a train limit of "4"
=> I would expect the newly built "Logistic Train Stop" to have no train limit, like the stop it was replacing, regardless of whether there is another station in the world which has a train limit or not

There are many many different cases and they behave inconstantly.
I will now simply write "EXISTS" if "at least one station with the same name in the world exists AND has "train limit" enabled to a VALUE"

Case A: If the train stop does not have a "train limit" and is quick-replaced, the replaced stop will have VALUE as train limit if EXISTS.
Case B: If the train stop does have a "train limit" and is quick-replaced, the replaced stop will keep its train limit, regardless of EXISTS.
Case C: If the train stop is force-pasted, the replaced stop will have VALUE as train limit if EXISTS, or "train limit" disabled regardless of whether or not it was enabled before.
Case D: If you undo any of these replacements, the train stop will get VALUE as train limit if EXISTS and it did not have a train limit before (if it had a train limit, it will get restored).

What needs to be changed in my opinion is that:
- Other stations with the same name should not impact replacements since it's not a group
- Undoing should revert to the previous situation, but I guess if the other stations with the same name no longer impact the train limit, it will get fixed for free
- Quick-replacing and force-pasting should either have the same behavior or be completely different, right now the name of the stop is kept in both cases, but not the train limit.

I'm sorry, I don't know which parts of these should be fixed in the core engine and which part should be fixed in the LTN mod :(

Attachments:
- The log file
- The save game where you can replace the Train stops on the left rail and watch what limit they get
On the left rail, the Train Stops to replace by Logistic Train Stops (try quick-replace, force-build and undo)
In the chest, the blueprint for a full LTN stop, it has two pseudo-entities that you need to paste at the same time if you go for the force-paste test.
- A picture of the save game:
All stops with the same color have the same name
Every station on the right side of the tracks has no train limit
Every station on the left side of the tracks has a train limit

Kind regards,
Camusensei
Attachments
bug report train limit.zip
(3.36 MiB) Downloaded 35 times
factorio-previous.log
(10.71 KiB) Downloaded 34 times
initial setup.png
initial setup.png (2.64 MiB) Viewed 555 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4173
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.55][modded] Train limit unpredictable when replacing stop

Post by boskid »

Thanks for the report. I think i found the underlying issue and it can be also recreated in space-age by upgrading train stops to a better quality. Issue was that a train stop with no limit set would set the limit due to piece of logic that orders it to set a limit due to a rename on a fresh entity. Change i did should make the upgraded train stop to have correct value. Fixed for 2.0.67.
User avatar
EvilPLa
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sat Nov 14, 2020 7:26 am
Contact:

Re: [2.0.55][modded] Train limit unpredictable when replacing stop

Post by EvilPLa »

Now that I read this. I had a "problem" with several of my Trainstops had for no reason I'm aware of a Priority of 100. I thought I copied some wrong value from somewhere. But now that I read this report I think I should mention it. That said I have no real Info like the OP.
Mods where Krastorio, but vanilla train system
Wise men speak because they have something to say Fools because they have to say something. (Plato)
Post Reply

Return to “Resolved Problems and Bugs”