From: Bill R. <ro...@gm...> - 2011-03-28 09:14:49
|
Erik, I'll have an attempt at implementing this. I plan to add support for attribues to a new 'Tradeable' tag for: toCompany toPlayer lowerPrice upperPrice lowerPriceFactor upperPriceFactor The idea is to then add attributes to the PrivateCompany class to store the lower and upper prices (or to compute them from the upperPriceFactor and lowerPriceFactor). The question is: should I also leave these parameters in the Public <CompanyType>? Are there any games where different public companies can buy privates for different ranges of values? I don't want to break one set of games to implement another. Also, if I make these changes, I'll also go through the XML and move the PriceFactor attributes to the Private <CompanyType>. Is this going to break savegame compatibility or is it otherwise a bad idea? Bill On 2011-03-28, at 16:38 , Erik Vos wrote: > Basically, anything defined under <CompanyType> can be overridden under any > <Company> implementing that type. > Of course, the catch here is, that the private buying price range is defined > with the (buying) major companies rather than the (sold) private companies. > If we want to add an ability to vary the buy price ranges per private > company, we must move these parameters to the Private <CompanyType> > definition. > That will also require some code refactoring. > > I wasn't aware that games existed having this need, but indeed 1848 does. > It's also not using factors but absolute numbers as limits, so we probably > should also have new "lowerPrice" and "upperPrice" attributes. > > I'm willing to pick this up in the near future, but if you want to give it a > try, please go ahead. > > Erik |