Production patch v0.9 (was: Little patch that disables decre

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Jaume
Engineer
Engineer
Posts: 67
Joined: 24 Aug 2007 15:43

Production patch v0.9 (was: Little patch that disables decre

Post by Jaume »

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
Attachments
production-v0.8.png
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.
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: Litlle patch that disables decreasing or closeure for r10967

Post by Tekky »

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.
Last edited by Tekky on 28 Aug 2007 22:40, edited 1 time in total.
Tom0004
Chairman
Chairman
Posts: 822
Joined: 01 Jul 2007 22:33
Location: Manchester, UK

Re: Litlle patch that disables decreasing or closeure for r10967

Post by Tom0004 »

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 :wink:
DeletedUser21
Tycoon
Tycoon
Posts: 11501
Joined: 20 Sep 2004 22:45

Re: Litlle patch that disables decreasing or closeure for r10967

Post by DeletedUser21 »

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. ;)
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: Litlle patch that disables decreasing or closeure for r10967

Post by Tekky »

Mr. X wrote:What would be cool if there is this extra 'cheat' where industries can't lower their production but only increase it.
I wouldn't necessarily call it a cheat, especially if the patch also makes the growth rate significantly smaller.....
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: Litlle patch that disables decreasing or closeure for r10967

Post by athanasios »

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. :D
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.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Litlle patch that disables decreasing or closeure for r10967

Post by PikkaBird »

Once newindustries are implemented, everything this patch does will be achievable with a grf. ;)
sc79
Director
Director
Posts: 586
Joined: 22 Feb 2005 09:51

Re: Litlle patch that disables decreasing or closeure for r10967

Post by sc79 »

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.
User avatar
belugas
OpenTTD Developer
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

Post by belugas »

PikkaBird wrote:Once newindustries are implemented, everything this patch does will be achievable with a grf. ;)
Yup :) I second this statement.
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
Jaume
Engineer
Engineer
Posts: 67
Joined: 24 Aug 2007 15:43

Re: Litlle patch that disables decreasing or closeure for r10967

Post by Jaume »

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.
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: Litlle patch that disables decreasing or closeure for r10967

Post by MagicBuzz »

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...
Don't forget to handle the recession periods.
Even serviced industries should decrease (at least, stop increasing) during world recessions.
User avatar
belugas
OpenTTD Developer
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

Post by belugas »

Jaume wrote:But are incompatible? Maybe this patch can override newindustries options.
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: 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.
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.
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
Jaume
Engineer
Engineer
Posts: 67
Joined: 24 Aug 2007 15:43

Re: Production patch v0.7(was: Little patch that disables decrea

Post by Jaume »

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...
User avatar
belugas
OpenTTD Developer
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

Post by belugas »

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.
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: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 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.
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
Jaume
Engineer
Engineer
Posts: 67
Joined: 24 Aug 2007 15:43

Re: Production patch v0.7(was: Little patch that disables decrea

Post by Jaume »

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!
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: Production patch v0.7(was: Little patch that disables decrea

Post by MagicBuzz »

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.
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Re: Production patch v0.7(was: Little patch that disables decrea

Post by chrissicom »

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" :)
User avatar
belugas
OpenTTD Developer
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

Post by belugas »

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" :)
newindustries allows you to do pretty much everything you want to do with industries, including:

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
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1357
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: Production patch v0.7(was: Little patch that disables decrea

Post by MagicBuzz »

belugas wrote:
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" :)
newindustries allows you to do pretty much everything you want to do with industries, including:
[...]
Yeah, but the only problem so far it that you need to design some GRF files in order to change these values.
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.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Production patch v0.7(was: Little patch that disables decrea

Post by DaleStan »

MagicBuzz wrote:Just consider this as the "breakdown" option : you just override the reliability GRF setting.
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.

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
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 6 guests