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...Local authority should take them, and put a lot of taxes on their use
Infrastructure Sharing
Moderator: OpenTTD Developers
Re: Infrastructure Sharing
Re: Infrastructure Sharing
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.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.
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.

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
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.
Re: Infrastructure Sharing
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.
Greets
Ammler
Code: Select all
src/player_base.h:120: Player* GetPlayer(PlayerID): Assertion `IsInsideBS(i, PLAYER_FIRST, (sizeof(_players)/sizeof(_players[0])))' failed.
Ammler
Town Names:


Still work in progress: OpenGFX or/and OpenSFX - Please help!
Re: Infrastructure Sharing
ok, I'll look at it... expect same bug with buoys I thinkAmmler 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.GreetsCode: Select all
src/player_base.h:120: Player* GetPlayer(PlayerID): Assertion `IsInsideBS(i, PLAYER_FIRST, (sizeof(_players)/sizeof(_players[0])))' failed.
Ammler

are there others "stations" like buoys and oilrigs with no owners ?
Re: Infrastructure Sharing
Not in the standard game.. NewGrfs can supply Oilrig-like industries that have an included ownerless station though.
Re: Infrastructure Sharing
Don't forget the helipad on the oil-rig...
No-one's more important than the earthworm.
Re: Infrastructure Sharing
Isn't that one station? I mean, the dock and the helipad at the oilrig.
Re: Infrastructure Sharing
ho yes, thanks, calculating landing fee is another function that need to check ownership.Maedhros wrote:Don't forget the helipad on the oil-rig...
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Infrastructure Sharing
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.
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'm sorry, I can't test the savegame in multi because of newgrf version mismatch.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
Anyway years 1954 and 1955 seems fine, was there something unusual in 1953 ?
Re: Infrastructure Sharing
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
Re: Infrastructure Sharing
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
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

- 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.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Infrastructure Sharing
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.
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.
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
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.
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.
Re: Infrastructure Sharing
Hi.
Kind regards
Zombie
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.Gedemon wrote:I'm sorry, I can't test the savegame in multi because of newgrf version mismatch.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
Anyway years 1954 and 1955 seems fine, was there something unusual in 1953 ?
Kind regards
Zombie
Re: Infrastructure Sharing
r12983_infrastructure_sharing_v0.2_fixed.patch
GREAT, THX, this is best patch for multiplayer games, thanks lot for updated version !
GREAT, THX, this is best patch for multiplayer games, thanks lot for updated version !
Re: Infrastructure Sharing
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
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
Re: Infrastructure Sharing
working fine on MS Visual C++ 2005 here...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 ?

and you hadn't this problem with v0.1 ?
Re: Infrastructure Sharing
EDIT: i try compile older versionGedemon wrote:working fine on MS Visual C++ 2005 here...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 ?![]()
and you hadn't this problem with v0.1 ?
Who is online
Users browsing this forum: No registered users and 13 guests