How to make lab entity work indefinitely

Place to get help with not working mods / modding interface.
Bilka
Factorio Staff
Factorio Staff
Posts: 3305
Joined: Sat Aug 13, 2016 9:20 am
Contact:

How to make lab entity work indefinitely

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

kikker450
Inserter
Inserter
Posts: 30
Joined: Fri May 05, 2017 9:07 am
Contact:

Re: How to make lab entity work indefinitely

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

Bilka
Factorio Staff
Factorio Staff
Posts: 3305
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: How to make lab entity work indefinitely

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

kikker450
Inserter
Inserter
Posts: 30
Joined: Fri May 05, 2017 9:07 am
Contact:

Re: How to make lab entity work indefinitely

Post 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,
    }

Post Reply

Return to “Modding help”