Using external LUA packages via a local luarocks tree?

Place to get help with not working mods / modding interface.
Post Reply
Denubis
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sun Jul 19, 2015 11:14 am
Contact:

Using external LUA packages via a local luarocks tree?

Post by Denubis »

Hi folks,

I'm working on my first mod to allow for an SQLite console in game. I'm running into trouble with the require statements though. Is there a mechanism by which I can load a .so/.dll included in the mod distribution via the normal require command? All of my attempts have it either expecting a pure .lua file or are not apparently looking in the right place.

I've been exploring luarocks in local tree via the instructions at: http://leafo.net/guides/customizing-the ... -tree.html and by sudo luarocks installing to system lua (which matches the reported cpath when I cause the script to print it).

Are there mechanisms for loading external libraries, or should I figure out a different way of doing this (almost certainly unwise) thing?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13341
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Using external LUA packages via a local luarocks tree?

Post by Rseding91 »

We don't support (and disable any found methods within reason) loading external libraries.
If you want to get ahold of me I'm almost always on Discord.

Denubis
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sun Jul 19, 2015 11:14 am
Contact:

Re: Using external LUA packages via a local luarocks tree?

Post by Denubis »

Very reasonable. Are there any approved methods for I/O with the system?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13341
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Using external LUA packages via a local luarocks tree?

Post by Rseding91 »

Denubis wrote:Very reasonable. Are there any approved methods for I/O with the system?
Mods can write files with game.write_file or log(...). There's no system to read files.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding help”