Subsidiaries management (latest build: r7213)

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

cassac
Engineer
Engineer
Posts: 2
Joined: 22 Aug 2006 02:17
Location: Oslo, Norway

Performance rating

Post by cassac »

Hi!

Have been playing around with the patch for a while on now, and one thing
irretates me a bit. The performance rating can't ever reach 1000 points if you sort out companies in train, vehicles, etc. Should be a an extra vidget with for the combined score. Cool to see the information of each company but should be possibe to se the combined too. Just a suggestion for me ;)

Else I think the patch is very fun to play around with, do it's hard in the start to remember to change companies. Should mabe be possible to set what you company can build. But that would require a whole lot of programming so not makeing that suggestion, just letting it out in the air :P

Real good work..
-----------------
Best regards,

Chris
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

Hello,

I just updated the path to revision 6161. Note that this is just an update, I only made sure it compiles and runs without crashing. There are a few bugs that have been there for the last few month and that nobody (including me) cared, or had time to fix.

The bugs I know of are the following:
  • busses/trucks do not enter station from other subsidiaries
  • extending the station of another subsidiary attributes the extension to the wrong company (the extension is always of the same color as the base station, which shouldn't be the case, and wasn't the case in the first fully functional version of the patch)
  • impossible to extend the station of a subsidiary with a bus/truck station (this one seems to have fixed itself... but this needs confirmation)
there are probably some more bugs, so feel free to add to this list. I'll try to fix these bugs, but I don't really know whether I can find the time to do so, so please feel free to fix them yourself ;) Your contribution will be highly appreciated.
Attachments
subsidiaries_r6161.diff
.diff against SVN revision 6161
(145.69 KiB) Downloaded 253 times
subsidiaries_r6161.zip
Windows executable and language files. Unzip this on top of a nightly install.
(1.11 MiB) Downloaded 318 times
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
PforPieter
Engineer
Engineer
Posts: 11
Joined: 20 Sep 2006 19:44

Transfer more money

Post by PforPieter »

Hey folks,

Maybe this will be a nice addition. I'm using this patch for a while, and i love it. I usually have 1 "holding company" and several departments. Example:
Amsterdam Transport Holding (the orgininal company which i start a game with) -> Amsterdam Transport Air - > Amsterdam Industrial Transport.

You get the idea. I would die for a mod where i can actually transfer more money to the holding account. Maybe it would even be possible to transfer like 90% of the profit each month to the holding company?

Also it would be awesome to give the subs a bit more direction/strategies.

Thnx in advance! =)
Even a stopped clock gives the right time twice a day.
DanC
Engineer
Engineer
Posts: 1
Joined: 12 Oct 2006 19:11

Post by DanC »

Hey guys,

I've just been playing with the MiniIN with this patch in, and i'm really liking it so far. I just wanted to add a very small suggestion. I have a company, like the poster above, a holding company. It owns all of the buildings, and the sub-companies own their vehicles. Unfortunately, this means my holding company's value is £1, even though each sub-company is worth over £200,000.

It'd be cool if the parent company was calculated as ( company value + sum( child companies value ) ). :)
You get the idea. I would die for a mod where i can actually transfer more money to the holding account. Maybe it would even be possible to transfer like 90% of the profit each month to the holding company?
This'd be really useful too. :)
User avatar
Thalass
Traffic Manager
Traffic Manager
Posts: 200
Joined: 02 Jul 2004 13:29
Location: Ontario, Canada

Post by Thalass »

I've been playing with the MiniIN, with this patch in it, and I love it!

One thing that would be nifty, would be to be able to tranfer ownership of vehicles and stations between companies. Say I have an airline, and a train company. And I buy out a compeditor with some trains and some aircraft... It would be good to be able to transfer ownership (or sell at the current vehicle value) the vehicle to the appropriate subsidiary, rather than merging the whole thing and then fiddling with the remaining vehicles that don't come under that company's scope.


It's not really urgent, since I could just clone the routes and rebuild the stations, but it would be good to be able to do this.


Keep up the great work :)
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1354
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Post by MagicBuzz »

I started to use this patch today.
It's not a patch, it's a wonderfull feature! Good job!

Since I tried to reproduce a "irl" case, I played like the french system.

I have :
- Main compagny : "Réseau Ferré Français" (only tracks and stations).
- A company "SNCF Voyageurs" (only passengers) that uses the RFF railways.
- A company "SNCF Fret" (only goods) that use the RFF railways.
- A company "La Poste" (only mails) that owns some trains on my greatest lines, or buy some carriages and ask "SNCF Voyageurs" to exploit them. (I mean, some of my "SNCF Voyageurs" trains uses one or two "La Poste" carriages.

Right now, I started to play with subsidiaries very late, so I can't check my incomes and outcomes correctly. I set up in the patch I have to pay to use a subsidiarie track, and there is something I dodn't understand about grabbing goods from other subsidiaries.

So I have some questions :
- Does RFF will earn money from my three other companies as they use its tracks ? (right now, I own arround 200 trains I built before statring a subsidiarie, so I can't check)
- Does "La Poste" earn money from the carriages that are exploited by "SNCF Voyageurs" ? Does "SNCF Voyageurs" too ?

And then, two suggestions (that come with my questions)
- Is it possible to add 2 lines in the budget window "Subsidiaries costs" and "Subsidiaires revenues" ?
- Is it possible to design a clear screen where each subsidiary could say "You must pay xxx if you use my network, then I'll pay xxx if I use your vehicules to gain money" ?
- As cassac asked, it would be usefull to be able to set up wich items a subsidiary can build or not (La Poste could build only carriages and locos, SNCF Voyageurs could build only passengers carriages and locos, SNCF Fret could build only goods carriages and locos, then RFF couldn't build any vehicule)

Thank you for your great work :)
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1354
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Post by MagicBuzz »

I just tried again, and it's ok, I get money from vehicules of oe of my subsidiaries runing on my roads :)

I just have to test what does a company A carriage used in a company B train on company C tracks :D
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

I can tell you that :)

the carriage doesn't matter, the patch only takes into account the head locomotive.

check this
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Hi LordOfThePigs :)
I found a few issues with subsidiaries in the MiniIN related to recently added features to the depot window and vehicle list. I have fixed these problems and glx added my patch to the MiniIN at r6976. You will need to make similar changes to your patch.

I also have some other questions about subsidiaries which I ask here.
Image
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1354
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Post by MagicBuzz »

Do you plan to make the "rainbow trains" feature more realistic ?
I mean, the wagon compagny should gain the revenues, then give x% to the loco owner (when x = the same value as for the using opponents tracks tax).
What about it ?
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

not really, because I don't think this is very useful. To be honest, that's not the way I intended the patch to be played, that's just some funny stuff that happens to be possible.
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

mart3p wrote:I found a few issues with subsidiaries in the MiniIN related to recently added features to the depot window and vehicle list. I have fixed these problems and glx added my patch to the MiniIN at r6976. You will need to make similar changes to your patch.
Thanks a lot, I'll try to do that. But as you might have noticed by the lack of updates and fixes, I haven't had much time to work on this patch these days.
mart3p wrote:In the depot window a player can:
E. Sell vehicles belonging to a sister company by dragging to the Sell buttons. This may also be the case for competitor’s vehicles if depot sharing is on.
F. Drag vehicles belonging to a sister company to rearrange wagons. It is also possible to add a sister company’s wagons to the current player’s trains and visa versa.

I have also tried this in r6500 (before all recent changes) and it is the same. Is this intended?

IMO a player should only be able to: 1, sell or rearrange his own vehicles, 2, attach dragged wagons to his own trains. What do you think?
Basically, I think that it is ok for a company to be able to sell sister company vehicles (because I often want to do some management on one of my companies but I can't bother changing companies, having to change the adminstrated company very often is annoying.).

However, I don't think stuff like the rainbow train should be permitted either. It introduces too much complexity for what it really brings, IMO. So basically, yes a player should be able to attach his wagons only to his own trains.

I'd love to implement all of these fixes (plus all the other bugs I know, which I posted on the previous page IIRC), but as I said, I really don't have time to do that now.

The thing is I still really want this patch to get into the trunk somewhere before OpenTTD 0.6, so if anyone wants to have a try at fixing these issues, I'd be glad to give him as much help as he needs. But I'm afraid there is little hope that I can manage that by myself, sorry guys. I need your help :)
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

LordOfThePigs wrote:Basically, I think that it is ok for a company to be able to sell sister company vehicles (because I often want to do some management on one of my companies but I can't bother changing companies, having to change the adminstrated company very often is annoying.).
Yes I agree, as long as the money for the sale of the vehicle goes to the vehicle's owner. Currently it goes to the player selling the vehicle.
LordOfThePigs wrote:However, I don't think stuff like the rainbow train should be permitted either. It introduces too much complexity for what it really brings, IMO. So basically, yes a player should be able to attach his wagons only to his own trains.
I agree, although I’m sure there are some that won’t. ;) And making it optional would be even more complex.
LordOfThePigs wrote:I'd love to implement all of these fixes (plus all the other bugs I know, which I posted on the previous page IIRC), but as I said, I really don't have time to do that now.

The thing is I still really want this patch to get into the trunk somewhere before OpenTTD 0.6, so if anyone wants to have a try at fixing these issues, I'd be glad to give him as much help as he needs. But I'm afraid there is little hope that I can manage that by myself, sorry guys. I need your help :)
I've already made a start at fixing these issues for the MiniIN. In the process of testing my changes I came across some more serious problems (not related to subsidiaries) which I'm in the process of fixing. I will look again at subsidiaries when this is done.
Image
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

OK, I've started to do some cleanup on my side. My latest diff is attached. It applies to revision 6374. I'll bump it later, I just wanted to fix the more annoying stuff first.

here are the changes (not including mart3p's fixes):
  • [fixed] busses and trucks can visit subsidiaries stations again!
  • [codechange] cleaned up the code. Now all accesses to the boolean patch variables are restricted to subsidiaries.c. New convenience functions CanShareTracks, CanShareStations, CanModifySignals, CanRemoveTracks and CanShareDepots have been introduced. It allowed me to simplify quite a few conditions in the whole source base, and I'm sure I fixed a couple of latent bug in the process...
mart3p, could you please make a list of all the fixes you have made for the subsidiaries patch, so that I can integrate them into my patch? Thanks a lot.

I won't bother attaching a binary yet, not before I fix the other bugs I know of.
Attachments
subsidiaries_6374_r2.diff
Patch file against trunk revision 6374
(145.05 KiB) Downloaded 200 times
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

LordOfThePigs wrote:mart3p, could you please make a list of all the fixes you have made for the subsidiaries patch, so that I can integrate them into my patch? Thanks a lot.
The list of fixes for the depot window that I have completed and have been added to the MiniIN are here. I previously also fixed this one and this one.
Also have a look at this one done by glx, this one by Rubidium and this one by richk67.

The fixes I am working on are:
1. Prevent attaching wagons to another player's trains.
2. If vehicle is not player's don't allow dragging - just open the view window. At the moment this also prevents the player from selling a sister company’s vehicles, but this needs some more work.
3. Prevent starting/stopping another players vehicle (do we want to allow this for sister company’s vehicles?)
4. Prevent new engines and wagons from attaching to another player's unattached wagons.

I will let you have a patch to look at when I get back to work on it. :)
Image
User avatar
ma5owat
Engineer
Engineer
Posts: 47
Joined: 24 Oct 2006 17:01
Location: Warren, MI, USA
Contact:

Post by ma5owat »

mart3p wrote:[The fixes I am working on are:
1. Prevent attaching wagons to another player's trains.
2. If vehicle is not player's don't allow dragging - just open the view window. At the moment this also prevents the player from selling a sister company’s vehicles, but this needs some more work.
3. Prevent starting/stopping another players vehicle (do we want to allow this for sister company’s vehicles?)
4. Prevent new engines and wagons from attaching to another player's unattached wagons.
2. I feel that a parent company should be able to sell a daughter company's vehicles. Although money should goto daughter company instead of parent.

3. In single player games a sister company should be able to stop/start vehicles and send to depot. Switching between companies is a pain just to be able to do construction and needing vehicles out of the way.

- I would also like to see option of transfering ownership between subsidiaries fo vehicles, stations, etc.
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

Here's a version of the patch that can apply to a more recent trunk revision (namely 7028, which was commited yesterday). Basically, I have updated the patch so that most of the things work with the many changes in the last 600 revisions on the trunk... I also fixed a couple of bugs in the process.

the fixed bugs are
  • busses/trucks do not enter station from other subsidiaries
  • extending the station of another subsidiary attributes the extension to the wrong company
  • impossible to extend the station of a subsidiary with a bus/truck station
there are still many bugs, that I'm still working on during my free time
  • The new depot windows do not take subsidiaries into account at all
  • road vehicles (and possibly other vehicles) cannot find the path to subsidiaries depots (ships, trains are fine, haven't check airplanes yet)
  • when selling a vehicle the money goes to the selling player, not the vehicle owner
  • players should not be able to attach their wagons to other players trains
Attachments
subsidiaries_7028.diff
My latest version of the subsidaries patch, which applies to trunk revision 7028.
(143.46 KiB) Downloaded 201 times
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 »

remembering the rainbow trains, are you able to do a feature where a player (A) put his own engine and then other players (B,C,D) buy they wagons in the same depot (common for all players) to make trains-for-rent like
(A),A,A,B,B,C,C
(A),B,B,C,C,D,D
(B),A,A,A,C,C,C
so the players are exent of the running cost of the train (except of the player which own the engine) but pay a rent tax and earn cash based on how much wagons are attached (the income is divided by all the wagons and the rent tax repays the engine costs, but the player which own the engine doesn't get all the cash)
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

That sounds awfully complicated. As I said a few messages higher, I'm considering disallowing rainbow trains altogether. I don't want to confuse the hell out of 98% of the users to make the other 2% happy. Plus if we are going to allow transfering vehicles from one company to another in the future, I'd rather not have to deal with this additional complexity.
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
User avatar
adpro
Engineer
Engineer
Posts: 42
Joined: 22 Nov 2005 19:15
Location: Czech Republic
Contact:

Scenario with Subs6161

Post by adpro »

Can I play Scenario, which I created in Subsidiaries (rev 6161), in classic OTTD?
I created simple scenario and I can't read it in normal OTTD and OTTD MiniIn too. Exists any way to play scenario created in Subs patch in classic version of OTTD?

Also, when I worked on scenario, every load to continue working on it adds a count of years from starting_date (or starting_year), so I had to push down arrow for example from year 7800. Classic OTTD are ok.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests