From: John D. G. <jd...@di...> - 2012-04-01 01:04:15
Attachments:
18EU_20120331_1953_Kent.rails
|
This save file actually came from Rails 1.6.0, but I've upgraded to 1.7.0 and reloaded the game, and the bug persists. At the point of this save file, it is the first operating turn of KBS (light blue company), but the program is not allowing KBS to place its home tile. In 1.6.0, when I try to lay the tile (#57 at hex G4), the game complains that "there is no valid orientation for the tile." In 1.7.0, I can't even get that far because the tile image is grayed out, thus causing the same problem without the explanation. |
From: <Dr....@t-...> - 2012-04-01 09:31:29
|
Hi John, this is indeed a bug as the game engine right now doesnt know that the chosen hex is a home hex for a company. Two ways of fixing it in the code: (I'll defer to Erik and Stefan here as my way is as usual quick and ugly :)) diff --git a/rails/game/specific/_18EU/StockRound_18EU.java b/rails/game/specific/_18EU/StockRound_18EU.java index 5387e71..39620ba 100644 --- a/rails/game/specific/_18EU/StockRound_18EU.java +++ b/rails/game/specific/_18EU/StockRound_18EU.java @@ -4,6 +4,7 @@ import rails.common.DisplayBuffer; import rails.common.LocalText; +import rails.common.parser.ConfigurationException; import rails.game.*; import rails.game.action.*; import rails.game.move.AddToList; @@ -396,6 +397,14 @@ } company.setHomeHex(homeHex); company.setHomeCityNumber(homeCityNumber); + //Bugfix for Error reported by John Galt- Mar 31 2012 ; Martin Brumm + //The maphex needs to have the homes map set with the company value. + try { + homeHex.addHome(company, homeCityNumber); + } catch (ConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } company.start(startSpace); ReportBuffer.add(LocalText.getText("START_COMPANY_LOG", The other way around that bug would be to alter in ORUIManager.java the routine getMustConnectRequirement to check if the current hex is contained in the homehexes Map of that Company. public boolean getMustConnectRequirement (GUIHex hex,TileI tile) { if (tile == null || hex == null) return false; return tile.getColourName().equalsIgnoreCase(Tile.YELLOW_COLOUR_NAME) // Does not apply to the current company's home hex(es) && !hex.getHexModel().isHomeFor(orComp) // Does not apply to special tile lays && !isUnconnectedTileLayTarget(hex.getHexModel()); } We will find a fix :) The good news is that the first fix doesnt break your save file. So no need to replay the game. Kind regards, Martin Von: John David Galt <jd...@di...> An: rai...@li... Betreff: [Rails-devel] Bug: 18EU, 1.7.0 Datum: Sun, 01 Apr 2012 02:33:35 +0200 This save file actually came from Rails 1.6.0, but I've upgraded to 1.7.0 and reloaded the game, and the bug persists. At the point of this save file, it is the first operating turn of KBS (light blue company), but the program is not allowing KBS to place its home tile. In 1.6.0, when I try to lay the tile (#57 at hex G4), the game complains that "there is no valid orientation for the tile." In 1.7.0, I can't even get that far because the tile image is grayed out, thus causing the same problem without the explanation. |
From: Stefan F. <ste...@we...> - 2012-04-01 11:32:53
|
Martin: the fix is works perfectly and is exactly what was missing. Pushed into rails1.7.x branch. John: thanks for catching the bug. Most likely it was hidden as most players will prefer choosing to choose the home token at an already connected station. Stefan On 04/01/2012 11:31 AM, Dr....@t-... wrote: > Hi John, > > this is indeed a bug as the game engine right now doesnt know that the > chosen hex is a home hex for a company. > > Two ways of fixing it in the code: (I'll defer to Erik and Stefan here > as my way is as usual quick and ugly :)) > > > > diff --git a/rails/game/specific/_18EU/StockRound_18EU.java > b/rails/game/specific/_18EU/StockRound_18EU.java > index 5387e71..39620ba 100644 > --- a/rails/game/specific/_18EU/StockRound_18EU.java > +++ b/rails/game/specific/_18EU/StockRound_18EU.java > @@ -4,6 +4,7 @@ > > import rails.common.DisplayBuffer; > import rails.common.LocalText; > +import rails.common.parser.ConfigurationException; > import rails.game.*; > import rails.game.action.*; > import rails.game.move.AddToList; > @@ -396,6 +397,14 @@ > } > company.setHomeHex(homeHex); > company.setHomeCityNumber(homeCityNumber); > + //Bugfix for Error reported by John Galt- Mar 31 2012 ; Martin Brumm > + //The maphex needs to have the homes map set with the company value. > + try { > + homeHex.addHome(company, homeCityNumber); > + } catch (ConfigurationException e) { > + // TODO Auto-generated catch block > + e.printStackTrace(); > + } > > company.start(startSpace); > ReportBuffer.add(LocalText.getText("START_COMPANY_LOG", > > The other way around that bug would be to alter in ORUIManager.java the > routine getMustConnectRequirement to check if the current hex is > contained in the homehexes Map of that Company. > > public boolean getMustConnectRequirement (GUIHex hex,TileI tile) { > if (tile == null || hex == null) return false; > return tile.getColourName().equalsIgnoreCase(Tile.YELLOW_COLOUR_NAME) > // Does not apply to the current company's home hex(es) > && !hex.getHexModel().isHomeFor(orComp) > // Does not apply to special tile lays > && !isUnconnectedTileLayTarget(hex.getHexModel()); > } > > We will find a fix :) The good news is that the first fix doesnt break > your save file. So no need to replay the game. > > Kind regards, > > Martin > > *Von:* John David Galt <jd...@di...> > *An:* rai...@li... > *Betreff:* [Rails-devel] Bug: 18EU, 1.7.0 > *Datum:* Sun, 01 Apr 2012 02:33:35 +0200 > > This save file actually came from Rails 1.6.0, but I've upgraded to > 1.7.0 and > reloaded the game, and the bug persists. > > At the point of this save file, it is the first operating turn of KBS (light > blue company), but the program is not allowing KBS to place its home tile. > In 1.6.0, when I try to lay the tile (#57 at hex G4), the game complains > that > "there is no valid orientation for the tile." In 1.7.0, I can't even get > that > far because the tile image is grayed out, thus causing the same problem > without the explanation. > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: John D. G. <jd...@di...> - 2012-04-08 20:08:07
|
Stefan Frey wrote: > Martin: > the fix is works perfectly and is exactly what was missing. > Pushed into rails1.7.x branch. > > John: > thanks for catching the bug. Most likely it was hidden as most players > will prefer choosing to choose the home token at an already connected > station. The fix worked, but another bug seems to have arisen in 1.7.2 -- Hamburg (red off-board) is now shown as three unconnected arrows. Running through it still works, though. |
From: Erik V. <eri...@xs...> - 2012-04-08 21:41:00
|
Not sure what's wrong here. I don't have this problem with the master code. Version 1.7.2 has the correct XML for Hamburg: <Hex name="B7" value="30,50" tile="-903" pic="-939" orientation="1" city="Hamburg"> <Access runThrough="yes"/> </Hex> so perhaps some old code is included that does not pick up or use the 'pic' attribute (which is new). Stefan, could you check this? Erik. > -----Original Message----- > From: John David Galt [mailto:jd...@di...] > Sent: Sunday, April 08, 2012 10:08 PM > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Bug: 18EU, 1.7.0 > > Stefan Frey wrote: > > Martin: > > the fix is works perfectly and is exactly what was missing. > > Pushed into rails1.7.x branch. > > > > John: > > thanks for catching the bug. Most likely it was hidden as most players > > will prefer choosing to choose the home token at an already connected > > station. > > The fix worked, but another bug seems to have arisen in 1.7.2 -- Hamburg > (red > off-board) is now shown as three unconnected arrows. Running through it > still works, though. > > ---------------------------------------------------------------------------- -- > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Stefan F. <ste...@we...> - 2012-04-08 22:41:05
|
Erik: I assume you are referring to the following commit: 3b3c7 Allow 'pic' attribute in Hex definition in Map.xml. with follow-ups: e6477 Fixed picture ID determination, which did not work for upgrade 5b0f1 Fix to previous commit I have not picked them as I did not realize that they there required for the Goderich fix. I will pick them into Rails1.7.x. Stefan On 04/08/2012 11:40 PM, Erik Vos wrote: > Not sure what's wrong here. I don't have this problem with the master code. > Version 1.7.2 has the correct XML for Hamburg: > <Hex name="B7" value="30,50" tile="-903" pic="-939" orientation="1" > city="Hamburg"> > <Access runThrough="yes"/> > </Hex> > so perhaps some old code is included that does not pick up or use the 'pic' > attribute (which is new). > Stefan, could you check this? > > Erik. > >> -----Original Message----- >> From: John David Galt [mailto:jd...@di...] >> Sent: Sunday, April 08, 2012 10:08 PM >> To: Development list for Rails: an 18xx game >> Subject: Re: [Rails-devel] Bug: 18EU, 1.7.0 >> >> Stefan Frey wrote: >>> Martin: >>> the fix is works perfectly and is exactly what was missing. >>> Pushed into rails1.7.x branch. >>> >>> John: >>> thanks for catching the bug. Most likely it was hidden as most players >>> will prefer choosing to choose the home token at an already connected >>> station. >> >> The fix worked, but another bug seems to have arisen in 1.7.2 -- Hamburg >> (red >> off-board) is now shown as three unconnected arrows. Running through it >> still works, though. >> >> > ---------------------------------------------------------------------------- > -- >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@xs...> - 2012-04-08 22:47:26
|
That's right. Thanks. Erik. > -----Original Message----- > From: Stefan Frey [mailto:ste...@we...] > Sent: Monday, April 09, 2012 12:37 AM > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Bug: 18EU, 1.7.0 > > Erik: > I assume you are referring to the following commit: > > 3b3c7 Allow 'pic' attribute in Hex definition in Map.xml. > > with follow-ups: > e6477 Fixed picture ID determination, which did not work for upgrade > 5b0f1 Fix to previous commit > > I have not picked them as I did not realize that they there required for the > Goderich fix. I will pick them into Rails1.7.x. > > Stefan > > > On 04/08/2012 11:40 PM, Erik Vos wrote: > > Not sure what's wrong here. I don't have this problem with the master > code. > > Version 1.7.2 has the correct XML for Hamburg: > > <Hex name="B7" value="30,50" tile="-903" pic="-939" > orientation="1" > > city="Hamburg"> > > <Access runThrough="yes"/> > > </Hex> > > so perhaps some old code is included that does not pick up or use the 'pic' > > attribute (which is new). > > Stefan, could you check this? > > > > Erik. > > > >> -----Original Message----- > >> From: John David Galt [mailto:jd...@di...] > >> Sent: Sunday, April 08, 2012 10:08 PM > >> To: Development list for Rails: an 18xx game > >> Subject: Re: [Rails-devel] Bug: 18EU, 1.7.0 > >> > >> Stefan Frey wrote: > >>> Martin: > >>> the fix is works perfectly and is exactly what was missing. > >>> Pushed into rails1.7.x branch. > >>> > >>> John: > >>> thanks for catching the bug. Most likely it was hidden as most > >>> players will prefer choosing to choose the home token at an already > >>> connected station. > >> > >> The fix worked, but another bug seems to have arisen in 1.7.2 -- > >> Hamburg (red > >> off-board) is now shown as three unconnected arrows. Running through > >> it still works, though. > >> > >> > > ---------------------------------------------------------------------- > > ------ > > -- > >> For Developers, A Lot Can Happen In A Second. > >> Boundary is the first to Know...and Tell You. > >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > >> http://p.sf.net/sfu/Boundary-d2dvs2 > >> _______________________________________________ > >> Rails-devel mailing list > >> Rai...@li... > >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > ---------------------------------------------------------------------- > > -------- For Developers, A Lot Can Happen In A Second. > > Boundary is the first to Know...and Tell You. > > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > > http://p.sf.net/sfu/Boundary-d2dvs2 > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ---------------------------------------------------------------------------- -- > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |