The International Simutrans Forum

 

Author Topic: Long trains overlap and exploits  (Read 448 times)

0 Members and 1 Guest are viewing this topic.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Long trains overlap and exploits
« 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


Steps
1. Create a small one-way roundabout
Code: [Select]
====+=>=\
    |   |
    \=<=/
> < one-way signals
= \ / | + tracks
2. Create a train longer than all roundabout tiles
3. Tell the train to do the roundabout

Lightspeed train exploit


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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
Re: Long trains overlap and exploits
« Reply #1 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.

Offline ACarlotti

  • *
  • Posts: 245
Re: Long trains overlap and exploits
« Reply #2 on: June 02, 2018, 02:17:12 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 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.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Long trains overlap and exploits
« Reply #3 on: June 02, 2018, 02:39:40 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5374
  • Languages: EN, NO
Re: Long trains overlap and exploits
« Reply #4 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!

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Long trains overlap and exploits
« Reply #5 on: June 02, 2018, 05:19:09 PM »
You can also do the infinite station trick, but that doesn't give you money. :)

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2525
  • Languages: EN
Re: Long trains overlap and exploits
« Reply #6 on: June 03, 2018, 05:42:49 AM »
A solution to the "lightspeed train exploit" is to add the following mechanics...
  • The train is charged the running cost of the distance the engine moved when turning around. This is semi-realistic even as the engine has to be moved from the back to the front so will have moved some distance. One could argue that for some passenger trains which are directionless this makes no sense as such trains do not need to turn around, but neither does the passengers being teleported or walking from the back to the front instantly. Hence this is a good compromise in all situations.
  • To prevent teleporting some nominal turn around time is required. This could be something as little as the distance the front moved divided by half the maximum speed of the train. This would mean that such long trains will occur significant turn around time. One could argue that this does not make sense for directionless trains but then again neither does the driver being teleported from back to the front of the train, as in reality they have to walk which would take several minutes for a very long train.
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.

Offline Leartin

  • Devotee
  • *
  • Posts: 1088
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Long trains overlap and exploits
« Reply #7 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5374
  • Languages: EN, NO
Re: Long trains overlap and exploits
« Reply #8 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.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3594
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Long trains overlap and exploits
« Reply #9 on: June 03, 2018, 06:19:43 PM »
Just 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. 🤣