Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Company Takeover Maths not correct. #9281

Closed
lambodhar opened this issue May 19, 2021 · 11 comments · Fixed by #9300
Closed

Company Takeover Maths not correct. #9281

lambodhar opened this issue May 19, 2021 · 11 comments · Fixed by #9300
Labels
bug Something isn't working

Comments

@lambodhar
Copy link

lambodhar commented May 19, 2021

Not sure if bug but here is the scenario

  1. Company A buys out company B
  2. All the loans and all the balance should get added to company A finances.

However what is happening is

  1. Company B:- (Balance - Loan amount) is added to company A finance.
  2. Company B:- Loan amount is added as is to company A finance despite above money recovery.
  3. Net result:- Company A Loan = Loan of A + Loan of B and Balance of A = Balance of A + (Balance of B - Loan of B)

This does not make sense. Screenshots attached showing pre and post finance details.
premerge_OpenTTD_1 10 1
postmerge_OpenTTD_1 10 1

version 1.10.1

@James103
Copy link
Contributor

What OpenTTD version did you reproduce this on? Include the OS as well if possible.

@lambodhar
Copy link
Author

version 1.10.1

@James103
Copy link
Contributor

Have you tried updating to OpenTTD version 1.11.2 and then attempted reproducing this?

@lambodhar
Copy link
Author

same problem with version 1.11.2
I just installed newer version and loaded the previously saved game and tried doing the steps. Same results.

@LC-Zorg
Copy link

LC-Zorg commented May 21, 2021

James103: What OpenTTD version did you reproduce this on? Include the OS as well if possible.

This is not a new problem. It probably exists from the beginning of this feature. In general, the entire mechanism of buyout of shares is not very logical in economic terms - it's hard to even talk about buyout of shares, because it is basically limited to a simple, gradual buyout of companies. If it was a sale of shares, the selling company itself should decide to sell the shares for which it should receive money that could be invested in the company's development, because this is the purpose of selling the shares. And the buying company should profit from the shareholding - it is not.

Can be make a slight amendment so that the purchase of a company adds the right amounts, but it worth to ask yourself whether taking over the money of another company makes sense at all, because this leads to another much larger oddity, which is the fact that buying out companies in practice costs 1-5 % of their value. This is because in OTTD the value of companies is to the greatest extent based on the money held, which is acquired together with the company. As a result, you pay only for the infrastructure and vehicles themselves, which usually aren't worth much. Here, however, simply removing the takeover of the company's finances will not be good, as it will lead to the fact that two large connected companies will be worth nothing. In order to fix this mechanism, it would be necessary to change the mechanism of company valuation, which is generally not reliable, especially in the case of acquisitions, but also in the case of defining companies as bankrupt, where the game can close a profit-generating, well-developing company...

@lambodhar
Copy link
Author

Well, this is a game. So many things are unrealistic in this game that share buyout is a minor aspect. Still if it does affect then options to look at are like....

  1. Neither loan amount nor balance is transferred or
  2. Loan and balance amount all gets transferred.
  3. Try to come with system for getting better evaluation of company value. - For first few years, despite company owning multiple road vehicles, value stays at 1$

Also, approach 1 did exists in beginning as far as I can remember because I clearly remember both Loan and Balance getting transferred. That's what made me notice this behaviour. Been long time though, so could be wrong.

@LC-Zorg
Copy link

LC-Zorg commented May 23, 2021

lambodhar: Also, approach 1 (Neither loan amount nor balance is transferred or) did exists in beginning as far as I can remember because I clearly remember both Loan and Balance getting transferred. That's what made me notice this behaviour. Been long time though, so could be wrong.

I compared versions 1.4.4 and the current version 1.11.2 and I don't see any difference - all the results are identical. I also looked at the changelog since version 0.1.1 and I don't see a point there that would clearly indicate any change in this element. However, there are a few points that perhaps by chance changed something, especially the quite enigmatic change mentioned in version 0.3.0 "Fixed buy shares in company".

Well, this is a game. So many things are unrealistic in this game that share buyout is a minor aspect.

The game doesn't have to be realistic, but if it relates to reality, it is good to do it in a logical way that would not contradict reality. :) I agree that this is not some particularly important element, but I also think that it could be quite interesting if it were corrected. Especially in online games. The ability to sell shares in exchange for money for the development of the company would add interesting interaction between players. The game would gain an element reminiscent of the Dragons Den program. The sale of 100% of the shares would also allow the company to be transferred to someone. For this to work, a new company valuation method would be needed. There are many methods of valuation in the real world. The one that is currently used in the game is de facto an asset method and doesn't work well here. I think that the income method would be much more reliable, i.e. based on the forecast of profits over a specific period of time (10, 20 years) or preferably a mixed method where both income, property value and the age of the company would be taken into account.

Regardless of the above, I believe that the cost of taking over 100% of shares should include the cost of repayment of loans and debt, if any. As a result of the takeover of the company, the loan would remain unchanged.

@TrueBrain
Copy link
Member

TrueBrain commented May 27, 2021

I love how this pushed you above maximum loan :D

So, let me talk this right, and show you it is completely logical and realistic:

You don't own your company. Investors do, and you are put in charge. If another company buys your shares, they in fact buy them from the investors. This is why you don't see the money .. it was not yours to start with! You just work your ass off to make them rich. And you get nothing in return.

The loan is also given by the investors. That is the amount of money they are willing to risk for you.

Now when someone buys off your company, a few things happen:

  1. the loan is payed back to the investors. Fair is fair, it was their money. The rest of the balance is given to the company buying you out, under one condition given by the investors:
  2. they expected a profit on the loan they gave to you, so .. they want the company buying you out to take over the loan, so they are still likely to get their investment back. Or at least the interest.

So, there you have it, I made what is said to be "not realistic" pretty realistic! You just didn't know the full story, and it was in the details of the contract ;)

PS: I just completely and utterly pulled this out of my ass, I just made it up minutes ago, none of this is true or might be completely true, who knows. Either way, it is nonsense :)

@TrueBrain
Copy link
Member

TrueBrain commented May 27, 2021

Had to dig (deep) in the code to find out what really happens:

When you buy off a company, first all the shares are sold off. So basically, it is like pressing "Sell Shares" 4 times first. This is what gives your increase in balance.
Second, the loan of the company you are buying off is moved to you.

So it is not even that the balance of the company is given to you, as selling shares is done for slightly less than the company is worth.

It is all a bit odd :)

@TrueBrain
Copy link
Member

TrueBrain commented May 27, 2021

Sorry for the spam, but some more investigation:

Company-value used to be excluding the loan. So taking a loan increased your company value. This was heavily abused in multiplayer (player A having no loan, player B taking 75% shares, player A taking max loan, player B selling shares, player A goes bankrupt, repeat).
This was fixed in 0.3.6: 0074496

Next, a company that went bankrupt, was taken over, etc, didn't sell off his shares nor did it buy out shares people had on that company. This was a bit weird, so that was fixed in 0.6.0: 32c3ba6 . Well, actually, the code always already did this, like here:

value = CalculateCompanyValue(p) >> 2;

Later this code got touched again (in 1.2.0), like here: 0b33df7
But it was not noticed that this is just already broken.

So why is it broken?

First, when you buy a company, your shares are sold back to you. But in those shares are based on the company-value, which includes things like vehicle price etc. So not only do you get the vehicles, you are also paid for getting them.
Next, the company-value no longer includes the loan, but you get the loan assigned to you nevertheless. This means you basically pay twice for it. Once because it is reduced with the company-value, once because you are given the loan (without the money).

The reason this mostly goes unnoticed:

  • By the time most people buy off an AI, the loan is already gone
  • By the time most people buy off an AI, the amount of vehicles etc running around are worth well more than the loan

Either way, this is just buggy behaviour. Will see if I can find a nice explainable way to resolve the situation :)

TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue May 27, 2021
…you rich

When you buy-out a company, you got your shares back. This is
based on company-value, which includes values for the vehicles etc.
In other words, you not only got the vehicles, but you also got
paid to get them back.

Additionally, you also got the loan of the company, but not the
money for the loan (as that is subtracted from the company-value).

Solve this by making a buy-out easier: don't sell the shares, but
pay off the loan, get the infrastructure and any money that is
left over.
@TrueBrain TrueBrain added the bug Something isn't working label May 27, 2021
@lambodhar
Copy link
Author

lambodhar commented May 28, 2021

The loan is also given by the investors. That is the amount of money they are willing to risk for you

They way I understand it

  1. Loan is taken from Bank.
  2. Stocks of the company - Some are public + some are of investors. But in this games case, it's 100% public stocks.

When a rival is buying shares, they picking the shares from the Market. So investors/shareholders who are owning the shares are selling them. (In this case its rather force takeover, but thats for another discussion). Now when Rival has picked up all 100% shares of a company, ALL the assets, Finances and Loans and Debits are transferred to the new owner.

It is just cannot happen that balance is used in repaying existing loans and then new owner is again asked to repay the same loan.
Also, when purchasing share, already money is deducted from the buying comapnies balance in paying out the investors.
On same lines, company money is never owned by the share holders. It belongs to the Company. That's why we see Board of Directors being appointed by majority stakeholders and getting paid annual salary. Only case were this is not applicable is when one person owns 100% of the company.

So this is a triple whammy for buying company

  1. Lose money in buying shares
  2. Get burdened with bought out companies loan
  3. Lose the Liquid assets which bought out company held.

TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue May 29, 2021
…you rich

When you buy-out a company, you got your shares back. This is
based on company-value, which includes values for the vehicles etc.
In other words, you not only got the vehicles, but you also got
paid to get them back.

Additionally, you also got the loan of the company, but not the
money for the loan (as that is subtracted from the company-value).

Solve this by changing the rules of a buy-out: don't sell your
shares, get the loan AND the balance and get the infrastructure.
TrueBrain added a commit to TrueBrain/OpenTTD that referenced this issue May 29, 2021
…you rich

When you buy-out a company, you got your shares back. This is
based on company-value, which includes values for the vehicles etc.
In other words, you not only got the vehicles, but you also got
paid to get them back.

Additionally, you also got the loan of the company, but not the
money for the loan (as that is subtracted from the company-value).

Solve this by changing the rules of a buy-out: don't sell your
shares, get the loan AND the balance and get the infrastructure.
TrueBrain added a commit that referenced this issue May 29, 2021
#9300)

When you buy-out a company, you got your shares back. This is
based on company-value, which includes values for the vehicles etc.
In other words, you not only got the vehicles, but you also got
paid to get them back.

Additionally, you also got the loan of the company, but not the
money for the loan (as that is subtracted from the company-value).

Solve this by changing the rules of a buy-out: don't sell your
shares, get the loan AND the balance and get the infrastructure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants