Move tile transitions from one tile to another

Place to get help with not working mods / modding interface.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Move tile transitions from one tile to another

Post by darkfrei »

I'm trying to place the tile "dirt-4" on various tiles and I get this situation:
2019-09-21T17_10_48-Window.png
2019-09-21T17_10_48-Window.png (249.93 KiB) Viewed 990 times
As you see, left furnaces have tiles with dirt 2x2 and transactions about it, bur right furnaces have transactions under the furnaces (less than 2x2).
placed patch is 2x2
placed patch is 2x2
2019-09-21T17_04_37-Window.png (47.2 KiB) Viewed 990 times
another placed patch 2x2
another placed patch 2x2
2019-09-21T17_03_52-Window.png (164.21 KiB) Viewed 990 times
How to make them looking same?
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Move tile transitions from one tile to another

Post by posila »

I am planning to write a documentation (on wiki) on how our tile rendering works, because every time we need to do something with it, it takes long time to refresh on how the hell any of it works. It got out of hand in 0.16 with addition of universal water transition and little bit insane in 0.17 with addition of out-of-map transitions.

But short answer to your question: TilePrototype::layer control which tile render transitions over which tiles. Tiles with larger layer draw transitions over tiles with smaller layer. If layers are equal, no transition is drawn.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Move tile transitions from one tile to another

Post by darkfrei »

posila wrote: Sun Sep 22, 2019 1:02 pm I am planning to write a documentation (on wiki) on how our tile rendering works, because every time we need to do something with it, it takes long time to refresh on how the hell any of it works. It got out of hand in 0.16 with addition of universal water transition and little bit insane in 0.17 with addition of out-of-map transitions.

But short answer to your question: TilePrototype::layer control which tile render transitions over which tiles. Tiles with larger layer draw transitions over tiles with smaller layer. If layers are equal, no transition is drawn.
Thanks! So I've used the

Code: Select all

data.raw.tile["dirt-4"].layer = 50
and it works properly.

Except that all changed tile transitions must be updated.
2019-09-22T21_47_16-Factorio 0.17.69.png
2019-09-22T21_47_16-Factorio 0.17.69.png (261.15 KiB) Viewed 937 times
values from vanilla
posila
Former Staff
Former Staff
Posts: 5448
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Move tile transitions from one tile to another

Post by posila »

Yep.
To force correction of tile transitions, you can set lexicographically lowest tile prototype (concrete?) an order = "z". This trick won't work after next release, but next release will start tracking tile layer changes to apply corrections on migration.
Post Reply

Return to “Modding help”