Oil Attack!

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
ccomley
Traffic Manager
Traffic Manager
Posts: 227
Joined: 31 May 2013 16:19

Oil Attack!

Post by ccomley »

I've never seen this many oil rigs in a small space - and it's no just this space - all over my current map (which is a "default" generated map, not a loaded heightmap or anything). Never before have I seen the system resort to the station names it falls back on when you have multiple stations near the same town (halt, central, woods, etc!) for oil rigs. It's making new ones too! Even America couldn't use all this oil! :)

I'm unaware of having set a setting which might cause this. Is it a side-effect of some other apparently unrelated setting?

The only "sea" related GRF I have loaded is FISH, which has never done this before.

Other GRFs loaded which I'm playing with for the first time are PURR and AV8.
Attachments
Oil!.PNG
(205.31 KiB) Downloaded 12 times
User avatar
Chrill
Moderator
Moderator
Posts: 15980
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Re: Oil Attack!

Post by Chrill »

Is it a big map with little open water?
Image
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: Oil Attack!

Post by Sylf »

It's quite common from what I've seen. Non-industrial GRFs you've named has no effect on number of oil rigs.

What can affect it are settings like number of towns on the map, and if you allow multiple industries of same type in a town. If you keep playing the same map for much longer, you can possibly see a few more rigs in that given area.
ccomley
Traffic Manager
Traffic Manager
Posts: 227
Joined: 31 May 2013 16:19

Re: Oil Attack!

Post by ccomley »

It's 2048x 512. Previously I've played on 1024x1024. In both cases, i tend to play with water all around the edges.

Ah - "multiple industries per town" is a parameter I remember seeing, now you come to mention it. I didn't remember changing it but perhaps I did!
ccomley
Traffic Manager
Traffic Manager
Posts: 227
Joined: 31 May 2013 16:19

Re: Oil Attack!

Post by ccomley »

Looking at how other resources are spread around, I bet that that's it! I was wondering if it would let me build a second bank in a town where I can't get the "reach" of my main station to cover the bank but it didn't occur to me that it would affect "naturally occuring" recources too. Most odd...
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: Oil Attack!

Post by Eddi »

the game doesn't actually know much about what you call "naturally occuring". all cargos are more or less the same.
ccomley
Traffic Manager
Traffic Manager
Posts: 227
Joined: 31 May 2013 16:19

Re: Oil Attack!

Post by ccomley »

Eddi wrote:the game doesn't actually know much about what you call "naturally occurring". all cargos are more or less the same.
Yes but by "naturally occurring" I mean resources created at random by the game not "funded" by me.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Oil Attack!

Post by Alberth »

ccomley wrote:Yes but by "naturally occurring" I mean resources created at random by the game not "funded" by me.
If you have a floor with three marks 'X' where you can put a chair, and you try often enough, there is exactly one outcome.

People also often think that "random" means "evenly distributed". That is also a false assumption.

In other words, "random" may cause a different result than what you think.
Also, I think "random" is totally unrelated to "realistic". I don't believe that in nature, things are random. They may be at first, but there are forces in place that act like a filter, keeping only some points.
Water flows down, cats always find the most sunny high spot to sleep, and we flock together into cities. Seeing "random" as "naturally occurring" thus sounds very unrealistic to me.


In this case, the game does place oil industries randomly. It tries until sufficiently have been placed (for that map size). Thus if you make a huge map, and a small patch of water, yeah, it's going to be crowded. The same happens with farms in the arctic martian heightmap and there are more such examples. Not helping in this case is that the probability of oil rigs is a little too high, to compensate for a shortcoming of the old algorithm.

I don't know how to improve the algorithm without breaking promises made from NewGRF specs. I also looked into making NewGRFs smarter in allowing only small clusters, but iirc you could not express that in NewGRF.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Oil Attack!

Post by PikkaBird »

Alberth wrote:I don't know how to improve the algorithm without breaking promises made from NewGRF specs. I also looked into making NewGRFs smarter in allowing only small clusters, but iirc you could not express that in NewGRF.
I'm not sure what you mean by this, but you can definitely cluster industries with NewGRF. Look at FIRS, for example.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Oil Attack!

Post by Alberth »

PikkaBird wrote:
Alberth wrote:I don't know how to improve the algorithm without breaking promises made from NewGRF specs. I also looked into making NewGRFs smarter in allowing only small clusters, but iirc you could not express that in NewGRF.
I'm not sure what you mean by this, but you can definitely cluster industries with NewGRF. Look at FIRS, for example.
While writing my post I wondered about those farms too. The difference is perhaps that you want an upper limit on the number of nearby industries (for example at most 2 oil rigs nearby), which is not what FIRS seems to be doing (but maybe it does, I haven't checked the code).

This won't solve the problem of the OP of course, as he seems to be using just a base set, without NewGRFs.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Oil Attack!

Post by planetmaker »

Alberth wrote:
PikkaBird wrote:
Alberth wrote:I don't know how to improve the algorithm without breaking promises made from NewGRF specs. I also looked into making NewGRFs smarter in allowing only small clusters, but iirc you could not express that in NewGRF.
I'm not sure what you mean by this, but you can definitely cluster industries with NewGRF. Look at FIRS, for example.
While writing my post I wondered about those farms too. The difference is perhaps that you want an upper limit on the number of nearby industries (for example at most 2 oil rigs nearby), which is not what FIRS seems to be doing (but maybe it does, I haven't checked the code).

This won't solve the problem of the OP of course, as he seems to be using just a base set, without NewGRFs.
To my knowledge it works with different probabilities and on map generation the amount of clusters per industry type - depending on map size. Later, ingame the probability to build a new industry near the same type is quite a bit higher than building a new farm far from other farms.
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: Oil Attack!

Post by Eddi »

FIRS has no code to limit the size/density of a cluster, but i don't see any reason why such code couldn't exist.

at some point we discussed wether to make a "leave X tiles between industries" piece of code, but i don't remember whether that was actually done.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Oil Attack!

Post by andythenorth »

We're way off topic now, but FIRS does have a min distance enforced for some industries (in addition to the clusters). This is used to prevent a source and destination co-locating because that's silly. It's a reimplementation of builtin conflicting industries prop. It's not implemented strictly for every industry, due to...no particular reason.

Separately there is a neighbouring tile check for nearly every industry. This serves simply to enforce a gap between nearby industries so that they don't block route building. This check is not used for some large flat industries like the quarry, as it makes them too hard to construct.

Also separately, there is no upper limit to the number of industries in a cluster, because there is no concept of the cluster as a mathematical set in that sense. Rather the first few industries of a type are placed with no restriction until num. clusters is reached (based on map size), then all remaining instances of that type must be constructed within distance n of an existing instance of the type (n varies by type - farms are closer together than mines iirc). Limit could be done with a recursive search, but I suspect TMWFTLB, with possible unwanted side effects :)

Might have been better in the FIRS thread :)
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Google Adsense [Bot] and 10 guests