Infrastructure sharing 2.1.1

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.1.1

Post by planetmaker »

The best "community vote" is someone from the community stepping up, preparing a patch (queue) which implements it nicely, obeying the coding style and documentation requirements, and the ability to answer the questions which invariably will arrise during review and implement also the changes which might arise from such review.

The most difficult challange here is to find the balance in gameplay, to minimize the potential for abuse and griefing in MP and to be convincing in the communication of the found solutions to these issues.
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Infrastructure sharing 2.1.1

Post by Eddi »

mind you that this patch blissfully ignores the cargo payment issue when transferring between companies (only the last company will recieve money, not all companies involved). this is especially problematic in combination with automatic transfers (cargod*st)

another imho insufficiently solved question is who should control the trains (stop, turn around, ignore signal): the owner of the track, the owner of the train, both, nobody, ...? and how to control which parts of the network should be accessible by other companies
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.1.1

Post by planetmaker »

Eddi wrote:mind you that this patch blissfully ignores the cargo payment issue when transferring between companies (only the last company will recieve money, not all companies involved). this is especially problematic in combination with automatic transfers (cargod*st)
On a side note for the adventerous: in normal openttd, try to use an oil rig as transfer station for cargo between companies. It works. But mind your profits :-) Despite that TrueBrain and myself enjoyed it :D
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Infrastructure sharing 2.1.1

Post by FLHerne »

Eddi wrote:another imho insufficiently solved question is who should control the trains (stop, turn around, ignore signal): the owner of the track, the owner of the train, both, nobody, ...? and how to control which parts of the network should be accessible by other companies
I would suggest that the infrastructure owner should control all trains on their network*. Also, trains of different companies should be destroyed in collisions, with the infrastructure owner - responsible for controlling both trains and track - paying the owner(s) of the destroyed trains the purchase price of their destroyed vehicles**, plus a fee based on the amount of cargo destroyed.

With regard to limiting access by other companies, perhaps there should be a setting on each company window - "Permit access to rail network". For finer control, waypoints could be given options [allow/forbid trains of company X], along the lines of TTDP restrictive signals***.

Cargo payment of course needs sorting out. I heard the issues about a list of visited stations growing too large - presumably there's a maximum number that exist? If so, would keeping a list of transfer locations and times, then if the cargopacket returned to a station wiping that list back to the last time it visited (to keep the number of counted transfers < no. of stations) work? Or would that still be too large? Packets that circulated indefinitely (for longer than x ticks?) could be deleted as 'lost', in the same vein as cargo waiting interminably at stations.

*In case of jams or track rebuilding, having control of all trains is important - I found this troublesome in the current patch.
**Not the current 'value', that depreciates far faster than the real worth of the vehicle, and doesn't reflect the replacement cost to the owner suitably.
***O/T: these would be incredibly useful in OTTD, although presumably they'd need far more options to cope with autorefitting?
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: Infrastructure sharing 2.1.1

Post by ZxBiohazardZx »

FLHerne wrote:
Eddi wrote:another imho insufficiently solved question is who should control the trains (stop, turn around, ignore signal): the owner of the track, the owner of the train, both, nobody, ...? and how to control which parts of the network should be accessible by other companies
I would suggest that the infrastructure owner should control all trains on their network*. Also, trains of different companies should be destroyed in collisions, with the infrastructure owner - responsible for controlling both trains and track - paying the owner(s) of the destroyed trains the purchase price of their destroyed vehicles**, plus a fee based on the amount of cargo destroyed.

With regard to limiting access by other companies, perhaps there should be a setting on each company window - "Permit access to rail network". For finer control, waypoints could be given options [allow/forbid trains of company X], along the lines of TTDP restrictive signals***.

Cargo payment of course needs sorting out. I heard the issues about a list of visited stations growing too large - presumably there's a maximum number that exist? If so, would keeping a list of transfer locations and times, then if the cargopacket returned to a station wiping that list back to the last time it visited (to keep the number of counted transfers < no. of stations) work? Or would that still be too large? Packets that circulated indefinitely (for longer than x ticks?) could be deleted as 'lost', in the same vein as cargo waiting interminably at stations.

*In case of jams or track rebuilding, having control of all trains is important - I found this troublesome in the current patch.
**Not the current 'value', that depreciates far faster than the real worth of the vehicle, and doesn't reflect the replacement cost to the owner suitably.
***O/T: these would be incredibly useful in OTTD, although presumably they'd need far more options to cope with autorefitting?
to first answer Eddi: in current ottd stable/trunk you can also transfer cargo via neutral dock/oil rigs. im not sure but i think its hard to track cargo by who owns it, thus last gets it all. from the games i played this was not a real issue. all cargo and pax (even with A LOT of transfers) made most lines profitable even on current settings. i played IS in combo with cargodest/paxdest so i know what its about

then on the FLHerne suggestions
yes i agree, track owner is fully responsible thus should control all trains on his network. note that roads are not part of his network, roads are considered free for all in my opinion.
i also agree on the collission destroying both trains, but im not sure if the track owner should pay for cargolosses, refunding the train for me would be enough, and this would also offer new gameplay

then i also want to raise the new issue of bankruptcy (yet again) if the network owner is bankrup then a temp solution must be put in place to prevent all involved companies using the railnetwork to have trians that are on rails that no longer exist.

Upon bankrupcy i propose:
1) Transfer all assets to a temp-cleanup company
2) DISALLOW NEW TRAINS to join, and if possible force current trains off (this is most important, on the ownershipintersections, block new trains from entering and if possible force all other trains off the network via pathfinding blockages (is that even possible?)
(alternative option 2B: sell EVERYTHING (including non-owned trains) and refund the value to original owners)

3) with all non-company trains off the network: sell everything/bankrupt/reset
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.1.1

Post by planetmaker »

These solutions or suggestions don't cover the real problems but only answer the cases where all people play nice and the network(s) work like you think they should. Answering that is rather easy and can be done along these lines. But what if the networks are badly designed (purpose or accident) or players are malicious?
ZxBiohazardZx wrote: then on the FLHerne suggestions
yes i agree, track owner is fully responsible thus should control all trains on his network. note that roads are not part of his network, roads are considered free for all in my opinion.
And how do you deal with the situation of a malicious player who allow usage of their tracks. And when sufficiently many trains or vehicles of the competitor are on their property they modify it such that they're trapped for eternity, circling, incurring costs for the owner without any profit ever?
Upon bankrupcy i propose:
1) Transfer all assets to a temp-cleanup company
2) DISALLOW NEW TRAINS to join, and if possible force current trains off (this is most important, on the ownershipintersections, block new trains from entering and if possible force all other trains off the network via pathfinding blockages (is that even possible?)
(alternative option 2B: sell EVERYTHING (including non-owned trains) and refund the value to original owners)
How do you force trains off? Where shall they go? What happens if there's no path off the tracks (e.g. a company which only owns vehicles and no own tracks)?
Why is 1) needed? The company still exists... Why create another company with the same problem?
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: Infrastructure sharing 2.1.1

Post by ZxBiohazardZx »

if you cannot force them off, then a simple sell all trains on the track and refund original owner is easier

that or town-owned-rail XD
User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 708
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

Re: Infrastructure sharing 2.1.1

Post by JacobD88 »

Eddi wrote:there is no reason why you couldn't have a "community vote". but there's also no reason why the devs should act on such a vote...
It's always worth a try :wink:

I know from previous comments on the thread by the devs, that apart from the bugs which need ironing out, there is (or at least was) interest in the patch, but the post-bug stumbling point would have been IS's risk of introducing more abuses of play in MP.

Maybe, for once, a community vote would have swayed opinion on this if the majority accepted the IS risks...

That said, there's always going to be a bunch of teenagers appear somewhere screaming that their game was ruined by someone else because of the patch, so I've always seen the counter argument for it not being included.

Nonetheless, i suppose priority should still be the two main problems that were pointed out; Payment for Cargo Transport between companies and Bankruptcy Management as trunk isn't going to happen unless the patch is clean

Hopefully we'll get some more thoughts on this eventually.

EDIT: Ooo, seem to have missed out reading page 26, good to see more discussion. Apologies for not reading

Planet maker could you give some feedback on the feasibility of my suggestions please?
Cargo Packets:
This is difficult, as a log of time travelled, number of tiles, and with which companies would have to retained for each packet... It's only logical that the ratio of profits is split according to those factors... For example; Company 1 took cargo across 30 tiles in 5 days, company 2 took the cargo 70 tiles in 10 days, so ratio of share would be about 7:3

But i can foresee CPU load being an issue when games get large (Which is one big problem with CargoDist, which has not currently got a solution to CPU overload either)... On the other hand, IS working in this form would compliment CargoDist at a later time should both make it to trunk as they could share information from the same cargo packet information...

Bankruptcy:
Why not give all companies the chance to take over the network infrastructure in some kind of bidding system; the winner would then take control (The most "realistic" #DirtyWord situation).
Alternatively; can a dummy company be created to take up the infrastructure ownership until a player company can afford to buy it out?
The latter, Dummy Company, is most likely the easiest coding option as a bidding system would require a lot of extra work.
The Dummy company would be kept afloat by the income from people using it's infrastructure. If the dummy company goes bankrupt, again, it's just replaced with another dummy company until bought out.
I think that anything that involves destroying/blocking vehicles or infrastructure is going to be bad, and make the abuse options open to players more of a problem, hence the suggestion of a dummy company until bought out...

The only problem with this is that we would need an incentive (other than getting some cash from other players) for people to buy the dummy company out; otherwise i can see players just leaving the infrastructure in the hands of the dummy company forever... That said, they can't modify the network if it's in the hands of a dummy, so i guess there are two incentives to buy out ASAP, but is this enough? Maybe a price reduction for buying out a dummy company every-time one goes bankrupt (but again, this is much more work than simply making a dummy take over when the original player goes bankrupt)

Dummy Companies, as the name suggest do nothing; they don't build, amend, or alter anything; they just sit their solely to give a player ID to all of that infrastructure (and any vehicles).

If other players are on the network of the bankrupt player when it goes under, they remain going about their business on the network as it moves to the new dummy company; only from that point, all that happens is you pay the dummy company, not the previous player for the right to use their networks.
User avatar
Chris
Tycoon
Tycoon
Posts: 1985
Joined: 05 Oct 2009 16:36
Location: Leeds, UK

Re: Infrastructure sharing 2.1.1

Post by Chris »

On the topic of multiplayer abuse, there is inherently some risk in allowing your vehicles on to somebody else's infrastructure, you have to trust them that they're not going to mess your trains around. If they do (put your train going round and round a loop) then perhaps you should be given the option of revoking the 'contract', so that you don't have to keep paying the fees. To stop people abusing this feature (and gaining free access), all your vehicles on their track should be scrapped.
Screenshots

Formerly Class 165
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Infrastructure sharing 2.1.1

Post by FLHerne »

planetmaker wrote:And how do you deal with the situation of a malicious player who allow usage of their tracks. And when sufficiently many trains or vehicles of the competitor are on their property they modify it such that they're trapped for eternity, circling, incurring costs for the owner without any profit ever?
I think it would be impossible to design any infra-sharing system that didn't rely on a certain level of trust. Without 'locking' a company's entire network when other users' trains were on it (or at least the parts contiguous with the section containing those trains), there's no guarantee that changes to a network won't affect the visiting trains - their owner will, quite simply, have to trust the good faith of the network operator.

That said, I don't think it's really a large problem - what percentage of OTTD multiplayer is actually between complete strangers, rather than friends or at least people who've played together previously? Also, there are enough ways to grief already (company swaps, buying all the land, placing objects across waterways or simply destroying/filling them, crossing abuse...) that good public servers already need moderation, and bad ones already suffer occasional griefing. Unlike some of the above, it's easy for players to avoid the risk of being griefed - just don't send your vehicles onto the tracks of someone you don't trust...


EDIT:
...all your vehicles on their track should be scrapped.
That would probably be exploitable either way, depending on if the returned money was worth more or less than the actual value of the trains...

EDIT2:
Regarding bankruptcies, I would suggest that trains on the soon-to-be-bankrupt company's network should be sent directly to the nearest station or depot belonging to their owner (some variant on the existing depot search?). The track of the bankrupt network would not be removed until all visiting trains left. If the visiting trains can't find their way back to their home railway, there's already a problem - perhaps just delete such and refund their value?
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
User avatar
Chris
Tycoon
Tycoon
Posts: 1985
Joined: 05 Oct 2009 16:36
Location: Leeds, UK

Re: Infrastructure sharing 2.1.1

Post by Chris »

FLHerne wrote:EDIT:
...all your vehicles on their track should be scrapped.
That would probably be exploitable either way, depending on if the returned money was worth more or less than the actual value of the trains...
1. A connection between the two networks is made.
2. The track owner modifies his network putting your train in a loop.
3. You break the track sharing agreement, resulting in:
a) All your trains on that company's track are scrapped. You receive no compensation.
b) You can no longer share tracks.

This means that you can stop another player exploiting you by putting your trains in a loop, and that breaking the agreement would only be used in a situation of last resort, as it harms the you if you do use it (which you deserve for being a fool and putting your trains on their track - risk is involved so there will always be a bad outcome as well as a good one, this just limits the bad outcome).

For bankruptcy, the company should be allowed to keep going for six months, whilst trains are automatically sent to the nearest other company's depot, and lost ones can be routed by players. At the end of the six months if nobody has bought the company, the track is sold, and any remaining trains are scrapped (with no monetary return - tough if you can't get your train back, maybe you shouldn't have put it there).
Screenshots

Formerly Class 165
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Infrastructure sharing 2.1.1

Post by Eddi »

wrt bankrupcy, i think the rails [and roads] should just stay there as "owner: none" [needs checking whether the needed bits are free in the map array]. stations, trains, etc. of the company are removed. depots are tricky if depot-sharing is allowed (personally, i think it should not be allowed)
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Infrastructure sharing 2.1.1

Post by ChillCore »

Eddi wrote: wrt bankrupcy, i think the rails [and roads] should just stay there as "owner: none"
Roads (also roadbridges and -tunnels) already behave this way and cause no problems (preserving bridges a tunnels is a recent-ish addition to trunk -> they used to dissapear). However, a train being present on a rail without owner will crash the game. As I have found out by messing with the progsigs patch. (I can give more details in the appropriate place if wanted).
Anyway I was thinking in the same direction ... Something like zap trains-on-the-to-be-removed-rails to involved companies' nearest depots before deleting the rail.


As for abuse ...
- In case of someone keeping your trains trapped on their rails by modifying the infrastructure and no longer providing exits:
-> Give the option to stop using someones infrastructure?
(aka. Zap_my_trains_back_to_the_closest_of_my_depots button)

- To stop annoying behaviour on your tracks, whatever it may be (*):
-> Give the option to send someone's train back to the his/hers closest depot?
(aka. Zap_your_trains_back_your_depot button).

Using either option should dissalow the sharing of infrastructure between involved companies untill re-enabled by both parties.

(*) last time I payed attention trains belonging to different companies clipped through eachother while going from one place to another, but I did not check what happens at stations etc., except for the payment issue that is.


ps:
It has been a while I looked at the IS code ... I do not remember if it already possible to enable IS on a per-company basis ... if the option is not there, it should be; if it is, great.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Infrastructure sharing 2.1.1

Post by Eddi »

ChillCore wrote:ps:
It has been a while I looked at the IS code ... I do not remember if it already possible to enable IS on a per-company basis ... if the option is not there, it should be; if it is, great.
i don't know this either but it could work "diplomacy"-like, i.e. in the company's window you have buttons for:
  • offer track sharing (x$ per time/distance unit)
  • offer loading at stations (x$ per time unit)
  • offer joining stations (x$ one-time fee)
  • offer servicing at depots (x$ per service)
  • ...
and the other person gets a news message alerting him to the offern, and can accept it through the company window (his or theirs) [also, the give-money option could be done this way]

clicking on the message (as well as "new company founded", etc.) should open the respective company window.
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Infrastructure sharing 2.1.1

Post by FLHerne »

ChillCore wrote:Zap_my_trains_back_to_the_closest_of_my_depots button
Without some form of severe penalty, that would be very exploitable: Depot -> station -> just close enough to other depot -> ZAP -> depot -> station -> just close enough to depot -> ZAP?
Alternatively, have just the one depot at the destination, and have the train go the full distance to the source and then zap back when full...
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
User avatar
Chris
Tycoon
Tycoon
Posts: 1985
Joined: 05 Oct 2009 16:36
Location: Leeds, UK

Re: Infrastructure sharing 2.1.1

Post by Chris »

FLHerne wrote:
ChillCore wrote:Zap_my_trains_back_to_the_closest_of_my_depots button
Without some form of severe penalty, that would be very exploitable: Depot -> station -> just close enough to other depot -> ZAP -> depot -> station -> just close enough to depot -> ZAP?
Alternatively, have just the one depot at the destination, and have the train go the full distance to the source and then zap back when full...
So the trains just get scrapped (with no compensation) instead. Yeah it may not be completely fair, but hey the world isn't and you're taking a risk. At least it means it isn't exploitable.
Screenshots

Formerly Class 165
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Infrastructure sharing 2.1.1

Post by ChillCore »

Class 165 wrote:
FLHerne wrote: Without some form of severe penalty, that would be very exploitable: Depot -> station -> just close enough to other depot -> ZAP -> depot -> station -> just close enough to depot -> ZAP?
So the trains just get scrapped (with no compensation) instead. Yeah it may not be completely fair, but hey the world isn't and you're taking a risk. At least it means it isn't exploitable.
Scrapping the vehicles is a bit drastic, no?
Maybe the vehicles should be emptied. To avoid the abuser having his way ... again.
As for the abused party ... "You are not ending the partnership for fun most likely. Take your losses, maybe find someone more fun to play with and get on with your game"?

FLHerne wrote:Alternatively, have just the one depot at the destination, and have the train go the full distance to the source and then zap back when full...
Yeah, but do you really want to play a game with only one train? All your trains on that person's tracks would be flying back to the depot not just one.
The "zapping" would only occur in case of one partie ending the agreement to share infrastructure and after that no more zappedyzap?
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: Infrastructure sharing 2.1.1

Post by ZxBiohazardZx »

by far the easiest is to just remove the tracks, stations and ALL TRAINS ON THE TRACKS (yes alien trains as well) (alien as non-self-owned) and if possible refund original owner for the train removal
User avatar
Benjamin
Engineer
Engineer
Posts: 54
Joined: 10 Aug 2007 20:35
Location: Wales, on a hill, near some sheep.

Re: Infrastructure sharing 2.1.1

Post by Benjamin »

Would it be possible to do a monthly check on lost vehicles:

1. Is the destination reachable?
2. Is the vehicle on shared infrastructure?
3. Can the vehicle get to a depot in the next three checks (3 months)?

If no to all, give player option to 'zap' vehicle (make it selectable as an automated option, in case there are 100 plus vehicles to zap).

I would have suggested giving the infrastructure owner a fine, but this would then be open to abuse from the other side of people setting unreachable destinations.
You ain't seen me. Right?
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: Infrastructure sharing 2.1.1

Post by ZxBiohazardZx »

Benjamin wrote:Would it be possible to do a monthly check on lost vehicles:

1. Is the destination reachable?
2. Is the vehicle on shared infrastructure?
3. Can the vehicle get to a depot in the next three checks (3 months)?

If no to all, give player option to 'zap' vehicle (make it selectable as an automated option, in case there are 100 plus vehicles to zap).

I would have suggested giving the infrastructure owner a fine, but this would then be open to abuse from the other side of people setting unreachable destinations.
3 would make it possible to send all aliens to depot on bankrupt-check-3 fail
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 11 guests