Page 1 of 1

How to make lab entity work indefinitely

Posted: Fri May 05, 2017 9:50 am
by Bilka
I'm using a lab type entity in my mod. I'd like it to have an idle sound, however this

Code: Select all

idle_sound =
		{
			filename = "__Portals__/sounds/portal_ambient_loop1.ogg",
			volume = 0.4
		},
and this

Code: Select all

working_sound =
		{
			sound =
			{
				filename = "__Portals__/sounds/portal_ambient_loop1.ogg",
				volume = 0.4
			},
			idle_sound =
			{
				filename = "__Portals__/sounds/portal_ambient_loop1.ogg",
				volume = 0.4
			},
		},
does not work. The base lab uses working_sound so I'm looking for something I can insert in it that does not show up in alt view and is never consumed but the lab still works. This has to work without the lab being connected to power.

Re: How to make lab entity work indefinitely

Posted: Fri May 05, 2017 10:46 am
by kikker450
Two things,
First it seems that entities check whether their power demand is met before doing anything so working without power doesn't seem to be possible.
Second working_sound is a value of the entity that factorio requests to play off some sound while working.

To change these things you would need to change the way factorio executes entities. I'm not sure if it's possible or how to do it if it's possible.

Re: How to make lab entity work indefinitely

Posted: Fri May 05, 2017 11:33 am
by Bilka
So the lab won't work... Are there any entities that can can have an idle_sound? I think I could try belts, but I'm wondering if there is maybe something better for that.

Re: How to make lab entity work indefinitely

Posted: Sat May 06, 2017 10:56 am
by kikker450
A invisible, collision free speaker entity with a power requirement of 0 perhaps? I'm guessing here.


EDIT:
i was wrong, i stumbled across an example of idle sound for assembling-machine-1
still needs to be powered though.

Code: Select all

{
      sound = {
        {
          filename = "__base__/sound/assembling-machine-t1-1.ogg",
          volume = 0.8
        },
        {
          filename = "__base__/sound/assembling-machine-t1-2.ogg",
          volume = 0.8
        },
      },
      idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 },
      apparent_volume = 1.5,
    }