"Railroad Tycoon"-style stock market and shares

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
tristeng
Engineer
Engineer
Posts: 1
Joined: 10 Sep 2018 05:37

"Railroad Tycoon"-style stock market and shares

Post 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 11070 times
stock information on the company window
stock information on the company window
company.png (41.81 KiB) Viewed 11070 times
issue and buyback shares - see bottom of the window
issue and buyback shares - see bottom of the window
finances.png (28 KiB) Viewed 11070 times
User avatar
openbu.org
Engineer
Engineer
Posts: 74
Joined: 14 Nov 2014 07:40
Location: USA
Contact:

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

Post by openbu.org »

I like "Capitalism 2" -Style stock market and shares,"Capitalism Lab" -style stock market and shares.
User avatar
openbu.org
Engineer
Engineer
Posts: 74
Joined: 14 Nov 2014 07:40
Location: USA
Contact:

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

Post by openbu.org »

Candlestick chart
Attachments
Screenshots-1.jpg
(1.08 MiB) Not downloaded yet
xmart2k
Engineer
Engineer
Posts: 91
Joined: 04 May 2006 07:36
Contact:

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

Post by xmart2k »

I think is a great idea. Keep up the good work!
Lucardes
Engineer
Engineer
Posts: 9
Joined: 19 Jan 2018 12:59

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

Post 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 :)
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

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

Post 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?
Tarabaystitans
Engineer
Engineer
Posts: 5
Joined: 27 Jul 2020 21:53

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

Post by Tarabaystitans »

I think this is a fantastic idea!! where did this land?
User avatar
kamnet
Moderator
Moderator
Posts: 8579
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

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

Post 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.
Tarabaystitans
Engineer
Engineer
Posts: 5
Joined: 27 Jul 2020 21:53

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

Post by Tarabaystitans »

Shame, how hard would it be to implement these changes into a patch if i were to attempt it myself?
User avatar
jfs
Tycoon
Tycoon
Posts: 1757
Joined: 08 Jan 2003 23:09
Location: Denmark

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

Post 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.
Tarabaystitans
Engineer
Engineer
Posts: 5
Joined: 27 Jul 2020 21:53

RT3 Style Newgrf or Script

Post 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
User avatar
kamnet
Moderator
Moderator
Posts: 8579
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: RT3 Style Newgrf or Script

Post 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.
User avatar
odisseus
Director
Director
Posts: 564
Joined: 01 Nov 2017 21:19

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

Post 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.
User avatar
kamnet
Moderator
Moderator
Posts: 8579
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

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

Post 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?
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 502
Joined: 11 Aug 2019 18:15
Contact:

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

Post 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.
User avatar
jfs
Tycoon
Tycoon
Posts: 1757
Joined: 08 Jan 2003 23:09
Location: Denmark

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

Post 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.
User avatar
odisseus
Director
Director
Posts: 564
Joined: 01 Nov 2017 21:19

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

Post 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.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 22 guests