Mod accessible Render Layers

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Mod accessible Render Layers

Post by CmdrKeen »

I have a mod in progress thats stuck as WIP because I cannot assign custom render layers to the prototypes in the mod. As stands the mod looks something like this:

https://gfycat.com/NeighboringEvergreenConey

The tank in the gif is actually 2 vehicles to allow two players to control different aspects of the tank (gunner/driver type setup) and 2 other 'attached' entities' to test the interface I made.

If the render layers could be accessible in the prototype and not hard-coded it should fix my issues.
Last edited by CmdrKeen on Mon May 23, 2016 5:33 pm, edited 1 time in total.

Supercheese
Filter Inserter
Filter Inserter
Posts: 841
Joined: Mon Sep 14, 2015 7:40 am
Contact:

Re: Mod accessible Render Layers

Post by Supercheese »

Looks like a neat idea, but yeah, monstrous clipping issues.

Moonheart08
Inserter
Inserter
Posts: 27
Joined: Wed Jun 01, 2016 8:15 am
Contact:

Re: Mod accessible Render Layers

Post by Moonheart08 »

Generally, without a new class full of functions, this would be really hard. Just use the built in one

CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: Mod accessible Render Layers

Post by CmdrKeen »

Moonheart08 wrote:Generally, without a new class full of functions, this would be really hard. Just use the built in one
for decorative objects it's as simple as adding this:
render_layer = "decorative",

to the prototype definition.

for other objects, when you try and add it. it either silently fails or the game has a hard coded layer based on entity type that takes precedence on it. I imagine the hard coding is to prevent graphical errors from happening, but allowing certain layers to be set by the render_layer property would be helpful.

to try and prevent graphical errors, I imagine it'd be possible to add render layers like object-c1 ... object-c5 and set only those as acceptable entries, and set those in the layer hierarchy where appropriate.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Mod accessible Render Layers

Post by aubergine18 »

@CmdrKeen sorry for the post necro, but did you ever post the code for that mod anywhere? I was planning to do something similar in a mod but didn't realise it was possible to have that sort of effect...
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.

CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: Mod accessible Render Layers

Post by CmdrKeen »

I never did post the code for that mod. I should take a look at making availiable on my github page, the graphics are from the sony game infantry and I have questions as to whether I can use it or not...

CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: Mod accessible Render Layers

Post by CmdrKeen »

finally spent time to port from 0.12 and upload: the code for the API is here:

https://github.com/msu320/turrets_API

Post Reply

Return to “Modding interface requests”