Production patch v0.9 (was: Little patch that disables decre
Moderator: OpenTTD Developers
Production patch v0.9 (was: Little patch that disables decre
Hi all!
I wrote this patch because I usually left game running when I go to sleep, so I need really stable economy to avoid traffic jams.
This patch can do:
* Allow all industries to increase their production on temperate, included Oil Wheels
* Disallow all industries to increase their production
* Disallow industries that aren't serviced to increase their production
* Disallow all industries that are serviced to decrease their production
* Disallow all industries to decrease their production
* Disallow all industries to close
* Create new industries with customized production, from 8 units per month to 2048 units per month
* Create new industries with smooth or full random values
* Allow industries that can't be created to be created (Oil Wheels after 1950, Oil Rigs before 1060)
* Disallow creation of new industries
* Increased maximum production to 2048 units per month with no smooth economy (experimental)
* Language versions: English (maybe need corrections?), Spanish and Catalan.
Status:
Stopped until newindustries are released
ToDo:
* Allow decreasing industries under 32 units per month
* Disallow increasing production for industries that aren't good serviced (>60%)
* Disallow decreasing production for industries that are good serviced (>60%)
* Translate all strings to other languages
Log:
v0.9: Better catalan and spanish strings (r10995,r11005,r11039,r11050,r11072,r11088,r11094,r11118)
v0.8: Better english strings (r10995)
v0.7: Added create options (r10986)
v0.6: Added more increase options (r10982)
v0.5: Added increase/decrease options (r10982)
v0.4: Added 7 levels for initial production of new industries (r10982)
v0.2: New version with gui
Install:
To apply this patch simply do:
patch -p0 < production-0.9.patch
Old patches:
All old patches can be found at http://www.sabater.cat/download/openttd/
PD: If you translate strings of this patch, please send me these translations at jaume [at] sabater [dot] cat
Jaume Sabater
I wrote this patch because I usually left game running when I go to sleep, so I need really stable economy to avoid traffic jams.
This patch can do:
* Allow all industries to increase their production on temperate, included Oil Wheels
* Disallow all industries to increase their production
* Disallow industries that aren't serviced to increase their production
* Disallow all industries that are serviced to decrease their production
* Disallow all industries to decrease their production
* Disallow all industries to close
* Create new industries with customized production, from 8 units per month to 2048 units per month
* Create new industries with smooth or full random values
* Allow industries that can't be created to be created (Oil Wheels after 1950, Oil Rigs before 1060)
* Disallow creation of new industries
* Increased maximum production to 2048 units per month with no smooth economy (experimental)
* Language versions: English (maybe need corrections?), Spanish and Catalan.
Status:
Stopped until newindustries are released
ToDo:
* Allow decreasing industries under 32 units per month
* Disallow increasing production for industries that aren't good serviced (>60%)
* Disallow decreasing production for industries that are good serviced (>60%)
* Translate all strings to other languages
Log:
v0.9: Better catalan and spanish strings (r10995,r11005,r11039,r11050,r11072,r11088,r11094,r11118)
v0.8: Better english strings (r10995)
v0.7: Added create options (r10986)
v0.6: Added more increase options (r10982)
v0.5: Added increase/decrease options (r10982)
v0.4: Added 7 levels for initial production of new industries (r10982)
v0.2: New version with gui
Install:
To apply this patch simply do:
patch -p0 < production-0.9.patch
Old patches:
All old patches can be found at http://www.sabater.cat/download/openttd/
PD: If you translate strings of this patch, please send me these translations at jaume [at] sabater [dot] cat
Jaume Sabater
- Attachments
-
- production-v0.8.png (9.25 KiB) Viewed 4670 times
-
- production-0.9r11094.patch
- (19.06 KiB) Downloaded 149 times
-
- production-0.9r11118.patch
- (19.17 KiB) Downloaded 179 times
Last edited by Jaume on 17 Sep 2007 10:38, edited 35 times in total.
Re: Litlle patch that disables decreasing or closeure for r10967
This is an interesting patch. However, I think you should also decrease the chance or magnitude of production increases. Otherwise, the primary industries will grow too quickly, since the growth of primary industries is no longer slowed down by production decreases also occuring from time to time.
Also, you may want industries to only grow when serviced and make the growth chance proportional to the percentage transported.
NOTE: This post is outdated because Jaume has changed his first post significantly in the mean time.
Also, you may want industries to only grow when serviced and make the growth chance proportional to the percentage transported.
NOTE: This post is outdated because Jaume has changed his first post significantly in the mean time.
Last edited by Tekky on 28 Aug 2007 22:40, edited 1 time in total.
Re: Litlle patch that disables decreasing or closeure for r10967
this just makes the game more of a game, and i can see now this won't go down well with the realist
but i like the concept
welcome to the forums also
but i like the concept
welcome to the forums also

-
- Tycoon
- Posts: 11501
- Joined: 20 Sep 2004 22:45
Re: Litlle patch that disables decreasing or closeure for r10967
What would be cool if there is this extra 'cheat' where industries can't lower their production but only increase it.
Say that when the cheat is turned on all production industries will only grow their monthly production until a specific value is met. (4098 tonnes of a certain good per month for instance.)
And ofcourse welcome to the forums.
Say that when the cheat is turned on all production industries will only grow their monthly production until a specific value is met. (4098 tonnes of a certain good per month for instance.)

And ofcourse welcome to the forums.

Re: Litlle patch that disables decreasing or closeure for r10967
I wouldn't necessarily call it a cheat, especially if the patch also makes the growth rate significantly smaller.....Mr. X wrote:What would be cool if there is this extra 'cheat' where industries can't lower their production but only increase it.
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Litlle patch that disables decreasing or closeure for r10967
Only increase? I don't like it. Same for Oil Well decreasing production in temperate.
Actually, because we have discussed this matter extensively in the past, it would be nice if we could be able to set these as parameters before we start a new game. It would be especially helpfull when creating scenarios.
-
Nevertheless, welcome to the forums Jaume and thanks for your patch.
Actually, because we have discussed this matter extensively in the past, it would be nice if we could be able to set these as parameters before we start a new game. It would be especially helpfull when creating scenarios.
-
Nevertheless, welcome to the forums Jaume and thanks for your patch.

http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Litlle patch that disables decreasing or closeure for r10967
Once newindustries are implemented, everything this patch does will be achievable with a grf. 

Re: Litlle patch that disables decreasing or closeure for r10967
Instead of having primary industries only increase production, how about getting (slightly) more complex, and just making it so that well serviced industries ( > 70%, for example) don't decrease.
Secondary industries never closing is great. I like to have to 'deal with' the random placement of industries on a map, and its frustrating to see secondary industries closing from the very start of a game.
Secondary industries never closing is great. I like to have to 'deal with' the random placement of industries on a map, and its frustrating to see secondary industries closing from the very start of a game.
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Litlle patch that disables decreasing or closeure for r10967
YupPikkaBird wrote:Once newindustries are implemented, everything this patch does will be achievable with a grf.

And even if i'm still working on it, it is currently at the most boring and tedious phase of it all, the debugging...
Which means, of course that, no matter how good the intention of the author, this patch has very little chance to be included.
Nice work, by the way.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Re: Litlle patch that disables decreasing or closeure for r10967
Once newindustries are implemented, everything this patch does will be achievable with a grf.
But are incompatible? Maybe this patch can override newindustries options.
I'm working now to make initial production configurable with a selector. So, user can decide if new initial industries production are randomized, normal (tt original), smoothy randomized (actual smooth economy algoritm), minium as possible, or maximum as posible.
And for increasing/decreasing options, I working to make decreasing options for only non-serviced industries, and increasing options for all industries (doing stable economy - never increase), or increase only serviced industries...
Basicaly, I want to control all of production options.
But are incompatible? Maybe this patch can override newindustries options.
I'm working now to make initial production configurable with a selector. So, user can decide if new initial industries production are randomized, normal (tt original), smoothy randomized (actual smooth economy algoritm), minium as possible, or maximum as posible.
And for increasing/decreasing options, I working to make decreasing options for only non-serviced industries, and increasing options for all industries (doing stable economy - never increase), or increase only serviced industries...
Basicaly, I want to control all of production options.
Re: Litlle patch that disables decreasing or closeure for r10967
Don't forget to handle the recession periods.Jaume wrote:And for increasing/decreasing options, I working to make decreasing options for only non-serviced industries, and increasing options for all industries (doing stable economy - never increase), or increase only serviced industries...
Even serviced industries should decrease (at least, stop increasing) during world recessions.
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Litlle patch that disables decreasing or closeure for r10967
I would rather see a protection against newindustries. Like : if (!_loaded_newgrf_features.has_newindustries). Mainly because newindustries let the grf author deal with the production/lifeline/etc of industries. So overriding the expected behaviours is not a good way to go.Jaume wrote:But are incompatible? Maybe this patch can override newindustries options.
I really worry about that... You're doing everything that newindustries allows. Furthermore, you will need a hell of a big gui to control all aspects of industries. I'm not in favor of this patch to go in trunk. Sorry, but this is how i feel.Jaume wrote: I'm working now to make initial production configurable with a selector. So, user can decide if new initial industries production are randomized, normal (tt original), smoothy randomized (actual smooth economy algoritm), minium as possible, or maximum as posible.
And for increasing/decreasing options, I working to make decreasing options for only non-serviced industries, and increasing options for all industries (doing stable economy - never increase), or increase only serviced industries...
Basicaly, I want to control all of production options.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Re: Production patch v0.7(was: Little patch that disables decrea
Belugas wrote:
I would rather see a protection against newindustries. Like : if (!_loaded_newgrf_features.has_newindustries). Mainly because newindustries let the grf author deal with the production/lifeline/etc of industries. So overriding the expected behaviours is not a good way to go.
But all patches can be activated/deactivated... If all patches aren't active all of newindustries values stored in grf files could be active.
Belugas wrote:
I really worry about that... You're doing everything that newindustries allows. Furthermore, you will need a hell of a big gui to control all aspects of industries. I'm not in favor of this patch to go in trunk. Sorry, but this is how i feel.
But I typed this "big" gui, that isn't big...
I would rather see a protection against newindustries. Like : if (!_loaded_newgrf_features.has_newindustries). Mainly because newindustries let the grf author deal with the production/lifeline/etc of industries. So overriding the expected behaviours is not a good way to go.
But all patches can be activated/deactivated... If all patches aren't active all of newindustries values stored in grf files could be active.
Belugas wrote:
I really worry about that... You're doing everything that newindustries allows. Furthermore, you will need a hell of a big gui to control all aspects of industries. I'm not in favor of this patch to go in trunk. Sorry, but this is how i feel.
But I typed this "big" gui, that isn't big...
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Production patch v0.7(was: Little patch that disables decrea
True, but your system would have "injected" values and behaviours in industries that would not be recoverable when turned off. So this is why i say that newindustries (loaded) has to have priority over.Jaume wrote:But all patches can be activated/deactivated... If all patches aren't active all of newindustries values stored in grf files could be active.
I don't know if you realized it already, but having a gui that will change all the props of all the industry types has to be big.Jaume wrote:Belugas wrote:
I really worry about that... You're doing everything that newindustries allows. Furthermore, you will need a hell of a big gui to control all aspects of industries. I'm not in favor of this patch to go in trunk. Sorry, but this is how i feel.
But I typed this "big" gui, that isn't big...
I'm not aware of the path you will follow to allow modification of these values, but there are two ways that i see : a lot of little gui or a massive one.
And I still think that all that you offer is TOTALLY possible to be done with newindustries, therefore making this patch TOTALLY irrelevant. But agreed, this does imply that if one wants to write a grf implementing this or that or even all of the features you are proposing, he will have to LEARN NFO (and of course that i finish the feature, but this is beside the point).
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Re: Production patch v0.7(was: Little patch that disables decrea
Belugas wrote:
True, but your system would have "injected" values and behaviours in industries that would not be recoverable when turned off. So this is why i say that newindustries (loaded) has to have priority over.
I don't know how works newindustries patch, but I think that they may be compatible, this patch simply skip some verifications in ExtChangeIndustryProduction(), ChangeIndustryProduction(), DoCreateNewIndustry() and MaybeNewIndustry(), from industry_cmd.cpp. Where can I find last newindustries patch?
Belugas wrote:
I don't know if you realized it already, but having a gui that will change all the props of all the industry types has to be big.
Isn't. Only one boolean switch and four uint8 switches are needed. Its the same for 8 industries than for 1000 industries. This patch isn't industry dependent.
Belugas wrote:
And I still think that all that you offer is TOTALLY possible to be done with newindustries, therefore making this patch TOTALLY irrelevant.
Unless you don't want to use newindustries... But, if I understand it, newindustries does it from grf author. I don't want to hack grf files to do it.
PD: The GUI is very easy to use, one switch only needs 3 lines of code, great job!
True, but your system would have "injected" values and behaviours in industries that would not be recoverable when turned off. So this is why i say that newindustries (loaded) has to have priority over.
I don't know how works newindustries patch, but I think that they may be compatible, this patch simply skip some verifications in ExtChangeIndustryProduction(), ChangeIndustryProduction(), DoCreateNewIndustry() and MaybeNewIndustry(), from industry_cmd.cpp. Where can I find last newindustries patch?
Belugas wrote:
I don't know if you realized it already, but having a gui that will change all the props of all the industry types has to be big.
Isn't. Only one boolean switch and four uint8 switches are needed. Its the same for 8 industries than for 1000 industries. This patch isn't industry dependent.
Belugas wrote:
And I still think that all that you offer is TOTALLY possible to be done with newindustries, therefore making this patch TOTALLY irrelevant.
Unless you don't want to use newindustries... But, if I understand it, newindustries does it from grf author. I don't want to hack grf files to do it.
PD: The GUI is very easy to use, one switch only needs 3 lines of code, great job!
Re: Production patch v0.7(was: Little patch that disables decrea
IMHO I think this patch should be put in stand by mode until the new industries feature is finished.
After that, I think this patch could allow a lot of things and have some reasons to exists, just like the "smooth economy patch".
GRF authors can set some paramters to their industires this patch should change.
By exemple, according the real economy, most coal mines closed, and it remains only a few enormous ones. A GRF author could parameter his patch to relate this. But some players should prefer to override this parameter, and keep a lot of small coal mines.
But as most of these parameters (and certainly others) will be set up with the new industry feature, this patch should become a new industry feature patch, not a general OTTD patch. That's why I think this patch should wait until the new industries feature is finished, then alter the way it works, to avoid redondant code and inconsistant effects.
After that, I think this patch could allow a lot of things and have some reasons to exists, just like the "smooth economy patch".
GRF authors can set some paramters to their industires this patch should change.
By exemple, according the real economy, most coal mines closed, and it remains only a few enormous ones. A GRF author could parameter his patch to relate this. But some players should prefer to override this parameter, and keep a lot of small coal mines.
But as most of these parameters (and certainly others) will be set up with the new industry feature, this patch should become a new industry feature patch, not a general OTTD patch. That's why I think this patch should wait until the new industries feature is finished, then alter the way it works, to avoid redondant code and inconsistant effects.
-
- Route Supervisor
- Posts: 415
- Joined: 07 Oct 2004 10:05
Re: Production patch v0.7(was: Little patch that disables decrea
I really like this patch because it offers some useful tools to me. I think that newindustries won't make it obsolete because there are still the old industries right? Or will the whole new industries thing change the way the current industries behave? I thought it only gives you the option to add industries and those don't need to be handled by this patch since they have their own "control" 

- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Production patch v0.7(was: Little patch that disables decrea
newindustries allows you to do pretty much everything you want to do with industries, including:chrissicom wrote:I really like this patch because it offers some useful tools to me. I think that newindustries won't make it obsolete because there are still the old industries right? Or will the whole new industries thing change the way the current industries behave? I thought it only gives you the option to add industries and those don't need to be handled by this patch since they have their own "control"
Changing almost all properties of current industries
Changing almost all behaviours of current industries
Changing all graphics of current industries
Add new industries from scratch
Add new industires based on original ones
Allow to change production behaviour/pattern by means of callbacks, where decisions are based on current values
and so much more that i do not remember everything...
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Re: Production patch v0.7(was: Little patch that disables decrea
Yeah, but the only problem so far it that you need to design some GRF files in order to change these values.belugas wrote:newindustries allows you to do pretty much everything you want to do with industries, including:chrissicom wrote:I really like this patch because it offers some useful tools to me. I think that newindustries won't make it obsolete because there are still the old industries right? Or will the whole new industries thing change the way the current industries behave? I thought it only gives you the option to add industries and those don't need to be handled by this patch since they have their own "control"
[...]
Anyone can say "I want only coal mines and powerplants in my game", but only a very few can make the GRF that set up these settings.
That's why I think this patch can be usefull. But I stay on my position : it should be a new industries feature add on : at run time you can override the GRF settings, but not be implemented before or the both features might conflict.
Just consider this as the "breakdown" option : you just override the reliability GRF setting.
Re: Production patch v0.7(was: Little patch that disables decrea
No, you don't. The reliability still behaves as normal, and any GRF that wants to check the actual current reliability and provide additional punishments for low reliability (eg a lower max speed) could do so.MagicBuzz wrote:Just consider this as the "breakdown" option : you just override the reliability GRF setting.
You just override the breakdowns, which GRFs can't control in the first place.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Who is online
Users browsing this forum: No registered users and 6 guests