ollybh / 18xx Goto Github PK
View Code? Open in Web Editor NEWThis project forked from tobymao/18xx
A platform for playing 18xx games online!
Home Page: https://www.18xx.games
License: Other
This project forked from tobymao/18xx
A platform for playing 18xx games online!
Home Page: https://www.18xx.games
License: Other
Game #8 - all privates are purchased, there's nothing to do, but I have P85 left. I can't start a company, of course. So why don't we go to OR1 automatically?
Exchanging a private company for a share in a public company is a sell action, so it should be possible to do this multiple times in a single stock turn.
When a company lays metre gauge track, it receives a 50% discount for terrain costs and 50% (Pt10) discount if it is a second build.
This second build discount is incorrectly being applied to the company's first build, reducing its building costs by a Pt10.
Privates owned by players are rendered using View::Game::Corporation.render
which is attempting to show previous revenue, and the company names aren't fitting in the tiles.
It would be better to use a similar format to the one for unsold private companies. The rendering can be overridden through a setting in @game.corporation_view, see 1872 for example.
ZPB is at a share value of 50 without a train and little cash. The owner has lots of cash and there are 5 shares available to issue for Emergency Money Raising.
But when I try to issue some stock, I get an error message: "must buy train from the depot after issuing shares". What should happen is that the company closes.
Hotseat game, so I'll send you the JSON in an email.
Contributing just cash from hand works correctly. Also, skipping buying a train closes the company correctly, except that it is no longer available to start in the next SR (which it should be).
OR3.2 RP attempts to lay a token in Cordoba (which it cannot afford), I get the following error message:
"Blocking Step run routes cannot process action 284"
This may just be that a more intelligible message is needed e.g "cannot lay token: insufficient funds"
The three Madrid private railway companies (M&V, M&A, CM&P) all have H11 included in their coordinates
. This means that any track lay is legal if a route can be traced to the Madrid hex.
Ian Wilson has confirmed that this is wrong. The three privates each have an assigned city circle in Madrid, and only routes that can be traced to this space are legal.
One of M&V's home hexes is Madrid. If it wanted to, it could build track in the southern route out of Madrid, into J15 (Albacete) rather than just being restricted to the northwest route out of Madrid. Right?
No. It must be connected to new track outside its home hexes, and M&V is in north Madrid only. (A bit of a corner case, I'm not sure if the rules actually say either way, but that's what I intended when I designed the game!)
In effect, there aren't "rickshaws" for building track (or running trains), but there are for acquisition purposes.
To fix this H11 will need to be removed from these companies coordinates
. The track laying should be fine without this hex included, but the checks for connectivity will need to include a check for H11, as a connection to anywhere in Madrid is sufficient when exchanging a private company for a share in a public company.
There are no desc
properties defined for any of the private railway companies.
These should be added to all of them and show:
If B&CR's first build is a straight plain piece of track (tile 9) in hex F15, then it should be able to build in G16. But it is only being given options to build in its other two home hexes, D15 and E14. The code for calculating available builds is probably confused because there are no revenue centres to trace a route from.
B&CR built F15 and then wanted to build G16, but couldn't until it had built all 3 home hexes. This was ok before!
Starting CRP with P&L, it asks where to place the home token and accepts "no token". But you must place a home token (in this case in Porto).
There's too much clutter on the 1858 map. It needs to be tidied up with unneccessary items removed and making sure that nothing is obscured.
Private railway companies are the cause of much of this, with icons showing their home hexes, and indicators for blocked hexes (which only show a single company even if two block the same hex) and reserved cities (again, this doesn't work for shared cities).
Ideally it would be possible to show the private railway like on the AAG game board, with multiple hexes connected by lines. If not then removing the blocked hex markers would help, and private company icons in cities (as the company should be shown in the city).
Latest hotseat game: SJC swapped for a pool share of A. Everything was correct except the player didn't lose the private (it doesn't pay out, but does count towards share limit).
I'll send you the JSON in an email.
In a SR, I traded in the S&C for a RP share, but it then wouldn't let me trade in the O&V (which was also connected by the same route).
I could trade in the O&V into the N & W, both of whom were also connected.
I've been working through the quick-start setups, the others are all correct - but although 4p alternate is available to select, it just starts with a standard setup.
The log message on exchanging a private company for a public company presidency reads something like:
Player 3 exchanges Alar and Santander Railway and Pt80 from the Treasury for a 40% share of N
This suggests the money for half of the president's certificate is being paid from the company treasury, which is untrue.
The game behaviour is correct (the player is paying this money), the message needs to be amended to match.
This message comes from Engine::SharePool.buy_shares
. The best way to fix this would be to extract a method for generating the log message and then overridge this in a SharePool subclass.
The code in Engine::Step::Tokener.can_place_token? is using the default graph. You can get the case where there is no legal route to an empty token spot using either broad or metre gauge track, but the code is finding a route using a combination of both broad and metre gauge track. This means the token step is not skipped.
If no track is built in either Córdoba or Sevilla, and then C&S is used to start a major company, it should be possible to swap one of the other Andalucian privates (SJ&C for Sevilla or C&M for Córdoba) for a share in the major. This option isn't being offered, as the company_corporation_connected
check is failing.
This is unlikely to come up in an actual game, but it's still incorrect behaviour.
This might be caused by the same graphing bug as #7.
SR2: player 3 tries to start the A with C&S, but the program hangs...
I'll send the JSON in an email.
After a couple of operating rounds, many of the private railway companies are unable to build any track on their operating turns. At the moment the player is still having to take their turn, and decline the opportunity to build track.
As track building is the only step a private company can take in an operating round, the entire operating turn can be skipped if they cannot legally place any track.
OR6.1 MZA had a wounded 4H plus an unwounded 6H. It scrapped the 4H and bought the first 7E, thus wounding its 6H. But it wasn't then allowed to scrap the 6H to buy another train (despite having the cash to do so).
I'll send you the JSON.
There's so much clutter on the Madrid hex (H11) that the (40) value is obscured. (The value of a run is correct.)
SR5: succeeded in swapping the C&B into the TBF, but the connection was only by mixed gauge (broad, then narrow, then broad). The game then refused to proceed "game is broken", and wouldn't even undo the illegal action.
When a private company is exchanged for a treasury share of a public company, the public company is allowed to place a free token in one of the private company's home cities, if there is an available spot.
Three cities (Seville, Córdoba and Zaragoza) are in hexes that are home for two private railways, and so have two companies with reservation abilities for the hexes.
If one of these private railway companies is used to start a public company in the city, a second token slot is being created on the yellow tile. This must be the engine trying to be helpful: it can see the public company token and the reservation for the other private, so thinks two slots are needed.
This second slot should not appear until the tile is upgraded to green. At that point the reservation for the second private should reappear, if that company is still open.
In my hotseat game, a company bought a 7E from another company, after four phase 7 trains had been bought from the bank, and this triggered the rusting of the 6H's. But it should be five new trains that is the trigger.
Privates owned by a major currently close after the company has bought trains i.e. as it's last action. This is incorrect: they should close after running trains/distributing income but before buying trains!
Privates don't have 'abilities', and clicking on the button does nothing. I suggest you remove this - it's just confusing.
You can see what privates you own further down the page too.
A company acquired a private which was only connected via a mixed standard/meter gauge route, ie. an illegal one.
1858_acquire.txt
OR3.1 MZA earns 68 from privates, but when trying to pay out, I get the following error message:
"undefined method 'reservations' for nil". It doesn't hang, but paying half or withholding does the same.
So cannot progress the game.
I'll send you the JSON in an email.
When starting a new company, you are given the option of "exchange 50% for Treasury Share" which is not allowed. Clicking on that button just flags an error, but why not remove the button altogether? i.e. just have the "exchange for 50% of President Share" button(s).
BTW, it's Director not President.
Also, when trading in a private for a treasury share it should be 100% not 50%.
A is started using C&M with a token in Córdoba. When Córdoba is upgraded to green, A's token is in slot 0. The reservation for C&S does not appear in slot 1 as expected, and other corporations are able to place a token there. If C&S is used to start a corporation it overwrites A's token in slot 0.
If the major takes a token when absorbing a private during the final closure round, it says that it pays something. I'm not sure if it actually does pay it, but either way it should be free.
When trying to review my latest game, I get the following message:
"We're sorry this game cannot be continued due to GameError: Blocking step Run Routes cannot process action 355
Broken action: { "type": "pass", "entity": "ZPB", "entity_type": "corporation", "id": 355, "created_at": 1668274116 }"
This is when ZPB is running during OR4.1 - this was ok when I played the game originally!
TBF in Barcelona wanted to upgrade Valencia but couldn't, also A in Cordoba couldn't upgrade Cordoba! The restriction on laying in home hexes should only apply to yellow tiles.
[This was crippling for the A, since it had bought a 2M but now couldn't run it.]
P.S. The rule about laying yellow in the home hex of a private owned by the major is correct.
Three cities (Sevilla, Córdoba and Zaragoza) are each home locations for two private railway companies. Each of these companies has an ability to reserve the city, but the user interface is not expecting this and so only shows the name of the last one declared. Both names need to be shown, though this is likely to require very small text.
When a public company is operating, it would be good if the revenue from any private companies it owns is shown during the 'select routes' phase. At the moment the trains are listed and the 'submit' button to end this phase shows the revenue from these, but not the additional revenue from privates. This is especially weird during a public company's first operating turn, when it does not have any trains but will still generate revenue, as long as it has been started by converting a private.
The simplest fix might be just to tweak the 'submit' button to include this additional revenue.
A better solution would be to have the private companies appear in the list of trains, shown as train=[company abbreviation], used=[blank], revenue=[revenue], route=[blank]. These trains would have to be non-selectable, and excluded from route selection/auto-routing, route clearing, and so on. This would also be usable in other games, such as 1873's bonus revenue for the QLB.
At the end of SR1, for example, after all the privates have been sold, all players still have to press 'Pass'. Not a bit deal, just would be nice to speed up play?
When the first 6H/3M was bought, several companies had to discard a train. This should be in operating order, but it wasn't.
Same hotseat game as #45, at the end of OR3.1 (RP bought a 3M).
OR6.1: RP wants to build in hex F13 (CM&P has closed) but - even though it is highlighted - nothing happens when one clicks on the hex. E12 is ok.
Looks like that - when CM&P closed - this hex wasn't freed up.
For example, M&A can build in hex I10 even though that's reserved for the M&Z.
Ian D Wilson 06 Dec 2022
Start capital = P500
Bank = P8,000
Certificate limit = 21
Set aside five randomly chosen privates from P2-P17 (inclusive) plus two from P18-22. These are not available to be bought but remain in play (so they block building and prevent tokening in their home hexes). They close as normal in the Final Closure Round.
Remove 2 x 2H, 2 x 4H/2M, 1 x 6H/3M, and 1 x 5E/4M trains.
The limit on director’s share holdings is now 70% rather than 60%. You can only exceed 70% by exchanging privates in the FCR.
It only takes three grey trains to rust the 6H/3M trains.
A player is given the option to trade in their private company for a treasury share in any public company it is connected to. There is no check whether the public company is owned by the same player. If it is not then consent is required for the exchange to take place.
Choosing the quick start variant breaks the game. Nobody can act in the first stock round as they do not have enough money after paying for their batch of private companies. The game should advance to the first operating round but this is not happening, the first stock round is being rendered but breaking because there is no active step or current entity.
You're going to hate me for this...
The order of track laying shouldn't affect the total cost!
As an example: the N built a yellow narrow gauge track from Valladolid to Madrid (though the mountain) for 40, then upgraded Valladolid to brown for 20, total cost 60. But doing it in the opposite order it costs 0 (upgrade) and 50 (40+10) for the yellow tile. It should cost 50 whichever order they are laid.
Might be tricky to code...
During Final Private Exchange if two companies which share a token slot have not been previously exchanged, e.g. C&M and C&S, and the tile is still yellow and has only one slot, the first company swapped in cannot lay a token because "no token slots available on G18". The second company is then allowed to place a token as the reservation has been removed. This should be first-come first-served.
Testing 2p: in the Final Closure Round (after OR4.1), the O&V elected to take an RP treasury share. But the RP wasn't given the opportunity to place a token in Vigo.
Earlier in the round, the Z&P exchanged for a TBF treasury share and TBF took the token in Zaragoza.
I'll send you the JSON.
The W, in west Madrid, was only connected to Murcia by a combination of broad and narrow gauge track. But the program allowed the upgrade (yellow to green). It also allowed the trade-in of the M&C i.e. the same error in the SR.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.