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

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

Post by thorkia »

Here are some screen shots from Facilities Inc, a management company that owns all stations and tracks, and roads. It also operates 3 subsidiary companys: Trainsport (the train company), Truckers (the road vehcle company), and Mile High (my plane company)

Thank-you for this patch LordofthePigs. I have found it lots of fun.

Here they are:
Attachments
Facilities Inc., 9th Jan 1995 #3.png
(262.92 KiB) Downloaded 449 times
Facilities Inc., 9th Jan 1995 #2.png
(243.6 KiB) Downloaded 430 times
Facilities Inc., 9th Jan 1995 #1.png
(230.41 KiB) Downloaded 478 times
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

thorkia wrote: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.
No it doesn't, I forgot about this, but now that you say it, I'll make it so it does the auto-renew.
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 »

Minor problem. If i disable the patch (as in turn it off) whilst in a game that has a train in a tunel, or out of a station (never seen the problem in a station (these are all facilities that are owned by other subs)), then the game will crash with a "!disconecting train" (the ! is there in the error report) error.
Trying to load up the game with the relevent patch still turned off results in it dying again. Enabling the patch before loading results in the game working fine.


Code from the crash report below:

Code: Select all

*** OpenTTD Crash Report ***
Date: 2004-11-30 23:25:42
Build: ??? built on Thu Nov 25 12:48:58 2004
Reason: !Disconnecting train
Exception C0000005 at 0043EBF9
Registers:
 EAX: 0012F9C4 EBX: 00000000 ECX: 0012F9C4 EDX: 00000021
 ESI: 00000000 EDI: 7C80B529 EBP: 0012F9BC ESP: 0012F9B8
 EIP: 0043EBF9 EFLAGS: 00010246

Bytes at CS:EIP:
 C6 05 00 00 00 00 00 8B E5 5D C3 CC CC CC CC CC CC CC CC CC CC CC CC 55

Stack trace: 
 0012F9C4 0012FBCC 00431F38 73694421 6E6E6F63 69746365 7420676E 6E696172
 00000000 00B60178 7FFDEC00 00000030 00000000 00000001 021A0038 001420A0
 00000000 001420A0 00000001 00B98050 0012FA2C 7C801A4F 00000378 7C90E234
 7C8110DB 7C90E5E5 7C810E48 00000008 0012FA5C 0012FA64 00000008 00B60178
 00692AE0 00B97050 00000000 0049F0C8 00000016 00000378 00B60178 00000001
 FFFFFFFF 0012FA74 0012FBAA 0012FA78 0041D8BF 004A6F72 7D55C25C 0012FBA9
 0012FA8C 00431144 00000005 0012FBA9 7D55C25C 0012FAA8 004301F4 004303CF
 000020C5 0012FBA0 00000004 000000C5 0012FB00 00430803 00000000 00000000
 00000000 0012FAEC 7C90FB6C 7C90FB71 00000000 00000000 00000000 0012FAC8
 0012FAF0 0012FFB0 7C90EE18 00000000 00000006 0012FAFC 7C809392 00000006
 00000000 0012FB0C 7C8404F8 C0000008 001479D4 0012FB24 71AB63AA 00000000
 0012FB2C 7C80B529 00000000 0012FB48 71ABB230 00002736 00000000 00000000
 00000080 00000000 00147968 00002736 0012FCAC 0012FBBC 000086B4 00000000
 00000000 00000000 00000008 0012FB74 00483D62 0012FBC8 005CED84 0012FBAC
 00434486 0012FBC8 005C86B4 00000000 005CED84 00000033 FFFFFFFF FFFFFA40
 000013A0 00000033 000003C0 00000035 00000000 000086B4 005CEBF8 000086B4
 00000202 02000000 0012FBD0 0041A3A9 00000000 0012FC10 004851F8 004C8300
 005CEBF8 0012FBEC 0041A3A9 00000000 00000007 00000202 000863A8 00000200
 005CEE8C 00000B48 0000086F 000087B4 000086B4 00000008 0012FC24 00483F6F
 00691901 005CEE8C 00000001 0012FC30 00483E04 005CEE8C 0012FC3C 00434C2B
 005CEE8C 0012FCB8 00433918 00000000 7C80B529 00000000 00000000 00622EC0
 0012FC68 00428490 00000000 00000000 0012FC98 0040DDD5 00000000 00000000
 00000000 0046E160 00000000 00000000 00000000 00000000 00000000 00622904
 8AA2F5C6 00000010 FFFFFFFF 00000000 00000102 0012FCB8 00420C1F 8AA3CDE1

Module information:
 G:\ttd2\openttd.exe  handle: 00400000 size: 861184 crc: 32D979E1 date: 2004-11-28 23:41:20
 D:\WINDOWS\system32\ntdll.dll handle: 7C900000 size: 708096 crc: A5A50370 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\kernel32.dll handle: 7C800000 size: 983552 crc: 63EDEAA9 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\WINMM.dll handle: 76B40000 size: 176128 crc: 123646FA date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\USER32.dll handle: 77D40000 size: 577024 crc: 23C4ACD0 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\GDI32.dll handle: 77F10000 size: 278016 crc: 38A80671 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\ADVAPI32.dll handle: 77DD0000 size: 616960 crc: 5E7A2F0A date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\RPCRT4.dll handle: 77E70000 size: 581120 crc: 3AE05623 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\WS2_32.dll handle: 71AB0000 size: 82944 crc: 9738CC56 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\msvcrt.dll handle: 77C10000 size: 343040 crc: 5298C0C5 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\WS2HELP.dll handle: 71AA0000 size: 19968 crc: F5DD5AB6 date: 2004-08-04 15:00:00
 D:\WINDOWS\System32\mswsock.dll handle: 71A50000 size: 245248 crc: E2309390 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\DNSAPI.dll handle: 76F20000 size: 148480 crc: F2388F61 date: 2004-08-04 15:00:00
 D:\WINDOWS\System32\winrnr.dll handle: 76FB0000 size: 16896 crc: F415B2FF date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\WLDAP32.dll handle: 76F60000 size: 172032 crc: 5FAE75A9 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\rasadhlp.dll handle: 76FC0000 size: 8192 crc: EFB09679 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\wdmaud.drv handle: 72D20000 size: 23552 crc: 982E84EE date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\WINTRUST.dll handle: 76C30000 size: 176640 crc: 88D208BD date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\CRYPT32.dll handle: 77A80000 size: 597504 crc: 971ECFAA date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\MSASN1.dll handle: 77B20000 size: 57344 crc: D5127637 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\IMAGEHLP.dll handle: 76C90000 size: 144384 crc: 714A70BC date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\msacm32.drv handle: 72D10000 size: 20480 crc: D5406BAE date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\MSACM32.dll handle: 77BE0000 size: 71680 crc: 6A21891E date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\midimap.dll handle: 77BD0000 size: 18944 crc: 502B5282 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\ole32.dll handle: 774E0000 size: 1281536 crc: 8A7E66C7 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\CLBCATQ.DLL handle: 76FD0000 size: 501248 crc: 258B91EE date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\OLEAUT32.dll handle: 77120000 size: 553472 crc: 78035CFF date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\COMRes.dll handle: 77050000 size: 792064 crc: 5A12B4A2 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\VERSION.dll handle: 77C00000 size: 18944 crc: CFE439BB date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\dmime.dll handle: 5C570000 size: 181248 crc: F18E50F8 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\DSOUND.dll handle: 73F10000 size: 367616 crc: F0EFB582 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\dmusic.dll handle: 6C980000 size: 104448 crc: 0C1C73CE date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\KsUser.dll handle: 73EE0000 size: 4096 crc: 519CF22C date: 2004-08-03 23:56:44
 D:\WINDOWS\system32\dmsynth.dll handle: 6C9A0000 size: 103424 crc: ECEFF055 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\dmloader.dll handle: 6CA10000 size: 35840 crc: CCCBFD58 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\dmstyle.dll handle: 6C9C0000 size: 105984 crc: 41F12E87 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\dmband.dll handle: 6CBC0000 size: 28672 crc: 7CAFFAE0 date: 2004-08-04 15:00:00
 D:\Program Files\Trillian\events.dll handle: 10000000 size: 143360 crc: DFFAC602 date: 2004-03-07 23:00:00
 D:\WINDOWS\system32\COMCTL32.dll handle: 5D090000 size: 611328 crc: DD782FC8 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\comdlg32.dll handle: 763B0000 size: 276992 crc: D64B240A date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\SHLWAPI.dll handle: 77F60000 size: 473600 crc: 2D4FD44F date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\SHELL32.dll handle: 7C9C0000 size: 8384000 crc: 51CDDF32 date: 2004-08-04 15:00:00
 D:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll handle: 773D0000 size: 1050624 crc: 893FE926 date: 2004-08-04 15:00:00
 D:\WINDOWS\system32\SSSensor.dll handle: 06270000 size: 83096 crc: 929C53A2 date: 2004-08-10 16:05:30
 D:\WINDOWS\system32\psapi.dll handle: 76BF0000 size: 23040 crc: 97A44A88 date: 2004-08-04 15:00:00

System information:
 Windows version 5.1 2600 Service Pack 2
Personally i'd prefer for it to die gracefully. :)


Suggestion/request: Could you implement a faster way of switching between companies? Because the present way is rather slow and tedious.

Also, is it possible to disconnect the subsidiaries screen from the company info screen, so that when i close the company info screen, the subs screen stays 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 »

Another little glitch. this time with finances.
Started a game in 1987. Attached screenshot shows the finance windows for the two companies in game (both mine).
Red owns the infrastructure, and blue runs the trains.

You will note on Blue's accounting that in teh first year it spent 100k on Construction. But it didn't!?!?! At most it spent a few k because i mis-built a depot. Red does all the building.
Then if you look at the "new vehicles" category, you can see that a grand total of 15k was spent on new vehicles in 1987, however if you look at the vehicle info for the 3 trains, u can see that 2 trains were brought in 1987 both of which have a current value of more than 15k.

So i believe that the new-vehicles purchases for blue were placed into the construction category for blue.


Another bug: The tooltips still say 6% is the transfer interest rate cost. However it's 6.25% as you've stated.


Thanks
Attachments
Network Rail, 8th Nov 1989.png
Network Rail, 8th Nov 1989.png (48.2 KiB) Viewed 8434 times
Last edited by Moriarty on 30 Nov 2004 23:43, edited 1 time in total.
Archonix
Chief Executive
Chief Executive
Posts: 733
Joined: 01 May 2003 17:29
Location: Manchester, UK
Contact:

Post by Archonix »

Good grief, it's Railtrack! Now I can run the railways as incompetently as they're run in real life and make a handsome profit too... :D
Moriarty
Tycoon
Tycoon
Posts: 1395
Joined: 12 Jun 2004 00:37
Location: United Kingdom of Great Britain and Northern Ireland
Contact:

Post by Moriarty »

Good grief, it's Railtrack! Now I can run the railways as incompetently as they're run in real life and make a handsome profit too...
You mean someone's already taken my business plan? Nooooo....

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

Post by LordOfThePigs »

Moriarty wrote:Minor problem. If i disable the patch (as in turn it off) whilst in a game that has a train in a tunel, or out of a station (never seen the problem in a station (these are all facilities that are owned by other subs)), then the game will crash with a "!disconecting train" (the ! is there in the error report) error.
Trying to load up the game with the relevent patch still turned off results in it dying again. Enabling the patch before loading results in the game working fine.
This is probably caused by the trains which are not running on their companies tracks at the moment you switch off the patch.

An ugly workaround would be to merge all subsidiaries into the mother company as soon as the patch is disabled. But this is clearly not satisfactory.

For now, I'll probably leave it like that (subs are considered as other human players when the patch is turned off), but I'll solve the bug. If the user wants to switch off the patch, he'll have to merge all the companies by hand (wich isn't a big deal since he already owns 100% of them, just press "sell 25%" and then "buy 25%" for all subs, and it's done).

Any thoughts about that problem?

I'll also look into the finance window problem, seems weird since I really don't think I changed that code....

Lord of the Pigs
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
Mek
TTDPatch Developer
TTDPatch Developer
Posts: 417
Joined: 13 Apr 2004 13:35
Location: Eindhoven, Netherlands
Contact:

Post by Mek »

Moriarty wrote:Another little glitch. this time with finances.
Started a game in 1987. Attached screenshot shows the finance windows for the two companies in game (both mine).
Red owns the infrastructure, and blue runs the trains.

You will note on Blue's accounting that in teh first year it spent 100k on Construction. But it didn't!?!?! At most it spent a few k because i mis-built a depot. Red does all the building.
Then if you look at the "new vehicles" category, you can see that a grand total of 15k was spent on new vehicles in 1987, however if you look at the vehicle info for the 3 trains, u can see that 2 trains were brought in 1987 both of which have a current value of more than 15k.

So i believe that the new-vehicles purchases for blue were placed into the construction category for blue.
Could this be related to another bug reported a while ago; all AI engine purchases were also put in the construction category, only wagons were placed in the new vehicles category...
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

Ok, so here's a new executable, with a working auto-renew and no crashing when the subsidiaries patch is disabled.

In the latter case, trains will just go back and forth within the tile they are now locked into. If you don't see what I mean, just try it out!

Lord of the Pigs
Last edited by LordOfThePigs on 03 Dec 2004 14:19, edited 1 time in total.
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
pomeranc.cz
Engineer
Engineer
Posts: 18
Joined: 25 Nov 2004 06:35
Location: Brno, Czech Republic
Contact:

Question..

Post by pomeranc.cz »

Is it possibe to include this excellent patch into new nightbuilds od OpenTTD? Or it is in? Iam WIN user, so we have last build one week old :(( so i dont know what is in :(
My english is bad, i know, sorry!
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

The files attached to my previous message are for windows. Just download the .zip, and extract it to your openttd directory. You may want to rename your original files (openttd.exe and langs/english.lng) so as to have a safe copy somewhere.

By the way, the location of the source patch (for those who'd like to play it under another OS) has changed. It is now

http://sourceforge.net/tracker/index.ph ... tid=636367

Lord of the pigs
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
103er-Fan
Traffic Manager
Traffic Manager
Posts: 142
Joined: 22 Jan 2003 22:32
Location: Stuttgart, Germany
Contact:

Post by 103er-Fan »

First: I love this feature, it's awesome! I never imagined something like this would be ever featured in any game and now... well, here it is. Thanks LOTP!

One suggestion from me: Is it possible to send vehicles over to another company? Let's say you start a new company just for oil transport and have some engines at your main company without any work. It would be great to just give them to that oil company.
pomeranc.cz
Engineer
Engineer
Posts: 18
Joined: 25 Nov 2004 06:35
Location: Brno, Czech Republic
Contact:

Merger color problem

Post by pomeranc.cz »

When I merger two companies.. trains have still same color.. And there is no money move in financies, just zero..
Attachments
There - blue train - no blue company and zero in financies..
There - blue train - no blue company and zero in financies..
První Prepravní Akciová Spol., 29th Jan 2018.png (52.69 KiB) Viewed 8609 times
My english is bad, i know, sorry!
User avatar
Bernhard
Transport Coordinator
Transport Coordinator
Posts: 293
Joined: 11 Mar 2004 11:26
Location: 52º31'20"N 13º17'51"O

Post by Bernhard »

i think you should only by 75 %. It's yours than too
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

Here is a new mock-up screenshot I just made.

It features the most braindead thing you can do with the plugin: Rainbow Trains.

Well, I did this just to see if the plugin could handle this. However, since it's a completely ridiculous think to do, I didn't bother checking to whom the money goes when the train is sold.

However, Doing this, I found out another bug: You cannot assign shared orders to your trains, if the target train doesn't belong to the company you are administrating. I'll look into this.

Lord of the pigs
Attachments
Gueret Transport, 5th Sep 1950.png
Gueret Transport, 5th Sep 1950.png (52.35 KiB) Viewed 8561 times
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 the new patch binaries and english language pack. It corrects the merger bug and the shared orders bug.

I didn't implement 103er-Fans' suggestion to be able to pass vehicles from one sub to another. I'm still wondering if this is a good idea or not. As usuall, any comment on this issue will be greatly appreciated.

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 »

RAINBOW TRAINS!!!!

MINT... where have these things been all my life?!?!?!

They're great... Seriously. Shame they require so much effort to make. But they look great. No more dull same colour jobs!
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

Somebody stop me!!!!

I'm going insane.... Rainbow craziness!!!

Lord of the Pigs
Attachments
Rainbow Stations and trains
Rainbow Stations and trains
Pilkington & Co., 11th Nov 1950.png (92.16 KiB) Viewed 8420 times
Sometimes I'm told "Brilliant"...
Sometimes I'm told "Charming"...
And Often I'm told "Shut Up"!
FlipFlipsen
Engineer
Engineer
Posts: 70
Joined: 22 Dec 2002 09:38

Subsidiaries

Post by FlipFlipsen »

Hello Lord,

Question,

Very nice work, the subsidiaries patch.

Are you compiling a new update, every time there is a new nighty.

I like the changes in the new nighties, but also the subsidiaries.
User avatar
LordOfThePigs
Route Supervisor
Route Supervisor
Posts: 435
Joined: 01 Jul 2004 10:28
Location: Jura/Switzerland

Post by LordOfThePigs »

Each time I post a new executable here, its done using the latest nightly build. So all the latest changes are included in my builds, with in addition the subsidiaries.

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

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 15 guests