Path

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

Path

Post by doppelEben » Wed Jun 12, 2019 12:14 pm

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: 1860
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Path

Post by Bilka » Wed Jun 12, 2019 12:46 pm

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
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Thu Oct 27, 2016 6:21 am
Contact:

Re: Path

Post by doppelEben » Wed Jun 12, 2019 5:07 pm

thanks for the link

Post Reply

Return to “Questions, reviews and ratings”

Who is online

Users browsing this forum: KrazyTygr, Qon