Page 1 of 1
I made a helicopter, but it flies under trees
Posted: Sat Feb 28, 2015 8:51 pm
by Zuzak
I made a helicopter, but it flies under trees.
I made it, it functions, but even though it is using (temporarily for now) (scaled up)construction bot art, it goes under/behind stuff like the car does. It currently looks very silly going under things like that, as I want it to be a big, fast, gashogging blimp/helicopter.
I want this helicopter entity to be drawn always on top of buildings, shadows, rocks, trees, bots, everything else.
Is there such a piece of code to do so that I have overlooked for months?
Or is it a hardcoded property of a drivable entity?
In thanks I will release it.
Re: I have a helicopter, but it flies under trees
Posted: Sun Mar 01, 2015 7:12 am
by Pickle
You have to change the
RenderLayer.
Look for "render_layer" in these file for an example.
"\data\base\prototypes\entity\demo-doodads.lua"
"\data\base\prototypes\entity\demo-entities.lua"
Re: I have a helicopter, but it flies under trees
Posted: Mon Mar 02, 2015 10:23 pm
by Zuzak
finally got internet access for a few minutes.
Thank you. I will tinker with it when I get back home.
Re: I made a helicopter, but it flies under trees
Posted: Tue Mar 03, 2015 7:21 pm
by Zuzak
The render layer specifies the order of the sprite when rendering, most of the objects have it hardcoded in the source, but some are configurable.
desired code narrowed down to
render_layer = "air-object",
final_render_layer = "air-object",
Sadly, type car seems to be one of the harcoded ones, to lower-object
(layer narrowed down via editing wall corpse final_render_layer = "remnants", multiple times)
I think it very strange that type = corpse, decorative doodads, and smoke to be the only types not hardcoded
I messed around a bit with a few other entities and seems only objects that have render layer already in their code (corpses, doodads, and smoke) seem to respond to changing it. Adding it to one without gets ignored. Possibly it might be different for more current factorio as for lack of home internet for months has left me stuck with v11.6.
Re: I made a helicopter, but it flies under trees
Posted: Thu Mar 05, 2015 2:52 am
by SHiRKiT
Zuzak wrote:The render layer specifies the order of the sprite when rendering, most of the objects have it hardcoded in the source, but some are configurable.
desired code narrowed down to
render_layer = "air-object",
final_render_layer = "air-object",
Sadly, type car seems to be one of the harcoded ones, to lower-object
(layer narrowed down via editing wall corpse final_render_layer = "remnants", multiple times)
I think it very strange that type = corpse, decorative doodads, and smoke to be the only types not hardcoded
I messed around a bit with a few other entities and seems only objects that have render layer already in their code (corpses, doodads, and smoke) seem to respond to changing it. Adding it to one without gets ignored. Possibly it might be different for more current factorio as for lack of home internet for months has left me stuck with v11.6.
Actually if requested, they can expose and change this behaviour.