From: Stefan F. (web.de) <ste...@we...> - 2010-04-29 22:39:29
|
Thanks Erik for the first answers. I agree that the fact that Tiles.xml is not game dependent, makes things somewhat more complicated. More seriously the automatic generation discourages any manual adjustments. I considered to define bonus which are tile dependent there, but that I think I will drop that idea too. Maybe the easiest path to follow for now, is to define any rules related to the revenue calculation in a separate entity <RevenueCalculator> in Game.xml, wait until the dust settles and if advisable move some functionality back to more logical positions. That would decrease the coordination efforts. The question about the token positions (be it open or used) was only related to the graphical representation. I wanted to ensure that the path shown travels through the tokens of the running company if there is one or through an open slot, if the station is not fully tokened. Thus not really that important. Stefan On Friday 30 April 2010 00:10:47 Erik Vos wrote: > Stefan, > > This all needs careful consideration. Some short answers for now: > > A,B) Where would you want to define these extra attributes? > Please note, that no game-dependent attributes can be defined in Tiles.xml. > But you can use the types defined there as station type names for your > extra properties. > I think these properties should be placed in (or in place of, or added to) > the <Defaults> section of <TrainManager> in Game.xml. > > C) I believe this is already (at least partly) provided for by the city > type > > in Tiles.xml, and the various train attributes in Game.xml. None of this is > already used, but at least that's where I would start refining this. > > D1) See the cityMap in util.ConvertTilesXML, which translates the XML > output of TileDesigner into the overall Tiles.xml. The location codes are > related to the TileDesigner position names. In short: > first digit: side or corner, counted as in orientation. > second digit: 0=side, 5=corner > third digit: 0=center, 1/2/3=inner/middle/outer ring, 6-9 positions > in sharp and wide bends. > > D2) Not sure what you are after. Tokens belong to cities (stations), > the slot is considered immaterial. (I know this doesn't help out for > 1835 Hamburg, I'm not yet sure how to handle that case). > > Erik. > > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Thursday 29 April 2010 21:54 > To: Development list for Rails: an 18xx game > Subject: [Rails-devel] Changes to the Station objects > > Hi Erik, > > I would like to add additional attributes to the station class. This is > mainly > related to the different off-board locations in various games. At the > bottom > > were are some questions how to derive graph coordinates for various > objects. > > Any comments or suggestions are welcome, > Stefan > > > A) Each station adds the following (additional) attributes: > > tokenAllows = {RunThrough, RunFrom, NoAccess, N/A} > If a token is laid it allows to run through, to run from or no access? > > openStationAllows = {RunThrough, RunTo, NoAccess, N/A} > If a token is laid it allows to run through, to run to or none? > > closedStationAllows = {RunThrough, RunTo, NoAccess, N/A} > If the station is fully tokened and the company does not own a token there, > what are the possibilities? > > To allow an easier definition I suggest to use station type definitions > like > > the company types etc. > > A station is closed if the number of tokens equals the number of slots, > otherwise it is open. > > By this definition a town is always closed, but by setting > closedStationAllows > to RunThrough that is not an issue. > > B) Different off-board locations: > There is a substantial variation of different kind of off-board locations. > There are at least four cases, may be more. > > 1) Standard off-board locations (as in 1830) > The off-board areas act as sinks for all companies. > No tokens allowed. > (tokenAllows = N/A, openStationAllows = N/A, closedStationAllows = RunTo) > > 2) Tokenable off-board locations (example: SP base in 1870) > A base token can be layed in at least one of the areas. > The rules claim that off-board areas are still sink for all companies, > except > for the company with a token which can start a train there. > But it cannot run its trains through the hex (thus SP cannot have the same > train enter from NE and then continue to the E). > > (tokenAllows = RunFrom, openStationAllows = RunTo, closedStationAllows = > RunTo) > > 3) Run-through off-board locations (as Hamburg in 18EU) > A non-tokenable station (similar to towns), that allows running through it. > > (tokenAllows = N/A, openStationAllows = N/A, closedStationAllows = > RunThrough) > > And another from an non-implemented game: > 4) Tokenable run-to off-board locations (as in 18Scan) > Here a base-token is needed to run to the station. > > (tokenAllows = RunFrom, openStationAllows = NoAccess , closedStationAllows > = > > NoAccess) > > In general a station is fully tokened if the nb of slots equals the nb of > tokens. This implies that (default) towns are fully tokened (0=0), but the > fullyTokened attribute would be set to RunThrough. > > StationTypes should be added to provide defaults. > > C) Other new station attributes > runStationType = {Major, Minor} > Is it counted as city-type or town-type for plus-trains and express-trains? > > name = {...} > I would like to add is a "name" attribute for stations on > tiles. Identical names would imply that those stations are mutually > exclusive > for train runs. They would be automatically added to the list of exclusions > to the revenue calculator. > > D) Related questions to the current implementations: > > 1) How is the position property defined? Is this from the tiledesigner? > How > > do I read for example a value of 408? > > 2) Is there an easy way to determine the coordinates of the token for a > public > company if there are two or more tokens available? I currently use > getTokenCenter(), but how do I know which of the available slots belongs to > which company? How would I determine which is an open slot? > > > > --------------------------------------------------------------------------- >- -- > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > --------------------------------------------------------------------------- >--- _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |