Graphing Income Help

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
Foofoo99
Engineer
Engineer
Posts: 2
Joined: 23 May 2024 15:53

Graphing Income Help

Post by Foofoo99 »

I am trying to graph the theoretical income of my vehicles, for optimization purposes. I found the formula I am trying to replicate in Desmos from the wiki page, and I am thinking the miscalculation is coming from the units I am using in the game (imperial system) being different than what the game uses to calculate income.

For example, when calculating trucks transporting coal, my variables are:
  • c=5916 (from the constants table on the wiki page)
  • a=22 (tons)
  • d=137 (manhattan distance tiles between coal mine and power plant)
  • t=36.8 (92 in-game days [e.g. Oct. 29 to Jan. 29] / 2.5 based on note from wiki)
  • result of max function = 225.2
And the result is 1914.74.
The problem is that the actual income from this route is between 3300 and 3500 (depending on breaking down, its a Balogh truck :lol:).
What needs to be adjusted to fix this error?
WhereDidTheTrainsGo?
Engineer
Engineer
Posts: 1
Joined: 14 May 2024 07:15

Re: Graphing Income Help

Post by WhereDidTheTrainsGo? »

You are correct in that the units are incorrect, weight should be given as metric tonnes in the formula (the Balogh Coal Truck's max capacity is 20 tonnes). In addition, if your currency is set to US Dollars or Euros, you need to multiply the result by 2 as the listed payment rates are in terms of British Pounds.
Factoring both in puts the calculated payment in the ballpark of your actual income, if my calculations are right.
Last edited by WhereDidTheTrainsGo? on 24 May 2024 03:25, edited 1 time in total.
Foofoo99
Engineer
Engineer
Posts: 2
Joined: 23 May 2024 15:53

Re: Graphing Income Help

Post by Foofoo99 »

Yep, this worked! Thanks so much.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 0 guests