Page 2 of 7

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 09 Jan 2008 11:12
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!

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 09 Jan 2008 12:12
by Korenn
yes, I've noted the same problem with ECS farms.

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 11 Jan 2008 02:00
by glx
Do you get this assert in new games or only in loaded games ?

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 11 Jan 2008 02:56
by belugas
with clean trunk? with nighlies?
Do you have a way to reproduce it?

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 11 Jan 2008 03:55
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.

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 12 Jan 2008 00:23
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

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 12 Jan 2008 02:55
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.

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 12 Jan 2008 04:35
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!

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 14 Jan 2008 12:41
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

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 14 Jan 2008 13:58
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.

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 14 Jan 2008 15:59
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.

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 14 Jan 2008 18:49
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...

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 15 Jan 2008 02:03
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.

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 15 Jan 2008 13:36
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

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 16 Jan 2008 11:27
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 :)

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 17 Jan 2008 11:28
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)

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 17 Jan 2008 13:12
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.

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 17 Jan 2008 14:45
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]

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 17 Jan 2008 16:21
by CARST
Beside daleks post at the top of page 2 here, is this patch stable? Sounds very interesting...

Re: Patch: Disable Random Closing and Opening of Industries

Posted: 17 Jan 2008 22:05
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.