Path

Looking for a mod? Have a review on a mod you'd like to share?
Post Reply
doppelEben
Fast Inserter
Fast Inserter
Posts: 117
Joined: Thu Oct 27, 2016 6:21 am
Contact:

Path

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

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

Re: Path

Post by Bilka »

It's __mod-name__. So __DoppelEben__. Somewhat documented here: https://lua-api.factorio.com/latest/Libraries.html
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

doppelEben
Fast Inserter
Fast Inserter
Posts: 117
Joined: Thu Oct 27, 2016 6:21 am
Contact:

Re: Path

Post by doppelEben »

thanks for the link

Post Reply

Return to “Questions, reviews and ratings”