Page 1 of 1

Path

Posted: Wed Jun 12, 2019 12:14 pm
by doppelEben
Is there somewhere a list about "globals" one could use for example the path for the mods-files?

I try to define the laser-working.sound new, got this snippet from some user here in the forum:
My testmod local is named "DoppelEben" and its version is 0.0.1 - so its "DoppelEben_0.0.1"

Code: Select all

local laser = data.raw.beam["laser-beam"]
laser.working_sound = { filename = "sounds/Laser_Turret2.ogg", volume = 1.0 }
I tried "__base__", "__source__", "DoppelEben_0.0.1", "Factorio/mods/DoppelEben_0.0.1/"

I get the this error:

Failed to load mods: Loading sound "Factorio/mods/DoppelEben_0.0.1/sounds/Laser_Turret2.ogg" failed with error: Path not matching the resource path pattern: _ _ source _ _ /path

What does it mean, the path pattern?
if I use f.E. "__base__" before, I get following error:

Code: Select all

Failed to load mods: Missing sound when loading sound library _ _ base _ _/sounds/Laser_Turret2.ogg


Is there a good tutorial to get used to the most common functions, without powerreading the API-documentation without practical use?

Re: Path

Posted: Wed Jun 12, 2019 12:46 pm
by Bilka
It's __mod-name__. So __DoppelEben__. Somewhat documented here: https://lua-api.factorio.com/latest/Libraries.html

Re: Path

Posted: Wed Jun 12, 2019 5:07 pm
by doppelEben
thanks for the link