Workaround for a fixed render layer object?

Place to get help with not working mods / modding interface.
User avatar
simonsays476
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Mar 22, 2016 4:45 pm
Contact:

Workaround for a fixed render layer object?

Post by simonsays476 »

I made an in-ground lamp with the collision_mask = { "item-layer", "object-layer", "water-tile" } so that players and vehicles don't collide with it. Unfortunately, it's giving me this graphical bug:
Capture.PNG
Capture.PNG (164.65 KiB) Viewed 2337 times
I searched around and found out it was a render layer issue but setting it to something lower doesn't do anything so I'm guessing lamps have the render_layer hardcoded. Is there an easy way around this?
User avatar
bloc97
Inserter
Inserter
Posts: 47
Joined: Sat Apr 16, 2016 4:57 am
Contact:

Re: Workaround for a fixed render layer object?

Post by bloc97 »

I think that the layers={{shift= {x,y}} changes the layer. If Y is 0, it is on the ground, and if it is positive, it should be under the ground.
Image-Vehicles, Defense, Energy & More!
Image-Keep inventory on death!
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Workaround for a fixed render layer object?

Post by Adil »

bloc97 wrote:I think that the layers={{shift= {x,y}} changes the layer. If Y is 0, it is on the ground, and if it is positive, it should be under the ground.
Nope, that's shift on west-east and north-south directions.

@op
There are such fields as render_layer and priority in drawing related parts of the prototype definitions though I know nothing about their works. You might be the first to figure out, how to use those.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: Workaround for a fixed render layer object?

Post by keyboardhack »

Add this to the prototype.

Code: Select all

render_layer = "lower-object"
You can find the different render layers here
Waste of bytes : P
User avatar
bloc97
Inserter
Inserter
Posts: 47
Joined: Sat Apr 16, 2016 4:57 am
Contact:

Re: Workaround for a fixed render layer object?

Post by bloc97 »

Adil wrote: Nope, that's shift on west-east and north-south directions. [...]
I've definitively noticed a change of layering of the sprites when I changed the shift values. When I made the Y shift less than the player, the player walks over the object. When the Y value is very high, it overshadows trees, assemblers, etc.

Edit: There's something going around inside the game engine that automatically assigns layers based on render_layer and shift...
Image-Vehicles, Defense, Energy & More!
Image-Keep inventory on death!
User avatar
Ace-Athor
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Dec 19, 2016 3:21 pm
Contact:

Re: Workaround for a fixed render layer object?

Post by Ace-Athor »

Have you found a solution? I have a similar problem for a building. viewtopic.php?f=25&t=38974
Post Reply

Return to “Modding help”