FS#921 - Patch to allow disabling exclusive rights

Attached to Project: OpenTTD
Opened by Bilbo (bilbo) - Saturday, 23 June 2007, 00:35 GMT
Type Patch
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Since exclusive rights are often abused in multiplayer to "buy out" or pester competition (and then laugh at giant queues if he is using full load or whatever ...), generally doing more bad then good, it may be desirable to turn them off on network server. This patch (for 10290) allow the exclusive right to be disabled, so nobody can (ab)use them anymore.

Note: Tested, seems to work fine (once  FS#920  will be fixed), but loading saved games does not work after applying patch. I looked at the loading code, but I have no idea why is that happening, as I don't know the code. Maybe the loading code will need some minor tweak somewhere to handle the extra bool in _patches, but I have not found the place to alter to achieve this. Probably not a problem for someone familiar with the code :)
This task depends upon

Closed by  Remko Bijker (Rubidium)
Sunday, 30 September 2007, 17:38 GMT
Reason for closing:  Implemented
Additional comments about closing:  In r11188.
Comment by Kenn Booth (Smoovious) - Saturday, 23 June 2007, 03:22 GMT
maybe change the behavior... I haven't seen it used on a network game yet, but if it still just basically removes your stations, perhaps keep the stations intact, but change acceptance/availability to none for a year instead... so when the year is up, you don't have to rebuild?

Perhaps, don't allow exclusive transport rights within 1 or 2 years after the last one expired?

-- Smoovious
Comment by Bilbo (bilbo) - Saturday, 23 June 2007, 09:44 GMT
Often it is abused in a manner that someone will identify your few key stations (large factory where everything is piled up and converted into goods, large coal/ore mines), then open up those few city authorities and buy rights. Your income can easily drop to one third or like with few targeted cities. Once discovered, you usually buy rights back, but if that will hurt the offender too (like if he have also some station in one of the towns) it can end up with very long haggling (you buy them, he buy it immediately back, you buy them immediately back), millions ending in a drain...

Also, it is not very "good" behavior for the town authority to sell you rights, then in a moments selling the same rights to someone else and keeping your money. In a real world it would be called a fraud or something like it :)

And you are not warned that someone have bought exclusive rights in the town where you have station (unless you examine the town and see red dot beside the offender name or see the effects of it (long queues with full load ... ))

To remedy this a bit, I sometimes rename the stations to not contain the name of the city, so for stations near coal mines/factories, that are far from asny city it may not be obvious to what city they belong, but then I'll have the same problem if I want to do things like build statue or run advertising campaign.

Maybe changing the behavior would be better, but inventing how to change it intelligently may be hard and till someone will manage to do that, there is this patch that allow to turn it off (by default it is on (rights not forbidden), like it was before)

Comment by Bilbo (bilbo) - Saturday, 23 June 2007, 09:50 GMT
Well, a "logical" behavior for the rights may be that if someone already have rights, the price for overtaking the rights will be doubled and whoever have bought them will get part (basing on how early after buying the rights they were overtaken) of their money back. So for example:

Adam buys rights for $1000000
after 1/10 of year Bob buys them for $2000000, Adam will get $900000 refund
Adam almost immediately buys them back for $4000000, Bob will get like $1999000 refund
Bob buys immediately for $8000000, Adam gets $3999000 refund
Adam buys for $16000000 .....

This way those haggles will be ... pretty short. And whoever loses, will at least get most of their money back (Tho he will have no rights in the town. Whoever wins will probably spend much more money than without this improvement :)

And if wont look like town authority is taking your money for nothing
Comment by Kenn Booth (Smoovious) - Saturday, 23 June 2007, 12:40 GMT
could also just disallow someone else buying rights while exclusive rights is in effect for someone else too... and have it not become available again, for a couple years after the rights expire...


Don't misunderstand me, I love the idea of being able to disable exclusive rights. :) I just had a couple ideas related to it pop into my head when I read it.


-- Smoovious
Comment by Bilbo (bilbo) - Monday, 02 July 2007, 02:12 GMT
Updated the patch for 10409 and also figured out the problem with savegame loading/saving. Now the patch should be bug free). Tested also in multiplayer (though only via localhost)
Comment by Bilbo (bilbo) - Saturday, 14 July 2007, 00:51 GMT
Updated the patch for 10556 and since someone was complaining in forums about abuse of "Give money" command, this can now be disabled by server admin too (but giving money is allowed by default, as are exclusive rights)
Comment by Benedikt Brüggemeier (skidd13) - Thursday, 02 August 2007, 19:30 GMT
Cool patch. The last time I played online. I missed something like that.
Comment by Benedikt Brüggemeier (skidd13) - Thursday, 02 August 2007, 19:55 GMT
I updated the patch since the last savegame bump broke it and changed the disallow to allow. This looks IMO more similar to the existing options.
Comment by Remko Bijker (Rubidium) - Monday, 10 September 2007, 20:54 GMT
This patch seems to be missing some checking in the commands that are called (over the network) to make sure the disallowed things are really disallowed.
Comment by Benedikt Brüggemeier (skidd13) - Tuesday, 11 September 2007, 15:13 GMT
I really like the idea behind the patch.
Comment by Benedikt Brüggemeier (skidd13) - Friday, 28 September 2007, 16:56 GMT
Savegame bmp update
New algorithm for TownAction bit assigning.