Subsidiary Companies

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

Post Reply
Ruiluth
Engineer
Engineer
Posts: 36
Joined: 24 Jun 2013 02:13
Location: Orbitting Jool

Subsidiary Companies

Post by Ruiluth » 24 Jan 2019 03:07

If there's one feature missing from every train game ever made, it's subsidiary companies. In real life, in the US at least, it was extremely common for a larger railroad to create a smaller railroad to build and operate a particular section of their network.

As an example, the Union Pacific's primary mainline was from Omaha, Nebraska, to Salt Lake City, Utah: the original Transcontinental Railroad. However, UP execs also wanted access to Oregon and California. Rather than building the lines themselves, they set up subsidiary companies. The Oregon Short Line started in Granger, Wyoming, where it branched off of the main Union Pacific line, and built northwest to Huntington, Oregon, with the goal of Portland, Oregon. The Oregon Railway and Navigation Co already connected Huntington to Portland, so they simply bought a majority share in that line and reorganized it as the Oregon and Washington Railway and Navigation Co, which was a subsidiary of the Oregon Short Line, which was a subsidiary of the Union Pacific. The Los Angeles and Salt Lake connected the Union Pacific at Salt Lake City to Los Angeles. Together, the OWR&N, OSL, LA&SL, UP, and various other subsidiaries, were called the Union Pacific System. All painted their equipment the same way and lettered them Union Pacific, but somewhere on the car or engine would be small letters that showed which company the car actually belonged to.

Another great example is the Southern Pacific Lines. Everyone knows the Central Pacific, the pioneering railway that met the Union Pacific at the Golden Spike, but unlike the UP, the CP name wasn't the one they used for most of their life. The owners of the Central Pacific also owned the Southern Pacific, and they decided to paint all equipment on both railroads to match the latter. Over time, their system came to include many railroads, such as the Oregon and California, California and Oregon, Texas and New Orleans, St Louis Southerwestern (aka Cotton Belt), Arizona Eastern, Pacific Electric, Northwestern Pacific, the Galveston Harrison & San Antonio, San Diego & Arizona Eastern, and various others. This is why, until 1941, all rolling stock belonging to any of these companies was lettered "Southern Pacific Lines," because the Southern Pacific was actually a big conglomeration of many distinct railroads all working together and feeding each other. Here's a great image of a cab forward locomotive, the Southern Pacific's unique locomotive type, painted and labeled as a Southern Pacific engine, but sporting a tiny CP marking to show who it actually belongs to. https://c7.alamy.com/comp/KKJ0PD/southe ... KKJ0PD.jpg


Anyway, sorry for the exposition dump, but how does this all relate to TT? Well, simply put, if I have an existing rail line, I may not want to simply build a branch, because I don't know if it will make me a profit or not, and after it gets mixed with everything else, it's hard to tell what budget items go where. However, if I can start a new company, and have that other company build the line, then I can simply look at that company to see if it's doing well, and see if I should formally absorb it or tear it down and try something else. Either way, it's no risk to the parent company because if the subsidiary goes bankrupt, all is not lost and it simply goes out of business, while the parent continues on like nothing happened. (Side note: the Infrastructure Sharing patch in JGRPP is pretty much required for this to be viable.)

This is easy to implement right now: just start a multiplayer game, and when you feel like it, quit and start a new company. If there are no other clients, you can switch between companies at will, making it easy to control both at once. However, there is one fatal flaw with this system: you can't fast forward at all. This seems like a trivial thing to add to single player mode: simply allow the player to take control of any company not already controlled by AI, and create a new company with a button. These features already exist in multiplayer and for spectators; all that needs to be done is to enable them in single player.

(I just realized that the cheat menu can be used for a similar effect, but it's kind of a pain to have to load your game into multiplayer, make a new company, and then go back to single player and switch using the cheat menu.)

Anyway, I could probably figure out a way to make this patch myself given enough time, but as a novice coder I'm sure there's someone out there who can do it much faster than I and save me a lot of trouble. So what do you say? Does this feature interest anyone else? Can someone quickly whip this up in the time it would take me to figure out what language I'm in, or should I do it myself?

Thanks for reading, and I hope this sparks some interesting discussion!

mrjack2
Engineer
Engineer
Posts: 47
Joined: 21 Jan 2016 23:04

Re: Subsidiary Companies

Post by mrjack2 » 24 Jan 2019 03:48

You can use the console instead of switching between multiplayer and singleplayer

Commands: start_ai starts an AI
stop_ai 5 stops the AI in slot 5

You can use a blank AI like Idle or IdleMore in all the AI slots.

Ruiluth
Engineer
Engineer
Posts: 36
Joined: 24 Jun 2013 02:13
Location: Orbitting Jool

Re: Subsidiary Companies

Post by Ruiluth » 24 Jan 2019 07:26

mrjack2 wrote:You can use the console instead of switching between multiplayer and singleplayer

Commands: start_ai starts an AI
stop_ai 5 stops the AI in slot 5

You can use a blank AI like Idle or IdleMore in all the AI slots.
Oh, that didn't occur to me. I'll try that.

Tsylatac
Engineer
Engineer
Posts: 24
Joined: 26 Dec 2015 01:04

Re: Subsidiary Companies

Post by Tsylatac » 27 Jan 2019 09:37

Cargo can't shared between companies though, right?

For example, if I as company 1 make a train line from station A to B, then switch to company 2 and make a bus line from station B to C, cargodist won't ever generate passengers who want to travel from A to C or vice versa...

This is the only reason I've never tried playing like this, I'd end up having to have all passenger services under one company's umbrella anyway because I want a theoretical passenger to be able to reach any station no matter where they start, one big network...

mrjack2
Engineer
Engineer
Posts: 47
Joined: 21 Jan 2016 23:04

Re: Subsidiary Companies

Post by mrjack2 » 28 Jan 2019 00:19

Infrastructure sharing (part of JGR's patchpack) is being used, as the OP said.

User avatar
kamnet
Moderator
Moderator
Posts: 6606
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Subsidiary Companies

Post by kamnet » 28 Jan 2019 03:44

The Infrastructure Sharing patch isn't perfect, but it's perfect enough that I don't play OpenTTD without it anymore. And to that end, I only play using JGR Patch Pack, which JGR has attuned IS for his needs. It does a very good job at simulating cooperative company gameplay.

Tsylatac
Engineer
Engineer
Posts: 24
Joined: 26 Dec 2015 01:04

Re: Subsidiary Companies

Post by Tsylatac » 30 Jan 2019 08:21

Well I'll be damned. I feel like it took awhile longer than normal for CargoDist to do its thing, but after a couple months it's doing exactly what I thought it wouldn't do. :oops: New game time!

Eddi
Tycoon
Tycoon
Posts: 7366
Joined: 17 Jan 2007 00:14

Re: Subsidiary Companies

Post by Eddi » 30 Jan 2019 13:26

just keep in mind that with infrastructure sharing, payment will be wrong, as the company making the final delivery gets all the income, and there is no method to compensate the other company for its transfer share. depending on your play style/network layout this may be more or less relevant (with and without cargodist).
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9267
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Subsidiary Companies

Post by planetmaker » 30 Jan 2019 14:05

Eddi wrote:just keep in mind that with infrastructure sharing, payment will be wrong, as the company making the final delivery gets all the income, and there is no method to compensate the other company for its transfer share. depending on your play style/network layout this may be more or less relevant (with and without cargodist).
Also note: with CargoDist enabled, OpenTTD will try to route stuff via oil rigs when both companies start serving it (e.g. easy to do mix passengers there if you provide service to the workers on the platform).

User avatar
kamnet
Moderator
Moderator
Posts: 6606
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Subsidiary Companies

Post by kamnet » 30 Jan 2019 14:15

Eddi wrote:just keep in mind that with infrastructure sharing, payment will be wrong, as the company making the final delivery gets all the income, and there is no method to compensate the other company for its transfer share. depending on your play style/network layout this may be more or less relevant (with and without cargodist).
Is this also the case if you have more payment set to earlier transfers in the journey?

User avatar
JGR
Tycoon
Tycoon
Posts: 1935
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Subsidiary Companies

Post by JGR » 30 Jan 2019 18:37

Eddi wrote:just keep in mind that with infrastructure sharing, payment will be wrong, as the company making the final delivery gets all the income, and there is no method to compensate the other company for its transfer share. depending on your play style/network layout this may be more or less relevant (with and without cargodist).
This has already been corrected in the implementation of infrastructure sharing which is in my patchpack.
When the final delivery is made, all companies involved are paid the appropriate income according to the transfers and final delivery income which have occurred en route.

There is also a setting to change/improve the calculation of transfer payments for intermediary journeys, which generally improves the distribution of income with infrastructure sharing.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

Eddi
Tycoon
Tycoon
Posts: 7366
Joined: 17 Jan 2007 00:14

Re: Subsidiary Companies

Post by Eddi » 30 Jan 2019 23:25

kamnet wrote:
Eddi wrote:just keep in mind that with infrastructure sharing, payment will be wrong, as the company making the final delivery gets all the income, and there is no method to compensate the other company for its transfer share. depending on your play style/network layout this may be more or less relevant (with and without cargodist).
Is this also the case if you have more payment set to earlier transfers in the journey?
i don't know about JGR's changes, but in the standard implementation, this is completely independent and the transfer payment setting is only used in accounting (vehicle statistics), not for actual payments (bank balance, yearly income reports)
You might not exactly be interested in Ferion, but if you are, have fun :)

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests