recently I posted an article, where I explained my Idea of a semiautomatic renew. I implemented it partially for trains (not yet for street-vehicles, ships or airplains).
How it works at user side:
Holding crtl and pressing GotoDepot in a TrainView pops up a new Window, similar to the build-train window. But this time only engines are shown. Clicking "refit" sends the train to the nearest depot. Reaching it, the train automagically gets a new engine of the selected type and continues it schedule (it does not stop!).
During its journey it shows an (*)-Mark in front of "train is heading for depot" in the TrainView. To stop the train from getting a new engine, just press again "GotoDepot" and the train resumes its normal schedule.
How it works inside:
There is a new attribute of the vehicle struct (automatic_replace). It is set to the number of the vehicle-type. If a train reaches a depot with this variable set to something different than 0, the engine is sold and a new one is bought. After that, the train is unstopped.
Bugs:
I am nut sure, if i did understand the numerous list completely. Furthermore sometimes I got the very strange situation, that there was a new engine of the ai-player in my depot! Perhaps the two commands, which sell and re-buy an engine should not be used that way?
If there is not enugh mony to buy a new engine, the game crashes. Perhaps the engine should not be sold, when there is not enough money to buy the new one. But I do not know, how to do that.
I attach a patch. I would be glad, if someone could test it and send me some comments. [Update: Use the patch at the end of this page!]
(And yes, I know. The vehicle-array is being reworked, and the patch will not be included in the current release
