From: John D. G. <jd...@di...> - 2011-06-09 22:02:07
|
On 2011-06-09 07:10, Erik Vos wrote: > As announced before, I have been thinking about how to upgrade train > management to enable some new features that currently can't be implemented > (notably items 2 and 5 of the below list). > > I'm aware of the following cases to be taken into account: > 1. Normal trains. > 2. Dual trains, as in 18VA, 18Scan and 1846 (these are the three games I'm > aware of having such flip-side trains, and which have considered so far). > 3. Initial trains (as in 18EU). > 4. Fixed trains (at a cost, as some 1825 minors have). > 5. Extra trains from a private special property (as in 18GA). > Any others? > > The basic idea is to separate train certificates from actual trains. I don't see any reason to want to do this. I would handle all these cases as follows. Case 1: The train is an object as now. Case 2: There can be more than one type of new train available at a time. Create XML attributes for each type of train that allow that type to become available for purchase as a result of an event, and that allow the total number of available trains of two types to be limited to a constant. In addition to the cases you've listed, one or both of these would apply to: diesels in 1830 and 1856 (available after first 6 train); 'G' trains in 1837; meter gauge trains in 1853 (especially the 2/1G trains in the Stuart Dagger variant, though I'm not sure if those made it into 1853v2); and the two versions of types I-V in 2038. But there is no reason ever to create a "train certificate" object, because the type of a train becomes fixed in stone as soon as it is first acquired by a company. I don't know of an exception to this in any game. Cases 3, 4, 5: Simply allow a company to be hard-coded as having specified train(s) before the game starts. This includes privates (for case 5). By default a private company which owns a train can't do anything with it, not even sell it, so no new code should be needed; but of course 2038's probe would be an exception. |