The International Simutrans Forum

Development => Bug Reports => Topic started by: An_dz on June 02, 2018, 07:12:42 AM

Title: Long trains overlap and exploits
Post by: An_dz on June 02, 2018, 07:12:42 AM
While working on the depot window I ended up creating some very long trains and found two problems.

Overlapping vehicle bug
(https://i.imgur.com/uQntsjg.gif)

Steps
1. Create a small one-way roundabout

====+=>=\
    |   |
    \=<=/
> < one-way signals
= \ / | + tracks

2. Create a train longer than all roundabout tiles
3. Tell the train to do the roundabout

Lightspeed train exploit
(https://i.imgur.com/Sm7DhUR.png)

As you can see on the above image the train has exactly the length of the track. The problem is that on Simutrans when the train reaches it's destination and has to reverse it keeps its size, in the above the front of the train that is right now at the farm on the top right jumps directly to the mill at bottom left.

This makes running cost nearly zero but profit is still full because of the long distance. In less than five minutes this line had already made over 40 000,00ยง.

Possible fix:
The train should start as like it leaves a depot, the whole train starts at the beginning and goes on releasing the wagons one by one.
Title: Re: Long trains overlap and exploits
Post by: prissi on June 02, 2018, 12:49:37 PM
The second one is not really a bug. Moreover, only the first cars will be loaded. If you want to do this, then ok ...

The first one is deliberately desinged that way, i.e. a train cannot block itself. Otherwise you can generate enough situations where one could block oneself after changing a route etc.
Title: Re: Long trains overlap and exploits
Post by: ACarlotti on June 02, 2018, 02:17:12 PM
Quote from: prissi on June 02, 2018, 12:49:37 PMThe second one is not really a bug. Moreover, only the first cars will be loaded. If you want to do this, then ok ...
I think the way loading and reversing is handled in Extended partly avoids this exploit. That is, when the train reverses, it runs backwards (with the exception of some locomotives that might move the front of the train), so the vehicles in the station at one end won't enter the station at the other end. However, you might still be able to set up a similar situation if you reverse at a short intermediate station.
Title: Re: Long trains overlap and exploits
Post by: An_dz on June 02, 2018, 02:39:40 PM
Quote from: prissi on June 02, 2018, 12:49:37 PM
The second one is not really a bug. Moreover, only the first cars will be loaded. If you want to do this, then ok ...

I did no say it was a bug, it's an exploit. You can get rich in almost no time because you get high incomes but has zero running cost. Even the high fixed maintenance cost of this convoy is negligible. The above was set with no minimum load, it just went from one side to the other every second and it was still generating a lot of money.
Title: Re: Long trains overlap and exploits
Post by: Ters on June 02, 2018, 04:29:20 PM
Exploit? Just make proper vehicle images, and you've created the pipes people have been asking for for years!
Title: Re: Long trains overlap and exploits
Post by: An_dz on June 02, 2018, 05:19:09 PM
You can also do the infinite station trick, but that doesn't give you money. :)
Title: Re: Long trains overlap and exploits
Post by: DrSuperGood on June 03, 2018, 05:42:49 AM
A solution to the "lightspeed train exploit" is to add the following mechanics...
Neither of these mechanics should have a significant impact on existing lines and maps. The exception being lines which depended on instant turn around time, which were either exploits like shown or prone to be unstable anyway.
Title: Re: Long trains overlap and exploits
Post by: Leartin on June 03, 2018, 07:20:07 AM
Or you change the distance calculation accordingly by subtracting the train length. Hence instead of making such a construction more expensive to maintain, you'd only make it unable to generate money, as you'd be paid for zero tiles travelled.
Title: Re: Long trains overlap and exploits
Post by: Ters on June 03, 2018, 09:14:57 AM
Usually, you don't get paid for distance traveled, but for distance between the stops (or is it the waypoints?) regardless of where the road goes. If supplier and consumer happens to be quite close to each other, a player might have built a line where the distance between stations minus train length is negative.
Title: Re: Long trains overlap and exploits
Post by: Isaac Eiland-Hall on June 03, 2018, 06:19:43 PM
Quote from: Ters on June 02, 2018, 04:29:20 PMJust make proper vehicle images
This would also have the advantage of having pipe moving around on the map if you screwed up on how many cars you needed. 🤣