Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No industry closure switch for smooth_economy and also default_economy #2621

Closed
DorpsGek opened this issue Feb 7, 2009 · 15 comments
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Feb 7, 2009

SirkoZ opened the ticket and wrote:

Revisions: all.

I think it's high time no_industry_closure switch under Configure patches/advanced settings should be implemented for OpenTTD.
That would mean - industry production changes normally according to smooth or "TTD" economy formulas except when it reaches
the lowest production rate (1)/level (0x4), industry then doesn't close with this switch in ON state.

I'm suggesting this because newGRF method with callbacks 28/35 is not an adequate way to do things. Using them, one would have
to simulate smooth_economy which is simple unacceptable.

Smooth_economy is the choice on great many server and single player games and as such there should be a simple way to disable
closures with this that works with this feature.

Thank you.

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2621
@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 7, 2009

SirkoZ wrote:

Of course let's not forget (which I have) to mention all the processing industries which would also not close with this switch in ON state.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5539

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 8, 2009

athanasios wrote:

When enabled, shouldn't it appear under Difficulty Levels (Easy)?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5540

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 8, 2009

Timitry wrote:

Hello!
I made such a suggestion some time ago, together with another switch to prevent the opening of new Industries: http://www.tt-forums.net/viewtopic.php?f=32&t=40068
Both of those options would help with creating great scenarios, or playing games on e.g. # openttdcoop, where planning takes time and all the industries disappear until then.
The poll in that thread shows that this suggestion would be welcomed by quite a few players!
So thumbs up for this task, and let's hope for a patch & trunk inclusion! :)
Greetings,
Tim


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5545

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 8, 2009

SirkoZ wrote:

athanasios - sure, where-ever. As long as it appears. ;-)

Thank you for your support, Tim.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5549

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 9, 2009

Belugas wrote:

Dare I express my point of view on the matter?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5558

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 9, 2009

Timitry wrote:

Something like "It is a hell lot more complicated than all of you think"? ;)


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5559

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 9, 2009

Belugas wrote:

not really... more like... NO FREAKING WAY!
If Sirkoz does not want to implement smooth economy in his grf, it's his right.

Having industries which do not close is in my mind an heresy, no matter how many users want it.
Plus, may I point out that it is something that could only affect OpenTTD WITHOUT ANY INDUSTRY GRF?
Since there are a lot of people using them, the "feature" would be unusable far too often.

And to finalize it, having industries almost dead for the rest of the game is not either a nice way of playing and would frustrate more than one player.
The game is as it is regarding the economy. It has always been. I do not see a single valid reason it would need to change. Users crying for it or not.

Sirkoz is doing the right thing trying to make it work with the help of a grf.
That he finds it too challenging is not really my concern. Nor a criteria to butcherize trunk's code.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5560

@DorpsGek
Copy link
Member Author

SirkoZ wrote:

I really didn't want it to come to this, belugas. I think (from what I have looked at the code, this switch would be at most 2 lines in industry_cmd.c and no butchering really, I can be wrong though.
Anyhow - I only wrote this request since it is according to the Forum thread on this topic under OpenTTD/Graphics not possible to achieve this behaviour for default industries without loosing smooth_economy functionality.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5565

@DorpsGek
Copy link
Member Author

SirkoZ wrote:

To elaborate on/prove my claim for only two (rather three - I keep forgetting the processing indus.) lines changed (rather than added) - this is what I would change:
industry_cmd.c rev. 15434
line 2161: if (new_prod > 1) closeit = false; ------> if ((new_prod > 1) && (patches.do_not_close_industry(bool))) closeit = false;
line 2180/2181: if ( (byte)(_cur_year - i->last_prod_year) >= 5 && Chance16(1, smooth_economy ? 180 : 2) [ADD]&& (!patches.do_not_close_industry(bool))[/ADD]) { closeit = true; }
line 2194/2195: if (i->prod_level == PRODLEVEL_MINIMUM) { closeit = true; ------> if (i->prod_level == PRODLEVEL_MINIMUM && (!patches.do_not_close_industry(bool))) { closeit = true;
Of course that (bool) remark belongs to settings.cpp...


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5566

@DorpsGek
Copy link
Member Author

SirkoZ wrote:

Sorry - there should be an "||" instead of "&&" for line 2161.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5567

@DorpsGek
Copy link
Member Author

Belugas wrote:

Let's put it in context, will you:
1-
/* Close the industry when it has the lowest possible production rate */
if (new_prod > 1) closeit = false;

If you BLOCK the setting to false, that industry which is at his LOWEST POSSIBLE RATE will languish FOREVER in this state. Nice job you did. Which I already told you more than once, by the way...

2-
if (!callback_enabled && indspec->life_type & INDUSTRYLIFE_PROCESSING) {
if ( (byte)(_cur_year - i->last_prod_year) >= 5 && Chance16(1, smooth_economy ? 180 : 2)) {
closeit = true;
}
}
In this case, it's not the production rate, but it's lifespan. SO the industries that are retiring because of age will keep on rolling.
Not as bad as previous case, but still...

3-
/* Decrease if needed */
while (div-- != 0 && !closeit) {
if (i->prod_level == PRODLEVEL_MINIMUM) {
closeit = true;
} else {
And we go again, back to point one.

You have only showed SOME parts that would be required to start the patch. You have not compensated in any ways the effects of those changes.

I am growing so tired of this debate...

And of course, grf industries MUST be protected agaisnt that behaviour, which you obviously did not care.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment5568

@DorpsGek
Copy link
Member Author

Belugas closed the ticket.

Reason for closing: Won't implement

The reasons are there.
Suit yourselves.
I'm bad? Could be. There are some stuff that need to stay as they are. For the sanity of the game.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621

@DorpsGek
Copy link
Member Author

unimatrix wrote:

So sad to see this won't be implemented.
I was going to play the huge map and eventually connect every factory and city into one gigantic railway system, but without this switch it is simply impossible to do so, because the damn industries close before you can get anywhere. Completely ruins the game for me.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment8556

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Just use the "industry's don't close" NewGRF. That will stop industries from closing without the need for (yet) another setting.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment8560

@DorpsGek
Copy link
Member Author

unimatrix wrote:

Just to be sure, is this the newGRF you are refering to: http://www.tt-forums.net/viewtopic.php?p=895736&sid=ec79a3a3d42c4cdea4029dd8a78cc684# p895736 ?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2621#comment8562

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant