Page 1 of 1

Object beneath player

Posted: Wed Dec 15, 2021 7:17 pm
by Shaderon
Ok so.. like in topic. I wanna create an object which is a "assembling-machine". I read that this type of object Inherit functions from Prototype/EntityWithHealth. In this prototype we can find "integration_patch_render_layer". So as I assume it determine on which layer object will be .. drawn?

Anyway, when I tried to use this function on my object which is assembling-machine, and then.. nothing happens. Command lines looks like (for example):

Code: Select all

 {
    type = "assembling-machine",
    name = "example_object",
    icon = "icon.png",
    icon_size = 64, icon_mipmaps = 4,
    flags = {"placeable-neutral", "placeable-player", "player-creation"},
    minable = {mining_time = 0.5, result = "example_object"},
    max_health = 300,
    corpse = "object-remnants",
    dying_explosion = "object-explosion",
    working_sound =
    {
      sound =
      {
        {
          filename = "__base__/sound/object.ogg",
          volume = 0.46
        }
      },
      max_sounds_per_type = 4,
      audible_distance_modifier = 0.37,
      fade_in_ticks = 4,
      fade_out_ticks = 20
    },
    resistances =
    {
      {
        type = "fire",
        percent = 100
      }
    },
    collision_box = {{-2, -2}, {2, 2}},
    selection_box = {{-2, -2}, {2, 2}},
    crafting_speed = 1,
    source_inventory_size = 0,
	energy_source =
    {
      type = "void",
    },
    
    --I tried use this command here:
    -----------------------------------------------------------
    integration_patch_render_layer = "transport-belt",
    -----------------------------------------------------------
    
    and_all_that_animation_section = {
    
    --or here
    -----------------------------------------------------------
    integration_patch_render_layer = "transport-belt",
    -----------------------------------------------------------
    }
    
}
Of course no results..
So.. am I understand something wrong with inherit this function, or maybe it work different than I expect? Or am I stupid..?? :roll:
Anyway, I hope someone understand it better than me and explain where am I doing bad.

Re: Object beneath player

Posted: Wed Dec 15, 2021 11:48 pm
by DaveMcW
That property only modifies the integration patch. I suppose if you really need a custom layer, you can stick all the assembling machine graphics there (but you lose animations).

Re: Object beneath player

Posted: Thu Dec 16, 2021 8:45 am
by Klonan
Shaderon wrote: Wed Dec 15, 2021 7:17 pm Anyway, I hope someone understand it better than me and explain where am I doing bad.
Assembling machines have the working visualisation, which lets you set specific render layers and things:
https://wiki.factorio.com/Types/WorkingVisualisation

Re: Object beneath player

Posted: Fri Dec 24, 2021 11:34 am
by Shaderon
Thanks guys, this solves one of my biggest problems. If someone wants to do the same with idle graphics, he/she should use "integration_path" formula instead of "animation". Then the graphic will be set below the player's character and his shadow.

"integration_path" also work with "make_4way_animation_from_spritesheet", so we can put all direction of object in one picture.

Thats all from me. Thanks again and topic can be closed.

Regards!