Hi,
I'm not sure, but I remember that I read sometimes something about a current mod directory variable ?
Something to replace __MyModName__ in data.lua by __current__ ? Did I dream ? Or do we have to always specify the
name of the relative path ?
Current mod directory ?
Current mod directory ?
My mods on the Factorio Mod Portal 

Re: Current mod directory ?
"__MyModName__" *is* the mod directory path. You can use any mod name to reference the mod files.
I'm not sure what you're asking about.
I'm not sure what you're asking about.
If you want to get ahold of me I'm almost always on Discord.
Re: Current mod directory ?
You can say like
And then just use it in its place:
Code: Select all
this_mod = "__My_Long_Named_And_Inconvenient_To_Type_Mod__"
Code: Select all
icon = this_mod.."/graphics/my_great_icon.png"
Re: Current mod directory ?
OK, so there is no generic name to point to the current mod directory. You always have to type your mod's name. I thought I saw something like that in past releases... Nevermind 

My mods on the Factorio Mod Portal 

- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Current mod directory ?
Isn't there an undocumented property lurking on _G that defines the mod name?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.