Patch: Disable Random Closing and Opening of Industries

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

one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: Patch: Disable Random Closing and Opening of Industries

Post by one billion daleks »

Oh by the way, thanks very much for this patch wleader!

(as an aside - I notice that on r11781, the "Apply Changes" to GRFs (via the main menu) doesn't work anymore!)

Anyway, about your patch ... the random element may be fine for computer-generated scenarios, but it is a right royal pain-in-the-butt for anyone creating scenarios. In fact I'd guess a lot of people would've given up creating scenarios after their first few attempts, simply because of the tendency of the code to just trash them anyway.

So this patch is very useful, and a great relief for people like myself who have invested a lot of time in designing scenarios ... now I won't have to watch the game progressively demolish all my carefully thought-out work, and replace it with what to me was essentially junk ... another example of entropy at work in the game haha ;)

So I hope your patch (or something similar) gets added to trunk.

Thank Q!

PS: I should mention I can't actually use the patch due to this ... oh well!
Attachments
V001.jpg
V001.jpg (48.02 KiB) Viewed 4293 times
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by Korenn »

yes, I've noted the same problem with ECS farms.
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 623
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by glx »

Do you get this assert in new games or only in loaded games ?
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by belugas »

with clean trunk? with nighlies?
Do you have a way to reproduce it?
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
one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: Patch: Disable Random Closing and Opening of Industries

Post by one billion daleks »

Yes, sorry guys ... I should've provided more information.

This was a scenario created under 0.6-beta-1, loaded to play under r11781 with the patch.
It loaded fine, then I pressed 'fast-forward' as a quick way of checking whether it would run or not ... the crash happened after a few seconds.

Still, I've deleted the r11781 build now ... I figured either the beta-1 scenario was incompatible, or there was a bug in r11781.
Anyway, I've decided to stick with beta-1 as that is stable, and instead use the 'dirty fix' I mentioned in General as a workaround for this problem with industries.
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by athanasios »

Ooups. Same here. I disabled some GRFs while game was running to load ones we are making for 8bpp OpenGFX, so I thought it has to do with that. (ECS, TTRS...) It always happens when I do that in a new game. Hope this helps.

regards
athanasios
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
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by belugas »

one billion daleks wrote:This was a scenario created under 0.6-beta-1, loaded to play under r11781 with the patch.
It loaded fine, then I pressed 'fast-forward' as a quick way of checking whether it would run or not ... the crash happened after a few seconds.
Do you still have the scenario? Can you reproduce the bug at will with current nightly? If so, could you provide the EXACT steps? We need the data been generated. Please.
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
one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: Patch: Disable Random Closing and Opening of Industries

Post by one billion daleks »

Sorry belugas, I had a bit of a tantrum ;) and just deleted the build and all its subdirectories from my hard-drive after it crashed. Sorry 'bout that!

But for the time being anyway, I've decided to stick with the 'labelling' method in my scenarios, as a quick-fix workaround for this ingame industry-deleting gremlin.

Next time I run into a bug I'll remember to keep the crashlogs etc for a bit longer!
User avatar
Smaug
Transport Coordinator
Transport Coordinator
Posts: 267
Joined: 02 Dec 2002 14:39
Location: Middle Earth, The Netherlands

Re: Patch: Disable Random Closing and Opening of Industries

Post by Smaug »

Hi,

OpenTTD is realy wunderful, except for the absence of PBS - wich I can live with - and this nervewrecking disappearing of industries. This last thing makes me realy realy sad. I spend usually ours on creating a beautiful large industrial station area to find the industry in question vanished shortly after I'm finished. This disappearing thing will drive me away from OpenTTD I'm afraid. I don't want to be ungrateful. I just hope someone will implement a feature or patch ingame to control this disappearing thing. My solution for now is to change the sav in scn and backwords to put those naughty industries back in place. I know, that's realy cheating, but my interest is mostly playing in sandbox mode because I just love to watch those vehicles moving around.

Regards,
smaug
Life's like a play in a theatre,
Life's like a dream,
If life could be expressed in a sound,
It would sound like Dream Theater...
ImageImage
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by richk67 »

I regularly create "keep alive" services to the factories and especially oil refineries that I will want to connect to in the future. Just a few trucks delivering a couple of times a year is more than enough to keep the secondary industries alive. Of course, nothing keeps the primaries going - if they want to shut, they go.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Disable Random Closing and Opening of Industries

Post by Bilbo »

richk67 wrote:I regularly create "keep alive" services to the factories and especially oil refineries that I will want to connect to in the future. Just a few trucks delivering a couple of times a year is more than enough to keep the secondary industries alive. Of course, nothing keeps the primaries going - if they want to shut, they go.
Well, but it is hard to do on large maps - first you can change the plans in future and having these keepalive services costs time and money.
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by belugas »

That is why I've offered a way to allow grfs to know how big the maps are and adjust the conditions of closure.
Internal way, of course...
In callback variables, that is...
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
one billion daleks
Traffic Manager
Traffic Manager
Posts: 198
Joined: 31 Oct 2007 10:54
Location: a/c closed

Re: Patch: Disable Random Closing and Opening of Industries

Post by one billion daleks »

Smaug ... possibly the reason the game works this way is because it is primarily intended to be a 'Tycoon' game, not a transportation sim.

In other words, the sudden closure of industries reflects real-world conditions for real-world tycoons ... an earthquake in Japan might demolish a factory that you supplied, a change of government somewhere in Africa might place iron-ore mines under state control, a US cruise missile lands on a power station in Baghdad you were delivering coal to ...

Nevertheless, as you indicate - if all you want to do is simulate transport networks, these ingame 'events' can get very annoying indeed.

A couple of possible fixes ...

Before you start building the infrastructure to supply an industry, use the ingame cheat to 'Build in pause mode'. That might reduce the likelihood of an industry closing down on you, though it won't eliminate the risk entirely.

Or try using the workaround detailed in A dirty fix to stop industries being deleted ... (similar to your solution in some ways).
I've found this to be effective for getting round the problem ... if you get a message telling you an industry is closing down, just put a label on the tile, then when you're ready, re-establish the industry later in the game.
User avatar
Smaug
Transport Coordinator
Transport Coordinator
Posts: 267
Joined: 02 Dec 2002 14:39
Location: Middle Earth, The Netherlands

Re: Patch: Disable Random Closing and Opening of Industries

Post by Smaug »

@ one billion daleks: Thanks for your advice. Your trick is less work then the one I've come up with myself.

Obviously you're right about the realism of closing industries. To be honest I alway used to play TTDPatch, and with that game industries very seldom to never closed down on me (I believe their was a switch in TTDPatch). I wasn't used to this closing down of industries, so that's why I got annoyed maybe a little excessive. Nevertheless I still hope for a switch in OpenTTD, because I found that I like OpenTTD as it is now just a little bit more then TTDPatch... 8)

Kind regards,
Smaug
Life's like a play in a theatre,
Life's like a dream,
If life could be expressed in a sound,
It would sound like Dream Theater...
ImageImage
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Disable Random Closing and Opening of Industries

Post by Bilbo »

I think that in openttd 0.5.x industries closed much less or not at all due to some bug ... but now once that bug is fixed, industries close like crazy ... and many people don't like it :)
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by Korenn »

belugas wrote:That is why I've offered a way to allow grfs to know how big the maps are and adjust the conditions of closure.
Internal way, of course...
In callback variables, that is...
I don't understand why you want to force people to use a .grf to stop industries closing? Feels a bit hackish to me.

I think a much more elegant elegant solution would be a cheat option 'freeze economy' that stops new industries from appearing and old ones from closing. (in fact, it would logically stop economy changes all together)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Disable Random Closing and Opening of Industries

Post by Bilbo »

Korenn wrote:I think a much more elegant elegant solution would be a cheat option 'freeze economy' that stops new industries from appearing and old ones from closing. (in fact, it would logically stop economy changes all together)
Why a cheat? For some scenarios where the industries are supposed to stay as they were build by the scenario creator (especially scenarios created for some kind of competition), this would be a very useful option, not a cheat.
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by belugas »

Korenn wrote:I don't understand why you want to force people to use a .grf to stop industries closing? Feels a bit hackish to me.
One of the reasons is that newindustries offers ways to control the industries the way the users want them to be. Without needs of recompilation, patch setting (one more new option addition.. beurk) or anything. Plus, the user who decide to customize his scenario can see the results right away. And can distribute that behaviour too.
A Hack? no. A use of the system.
Korenn wrote:I think a much more elegant elegant solution would be a cheat option 'freeze economy' that stops new industries from appearing and old ones from closing. (in fact, it would logically stop economy changes all together)
I personally think that a cheat is much more of a hack than a grf.

One thing for sure, if ever code is implemented in order to block creation/removal of industries at user's will, I will be totally against applying that behaviour on grf industries.
That would be going against what he decided to implement. Georges is making changes right now to his ECS implementation in order to please a bit more the users. So, i think it can be done by other means than coding.

There has been countless complains about the lack of realism in the game. It is very strange that one behaviour which is indeed realistic is been turned down as a big annoyance. Looks to me like realism is welcomed, as long as it does not stop users. I've played a few games with Pikka's industries this weekend. The resources depletion feature was a good challenge that i really enjoyed. I had to design a network that could easily adapt to the closures of coal mines and prepare stations in advance. Now, that is what i call realism. And I enjoyed it a whole lot.

Unless, of course, all you want to do with a game is lay down a network and see the trains doing all the work for you, with very few interventions. I don't know. I'm not in that kind of gaming. Or maybe it is not what we are discussing here?

[Edit] TTDPatch users had newindustries long before us. I do not recall as much shields raising as there have been in OTTD since we've implemented them. Does it mean the users have different gaming views/phylosophy?[/Edit]
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
CARST
Traffic Manager
Traffic Manager
Posts: 142
Joined: 06 Jun 2004 23:18
Location: Berlin, Germany
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by CARST »

Beside daleks post at the top of page 2 here, is this patch stable? Sounds very interesting...
Playing TT & TTD since 1995 - Will satisfy the Megalomaniac in everyone!

Click here to see all my maps!
Highlights:
CarstsEuropeScenario based on SRTM-Data (Redo planned)
CarstsWorldScenario based on satellite heightmap
CarstsGermanyScenario coming soon...
CarstsBerlinBburgScenario planned...
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Patch: Disable Random Closing and Opening of Industries

Post by DaleStan »

belugas wrote:TTDPatch users had newindustries long before us. I do not recall as much shields raising as there have been in OTTD since we've implemented them. Does it mean the users have different gaming views/phylosophy?
I trust that was rhetorical.

We just can't pack two thousand trains onto a 256x256 map. I think even Rob only has ~800. So we have to get our jollies out of thinking about how to adapt, instead of by complaining that the industries do things that cramp our style.

If Open were to adjust things so that industries didn't close, I would be very much in favour of George arranging his industries to stop accepting cargo when they were supposed to close. And, just in case that setting gets violated (which would require far more programming-around than a mere do-not-close-industry setting) refuse to produce, regardless of how much cargo they receive.
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: Ahrefs [Bot], Amazon [Bot] and 6 guests