18xx icon indicating copy to clipboard operation
18xx copied to clipboard

Suggestion: Auto run and payout function

Open philcampeau opened this issue 1 year ago • 5 comments

What's your idea?

It would be nice to have an "auto run and pay out" function. There are definitely times in games where everyone is just running and paying out to drain the bank because we've all agreed there's nothing left to do track-wise.

Once activated, the game could automatically skip tiles, tokens, etc, submit the previous route, and pay out, much like the present auto-actions in the Stock round. Assuming it's implemented on a per-company basis, you could have it disable if the route gets token blocked.

This is a feature I've often thought about, but implementing it is a bit beyond my current skill set.

Are there related ideas?

Other contributors may be working on something similar, check out the list of open feature requests to see if there's opportunity to collaborate.

Did you join the Slack?

Check out #18xxgamesdev on the slack and meet your fellow contributors!

philcampeau avatar Nov 20 '23 19:11 philcampeau

Another case for this is companies in receivership etc, where they may only run/withhold

benjaminxscott avatar Nov 23 '23 01:11 benjaminxscott

Absolutely, great point. The national in 1861 would also be a good example.

philcampeau avatar Nov 23 '23 19:11 philcampeau

The national in 1861 requires new route finding each operation, probably also most cases for receivership companies. I think you should restrict this request to a simple "accept the last run without checking routing".

A problem with this feature is going to be defining when this is allowed. What is preventing someone from using this option after they buy the P1 in 1830. then this button makes the log generate 2400 sets of SRs/ORs to break the 12k bank. Or maybe that is okay? Probably scenarios can be constructed that run indefinitely.

scottredracecar avatar Nov 23 '23 19:11 scottredracecar

I have a WIP a branch from a while back where I was trying to do this, IIRC it was getting tripped up when consecutive companies wanted to do it.

Anyone who wants to take this on feel free to check it out and take anything that might be useful: https://github.com/tobymao/18xx/compare/master...michaeljb:18xx.games:run-and-pay

michaeljb avatar Nov 24 '23 16:11 michaeljb

A problem with this feature is going to be defining when this is allowed. What is preventing someone from using this option after they buy the P1 in 1830. then this button makes the log generate 2400 sets of SRs/ORs to break the 12k bank. Or maybe that is okay? Probably scenarios can be constructed that run indefinitely.

On my branch linked in my previous comment, my approach was to have the UI for this on the auto tab, like with auto-buying shares, but you can only activate it for companies of which you are the President.

michaeljb avatar Nov 24 '23 22:11 michaeljb