Object beneath player

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Shaderon
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Dec 13, 2019 8:27 pm
Contact:

Object beneath player

Post 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.
Pain is an universal constant.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Object beneath player

Post 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).

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Object beneath player

Post 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

User avatar
Shaderon
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Dec 13, 2019 8:27 pm
Contact:

Re: Object beneath player

Post 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!
Pain is an universal constant.

Post Reply

Return to “Modding help”