Infrastructure Sharing

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
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: Infrastructure Sharing

Post by Zephyris »

Local authority should take them, and put a lot of taxes on their use
I like this idea, "nationalisation"! Im not sure where you could fit it in the map array (except as a dummy ai player), but it would be fun to have town owned, any player-usable, infrastructure which you could buy off them at a later date...
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Infrastructure Sharing

Post by Zuu »

Anunnaki wrote:the pieces of shared tracks on which is actualy standing train would be assigned to the comany which own the train. Then is important, stoping payments for service, so train would no more spend money for "fuel" when is standing = the same way as in depos.
If you have two diagonal tracks next to each other with trains on them from two different companies you will have a problem, only one owner per tile is allowed. But two is required with your approach.

Though I like the idea of having your trains stranded. The best thing player wise would probably be having your trains teleported back to your track but that would be a bit strange, to not say unrealistic. :) Or if not teleported, auto rebuilt in a deport you own, given you have the money to do it.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
T-Unit
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 03 Feb 2007 18:53
Location: Leeds, England

Re: Infrastructure Sharing

Post by T-Unit »

How after the first warning of bankruptcy all contracts are cancelled and the ability to make new ones is frozen out for 6-12 months. This would mean that all companies involved in sharing carry a risk to their income and would have to make sure that they look after their finances properly. This would also solve the problem of who gets the track seeing as there wont be any trains on the bankrupted companies track.
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Infrastructure Sharing

Post by Ammler »

Small BUG Report from the dev server: The client asserts, if you try to send a ship to a fishing ground or oil rig. It's because the owner of the station there is nobody. Thanks to #openttd.

Code: Select all

src/player_base.h:120: Player* GetPlayer(PlayerID): Assertion `IsInsideBS(i, PLAYER_FIRST, (sizeof(_players)/sizeof(_players[0])))' failed.
Greets
Ammler
User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Infrastructure Sharing

Post by Gedemon »

Ammler wrote:Small BUG Report from the dev server: The client asserts, if you try to send a ship to a fishing ground or oil rig. It's because the owner of the station there is nobody. Thanks to #openttd.

Code: Select all

src/player_base.h:120: Player* GetPlayer(PlayerID): Assertion `IsInsideBS(i, PLAYER_FIRST, (sizeof(_players)/sizeof(_players[0])))' failed.
Greets
Ammler
ok, I'll look at it... expect same bug with buoys I think :O

are there others "stations" like buoys and oilrigs with no owners ?
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Infrastructure Sharing

Post by Roujin »

Not in the standard game.. NewGrfs can supply Oilrig-like industries that have an included ownerless station though.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Infrastructure Sharing

Post by Maedhros »

Don't forget the helipad on the oil-rig...
No-one's more important than the earthworm.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Infrastructure Sharing

Post by Roujin »

Isn't that one station? I mean, the dock and the helipad at the oilrig.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Infrastructure Sharing

Post by Gedemon »

Maedhros wrote:Don't forget the helipad on the oil-rig...
ho yes, thanks, calculating landing fee is another function that need to check ownership.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure Sharing

Post by planetmaker »

For testing purposes on the dev server of #openttdcoop, I combined the patch with dih's move patch to allow easier movement between companies. Join us with the updated version (0.1) and use the attached diff to patch r12974 (don't minde the name ;) ).
Attachments
r12974_wwottdgd_stub.diff
patch to r12974: track sharing and move players
(100.72 KiB) Downloaded 186 times
r12974M.tgz
Linux binary of the patch
(2.75 MiB) Downloaded 194 times
r12974-osx.tgz
OS-X binary (intel)
(2.91 MiB) Downloaded 173 times
Last edited by planetmaker on 07 May 2008 00:58, edited 1 time in total.
User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Infrastructure Sharing

Post by Gedemon »

zombie wrote:While the company operating the trains is charged with sharing fees, the company providing tracks and stations does not receive these fees. I compiled from revision 12972 with the latest patch from this thread. I attached a screenshot, the savegame and the openttd.cfg of the server.

Kind regards

Zombie
I'm sorry, I can't test the savegame in multi because of newgrf version mismatch.

Anyway years 1954 and 1955 seems fine, was there something unusual in 1953 ?
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Infrastructure Sharing

Post by Roujin »

here's a binary for windows. original files not included as always..
Attachments
r12974_wwottdgd_stub_binary_win32.zip
binary for windows
(3.14 MiB) Downloaded 206 times
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Infrastructure Sharing

Post by Gedemon »

New update !

The oilrig/buoy bug should be fixed.

Changelog v0.2 :
- removed : max train size and min train speed. Those should be set by another patch (Waypoint or signals restriction)
- added : fee for road stops per tons of cargo capacity
- added : fee for harbours per tons of cargo capacity
- added : show cost or income animation on station fee paiement
- added : remove station fee from vehicle annual profit
- fixed : do not assume that a station (or tile) is owned by a player
- updated to r12983
- warning : savegame from 0.1 can't be loaded with 0.2

again, thanks for testing, commenting and helping :mrgreen:
Attachments
r12983_infrastructure_sharing_v0.2_fixed.patch
Shared Infrastructure v0.2 r12983
(93.27 KiB) Downloaded 239 times
Last edited by Gedemon on 07 May 2008 20:14, edited 1 time in total.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure Sharing

Post by planetmaker »

Great. Added new diff jointly with move patch for dev server, applied to r12895 as with r12893 the os-x compile was broken.

Have also a look at the #openttdcoop blog on this topic. There you'll find a download link for a windows binary, too.
Attachments
r12985IS.tgz
linux binary
(2.74 MiB) Downloaded 272 times
r12985IS.diff
r12985IS.diff for the #openttdcoop dev server with integrated move client.
(101.15 KiB) Downloaded 221 times
r12985IS-osx.tgz
os-x binary (intel)
(2.91 MiB) Downloaded 166 times
Last edited by planetmaker on 07 May 2008 14:08, edited 8 times in total.
fabca2
Transport Coordinator
Transport Coordinator
Posts: 312
Joined: 14 Apr 2004 15:18
Location: Fr

Re: Infrastructure Sharing

Post by fabca2 »

Hi,

I didn't try already this patch, but I have a question :
I can choose to share my tracks and station, ok...
but can I choose that my trains don't use shared track from other player ?
I mean, If I had to pay them, and if there are two path to reach a tile (one with my own rail, another with costly shared rail) I would like to be able to globally enable/disable usage of shared track.

Thank you.
zombie
Traffic Manager
Traffic Manager
Posts: 153
Joined: 19 May 2005 22:19
Location: Germany

Re: Infrastructure Sharing

Post by zombie »

Hi.
Gedemon wrote:
zombie wrote:While the company operating the trains is charged with sharing fees, the company providing tracks and stations does not receive these fees. I compiled from revision 12972 with the latest patch from this thread. I attached a screenshot, the savegame and the openttd.cfg of the server.

Kind regards

Zombie
I'm sorry, I can't test the savegame in multi because of newgrf version mismatch.

Anyway years 1954 and 1955 seems fine, was there something unusual in 1953 ?
I don't think so. I set up the tiny route and let the server alone for a while without any connected client. Except from the ECS grfs I used OpenTTDCoop GRF pack 7.0. I downloaded the ECS grfs from Georges website (version 2008-03-29). I'll send you these GRFs via mail if you like.

Kind regards

Zombie
Anunnaki
Engineer
Engineer
Posts: 64
Joined: 16 Aug 2005 16:09
Location: Prague, Czech Republic

Re: Infrastructure Sharing

Post by Anunnaki »

r12983_infrastructure_sharing_v0.2_fixed.patch

GREAT, THX, this is best patch for multiplayer games, thanks lot for updated version !
Anunnaki
Engineer
Engineer
Posts: 64
Joined: 16 Aug 2005 16:09
Location: Prague, Czech Republic

Re: Infrastructure Sharing

Post by Anunnaki »

I was trying to patch your r12983_infrastructure_sharing_v0.2_fixed.patch to official clean openttd svn r12983 and r12991 too and then make win32 build (with MS VS2008), but the same problems in both cases. Can you look on that ?

3>Compiling resources...
3>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
3>Copyright (C) Microsoft Corporation. All rights reserved.
3>Linking...
3>command.obj : error LNK2001: unresolved external symbol "class CommandCost __fastcall CmdSetSharedBoolValues(unsigned int,unsigned int,unsigned int,unsigned int)" (?CmdSetSharedBoolValues@@YI?AVCommandCost@@IIII@Z)
3>command.obj : error LNK2001: unresolved external symbol "class CommandCost __fastcall CmdSetSharedIntValues(unsigned int,unsigned int,unsigned int,unsigned int)" (?CmdSetSharedIntValues@@YI?AVCommandCost@@IIII@Z)
3>date.obj : error LNK2001: unresolved external symbol "void __fastcall SharedTracksPayment(void)" (?SharedTracksPayment@@YIXXZ)
3>date.obj : error LNK2001: unresolved external symbol "void __fastcall SharedSettingDelay(void)" (?SharedSettingDelay@@YIXXZ)
3>npf.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedRoadDepots(unsigned int,enum Owner)" (?SharedRoadDepots@@YI_NIW4Owner@@@Z)
3>npf.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedDepotTransport(unsigned int,enum Owner,enum TransportType)" (?SharedDepotTransport@@YI_NIW4Owner@@W4TransportType@@@Z)
3>npf.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedTracks(unsigned int,enum Owner)" (?SharedTracks@@YI_NIW4Owner@@@Z)
3>npf.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedWaterDepots(unsigned int,enum Owner)" (?SharedWaterDepots@@YI_NIW4Owner@@@Z)
3>npf.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedRoadStops(unsigned int,enum Owner)" (?SharedRoadStops@@YI_NIW4Owner@@@Z)
3>npf.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedRailwayStations(unsigned int,enum Owner)" (?SharedRailwayStations@@YI_NIW4Owner@@@Z)
3>npf.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedRailwayDepots(unsigned int,enum Owner)" (?SharedRailwayDepots@@YI_NIW4Owner@@@Z)
3>settings.obj : error LNK2001: unresolved external symbol "int __fastcall SettingsEnableSharedRailwayStations(int)" (?SettingsEnableSharedRailwayStations@@YIHH@Z)
3>settings.obj : error LNK2001: unresolved external symbol "int __fastcall SettingsEnableSharedRailwayTracks(int)" (?SettingsEnableSharedRailwayTracks@@YIHH@Z)
3>depot_gui.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedDepotVehicleType(unsigned int,enum Owner,enum VehicleType)" (?SharedDepotVehicleType@@YI_NIW4Owner@@W4VehicleType@@@Z)
3>order_gui.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedAirports(unsigned int,enum Owner)" (?SharedAirports@@YI_NIW4Owner@@@Z)
3>order_gui.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedHarbours(unsigned int,enum Owner)" (?SharedHarbours@@YI_NIW4Owner@@@Z)
3>player_gui.obj : error LNK2001: unresolved external symbol "bool _si_railway_tracks" (?_si_railway_tracks@@3_NA)
3>player_gui.obj : error LNK2001: unresolved external symbol "bool _si_railway_stations" (?_si_railway_stations@@3_NA)
3>player_gui.obj : error LNK2001: unresolved external symbol "unsigned short _si_landing_fee" (?_si_landing_fee@@3GA)
3>player_gui.obj : error LNK2001: unresolved external symbol "bool _si_railway_depots" (?_si_railway_depots@@3_NA)
3>player_gui.obj : error LNK2001: unresolved external symbol "bool _si_road_stops" (?_si_road_stops@@3_NA)
3>player_gui.obj : error LNK2001: unresolved external symbol "unsigned char _si_harbours_fee" (?_si_harbours_fee@@3EA)
3>player_gui.obj : error LNK2001: unresolved external symbol "unsigned short _si_tontile_cost" (?_si_tontile_cost@@3GA)
3>player_gui.obj : error LNK2001: unresolved external symbol "bool _si_airports" (?_si_airports@@3_NA)
3>player_gui.obj : error LNK2001: unresolved external symbol "bool _si_road_depots" (?_si_road_depots@@3_NA)
3>player_gui.obj : error LNK2001: unresolved external symbol "bool _si_water_depots" (?_si_water_depots@@3_NA)
3>player_gui.obj : error LNK2001: unresolved external symbol "bool _si_harbours" (?_si_harbours@@3_NA)
3>player_gui.obj : error LNK2001: unresolved external symbol "unsigned char _si_road_stops_fee" (?_si_road_stops_fee@@3EA)
3>player_gui.obj : error LNK2001: unresolved external symbol "unsigned char _si_provision" (?_si_provision@@3EA)
3>aircraft_cmd.obj : error LNK2001: unresolved external symbol "void __fastcall SharedStationFee(enum Owner,unsigned short)" (?SharedStationFee@@YIXW4Owner@@G@Z)
3>aircraft_cmd.obj : error LNK2001: unresolved external symbol "void __fastcall SharedDepotProvision(class CommandCost,enum Owner,unsigned int)" (?SharedDepotProvision@@YIXVCommandCost@@W4Owner@@I@Z)
3>order_cmd.obj : error LNK2001: unresolved external symbol "bool __fastcall SharedStation(unsigned int,enum Owner,enum VehicleType)" (?SharedStation@@YI_NIW4Owner@@W4VehicleType@@@Z)
3>..\objs\Win32\Release\\openttd.exe : fatal error LNK1120: 32 unresolved externals
User avatar
Gedemon
Traffic Manager
Traffic Manager
Posts: 150
Joined: 29 Apr 2004 21:53

Re: Infrastructure Sharing

Post by Gedemon »

Anunnaki wrote:I was trying to patch your r12983_infrastructure_sharing_v0.2_fixed.patch to official clean openttd svn r12983 and r12991 too and then make win32 build (with MS VS2008), but the same problems in both cases. Can you look on that ?
working fine on MS Visual C++ 2005 here... :?

and you hadn't this problem with v0.1 ?
Anunnaki
Engineer
Engineer
Posts: 64
Joined: 16 Aug 2005 16:09
Location: Prague, Czech Republic

Re: Infrastructure Sharing

Post by Anunnaki »

Gedemon wrote:
Anunnaki wrote:I was trying to patch your r12983_infrastructure_sharing_v0.2_fixed.patch to official clean openttd svn r12983 and r12991 too and then make win32 build (with MS VS2008), but the same problems in both cases. Can you look on that ?
working fine on MS Visual C++ 2005 here... :?

and you hadn't this problem with v0.1 ?
EDIT: i try compile older version
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests