News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

[11.17] Loading time exploit

Started by jamespetts, January 27, 2014, 01:08:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

A user of the online game who does not have a forum account and has had some difficulties in creating one has reported an exploit, which I am recording here so that I am reminded of it when I have time to look into it. When a vehicle loads/unloads at a stop and the loading counter is running, the whole process can be accelerated and circumvented by setting the schedule manually to the next stop. A sensible solution would be to require the convoy to continue to wait until loading is finished before going on its way to its new destination.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

zook2

Switching "No Load" on and off again does the same.

jamespetts

Quote from: zook2 on January 27, 2014, 05:28:24 PM
Switching "No Load" on and off again does the same.

Are you sure? I have not been able to reproduce this behaviour.

In any event, I have now fixed this exploit on the 11.x branch by preventing editing the schedule of a loading vehicle.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

AP

I also noted that the loading time seems to be in "real time". That is, regardless of whether I set game speed to x1 or fast-forward on x45 approx, the yellow counter shows it still takes a couple of minutes for a ship to load.

jamespetts

Quote from: AP on February 02, 2014, 08:31:26 PM
I also noted that the loading time seems to be in "real time". That is, regardless of whether I set game speed to x1 or fast-forward on x45 approx, the yellow counter shows it still takes a couple of minutes for a ship to load.

That is odd, as the loading time is measured in ticks, which are internal to the game.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

zook2

Quote from: jamespetts on February 02, 2014, 07:59:29 PM
Are you sure? I have not been able to reproduce this behaviour.

I only tried with docked ships.

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sarlock

Indeed, it was a nice way to accelerate things in the early years :)

Does the convoy have to load at arrival to the dock or can it be switched to load its cargo when the load timer expires?  If it can be switched easily, then you don't need to worry about stopping the editing of schedules (there are times when this is handy).

You can still circumvent it by sending the convoy to depot, then editing schedule once it leaves the station and remove the depot call and send it on its way.
Current projects: Pak128 Trees, blender graphics

jamespetts

Loading on arrival is of some importance, as it affects how journey time is measured. One possible measure, however, would be to make a convoy unload all its cargo if it is sent to the depot whilst already in a station: this would also have the effect of preventing cargo loss, at least of convoys that are sent to depots whilst they are in the station (dock, etc.).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

wlindley

Quite frustrating now that you cannot even open the destination dialogue whilst a ship is docked. However you can still hit "Go to Depot" and then immediately open the destination dialogue.  Could the current behaviour somehow be replaced with the vehicle's loading time fully enforced before any departure, even to a depot? Then we could access the dialog.  As things stand, it's quite difficult to reroute vehicles.

Sarlock

I agree... waiting for 2 game hours (20 real life minutes) is a long time to wait to be able to edit a schedule.  I've been able to get around it currently by sending to depot and then editing the schedule and removing the depot call and sending it back to its dock.  Not a particularly easy thing to address.  Then again, is the exploit really that big of a deal... it's useful in early months to get your profits rolling but once a year or two go by it's not worth micromanaging that.  Simutrans online play isn't exactly set up for competitive type games, it's really a cooperative online game... so it doesn't matter that much.
Current projects: Pak128 Trees, blender graphics

jamespetts

It is important to eliminate exploits, as this can make a real difference, and it is a terrible drudgery for players to have to engage in this sort of unrealistic nonsense to make a possibly decisive difference in the early years. I shall look into more sophisticated solutions to this issue when I have time: the reason that I set it up this way in the first place was, aside from being unaware of the go to depot issue, that editing a schedule is already prevented when a convoy is reversing (which is often a more significant proportion of turnaround time than loading for trains, especially trains with tender steam locomotives), and I wanted to make sure that 11.18 was released quickly in order to deal with the instability issue.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sarlock

Normally the waiting time is not an issue, but in this game in particular with a heavy emphasis on long-distance shipping and a slow time advancement rate, waiting for 20 real life minutes for a ship to turn around at the depot is a long time to wait when you just need to tweak a schedule.
Current projects: Pak128 Trees, blender graphics

Sarlock

Something to add/note: with the code change you also cannot edit a schedule for a ship that is currently waiting for a load, which (especially in this game) can take a very long time.  If the ship is half loaded with precious cargo that it took 2-3 months to load and you want to send it on its way (for convoy spacing and other purposes-sometimes a ship that arrives later decides that it is going to load 50% of the cargo as well and then they both sit there at the station for eons as they both fill to 100%) you don't want to have to lose its cargo to send it to depot in order to make a change.
Current projects: Pak128 Trees, blender graphics

MCollett

Quote from: jamespetts on February 04, 2014, 12:51:50 AM
It is important to eliminate exploits

It is more important not to inconvenience legitimate users (DRM, anybody?) - this is only a game, after all.  There are already far too many times when players cannot access schedules; adding to them is a very bad idea, especially when the lockout is going to last for an hour or two of simulated time, not just a few minutes.    ("The vehicle's schedule must not be changed during route-finding" always irritates me: if I want to change a vehicle's schedule, route-finding should obviously be cancelled for that vehicle, since it will have to be redone afterwards anyway!  But at least that usually is only a brief delay.)

The reason the exploit works is of course that the actual loading of the cargo occurs at the beginning of the loading time: it would be more realistic, and would prevent the exploit, if the loading of the cargo occurred either gradually, or (simpler and nearly as good) at the end of the loading time.

Best wishes,
Matthew

zook2

Isn't it possible to determine whether a game is played online and restrict the exploit-prevention to only those?

zook2

Quote from: jamespetts on February 03, 2014, 07:44:59 PM
Does this still occur in 11.18?

Try a docked ship and hit the "No Load" button. If it has any cargo loaded, it then sails immediately. It doesn't seem to work with empty ships, though.

jamespetts

I will look into a more sophisticated solution to this - thank you all for your feedback. The best solution in principle would be to require the rest of the loading time to elapse before a vehicle departs even for a new destination: I will have to look into how to implement this in the code.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sarlock

As it exists now, if cargo shows up during a ship's wait time, the new cargo will be loaded not at the moment it arrives but sometime later during the wait time, usually near the end... so there must be some mechanism already in place to load cargo later in the process.  Maybe you can tap in to this routine.
Current projects: Pak128 Trees, blender graphics

Jando

Just to add to this discussion: it would also be great if the tooltip above a loading vehicle could change depending on why the vehicle is waiting. Currently it just says loading - but it can be three different reasons:

- loading time for the vehicle as defined in the pakset
- waiting fur full load
- waiting for scheduled departure time

I can see why the player should not be able to send a vehicle on it's way during the loading time from the pakest - but he should be free to let it depart during the other waiting times I think.

Sarlock

Want to add something to this:

When you want to later make a convoy in to a line but it is sitting at a station (loading, etc) you cannot open the schedule to make it in to a line.  Quite a nuisance to have to catch these convoys while in motion to actually be able to do this.

Same goes for when you want to change which line the convoy is operating on.
Current projects: Pak128 Trees, blender graphics