Page 1 of 1

"Railroad Tycoon"-style stock market and shares

Posted: 10 Sep 2018 06:01
by tristeng
Been playing this game since 1996 (in its non-open original form) and come back to it now and again in its OpenTTD form. One thing I always thought was missing was a stock market simulator similar to Railroad Tycoon, so I've started working on one, if anyone is interested:
https://github.com/tristeng/OpenTTD/tree/stock-exchange

So far, you start with 50K loan and 50K of investor money (5000 shares at 10 per share) and you can issue or buy back shares. If the shares go over 100 per share, they will split and if they go under 2, they will merge. This event can get triggered every quarter, depending on if the price goes above/below those values.

The share price calculation takes into consideration the company value (less cash) and the earnings from the last 4 quarters, but this is still a work in progress.

Things I intend to work on and would love to see:
  • player owned shares - instead of the player and company being one entity, the player could be separate and manage their own shares (to raise net worth as a goal), and same for the company
  • player starts out with 20% stake in their company (1000 shares)
  • instead of buying a company 25% at a time, you would need to purchase the shares, 1000 at a time and get a 51% stake to take over - you would need to do this to keep controlling interest in your own company as well
  • player would get paid a salary from the company - better earnings means bonuses to the player, which would allow the player to invest more money in the stock market, poor earnings means no bonus, less salary and maybe termination
  • dividends
  • perhaps you could change companies and preside over one of the AI companies, if a position was open
  • buying industries and industry profits - industry would be more valuable the more you ship to/from it
  • and more...
I've attached some screenshots of the work so far:
stock splits 2 for 1
stock splits 2 for 1
stock-split.png (32.19 KiB) Viewed 11123 times
stock information on the company window
stock information on the company window
company.png (41.81 KiB) Viewed 11123 times
issue and buyback shares - see bottom of the window
issue and buyback shares - see bottom of the window
finances.png (28 KiB) Viewed 11123 times

Re: "Railroad Tycoon"-style stock market and shares

Posted: 12 Sep 2018 13:25
by openbu.org
I like "Capitalism 2" -Style stock market and shares,"Capitalism Lab" -style stock market and shares.

Re: "Railroad Tycoon"-style stock market and shares

Posted: 12 Sep 2018 13:37
by openbu.org
Candlestick chart

Re: "Railroad Tycoon"-style stock market and shares

Posted: 17 Oct 2018 11:15
by xmart2k
I think is a great idea. Keep up the good work!

Re: "Railroad Tycoon"-style stock market and shares

Posted: 15 Nov 2018 01:31
by Lucardes
openbu.org wrote:Candlestick chart
Hey how did you get those cop cars and beautiful buildings? I also use 32bit/extra zoom and I would die to get those grfs you have.. die for!

If you can reference URL's or better if you can upload them somewhere for me to get them I would be in your debt.

Thank you so much man and I hope you see my msg :)

Re: "Railroad Tycoon"-style stock market and shares

Posted: 20 Nov 2018 19:09
by Baldy's Boss
This would be great (as would access to the company's full financial history).The stock price can be added to the available charts.
(Maybe this would be the added feature that moves the version from 1.x to 2.x?)

I regard the company manager face/name as my employee,not myself (my first TT game I had a manager named "Baldy Specs",which described him,and I have had other "Baldy" managers though am not bald myself...hence my username here).
How will you be treating that?

Re: "Railroad Tycoon"-style stock market and shares

Posted: 27 Jul 2020 21:56
by Tarabaystitans
I think this is a fantastic idea!! where did this land?

Re: "Railroad Tycoon"-style stock market and shares

Posted: 27 Jul 2020 23:11
by kamnet
Tarabaystitans wrote: 27 Jul 2020 21:56 I think this is a fantastic idea!! where did this land?
Nowhere. Nobody's worked on it.

Re: "Railroad Tycoon"-style stock market and shares

Posted: 28 Jul 2020 00:24
by Tarabaystitans
Shame, how hard would it be to implement these changes into a patch if i were to attempt it myself?

Re: "Railroad Tycoon"-style stock market and shares

Posted: 28 Jul 2020 07:40
by jfs
The difficult part is making a company valuation that's reliable and can't be gambled or exploited in silly ways, like the original shares-buying mechanism. Having a stable/reliable company valuation would probably mean reworking the entire economic model of the game to include double entry bookkeeping and such, so investments and sales (assets conversion) are tracked properly. That could be a huge task, where any shortcuts taken could easily become loopholes to cheat the system.

Keep in mind that the share price of a company is often based on its performance rather than its assets.

RT3 Style Newgrf or Script

Posted: 17 Aug 2020 08:17
by Tarabaystitans
viewtopic.php?f=33&t=83793&p=1234686#p1234686

This topic has been visited a couple of times but doesn't really go anywhere. I'd like to know if it is in the realm of possibility to make something like this? or it is too difficult and not worth it.

Would love any active developers to make contact and brainstorm with me

Re: RT3 Style Newgrf or Script

Posted: 17 Aug 2020 09:38
by kamnet
Tarabaystitans wrote: 17 Aug 2020 08:17 viewtopic.php?f=33&t=83793&p=1234686#p1234686

This topic has been visited a couple of times but doesn't really go anywhere. I'd like to know if it is in the realm of possibility to make something like this? or it is too difficult and not worth it.

Would love any active developers to make contact and brainstorm with me
jfs already provided you some insights on what needs to be done, and tristeng already has some code that you can download from his github repository. It might be more fruitful to contact tristeng via github and see what the two of you can work on.

Re: "Railroad Tycoon"-style stock market and shares

Posted: 17 Aug 2020 10:46
by odisseus
I think the stock market is irrelevant to OpenTTD. In fact, most of the public servers disable share trading altogether, and the gameplay doesn't seem to lose much. Remember, this is a game about managing a transport network, not about trading stocks.

The author's concept of stock trading may or may not be sound, but it's at best marginally related to the game. In effect, it would constitute a mini-game inside OpenTTD.

Re: "Railroad Tycoon"-style stock market and shares

Posted: 17 Aug 2020 10:59
by kamnet
Nothing wrong with that, though. There's no wrong way to play the game, and if you can find a way to make it more interesting for some people, why not?

Re: "Railroad Tycoon"-style stock market and shares

Posted: 17 Aug 2020 19:55
by 2TallTyler
In Railroad Tycoon 3, enriching your character's wealth via the stock market is mostly a mini-game separate from the trains, but it does have an effect on company mergers. I could see a case for allowing multiplayer mergers with the consent of both companies (via shareholder votes in this system, or a simple yes/no dialog even without a stock market revamp) which would open up interesting competitive and cooperative gameplay options.

Re: "Railroad Tycoon"-style stock market and shares

Posted: 17 Aug 2020 21:12
by jfs
Yes, if you could safely give players a permanent identity (account login of some sort) you could have a kind of personal wealth ladder system across multiple games or multiple servers. I'm not sure that would be fair in any way, but it could be done.

I've thought about this a bit more since my last post, and it might be possible to make a sensible company valuation, that isn't easily "falsified", without completely overhauling everything. It would probably involve capturing and storing much more statistics/bookkeeping for everything though. But I'm sure many would like seeing a vehicle's year-by-year earnings for the past 15 years anyway.

Re: "Railroad Tycoon"-style stock market and shares

Posted: 30 Oct 2020 03:00
by odisseus
kamnet wrote: 17 Aug 2020 10:59 Nothing wrong with that, though. There's no wrong way to play the game, and if you can find a way to make it more interesting for some people, why not?
Because OpenTTD is a game about managing transportation systems; it cannot possibly be a game about everything.

Some players on the Reddit forum have suggested a set of industries focused on armaments. I guess these players would also like to send military units against competitors' industries and towns to gain advantage over them. This could make for a fun and challenging "mini-game", but it would require a lot of changes to the code, and some players definitely wouldn't like it. Besides, there are plenty of other options for players who want to make war.

The arguments that make such addition to the game rather unlikely can be applied to the OP's suggestion. Some people would like it, others would dislike it, but it will surely add bloat to the game and increase the burden on the core developers. OpenTTD just doesn't need to focus on something that's only remotely related to the game's core features.