From: Erik V. <eri...@xs...> - 2011-10-28 10:33:07
|
Stefan, Thanks for the reminder. We should document it somewhere... In relation to the new game option we have just added, I have been thinking how we could rationalize option configuration. I see two main issues: 1. The need to configure each option twice. Historically, this has been caused by the (IMHO unfortunate) decision to combine game selection and option selection in one overall game setup window. Originally we had two separate windows. In the existing game initialization procedure, I think the best approach to remove the resulting duplication would be to remove the option tags from both GamesList.xml and Game.xml, and put these into a separate Options.xml file per game. 2. The need to configure global options separately for each game. I have long pondered about ways to specify "global" options only once. I believe the following options fall into this category: RouteAwareness RevenueCalculation UnlimitedTiles SeparateSalesAtSamePrice NoMapMode (perhaps not really, as this option may require game-specific code, IIRC). If (and only if) we are going to refactor option configuration into separate XML files, we could as well collect such global options into one global GameOptions.xml file. Such global options could still be overridden in game-specific option files (including invalidating such options, if possible). My proposal includes: - create a new global options file data/GameOptions.xml for all global options. - create new game-specific option files data/<game>/Options.xml. Global options can be overridden here, or even invalidated (e.g. 'use="no" '). - add an 'undefined' attribute, per Stefan's suggestion. - parse these files from both the GameSetupWindow and Game classes. Erik. > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Friday, October 28, 2011 10:37 AM > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] 18EU game option: unlimited plain track > > Bill & Erik: > just a short comment on the implementation: > > As you know all options are duplicated in both the central GamesList.xml as in > the game-specific Game.xml. > > However the default attribute of the GameOption element in Game.xml has > a different effect for Rails than the default attribute for the Option element > in GamesList.xml. > > A) Default of Option in GamesList.xml > This is the default value suggested to use if a new game gets started. > A saved game always saves the concrete setting of each option regardless if > this is the default or not. > This value will never effect loaded games. > > B) Default of GameOption in Game.xml: > This is default value is ONLY used for loaded games that do not have the > value defined as the option was previously unimplemented for that specific > game. > So a better name for this attribute would be undefined. Even better would > be merging the two option elements and keep default and undefined > attributes aside. > > A rule of thumb if one introduces new values is simply setting the default in > GamesList.xml to the value best suited for that game and the default in > Game.xml to that value that existing games had been used implicitly. > > As both games with a changed option (1826 and 1851) had that option > defined before it does not matter, as the save files will keep their selected > option and will not change without players being aware. > > Stefan > > > On Thursday, October 27, 2011 10:28:40 am Erik Vos wrote: > > Bill, > > > > Thanks. I have applied your update. > > For 1826 and 1851 I have set the default value to "Yellow Plain". For > > 1851 it's in the rules, and for 1826 (v1) in the (as I understand: > > "official") Steve Thomas/Chris Lawson clarification. > > I haven't checked other games; the Rules Differences site does not > > mention any other games that we currently cover in Rails. > > > > Apologies that I have not included your name as the Author of this and > > the previous fix - I'm just now discovering that I can and should set > > the correct Author while committing. > > Hopefully I'll remember it next time... > > > > Erik. > > > > > -----Original Message----- > > > From: Bill Rosgen [mailto:ro...@gm...] > > > Sent: Thursday, October 27, 2011 9:21 AM > > > To: Development list for Rails: an 18xx game > > > Subject: Re: [Rails-devel] 18EU game option: unlimited plain track > > > > > > Erik, > > > > > > I've attached patches that should enable the option for all games > > > that had unlimited track as an option, as well as for 1889, which > > > did not for > > > > reasons I > > > > > do not understand. (I left it out of only the few prototype games > > > that > > > > have > > > > > no game options.) > > > > > > I've also renamed the option to "Yellow Plain". > > > > > > I can find no quote from the designer as to whether or not he > > > prefers unlimited plain yellow track in 18EU. I've left the default > > > option as > > > > 'No' in all > > > > > cases, though it is reasonable to change this for 1826 and 1851. > > > The > > > 1851 rules I can find on the internet suggest that the number of > > > 7,8,9 tiles provided is not intended to be a limit. My internet > > > connection is > > > > currently > > > > > quite poor, and so I am unable to verify that this is the rule also > > > in > > > > 1826. (The > > > > > 18xx difference list states that plain yellow track is unlimited in > > > both > > > > of these > > > > > games.) > > > > > > As usual, there are two patches, the first in git format and the > > > second in > > > > Egit > > > > > format. > > > > > > Bill > > > > ---------------------------------------------------------------------- > > ----- > > --- The demand for IT networking professionals continues to grow, and > > the demand for specialized networking skills is growing even more rapidly. > > Take a complimentary Learning@Cisco Self-Assessment and learn about > > Cisco certifications, training, and career opportunities. > > http://p.sf.net/sfu/cisco-dev2dev > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > ---------------------------------------------------------------------------- -- > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn about > Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |