Industry production annoyance...
Moderator: OpenTTD Developers
Industry production annoyance...
Just looking at the code for whether an industry grows or shrinks...
Seems to be fairly straightforwards, if a bit random...
If there was more than 153 transported (in the last month?) then the industry has a chance of growing - if not then it has a chance of shrinking.
There really should be some extra code here, I feel, to say 'unless an industry is new' - I've had it many times where a sawmill has been lying idle for 50 years, I start using it, and it goes bust 2 months later.
That '153' seems like a totally arbitrary number, too - why isn't is a percentage? Or even better, why isn't it a value, so the industry actually has to make a profit, or go bust? (it would be great to have it so that you could see the money an industry has made, and help it from going bust)
function MaybeCloseIndustry in industry_cmd.c
Seems to be fairly straightforwards, if a bit random...
If there was more than 153 transported (in the last month?) then the industry has a chance of growing - if not then it has a chance of shrinking.
There really should be some extra code here, I feel, to say 'unless an industry is new' - I've had it many times where a sawmill has been lying idle for 50 years, I start using it, and it goes bust 2 months later.
That '153' seems like a totally arbitrary number, too - why isn't is a percentage? Or even better, why isn't it a value, so the industry actually has to make a profit, or go bust? (it would be great to have it so that you could see the money an industry has made, and help it from going bust)
function MaybeCloseIndustry in industry_cmd.c
The largest multiplayer games in the world - ever.
http://www.projectorgames.net
http://www.projectorgames.net
Re: Industry production annoyance...
But it _is_ a percentageDjArcas wrote:That '153' seems like a totally arbitrary number, too - why isn't is a percentage?

Code: Select all
if (type == IT_OIL_WELL && _opt.landscape == LT_NORMAL) goto decrease_production;
if ((i->pct_transported[0] > 170)&&(_economy.fluct > 0)) {
if (((i->pct_transported[0] > 230))||
((i->pct_transported[0] > 200) ^ CHANCE16I(2,3,r=Random()))||
(CHANCE16I(1,3,r=Random())))
{
/* Increase production */
I've just made something like that:
http://sourceforge.net/tracker/index.ph ... tid=636367
http://sourceforge.net/tracker/index.ph ... tid=636367
What do you think of this system? I hope it can make TTD more challenging and realistic by removing the usual 120 tons of coal, 90 tons of iron ore etc. Farms don't have their two cargo linked anymore, either.This patch tries to make industry production more realistic. First, newly generated industries have randomized starting productions (between 50% and 200% of the old starting production). Second, the productions change much smoother than the old +100% -50% system: every month, an industry has two percent chance to decrease its production by a random amount between 5% and 25%. At the same time, it has by default 2% chance to increase production by a random amount between 5% and 25%, but this chance can be increased up to 4% by transporting the products from the industry. You get news messages about changes bigger than 10%. An industry announces closure if its production
drops below one quarter of the old default production.
I haven't tested this new system for longer periods, but it seemed to work fine for a few months. I plan extending this patch later to allow saving industries from "imminent closure", and allow power plants, banks and water towers to close down.
Is the '2% to decrease' chance regardless of goods transported?
The largest multiplayer games in the world - ever.
http://www.projectorgames.net
http://www.projectorgames.net
Yes, it is. We've discussed it on #openttd yesterday: whatever causes decrease of production, it's independent of how well the workers try to do their job. For example, an insect infestation has the same chance no matter how much grain is produced there. On the other hand, if a farm is going well (much transported from there), farmers will have a motivation to try to increase production (try out new, more productive farming methods).
*nods*
Is there a cap on the maximum production rate? (or merely how much you can squeeze in a byte?)
Is there a cap on the maximum production rate? (or merely how much you can squeeze in a byte?)
The largest multiplayer games in the world - ever.
http://www.projectorgames.net
http://www.projectorgames.net
The base value for production is the amount the industry produces in one step. Since a primary industry produces cargo 8 or 9 times a month, the monthly production is 8 or 9 times this base value. 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.
*nods*
So I have max'd out industries before, ace.
It might be an idea, in the future, to look at different types of industries differently. For instance, a mine has a very finite life, although it would tend to increase rapidly during it's life, then drop off sharply as the seams are exhausted, whereas a forest is (or should be
sustainable, but not likely to increase or decrease production.
Still, there's plenty of time. I look forwards to trying the new, smoother, industry production changes.
So I have max'd out industries before, ace.
It might be an idea, in the future, to look at different types of industries differently. For instance, a mine has a very finite life, although it would tend to increase rapidly during it's life, then drop off sharply as the seams are exhausted, whereas a forest is (or should be

Still, there's plenty of time. I look forwards to trying the new, smoother, industry production changes.
The largest multiplayer games in the world - ever.
http://www.projectorgames.net
http://www.projectorgames.net
Who is online
Users browsing this forum: No registered users and 12 guests