|
From: Erik V. <eri...@hc...> - 2005-10-14 13:09:18
|
> I was looking over the handling of train purchasing, and I'm
> not seeing any definitions in the XML for what the maximum
> number of trains a company can own.
>
> Has this not been defined yet?
No, but I'm about to start to work out the Phases,
to which IMO the train limits will be linked.
> I'm pretty sure I can add it in without too much hassle, but
> I just want to make sure I'm not duplicating efforts before I do.
>
> I think just a maxNumTrainsOwned="4" property is all we need.
I don't think there is a need for this once we have the phases in place.
> Is there any 18xx game that bases the number of trains a
> company can own on something other than what trains are available?
Yes, type of company: many games have minor companies
which typically have a train limit of 2 or 1.
And merger companies (like the Prussian in 1835) often
may have an extra train above what normal major companies may have.
Because of this, train limits should IMO be linked to CompanyType,
and be an array with an element per phase.
For instance:
<CompanyType ....>
....
<TrainLimit number="4,4,3,2"/>
</CompanyType>
where the last number ("2") applies for any later phase as well.
> Before we go inextricably tying these things together in the
> code, that might be handy to know. ;-)
Keep in mind, that the way company types are defined now is
by creating a dummy company, which in fact processes most of
the company-type related properties.
This dummy company is cloned to create each real company,
whereby each company-type property can be overridden.
For instance, in 1835 the Prussian would get an additional line
<Company name="Pr" ...>
....
<TrainLimit number="0,0,4,3"/>
(the first two numbers are immaterial because the Pr cannot operate
before the 4-trains run).
Erik.
|