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

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

Update

Post by LordOfThePigs »

Hello,

I just made an update to the patch. As you can see from the screen shot, there are 3 big changes:

1. You can now fully control all vehicles of all Sister companies without switching companies all the time.
2. Switching subsidiary usually got me confused about which one I was playing with, so now, the subsidiary window title bar reflects the color of the company you are currently playing with.
3. For the same reason, you now have a little color icon on the status bar. If you click on it, it will open the subsidiaries window. (if the patch is disabled, it will open your companys' information)

One thing I didn't mention before, is that this patch is disabled when playing a network game (be it maked as On or Off), since I have absolutely no idea what kind of problems this could cause...

I have added the openttd.exe and english.lang. Don't forget to backup these files before overwriting them.

By the way, I think this thread should be moved to OTTD Developpement now.

Lord of the Pigs
Attachments
Grenoble Transport, 21st Aug 1952.png
Grenoble Transport, 21st Aug 1952.png (47.2 KiB) Viewed 8206 times
Last edited by LordOfThePigs on 26 Nov 2004 17:04, edited 1 time in total.
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!

Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Post by Moriarty »

Lost: Well it works. :)
And the best bit is that using your builds, i have fixed that damn "missing trains" problem that appears in the nightly. :)


anyhow to the patch, a number of suggestions (minor cosmetic/usability ones) and bugs:

BUGS:

If i start a new game, create a subsidiary BEFORE naming it, and BEFORE i build anything, the sub will be owned by "unowned" (that's correct), but when i build something, the parent company is default named to whatever the local area is called. HOWEVER the subsidiary is named something else?!?!?
The really weird bit is that the name the sub claims to be a sub of is not in anyway related to the original name nor is it the name of another company on the map?!?
If i create a NEW sub (after the naming), it will also claim to be a sub of the non-existant company?!?!



the 4 subsidiary buttons (admin, give cash, etc etc) are ALWAYS available once you've created a sub. Even when you don't have a sub selected and they don't actually do anything when selected!


that "substract" is still there (for the request cash and the send cash).


The "build HQ button" appears for a sub even when you are not controlling that sub. Clicking it does nothing unless you control it. I would suggest it be greyed out like the "relocate hq" button is when it's not usable (when did that [relocate] button get added? hmm)



suggestions

Surely both companies should have the same manager picture and manager name? They both have me as a boss after all. :)

for the "merger" button, could you add confirmation (the sort you get when you click the "exit to windows" button?) otherwise i suspect i'm going to accidentally click it once in a while and loose my subs.


I'd recommend a change to the subsidiary screen. Basically i think it would be easier to use if ALL of the companies (including the one you are comanding) were listed on it. And that the parent company be shown as being the parent company.
Maybe something like this?:

Code: Select all

> Parent
|
-> Sub 1
-> Sub 2
---> Sub of Sub 2 (assuming you allow subs of subs :) ).
Highlighting the presently commanded company somehow in the process....



for both the "get cash" and "send cash". would it be possible to show on the little box that pops up, how much cash the target company has? So you don't try to take too much, and you don't give more than they need?




Most of the above are minor, however i like to find minor problems. They're more fun. :)


Edit: Oh, other than those things, it's a nice patch. :)

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

Post by LordOfThePigs »

Moriarty wrote:The best bit is that using your builds, i have fixed that damn "missing trains" problem that appears in the nightly. :)
I didn't do that, the main devs did, (my builds are synched with the latest SVN)
Moriarty wrote:The really weird bit is that the name the sub claims to be a sub of is not in anyway related to the original name nor is it the name of another company on the map?!?
Yeah, that's a problem I ran across at other points. I have absolutely no idea why, but internaly companies have 2 names (don't ask me why, even the main devs couldn't explain).... and If you don't write both names at the same time, you get this weird bug.
Moriarty wrote:The "build HQ button" appears for a sub even when you are not controlling that sub.
Oops, I did notice that one, but I forgot to correct it.
Moriarty wrote:Surely both companies should have the same manager picture and manager name? They both have me as a boss after all. :)
Well, you own the company, it doesn't mean you are the actual manager.
Moriarty wrote:for the "merger" button, could you add confirmation (the sort you get when you click the "exit to windows" button?) otherwise i suspect i'm going to accidentally click it once in a while and loose my subs.
I also thought about this, but to be honest, I didn't feel like making another dialog box (these are really a pain to create).
Moriarty wrote:I'd recommend a change to the subsidiary screen. Basically i think it would be easier to use if ALL of the companies (including the one you are comanding) were listed on it.
Ok, I'll just list all the sister companies, and highlight the one you are commanding (and I'll also make it unselectable).
Moriarty wrote:for both the "get cash" and "send cash". would it be possible to show on the little box that pops up, how much cash the target company has? So you don't try to take too much, and you don't give more than they need?
Granted, I'll do that.

Thanks a lot for the feedback.

I'll even point you to a bug that has already been connected. Select your Mother company, and try building a Dock. It gets flooded, when I discovered that, I found it hilarious.

Lord of the Pigs
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!

Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Post by Moriarty »

for both the "get cash" and "send cash". would it be possible to show on the little box that pops up, how much cash the target company has? So you don't try to take too much, and you don't give more than they need?
Granted, I'll do that.
One other thing that came to mind when i actually used it. Would it be possible to show on the updated screens the numbers before and after the 3% surcharge? Or in some way may it clear exactly how much is going to get lost during the transfer to those greedy bankers?

I look forward to the next build.[/quote]

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

Post by LordOfThePigs »

Here's the new build, with Moriartys' suggestions and bugs corrected.
Attachments
Check what has changed in the GUI
Check what has changed in the GUI
Watkins & Co., 11th Apr 1950.png (53.17 KiB) Viewed 8081 times
Last edited by LordOfThePigs on 26 Nov 2004 17:02, edited 1 time in total.
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!

Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Post by Moriarty »

goodie. something to break. ;)

bug:
When i click i company in the subsidarys screen, then click "administrate" to go to that company, there is a noticable (half second ish) delay for the 4 buttons to become darkened.
Also, when doing the above for companies other than the mother one, it sort of partly fills in. See screenshot. - This only lasts for a fraction of a second but is still noticable (or i wouldn't have noticed duh hehe ;) ).



the dialog that comes up. Nice. But a spelling mistake. and a grammar mistake too.

Present text: "Are you sure you want to merge these subsisiaries?"


I'd suggest something like:
"Are you sure you want to merge X into Y?"

That way you are stating which company is merging into which company.
Primarily because at present ther is no way to know which company will be the remaining one (except when the parent is involved), and which one will be absorbed.
This will clarify it.




you've fixed the bug with the ability to "build the hq", however at the same time u've disabled the "view HQ" button for any of the subsidiaries that have had their hq built. so the only way i can view the HQ for a sub now, is to be admining that sub. ;)



The "repay" and "borrow" buttons for the loan remain active for the parent company if i change to a sub and am viewing the parent company finances when viewing.
However the buttons don't work (both give red messages).
So i'd suggest the buttons be greyed out when you change command.
Similarly, if i transfer command from a sub to a parent whilst the finance screen for the parent is up, it (the parent) doesn't have any borrow/lend buttons.


Siimilar to the above, if i have the list of trains/boats/etc up for the company i am commanding it will have the "new vehicles" option. There will be no "new vehicles" option for the company i am not commanding.
However if i keep these two boxes up and transfer command to the second company, the "new vehicles" buttons remain where they were.
Moreover, if i click the "new vehicles" button for the company i WAS admining, then it will open a depot box for the company i AM admining.

NOTE: The above two bugs (the ones about the buttons) also happen with the cheat that lets you change players - just realised that the behavior for when under the cheat is liable to be the same. :)
So if you fix them, you can probably fix them for that cheat as well.


Lack of consistancy bug/niggle: For all your tooltips, you seem to have put a full-stop at the end of them. None of the other tooltips that i've seen have this.

The tooltips state that 6% will be charged by the bank for the transfer.

The tooltips for the "your subsidiarys" listing say "click here to toggle company's entry on graph on/off" - i see where you nabbed that code from... ;)




Suggestion:
I like the way it now selects companies, but what if i want to de-select a company? I have to close the window, or select another company. There's no real reason t want to de-select a company without having another company selected, but i still like doing that sort of thing (that's me :) ). Maybe clicking on a company name a second time will unselect it.


for the "send" and "get" money screens, they are not consistant.
one of them has
"amount to be sent
amount that will be recieved"
the other one has those two options the other way around. Would suggest making them both consistant. :)


Is there a way to do (give/get) more than 10k at once? Because in later game, that's not much money. Would potentially be useful to do 100k or even 1 mil at a time. Maybe if the player presses Ctrl or Ctrl-alt it can transfer higher ammounts.



Other than that small list, good work. ;)
Attachments
screenshot of delayed reaction
screenshot of delayed reaction
Unnamed, 25th Apr 1940.png (85.49 KiB) Viewed 7552 times

thorkia
Traffic Manager
Traffic Manager
Posts: 130
Joined: 25 Nov 2002 03:19
Location: Toronto, Ontario, Canada

Post by thorkia »

Excellent work.

I've enjoyed it thoroughly so far.

I have only one request, since sister companies can use each others stations, I'd like a service fee applied.

Say company B owns a airport in city A and City B. Now Company A has plane that lands at Company B's airport, I'd like say 3% (or maybe user set amount?) of Company A's income transfered automatically to Company B.

So if a companies plane (or train or automobile) made 10,000 buy using another companies stations, that stations owner would recieve 300 service fee.

Just an idea.

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

Post by LordOfThePigs »

Ok, Moriarty, Here's a new build for you to chew on.

thorkia: I love your suggestion! I'll start working on right now. I'll post a build as soon as it works.
Last edited by LordOfThePigs on 29 Nov 2004 12:10, edited 1 time in total.
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 »

Hello,

Here's a build implementing thorkia's suggestion, which I think is great.

Check the screen shot, you will see that green company has no property maintenance cost (since it doesn't have any buildings), and the red has a positive property maintenance number (for making the green pay to use the stations).

As you can see, the amount payed by Green to red is 8% of the trains' income at a red station.

For now, the paid tax is recorded as a negative "Other" in the green finances, and as positive "Property maintenance" in the Red finances.

I don't think this would have to be placed into the train income or train running costs, since it deals more with the stations than the trains, however, I'd like to hear your thoughts about this.
Attachments
Brown & Co., 17th Aug 1950.png
(103.58 KiB) Downloaded 519 times
Last edited by LordOfThePigs on 28 Nov 2004 22:45, edited 1 time in total.
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!

jake
Engineer
Engineer
Posts: 14
Joined: 12 Apr 2004 01:42

Post by jake »

first off, I think this patch is great!
second, I think we should be able to switch ownership of the stations and buildings. This is probably just useless but i think it would be fun to play around with. Say company A just took over a company to create a new subsidiary, company B. You would then hit a button on the station window that would sell the station of company B to company A. All the trains/buses would still go to the station. Right now, If you destroy a station of one company, and then switch over to a sister company, and try to build a station in the same place, it is given a new name, and all the buses will get in invaild order that were going to the old station. Also, sister companies can not connect next to each other. Company A can not connect a truck station next to company B's bus station.

thorkia
Traffic Manager
Traffic Manager
Posts: 130
Joined: 25 Nov 2002 03:19
Location: Toronto, Ontario, Canada

Post by thorkia »

I've noticed a little problem...

I created a new company, and a little network, then I created subsidiary company to start making trains....

Except this is what I get with subsidiary comapny (see picture)
Attachments
Trains Inc, 1st Jan 1950.png
(50.52 KiB) Downloaded 519 times

jake
Engineer
Engineer
Posts: 14
Joined: 12 Apr 2004 01:42

Post by jake »

hmm, I just noticed this too. You can still select the trains but you cant see which one you are clicking on.

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

Post by LordOfThePigs »

jake wrote:hmm, I just noticed this too. You can still select the trains but you cant see which one you are clicking on.
That's not caused by my patch. It was introduced by someone else into the trunk. But it kind of "fixed itself"...

I'll take a look at the switch owner thing for stations. And I'll make it possible for one station to have parts from any subs.

Lord of the pigs
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!

User avatar
SuperTycoon
Chief Executive
Chief Executive
Posts: 733
Joined: 24 Jun 2004 20:05

Post by SuperTycoon »

wow! OTTD has made real progress since i last checked! this patch may be the one that persuades me to switch (well maybe when the graphics engine is re-written)
Image

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

Post by LordOfThePigs »

LordOfThePigs wrote:That's not caused by my patch. It was introduced by someone else into the trunk. But it kind of "fixed itself"...
Well, actually that wasn't it. It was my fault. I have now disabled all compilers optimisations, and this problem went away...

So here is the new version wich allows you to build and manage multicolored stations!

How does it work. The original station builder is the owner of the station. you can see an example in the station "Lower Metz" which was founded by the green.

Subsidiary companies are allowed to add extensions to a station founded by another company (such as the blue Truck loading bay, and the red Bus station).

Any subsidiary can build can destroy station part of any other subsidiary.

Finally, the station ownership (ie: sign color) can only be changed if all, station facilites are destroyed. The first sub that rebuild on this station then becomes the new owner.

A new way of calculating taxes has been introduced. Let's say, that the tax rate has been fixed to 10% (reasonable).

Basically, when a vehicle enters a station facility, it will pay 5% tax to the facility owner (for Lower Metz, that would be red or blue, and 5% to the station owner (green). However, if a vehicle owned by the station owner, may stop for free at any facility withing that station, whoever the facility's owner is.

Let's make a few examples to make it clear (I'll be talikng about the Lower Metz case).

A blue train enters the green station: it will pay 10% to green
A blue bus enters the red bus station: it will pay 5% to red and 5% to green.
A blue truck enters the blue truck loading bay: It will pay 5% to green. It doesn't need to pay 5% to blue, since he is blue.
A green bus enters the red bus sation: It pays nothing.

These rules were thought with the following in mind. The orginal station owner is making you a favor in letting you suck the cargo out of its station by building your own facility, but he doesn't want to do it for free, so each vehicle entering your facility will have to pay a tax to the station owner. You are not willing to let others use your facility for free neither, so all vehicles other than your own, will have to pay you a tax. However, the stations' owner vehicled are exempt from this tax (since after all, you are using his station).

Well, here is a screenie and the windows binaries. Please report any bugs, and above all, have fun...

Lord of the Pigs

PS: Of course you can make the whole think much more interesting and challenging by raising the tax rate from the "Configure patches". If you put it high enough, you can actually sustain a company which has no vehicles, but only stations...
Attachments
Metz Transport, 22nd Jan 1950.png
Metz Transport, 22nd Jan 1950.png (69.78 KiB) Viewed 7779 times
Last edited by LordOfThePigs on 01 Dec 2004 16:57, edited 1 time in total.
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!

Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Post by Moriarty »

1 question about the numbers.
u say 1 green bus stops at red bus depot and doesn't get charged.
Surely it would make sense for the bus to pay... 5%? As the bus depot isn't its? It is getting a discounted service. Just seems like common sense to me....


Oh and the REALLY fun thing. What happens when you start expanding your train stations with multiple platforms of different players? Can the patch take into account platform owners as well?
Especially when you can make a platform longer, so you have a really long trtain covering platforms belonging to 2 companies?!?!


Just some thoughts. :)

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

Post by LordOfThePigs »

Moriarty wrote:1 question about the numbers.
u say 1 green bus stops at red bus depot and doesn't get charged.
Surely it would make sense for the bus to pay... 5%? As the bus depot isn't its? It is getting a discounted service. Just seems like common sense to me....
Well green is actually the owner of the whole station. He only allowed red to build his bus stop and suck the passengers out of the green station. It's part of the contract that they sign, that red buses will get a discount on stopping in the green station (they only pay half the tax) because it uses it's own facility. However by allowing this, green denies himself the possibility to build his own green bus stop into his own green station (the one facility of each kind limitation, that hasn't changed), so it's only fair that he may use his only possibility to bring busses into his own station for free.
Moriarty wrote: Oh and the REALLY fun thing. What happens when you start expanding your train stations with multiple platforms of different players? Can the patch take into account platform owners as well?
Especially when you can make a platform longer, so you have a really long train covering platforms belonging to 2 companies?!?!
Only the tile the engine is on is taken into account when determining whoses facility the train is in. So if you add platforms, the newer platforms will be in another color, and trains stopping on these platforms will pay half fee to the station owner and half fee to the platform owner.

I could do this more cleanly but it requires playing around with the map, and I'd rather not do that if I want the patch to find it's way into the next release.

I'm also considering not allowing a train station with platforms of different colors (doing away with the strange way it works now). Any thoughts on that?

Lord of the Pigs
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!

thorkia
Traffic Manager
Traffic Manager
Posts: 130
Joined: 25 Nov 2002 03:19
Location: Toronto, Ontario, Canada

Post by thorkia »

Leave the mixted stations. I love that idea. It allows for a "Union" station of sorts. With multiple trains from multipl companies stopping at the same facilities.

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

Post by LordOfThePigs »

Hey,

Does anyone have screenshots of a real game using the subsidiaries? All the ones I posted yet are just mock-ups, but I'd love to see how it turns out in a real game.

If you have some, please post them.

Lord of the Pigs
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!

thorkia
Traffic Manager
Traffic Manager
Posts: 130
Joined: 25 Nov 2002 03:19
Location: Toronto, Ontario, Canada

Post by thorkia »

I can take some of my game....

The only thing I want to make sure... Does the auto-renew feature work on subsidiary companies? Becuase it seems like my subs don't get anything auto renewed. Especially planes and trucks.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests