openttd test NO PLATFORM PENALTY OK++.exe.zip
(This is modified openttd-1.9.1. It works on Windows XP SP3, Windows 8.1, Windows 10 (and so on) - all of 32 bit or 64 bit - tested with WinXP_SP3 32 bit, Win8.1 32 bit and Win10 64 bit)
test NO PLATFORM PENALTY OK++ sav.zip
and for more detailed description of RESULTS - look at 9th post (26 May 2019 00:24) in this topic - viewtopic.php?p=1222322#p1222322 ]
This means penalty for loading speed if train length > station platform length.
I know this will break an old rule... and some part of illusion of physics in game (faster brake)... and some measure of "eyecandy" (not for all players - it doesn't matter for some players)...
BUT:
1. This (penalty) will be just an option, that server admins can switch to ON (do not use the possibility of this new option).
2. If some players (like me) use it (the loading speed penalty switched to OFF), so they will have (this way) the 0-stage approximation for the next possibilities:
2.1. To simulate stations in tunnels and on bridges - in the way as shown on the pictures in the topic "Allow existing tunnels and bridges to increase "platform length" parameter for directly adjacent station tiles" - viewtopic.php?f=32&t=85330 .
2.2. To simulate stations with "diagonal" platforms (or even with "not strait" = with "curved" platforms) !
/* Edited 20190523:
2.3. To simulate stations on slopes.
2.4. To simulate stations under bridges.
( but 2.1 is the most interesting possibility - it is significant advantage and development of 3D-space ) */
3. This option (Setting) is extraordinary easy to implement in the existing code of OpenTTD: it's enough to add this option to Settings and then to modify few strings of code in just one procedure to get this result.
If we don't take into account changes to Settings (to add + one option), then it would be enough to modify JUST ONE STRING of the existing code (in the procedure UpdateLoadUnloadTicks below) to achieve this purpose:
- if (overhang > 0) {
+ if ( false && (overhang > 0) ) {
Procedure UpdateLoadUnloadTicks(...) determines the platform length penalty for loading speed. It is in economy.cpp :
Code: Select all
/**
* Update the vehicle's load_unload_ticks, the time it will wait until it tries to load or unload
* again. Adjust for overhang of trains and set it at least to 1.
* @param front The vehicle to be updated.
* @param st The station the vehicle is loading at.
* @param ticks The time it would normally wait, based on cargo loaded and unloaded.
*/
static void UpdateLoadUnloadTicks(Vehicle *front, const Station *st, int ticks)
{
if (front->type == VEH_TRAIN) {
/* Each platform tile is worth 2 rail vehicles. */
int overhang = front->GetGroundVehicleCache()->cached_total_length - st->GetPlatformLength(front->tile) * TILE_SIZE;
if (overhang > 0) {
ticks <<= 1;
ticks += (overhang * ticks) / 8;
}
}
/* Always wait at least 1, otherwise we'll wait 'infinitively' long. */
front->load_unload_ticks = max(1, ticks);
}
I can not to compile the OpenTTD source code in the MS Visual Studio 2019 Community Edition by now because of many errors even over those, that are described in https://wiki.openttd.org/Compiling_on_W ... 2B%2B_2015 .
It looks like this edition doesn't work correctly with its Directories settings and can not find libraries from points 2.9 and 2.10 ( (WorkFolder)\OpenTTD essentials\shared\include and (WorkFolder)\OpenTTD essentials\win32\library ) of this manual from wiki.
If I will be able to compile the code, of course, I wish to modify it - at least, one string as I wrote here above.
OpenTTD Developers, please, could you add this simple option to our favorite game - to OpenTTD. Thank you.