If I set the `correct_tiles` param = `false` when using the LuaSurface.set_tiles() method, grass tiles at water boundaries that are adjacent to the tiles I'm updating still get "corrected", wrongly.
What I expect to happen: If I set `correct_tiles` param to `false`, then I expect no tile corrections anywhere, regardless of where I place my tiles.
Specifically, the land tiles at edge of water (those that are styled as half-land, half-water) should not be changed in any way unless I specifically overwrite them (or have the `correct_tiles` param set as `true` or `nil`).
Example code, images, discussion, etc: viewtopic.php?f=25&t=34428
[0.14] set_tiles() second param borkage
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
[0.14] set_tiles() second param borkage
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: [0.14] set_tiles() second param borkage
I actually managed to reproduce the issue
though this will probably not be an easy fix unfortunately
Looking at the raw tiles, it doesn't seem to be adding or removing any tiles in the wrong places, it is just the edges that are visually affected
though this will probably not be an easy fix unfortunately
Looking at the raw tiles, it doesn't seem to be adding or removing any tiles in the wrong places, it is just the edges that are visually affected
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [0.14] set_tiles() second param borkage
A alternate (and preferable from my perspective) solution would be a new method to change the collision layers of an existing tile (as that's essentially what I'm trying to achieve with the fake water tiles in my mod). It would avoid having to redraw tiles and thus avoid the side-effects on adjacent tiles.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: [0.14] set_tiles() second param borkage
That's not tile correction. That's just the tile variation system using the best "transition" tile when 2 different tiles connect.
What you can do is make your own tile and don't give it those sprites so it can't use them. Then, it will just use the fixed images you give it regardless.
What you can do is make your own tile and don't give it those sprites so it can't use them. Then, it will just use the fixed images you give it regardless.
If you want to get ahold of me I'm almost always on Discord.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [0.14] set_tiles() second param borkage
I tried setting the following to nil:
Where `fake` is my clone (via `table.deepcopy()`) of the original prototype.
Game crashes on startup with "No such node" errors.
So then I copied the images for those properties to my mod, deleted their content (so empty image of same dimensions as originals):
Of course, this does nothing to the rest of the water in the lake, or the land surrounding the lake, so the problem persists (but possibly to a lesser extent)...
Before...

After...

Somewhat frustrating.
Code: Select all
* fake.variants.inner_corner = nil
* fake.variants.outer_corner = nil
* fake.variants.side = nil
Game crashes on startup with "No such node" errors.
So then I copied the images for those properties to my mod, deleted their content (so empty image of same dimensions as originals):
Code: Select all
fake.variants.inner_corner.picture = '__Epoch__/graphics/water-inner-corner.png'
fake.variants.outer_corner.picture = '__Epoch__/graphics/water-outer-corner.png'
fake.variants.side.picture = '__Epoch__/graphics/water-side.png'
Before...

After...

Somewhat frustrating.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: [0.14] set_tiles() second param borkage
Another alternative would be if I could somehow toggle a flag on the surrounding tiles to tell them not to ignore any calls to update while I place or remove my fake water.
If there's any other way (aside from swapping player.character) to make water walkable, that would also suffice.
If there's any other way (aside from swapping player.character) to make water walkable, that would also suffice.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.