Infrastructure Sharing
Moderator: OpenTTD Developers
- NukeBuster
- Traffic Manager
- Posts: 222
- Joined: 04 Jan 2006 18:16
- Location: Alphen aan den Rijn, The Netherlands
- Contact:
Re: Infrastructure Sharing
Is there a server running with this patch, so I can give it a try?
NukeBuster
Transport Empire: The Transport Empire Linux effort
Join the Transport Empire IRC channel: [url]irc://irc.oftc.net/transportempire[/url] !
OpenTTD patch(es): Password at join
Transport Empire: The Transport Empire Linux effort
Join the Transport Empire IRC channel: [url]irc://irc.oftc.net/transportempire[/url] !
OpenTTD patch(es): Password at join
Re: Infrastructure Sharing
Checkout the dev-server of #openttdcoop. It runs some tests of the patchpack for WWOTTDGD2 (World Wide OpenTTD Game Day 2) which I think include infrastructure sharing. See this topic: http://www.tt-forums.net/viewtopic.php?f=33&t=37547 then perhaps join #openttdcoop on irc.oftc.net and ask what version of the patch-pack to use etc, and get the password for the server.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: Infrastructure Sharing
I was playing your test mod (patch) on mine dedicated server (in EPM mod) with 3 other players for cca 5 days (game is still running), and till now, everythings works ok. I was not trying bancrupcy while other train is on track, but sharing works great.Gedemon wrote:yes, but be warned this is a WIP, no code cleaning, not enought comment, and some parts buggy.Anunnaki wrote:BTW: Can you release what you have actualy done from v0.4 ? The v0.35 for r13205 would be great.
*TEST VERSION, DON'T USE FOR NORMAL GAME*
but if you want to check the pb with signals and airports, that will help...![]()
Have you other/new/updated version to test ? I am working right now on new EPMP modpack update, so i can implement there your newest test version if you wish.
Re: Infrastructure Sharing
I've played a game with a couple of friends last night, and we didn't encounter any bugs 

- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Infrastructure Sharing
bump & update to r13397. Would be nice, if there'd be actually a feature update
, even though, of course, RL has priority.

- Attachments
-
- is_v04beta_r13397.diff
- is_v04beta_r13397.diff
- (126.61 KiB) Downloaded 178 times
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Infrastructure Sharing
I would like to see a feature where you can sell routes and assets to the AI.
I like to specialize in Aircraft. So if i take over a AI i get the Aircraft plus vehicles and trains. So i would like to sell these off to another AI. Is it possible to have this feature in the Infrastructure Sharing patch or would it have to be done separately or it isn't possible to do at all.
I like to specialize in Aircraft. So if i take over a AI i get the Aircraft plus vehicles and trains. So i would like to sell these off to another AI. Is it possible to have this feature in the Infrastructure Sharing patch or would it have to be done separately or it isn't possible to do at all.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Infrastructure Sharing
That's IMO a different feature. This is about paying for (temporary) usage - not about ownership transferwozzar wrote:I would like to see a feature where you can sell routes and assets to the AI.
I like to specialize in Aircraft. So if i take over a AI i get the Aircraft plus vehicles and trains. So i would like to sell these off to another AI. Is it possible to have this feature in the Infrastructure Sharing patch or would it have to be done separately or it isn't possible to do at all.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Infrastructure Sharing
Can it be done though.planetmaker wrote:That's IMO a different feature. This is about paying for (temporary) usage - not about ownership transferwozzar wrote:I would like to see a feature where you can sell routes and assets to the AI.
I like to specialize in Aircraft. So if i take over a AI i get the Aircraft plus vehicles and trains. So i would like to sell these off to another AI. Is it possible to have this feature in the Infrastructure Sharing patch or would it have to be done separately or it isn't possible to do at all.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Infrastructure Sharing
Sure. But it will be a lot of work for a person who knows what s/he does.wozzar wrote:Can it be done though.planetmaker wrote:That's IMO a different feature. This is about paying for (temporary) usage - not about ownership transferwozzar wrote:I would like to see a feature where you can sell routes and assets to the AI.
I like to specialize in Aircraft. So if i take over a AI i get the Aircraft plus vehicles and trains. So i would like to sell these off to another AI. Is it possible to have this feature in the Infrastructure Sharing patch or would it have to be done separately or it isn't possible to do at all.
There're quite some points to decide on how to make the user interface for this feature and how to handle vehicles which are only available to one company etc pp. I guess it's approx as much work as this patch.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Infrastructure Sharing
It seems, that the 2 patchers, Vikthor and Gedemon, aren't coding on that patch right now. Because we would like to use that patch for the next WWOTTDGD. I like to request for a small addon, needed for proper gaming. I would be really happy if someone could add the following Request, also possible as additional patch/hack.
Requests for WWOTTDGD/2:
Greets
Ammler
Requests for WWOTTDGD/2:
- Trackowners should be able to start/stop the foreign trains. Train owners should not be able to start/stop on foreign tracks.
- Only owner can drive through WPs. (You can close you track for others.)
Greets
Ammler
Town Names:


Still work in progress: OpenGFX or/and OpenSFX - Please help!
Re: Infrastructure Sharing
What would happen when I stop a forein train on my track, and let it just sit there. The owner of the train has no option to get it out of there. I'd find the following restrictions for trains on foreign tracks more suitable:Ammler wrote: [*]Trackowners should be able to start/stop the foreign trains. Train owners should not be able to start/stop on foreign tracks.
- No stopping on foreign track.
- No drive through signal on foreing track.
-
- Transport Coordinator
- Posts: 283
- Joined: 08 May 2004 07:48
- Location: Alkmaar, The Netherlands
Re: Infrastructure Sharing
Why those options? If you don't trust another player on your tracks, don't give him permission. If you need to changer your tracks, you don't need to be able to stop other trains, just delete some piece of track.
Beer equals power
Re: Infrastructure Sharing
I still think that either of them should be able to stop the train, for safety concerns. It's same in the real life, everybody can pull the emergency brake, but he must face the consequences if he had done so without reason. And for ignoring signals I would consider joint agreement of both the vehicle and the track owner.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Infrastructure Sharing
Done. See attached diff file. Only the track owner may now give orders to start and stop , force proceed through signals and turn trains.Ammler wrote: Requests for WWOTTDGD/2:
- Trackowners should be able to start/stop the foreign trains. Train owners should not be able to start/stop on foreign tracks.
- Attachments
-
- is_v04beta2_r13536.diff
- infrastructure sharing updated for r13536. Changed behaviour: trackowner commands trains, not train owner.
- (88.55 KiB) Downloaded 188 times
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Infrastructure Sharing
Another bump, update and modification.
. Actually, the 2nd feature is really nice and allows much more sophisticated track building
. "here, I built a really nicely winding track for your ICE
"
On your own tracks you (and only you) have control over all trains via:
- start/stop
- force proceed through signal
- reverse
You block a track for all other companies except your own by putting a waypoint on it.
There's not (yet) any way to switch off this behaviour.
Thanks SmatZ for very helpful advice
Your wish is my commandAmmler wrote:Requests for WWOTTDGD/2:
- Trackowners should be able to start/stop the foreign trains. Train owners should not be able to start/stop on foreign tracks.
- Only owner can drive through WPs. (You can close you track for others.)



On your own tracks you (and only you) have control over all trains via:
- start/stop
- force proceed through signal
- reverse
You block a track for all other companies except your own by putting a waypoint on it.
There's not (yet) any way to switch off this behaviour.
Thanks SmatZ for very helpful advice

- Attachments
-
- is_v04beta3_r13552.diff
- infrastructure sharing v04c for r13552 with above mentioned changes to behaviour
- (129.96 KiB) Downloaded 224 times
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Infrastructure Sharing
How about if it's left stopped for more than x ticks, the local owner can start it and/or send it back to its owner's track. Alternatively make ownership switch to the track owner if it's left for too long - but that might be a whole new kettle of fish.
Jon
Re: Infrastructure Sharing
I have some suggestions:
- Use SubtractMoneyFromAnyPlayer(Player *p, CommandCost cost) instead of SubtractMoneyFromPlayer(CommandCost cost) and setting the _current_player
- Merge SharedRailwayStations, SharedRoadStops, SharedHarbours and SharedAirports into one function.
- Have a fee for all types of stations, not only for ones owned by a player, but execute industry-stations like oil rigs and fishing grounds.
- Remove timelimit for ENABLING sharing, but keep it for disabling or changing fees if it's enabled.
- Rework CmdSetSharedBoolValues and CmdSetSharedIntValues to have the new value in p1 and the thing that changed in p2, because you can't change multiple at the time.
Re: Infrastructure Sharing
Awesome patch! I really need to get into BuildOTTD. . .
In Railroad Tycoon 3, infrastructure is shared by default. If you attach your track to the AI's, expect their trains to wander onto your system if there's profit to be made. This is good (trackage use fees) and bad (congestion).
When an AI company in RRT3 goes under and is liquidated by its creditors, the track and stations are transferred to it's creditors, and still available for use (for a fee, of course.) Their infrastructure can then be bought for cash, without having to buy out the company.
Perhaps when a company goes bankrupt, their tracks, etc. could be transferred to a special "bank" AI? Or perhaps the original AI company just hangs around at $1 per share, with all of its vehicles sold, and no money to buy more.
Just throwing out ideas here- that's what I do.
What about having the game, after some time, announce that "Jones & Co.'s assets will be sold off", giving the player some time to either get his/her trains off the AI tracks or buy out the company? Then the game (after a year or so for the bankruptcy proceedings) will sell off the tracks except under player trains. Then the game will check once a month or so to see if there are still player trains on the tracks, and if not, tear up those rails also. A "stranded" train could be "rescued" by either laying track to its location, or building a depot along the track, driving the train to it, and selling it.
Sounds like building some of your own depots in AI territory might be a good idea.
Hmm. . . Company "A" is going bankrupt. Company "B" needs their infrastructure, and so takes on debt to buy them out. Then company "B" sells off unprofitable lines, etc., but now the debt drives company "B" into the red anyway. Old locomotives break down, service quality drops, traffic gets shifted to other modes. . .
Could never happen in real life. ** cough PENN CENTRAL cough**
In Railroad Tycoon 3, infrastructure is shared by default. If you attach your track to the AI's, expect their trains to wander onto your system if there's profit to be made. This is good (trackage use fees) and bad (congestion).
When an AI company in RRT3 goes under and is liquidated by its creditors, the track and stations are transferred to it's creditors, and still available for use (for a fee, of course.) Their infrastructure can then be bought for cash, without having to buy out the company.
Perhaps when a company goes bankrupt, their tracks, etc. could be transferred to a special "bank" AI? Or perhaps the original AI company just hangs around at $1 per share, with all of its vehicles sold, and no money to buy more.
Just throwing out ideas here- that's what I do.

What about having the game, after some time, announce that "Jones & Co.'s assets will be sold off", giving the player some time to either get his/her trains off the AI tracks or buy out the company? Then the game (after a year or so for the bankruptcy proceedings) will sell off the tracks except under player trains. Then the game will check once a month or so to see if there are still player trains on the tracks, and if not, tear up those rails also. A "stranded" train could be "rescued" by either laying track to its location, or building a depot along the track, driving the train to it, and selling it.
Sounds like building some of your own depots in AI territory might be a good idea.
Hmm. . . Company "A" is going bankrupt. Company "B" needs their infrastructure, and so takes on debt to buy them out. Then company "B" sells off unprofitable lines, etc., but now the debt drives company "B" into the red anyway. Old locomotives break down, service quality drops, traffic gets shifted to other modes. . .
Could never happen in real life. ** cough PENN CENTRAL cough**

Who is John Galt?
Re: Infrastructure Sharing
But it doesn't cause congestion. At least not as far as the track owner is concerned. Foreign trains always yield.ostlandr wrote:In Railroad Tycoon 3, infrastructure is shared by default. If you attach your track to the AI's, expect their trains to wander onto your system if there's profit to be made. This is good (trackage use fees) and bad (congestion).
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Infrastructure Sharing
Thanks, Yorick, for your input. Reading through this, it gives me actually the idea how to split the whole thing into two patches:yorick wrote:I have some suggestions:
- Use SubtractMoneyFromAnyPlayer(Player *p, CommandCost cost) instead of SubtractMoneyFromPlayer(CommandCost cost) and setting the _current_player
- Merge SharedRailwayStations, SharedRoadStops, SharedHarbours and SharedAirports into one function.
- Have a fee for all types of stations, not only for ones owned by a player, but execute industry-stations like oil rigs and fishing grounds.
- Remove timelimit for ENABLING sharing, but keep it for disabling or changing fees if it's enabled.
- Rework CmdSetSharedBoolValues and CmdSetSharedIntValues to have the new value in p1 and the thing that changed in p2, because you can't change multiple at the time.
- receiving and paying royalties for the usage of property of a different owner (player and non-player all the same). Shared usage is already possible. e.g. for oil rigs. This would also allow for another patch: the construction of stations by the local authority. Especially downtown bus stations, ports or airports might come to my mind there.
- allowing the usage of other player's property, thus extending the shared infrastructure from towns to include also other players tracks and stations.
When time allows I'll have a close look at it

OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Who is online
Users browsing this forum: Google [Bot] and 2 guests