Smooth Economy - Maximum Production Parameter

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
LeMulet
Engineer
Engineer
Posts: 2
Joined: 18 May 2020 10:58

Smooth Economy - Maximum Production Parameter

Post by LeMulet »

Hi,

I have been looking for the last few days for a way to cap the maximum production of primary industries under the smooth economy rules, because the current limit of 2295 tons/month is too high for my taste. After researching the issue, I found 2 way to achieve my goal:
1st: using normal economy rules (aka non-smooth), as the limit there is 1080 tons/month, or less for some industries like the gold mine.
2nd: using a newgfr called "Smaller Mines R0011"

My problem with the first option is that the economy is not "smooth" enough, changes are too infrequent, although it might be the one, I like most.

Option 2 is very nice on paper, however this newgfr conflicts with Opengfx+Industries0.35, resulting in duplicated industries (2 copy of the same industry per city under the "single industry copy per city"-rule). There is however no way I will pass on Opengfx+Industries, as I like to control the industry chains independently of the climate.

Now to my actual concern, under smooth economy rules, the maximum production is controlled by a cap, as explained in the openttd wiki:
With the smooth economy option enabled, production changes per month are between 3% and 23%
Industries with very low productions, (ie. 12-40 tons per month) will have higher changes.
Primary industries produce cargo 8 or 9 times a month. Monthly production is an industries 'base value' multiplied times 8 or 9. For example, the base value for a coal mine is 15 tons, so the monthly production is 120 or 135 tons. This base value is capped at 255, so the maximum possible monthly production for any industry is 2040 or 2295.
Is there any way to to change this cap value, either my modifying a game file or via a newgrf? Sadly, my programming/modding experience in this kind of situations is limited to editing .txt files, which is the reason I came here to ask for help/suggestions.

Thanks in advances and thanks for everyone who contributed to developing and polishing this wonderful game!
User avatar
jfs
Tycoon
Tycoon
Posts: 1758
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Smooth Economy - Maximum Production Parameter

Post by jfs »

When you're using OpenGFX+ Industries, that NewGRF is already replacing the default industries with new ones, that just happen to look and behave mostly the same.
You would need to modify the OpenGFX+ Industries set to change the maximum production.
LeMulet
Engineer
Engineer
Posts: 2
Joined: 18 May 2020 10:58

Re: Smooth Economy - Maximum Production Parameter

Post by LeMulet »

Thanks for your answer. As I understood, most newgrf (FIRS, ect...) indeed replace the vanilla industries with their own. It is even written as description of the smooth economy parameter, that it generally does not affect industries provided by a newgrf.

However, I think you might be mistaken regarding "Opengfx+Industries". It does not provide any new industries, but only define which "vanilla" chain gets activated (for example what a farm produces, whether copper mines will spawn, ect...). The smooth economy parameter very much seems to determine the production behavior of industries even while using "Opengfx+Industries". I can't show any code for my affirmation, however, here is what I have noticed:
  • creating a game with smooth economy, the initial production of industries varies (example: coal mines are between about 60 to 168 tons/month)
  • creating a game with normal economy, the initial production of every industry is set at an equal level (example: all coal mines start at 120 tons/month)
This behavior I observed while creating new games is the reason, I asked about modifying the maximum production either in a game file or by introducing a newgrf.


Additionally, looking at scripts today, a new idea popped into my mind: Might a game script be able to limit production of primary industries at "x" tons/month? Just like the "technology advancement" script is able to change introduction and obsolescence dates of vehicles from other newgfs.

Update: I also discovered the "JGR's Patch Pack", which allows, amongs many other changes, to increase / decrease the day length. I belived increasing the day length will effectively have the same effect, namely reducing the "production/travel time" ratio, since the train still travel at the same speed (tiles per tick). I will update the result of that idea after I checked it.
_dp_
Transport Coordinator
Transport Coordinator
Posts: 278
Joined: 18 Dec 2013 12:32

Re: Smooth Economy - Maximum Production Parameter

Post by _dp_ »

Newgrfs technically can't alter default industries. What OpenGFX+Industries and other similar newgrfs actually do is they provide a new industry set that looks and works like the default one. Thus, as you alreardy noticed, if two such newgrs are used they define two different sets of industries so they're pretty much incompatible with each other.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 15 guests