Page 1 of 1

[1.1.37] oil field shows as three disjoint oil fields on hover

Posted: Sat Aug 14, 2021 9:53 pm
by _hash
three_oil_fields.png
three_oil_fields.png (15.65 KiB) Viewed 2037 times
To reproduce:
1. Load the attached savefile.
2. Open the map view.
3. Hover over the north-east-east oil field.

Re: [1.1.37] oil field shows as three disjoint oil fields on hover

Posted: Sun Aug 15, 2021 12:18 am
by Rseding91
Thanks for the report however this isn't a bug. There is a minimum distance from one oil field to the next in order for them to be counted as a "field". These are simply too far apart.

Re: [1.1.37] oil field shows as three disjoint oil fields on hover

Posted: Sun Aug 15, 2021 6:35 am
by SoShootMe
Rseding91 wrote: Sun Aug 15, 2021 12:18 am There is a minimum distance from one oil field to the next in order for them to be counted as a "field". These are simply too far apart.
You presumably mean maximum, but this is demonstrably false considering the three in a roughly diagonal line at the south west.

The cause appears related to chunk boundaries. It seems two oil fields in diagonally-connected chunks always appear as separate, unless there is a field close enough in the chunk adjacent to both to "link" them together.

Re: [1.1.37] oil field shows as three disjoint oil fields on hover

Posted: Sun Aug 15, 2021 10:21 am
by _hash
Rseding91 wrote: Sun Aug 15, 2021 12:18 am There is a minimum distance from one oil field to the next in order for them to be counted as a "field". These are simply too far apart.
It doesn't look like this. The distances within the fields appears to be larger than the cross-field distance.
three_oil_fields_with_distances.png
three_oil_fields_with_distances.png (15.36 KiB) Viewed 1959 times

Re: [1.1.37] oil field shows as three disjoint oil fields on hover

Posted: Sun Aug 15, 2021 7:58 pm
by Kyralessa
I loaded up the save and drove over to look. The chunk boundaries don't entirely explain what's happening.

The two oil fields in the southwest are in one chunk. The two in the west are in another chunk. The bulk of the rest of the oil fields are in yet another chunk. Yet of that large set of oil fields, there's at least one oil field that's in a different chunk, yet is still considered part of the same oil field.

Re: [1.1.37] oil field shows as three disjoint oil fields on hover

Posted: Sun Aug 15, 2021 10:03 pm
by SoShootMe
Kyralessa wrote: Sun Aug 15, 2021 7:58 pm The chunk boundaries don't entirely explain what's happening.
After a bit more playing around I think the extent of a field is based on searching the four adjacent, but not diagonal, groups of 16x16 tiles (dividing each chunk into four). Marking the 16x16 groups from _hash's map that contain oil wells shows the "three" fields (I removed cliffs and trees for clarity):
oil.PNG
oil.PNG (363.51 KiB) Viewed 1880 times