Page 1 of 2

Faster loading of different cargos (version 0.22 & 0.50)

Posted: 06 Dec 2003 21:45
by Oracle
passload.grf and mailload.grf
These are (currently) a pair of GRFs that speed up the loading and unloading of passengers and mail, although currently only from trains. You can specify a parameter after their file name in newgrf[w].cfg to change the speed from the initial 20 per tick.
Put them last in your newgrf.cfg to use them to make sure that they They have only been tested with the DB set and normal TT vehicles.

Changelog:
In version 0.22:
  • Fixed serious bug that made the ICE-TD available in 1920 and not when it should be.
  • Slight fix to compatibility when DB set not used.
In version 0.21:
  • Fixed very minor bug with descriptions and copyright information.
In version 0.2:
  • Added support for changing the speed of passenger loading and unloading in all DB set trains and carriages, including the Transrapid.
  • Added support for changing the speed of mail loading and unloading in DB set and standard TT trains.
  • Added support for TT monorail and maglev carriages.
  • Number of passengers/mail loaded/unloaded per tick can now be set as a parameter after the relevant file in newgrf.cfg. Default (if left blank) is 20 units per tick.
In version 0.1:
  • Set speed of loading and unloading of passengers to 20 per tick.
allload.grf
This GRF speeds up loading of all cargos in all types of trains and train wagons. Simply place it at the end of your newgrf[w].cfg file (but above passload and mailload) and, by default, all cargo will load and unload at a rate of 60 units per tick (so just about all cargos will load and unload as close to instantly as possible). If you want to change the amount loaded per tick, add a space, then a number after the grf file name and all cargos will load at this speed per tick.

Changelog:
In version 0.50:
  • Changed default setting to 60 units loaded/unloaded per tick.
  • Added optional parameter to change loading speed from this amount.
In version 0.12:
  • Fixed bugs with description and copyright information
In version 0.1:
  • Initial release: all cargo loads and unloads at a rate of 20 units per tick.
So, if you want to use all three GRFs to give you control over loading speeds, you can use:

Code: Select all

allload.grf 20
passload.grf 50
mailload.grf 50
in your newgrf[w].cfg file to load passengers and mail at 50 per tick and everything else at 20 per tick.

If you find a bug or have a suggestion for improvement, please post it here.

All these files are released for totally free modification and reposting, although credits would definitely be appreciated.

Posted: 07 Dec 2003 00:24
by krtaylor
OK, I've been playing with it.

I take it that the trains are hard-coded so as to fully unload before they start reloading? In other words, all cars on the train have to be dead-empty before any of them start filling back up again?

Also, I thought that the game loaded and unloaded the train, per tick, at a rate of n * the number of cars in the train. The n was 5, now it's 30. But it seems like the train loads and unloads at 30 per tick regardless of train length. It's an improvement, no doubt about it, but I'm not quite sure that's what was supposed to happen.

Posted: 14 Dec 2003 16:48
by Oracle
krtaylor wrote:I take it that the trains are hard-coded so as to fully unload before they start reloading? In other words, all cars on the train have to be dead-empty before any of them start filling back up again?
A car has to be empty before it can start loading again (i.e. a car can't unload and load in the same tick) but with my settings some will start loading before others have unloaded. It's probably due to that miscmods setting you said you use.
krtaylor wrote:Also, I thought that the game loaded and unloaded the train, per tick, at a rate of n * the number of cars in the train. The n was 5, now it's 30. But it seems like the train loads and unloads at 30 per tick regardless of train length. It's an improvement, no doubt about it, but I'm not quite sure that's what was supposed to happen.
I tested it again, both with and without miscmods bit 3 but I didn't notice what you say. Each car loads or unloads at the rate set in the parameter (or at a total of n * cars in train per tick), but, as I said in another thread, I haven't tested it without a parameter.

I might have another go at re-integrating all the changes back into one GRF file if I have time.

Posted: 14 Dec 2003 18:20
by krtaylor
Huh. I don't quite understand, I've played with your GRF files (no parameters) and with the miscmods setting, and I've not seen it handle each car individually. What I observe is, it handles each CARGO separately. So, if the mail cars all unload before the passenger cars all finish, then the mail cars can start loading while the passenger cars are still unloading, but I've never seen one train with some passenger cars loading while others are still unloading. Which is what I'd like to see. Maybe we need a small change in how that miscmods setting works? Who wrote that, Csaba?

Posted: 15 Dec 2003 18:17
by mp3Pro
how about one for dry bulk goods.. ie: anything that uses a hopper. these would all be gravity loaded in real life.. it should take longer to load livestock than it does to load grain

Posted: 16 Dec 2003 01:01
by Patchman
krtaylor wrote:Huh. I don't quite understand, I've played with your GRF files (no parameters) and with the miscmods setting, and I've not seen it handle each car individually. What I observe is, it handles each CARGO separately. So, if the mail cars all unload before the passenger cars all finish, then the mail cars can start loading while the passenger cars are still unloading, but I've never seen one train with some passenger cars loading while others are still unloading. Which is what I'd like to see. Maybe we need a small change in how that miscmods setting works? Who wrote that, Csaba?
You seem to not be using the miscmods setting correctly. Try turning off all other miscmods, and set either

Code: Select all

miscmods 8
or

Code: Select all

miscmods 0
.

The first one will load and unload wagons starting at the front of the train, moving n*m amount of cargo in each tick, where n is the number of wagons, and m is the amount-per-tick-per-wagon, normally 5.

The second one will load and unload all wagons simultaneously, loading or unloading m amount of cargo per wagon per tick. In this setting, if wagons are done unloading, they'll start loading before other wagons are done unloading.

Posted: 16 Dec 2003 01:14
by krtaylor
Now that might actually be the trouble. I've never really understood how the bit-switches work (and YES I read the manual, twice.) Right now my miscmods is:

miscmods #10100001000

noting that the 8th position is a one. I'll try it as

miscmods 8

like you say.

Posted: 16 Dec 2003 01:23
by Patchman
That should be fine actually, but have you tried with a zero there too?

Posted: 16 Dec 2003 01:33
by krtaylor
No I haven't, I can try that if you like, but that isn't the behavior I want - I LIKE the traincars loading one at a time rather than all at once, it's more realistic.

You know something that would be really useful, would be to have a screen somewhere with a table showing what each of the bits do for miscmods at any given time. I know they are explained in a list, but with a table it would be easy to see what should be 0s and what should be 1s.

Or the TTDXC could make them all checkboxes, that'd be nice too...

Posted: 23 Dec 2003 16:24
by SHADOW-XIII
ehm, I think somthinf is incorrect
let's see what is shown when I press FILE INFO button in Graphic Manager ...
Description of passload.grf is totally messed up,
mailload.grf shows in description: ved.
I think passload.grf needs to be fixed

edited: allload.grf is also broken ....

hmm ... it is either Graphic Manager error or those files, but it never happen, only those two files

Posted: 23 Dec 2003 19:57
by Oracle
What exactly do you mean? (i.e. what is the error/what shows incorrectly?)
Could it be because there are no 'real' sprites at all in any of those files (but then mailload.grf wouldn't work either :?)
I'll install Graphics Manager when I get back home after Christmas (this isn't my computer) and have a look, but I really don't know what could be the problem. They're legitimate GRF files and both work as intended, so I haven't got a clue.

Posted: 23 Dec 2003 20:31
by SHADOW-XIII
some signs are not visible: (descirption can change sometimes, it does not always loks the same)

Code: Select all

File name: allload.grf
Modified: 2003-12-22 17:16:40

GRF Version: 4
GRF ID: 54570003
Info: Fast loading of all goods v0.10 16/12/2003 ©2003 by Thomas Walton.  All rights reserved.
»H
Description: dő

Total Sprites: 20
    Normal Sprites: 0
    Pseudo Sprites: 20
passload looks the same ... maiload in Description has got only text: 'ved.'

Posted: 23 Dec 2003 20:41
by Oracle
I think I only zero-terminated the whole thing, not each section of the Action 8 individually.
Will fix it right now if that's the problem, but mailload.grf should therefore give errors too....

Posted: 23 Dec 2003 20:56
by Oracle
Update:
I've updated these two files and allload.grf in their original posts. From reading newgrf.txt I should have zero-terminated each of the two strings so sorry for that, Shadow.
It should work now. Test them for me if you can, please.
Thanks.

Posted: 23 Dec 2003 21:28
by BobXP
SHADOW-XIII wrote:some signs are not visible: (descirption can change sometimes, it does not always loks the same)

Code: Select all

File name: allload.grf
Modified: 2003-12-22 17:16:40

GRF Version: 4
GRF ID: 54570003
Info: Fast loading of all goods v0.10 16/12/2003 ©2003 by Thomas Walton.  All rights reserved.
»H
Description: dő

Total Sprites: 20
    Normal Sprites: 0
    Pseudo Sprites: 20
passload looks the same ... maiload in Description has got only text: 'ved.'

Don't break the tables!

Posted: 23 Dec 2003 21:54
by orudge
Don't shout. That's not the first time I've seen you do that. Next time, I may end up taking action.

Posted: 23 Dec 2003 23:04
by BobXP
Sorry, but it really is annoying. Even with a 1280x960 resolution.

Posted: 24 Dec 2003 01:19
by SHADOW-XIII
you could ask about that ... as you see there was no problem to change that ...

Oracle now it works fine but allload.grf :wink:

Posted: 24 Dec 2003 10:59
by Oracle
Stupid me...
allload.grf didn't have any zero-termination on those strings before, and after changing that last night it only had one...
It should be fixed now, and uploaded again in the original topic.
Passload.grf should also be uploaded now with a slightly modified version but I don't think this will fix the bug with the ICE-TD.

Posted: 27 Dec 2003 19:40
by Oracle
Updated with new version, which fixes the ICE-TD bug.
Please check top post for details.