Subsidiaries management (latest build: r7213)
Moderator: OpenTTD Developers
I will do this, but i'm not sure if I should allow it for sister companies. What do you think?
I thought about allowing to build and remove signlas on sister companies tracks, because its unnerving when you play withother players and want to connect your rails and there is a signal in way or you want to build signls there and could not.
Should this be genreral enabled or just an option?
Edit:
New patchversion:
1. StartStop train is allowed only on your own tracks and in depots
2. ForceTrainProceed is allowed only on your own tracks
3. you can now build signals on sister-companies tracks
4. fixed a Bug, witch causes an assert when buying shares in network games
I thought about allowing to build and remove signlas on sister companies tracks, because its unnerving when you play withother players and want to connect your rails and there is a signal in way or you want to build signls there and could not.
Should this be genreral enabled or just an option?
Edit:
New patchversion:
1. StartStop train is allowed only on your own tracks and in depots
2. ForceTrainProceed is allowed only on your own tracks
3. you can now build signals on sister-companies tracks
4. fixed a Bug, witch causes an assert when buying shares in network games
- Attachments
-
- subsidiaries_r5186.diff
- (190.45 KiB) Downloaded 255 times
Hi!
I updated the patch and added an option to dis-/allow sister companies to build/remove each others signals.
I think other companies should to be allowed to do that.
The option-string is only avaliable in english and german yet. If someones doing another language i will add it:
STR_CONFIG_PATCHES_SUBS_BR_SIGNAL :{LTBLUE}Allow subsidiaries to build/remove each others singals: {ORANGE}{STRING}
Greetings,
gagarin.
Edit:
I forgot the diff ...
I updated the patch and added an option to dis-/allow sister companies to build/remove each others signals.
I think other companies should to be allowed to do that.
The option-string is only avaliable in english and german yet. If someones doing another language i will add it:
STR_CONFIG_PATCHES_SUBS_BR_SIGNAL :{LTBLUE}Allow subsidiaries to build/remove each others singals: {ORANGE}{STRING}
Greetings,
gagarin.
Edit:
I forgot the diff ...
- Attachments
-
- subsidiaries_r5234.diff
- (191.1 KiB) Downloaded 322 times
Hi!
I had the idea to make "contracts" possible, so that you can set the costs and allow sharing stations for each player seperatly in network games.
Maybe with the possibility to say a contract may last for 5 years or for ever os so.
What do you think of it?
It would be a hell of a lot of coding, so I will do it only if someone else is interrested.
Greetings,
gagarin.
I had the idea to make "contracts" possible, so that you can set the costs and allow sharing stations for each player seperatly in network games.
Maybe with the possibility to say a contract may last for 5 years or for ever os so.
What do you think of it?
It would be a hell of a lot of coding, so I will do it only if someone else is interrested.
Greetings,
gagarin.
- The Master
- Engineer
- Posts: 80
- Joined: 02 Apr 2005 20:50
- Location: Italy
- Contact:
- NukeBuster
- Traffic Manager
- Posts: 222
- Joined: 04 Jan 2006 18:16
- Location: Alphen aan den Rijn, The Netherlands
- Contact:
The Master wrote:Contract, sounds good for me.
Contract need:
Initial contract cost
Tracks using cost (x squares)
Station using cost
Max Vehicle
Max Train & Max train length
Max Aircraft
Max Ship?
I can't aid you to coding.
This would be awesome if this was possible.
Maybe it would also be possible to include a fine for when a crash occurs caused by the foreign player.
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
-
- Engineer
- Posts: 110
- Joined: 20 Jun 2005 19:22
- Location: Leuven, Belgium
There are a few problems one must be aware of.The Master wrote:Contract, sounds good for me.
Max Vehicle
Max Train & Max train length
Max Aircraft
Max Ship?
1) To make these things dynamically users must have a way to negotiate efficiently with nothing but a user interface. That's quite hard, given the fact that you can only send such small text messages in multiplayer.
2) If you set a max train length (which definitely makes sense) you run into the very big problem of verification and penalties. If a player violates the train lenght, there are a few options:
- money penalty
- don't allow the train on the track
The latter seems the better, but brings other problems with it. First, if a train gets blocked because of this, it will most likely block all other trains behind it. Even trains from the player who owns the network where the violating train would want to drive on. This thus would force one to accept trains in oversize.
Thus, you would also have to have the pathfinder exclude routes where a train may not drive because of it's lenght. And, a notice beforehand if the destination isn't reachable too, because it might not be obvious that it cannot be reached in the first place.
Guess we will have to stick to a money penalty.. and the option to break the contract in case of a violation.
3) This brings me to the next point: how about contract endings? One would want to ensure that all trains who are on the network can leave the foreign network once the contract gets terminated. Could maybe be solved by checking the contract every time a train switches networks.
4) I would make the contract indefinitely, but with an option to cancel it with a fairly long notice time (about a year?). Otherwise you'll more be negotiating than building networks. And, the notice time is necessary to give players an option of searching a backup solution for their trains using the network that got cancelled...
5) There are definitely more difficult points at this idea than I can think of now...
1) I thought about something that look like the paches configwindow, with an accept and a cancle button, both have to accept to enable the contract. If one has accepted and the other changes a setiing, both have to accept new.
2) I didn't thought about a max train length yet. Maybe later.
3) Thats the way I want to do it
4) I had in mind, that you can set 5 years, 10 years 20 years and indefinitly but you can cancel it with about 6 month notice time
5) There are problems. I have to change the savegame format to save contracts and syncronise them over network (the network server makes a savegame and sends it to the client)
Greetings,
gagarin.
2) I didn't thought about a max train length yet. Maybe later.
3) Thats the way I want to do it
4) I had in mind, that you can set 5 years, 10 years 20 years and indefinitly but you can cancel it with about 6 month notice time
5) There are problems. I have to change the savegame format to save contracts and syncronise them over network (the network server makes a savegame and sends it to the client)
Greetings,
gagarin.
-
- Engineer
- Posts: 8
- Joined: 12 Oct 2005 15:53
- Location: Constance, Germany
Hi there,
I've installed the miniIN-Version yesterday evening. It read anywhere, that subsidaries are implemented there. So i tried to handle with it a bit.
I loadad an older savegame and wanted to start subsidaries. But I realized that there was no free ending track. In result I couldn't connect to other company-networks.
Is there a possibility to place junctions on tracks of other companies?
Maybe it would be much better, if a player could even rebuilt the other comapnies' track, so that it has second track with signals? Therefor it would be really pretty, that the other companiy would have to agree with rebuilding its tracks...
Is there any possibility to code something like this?
Thankyou for your help!
I've installed the miniIN-Version yesterday evening. It read anywhere, that subsidaries are implemented there. So i tried to handle with it a bit.
I loadad an older savegame and wanted to start subsidaries. But I realized that there was no free ending track. In result I couldn't connect to other company-networks.
Is there a possibility to place junctions on tracks of other companies?
Maybe it would be much better, if a player could even rebuilt the other comapnies' track, so that it has second track with signals? Therefor it would be really pretty, that the other companiy would have to agree with rebuilding its tracks...
Is there any possibility to code something like this?
Thankyou for your help!
Bye
Patrick_kn
Patrick_kn
-
- Engineer
- Posts: 8
- Joined: 12 Oct 2005 15:53
- Location: Constance, Germany
-
- Engineer
- Posts: 8
- Joined: 12 Oct 2005 15:53
- Location: Constance, Germany
There is a bug in MiniIN which is as far as I'm concerned due to the subsidiaries patch.
It is possible to recreate the bug from scratch, but it is pretty difficult, as you need a lot of luck. You can 'create' it using the following steps:
- build a bridge
- let anonther player build a road under the bridge
- let the other player go bankrupt, so the road piece below the bridge becomes of owner OWNER_NONE. This last step is the most important one, as that (indirectly triggers the bug).
The bug triggers the following assertion:
openttd: player.h:218: GetPlayer: Assertion `i < (sizeof(_players)/sizeof(_players[0]))' failed.
This is due to the fact that on line 709 of tunnelbridge_cmd.c GetPlayer() is called, with OWNER_NONE as argument (as GetTileOwner(tile) returns OWNER_NONE). It can be solved by adding the extra "GetTileOwner(tile) != OWNER_NONE" predicate to the if-statement before the GetPlayer(...)->is_active predicate, like in the attached diff/patch.
It is possible to recreate the bug from scratch, but it is pretty difficult, as you need a lot of luck. You can 'create' it using the following steps:
- build a bridge
- let anonther player build a road under the bridge
- let the other player go bankrupt, so the road piece below the bridge becomes of owner OWNER_NONE. This last step is the most important one, as that (indirectly triggers the bug).
The bug triggers the following assertion:
openttd: player.h:218: GetPlayer: Assertion `i < (sizeof(_players)/sizeof(_players[0]))' failed.
This is due to the fact that on line 709 of tunnelbridge_cmd.c GetPlayer() is called, with OWNER_NONE as argument (as GetTileOwner(tile) returns OWNER_NONE). It can be solved by adding the extra "GetTileOwner(tile) != OWNER_NONE" predicate to the if-statement before the GetPlayer(...)->is_active predicate, like in the attached diff/patch.
- Attachments
-
- subsidiaries_OWNER_NONE_bug.diff
- (868 Bytes) Downloaded 253 times
-
- Engineer
- Posts: 8
- Joined: 12 Oct 2005 15:53
- Location: Constance, Germany
I've just gone through the whole thread in the hope that I would find what I'm about to post but couldn't see anything. If this has already been asked, please accept my apologies.
There seems to be too much scope for cheating with subsidaries. I know in real life the parent company would not be liable for the debts of a subsidiary, but I think they should in OpenTTD.
If not, then it is possible for Company A to set up train lines everywhere, found Company B as its subsidiary, give Company B some cash to buy the trains, run them as normal, but charge Company B massive amounts in fees for doing so through the tax function. (€100/tile, €100/unit etc.)
So while Company A receives large amounts of cash, Company B is plunged into debt. Eventually the game will bankrupt Company B for obvious reasons, but here's where I think it turns into a bug...
In my games, a bankrupted subsidiary happens - it is announced in the newspaper - and yet nothing changes. Company B still exists, its trains still run, and Company A gets to sit back and rake in the cash while Company B is apparently bankrupt.
Surely if a subsidary goes bankrupt, all of its assets should be sold off and any resulting funds/deficit should be transferred back to Company A so they are punished accordingly? This would discourage Company A from doing such actions as it would be liable for the debts of its subsidiary.
Any thoughts?
Thanks for all the work everyone has ever done on this patch. It is fantastic.
There seems to be too much scope for cheating with subsidaries. I know in real life the parent company would not be liable for the debts of a subsidiary, but I think they should in OpenTTD.
If not, then it is possible for Company A to set up train lines everywhere, found Company B as its subsidiary, give Company B some cash to buy the trains, run them as normal, but charge Company B massive amounts in fees for doing so through the tax function. (€100/tile, €100/unit etc.)
So while Company A receives large amounts of cash, Company B is plunged into debt. Eventually the game will bankrupt Company B for obvious reasons, but here's where I think it turns into a bug...
In my games, a bankrupted subsidiary happens - it is announced in the newspaper - and yet nothing changes. Company B still exists, its trains still run, and Company A gets to sit back and rake in the cash while Company B is apparently bankrupt.
Surely if a subsidary goes bankrupt, all of its assets should be sold off and any resulting funds/deficit should be transferred back to Company A so they are punished accordingly? This would discourage Company A from doing such actions as it would be liable for the debts of its subsidiary.
Any thoughts?
Thanks for all the work everyone has ever done on this patch. It is fantastic.
Who is online
Users browsing this forum: No registered users and 3 guests