Shared code in mod scenario and mod main code

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
blueblue
Long Handed Inserter
Long Handed Inserter
Posts: 75
Joined: Tue Apr 11, 2017 7:39 pm
Contact:

Shared code in mod scenario and mod main code

Post by blueblue »

I have some utility code inside my mod that I would like to use in the scenarios of the mod as well as in the data.lua and control.lua of the mod itself. When I tested it, files that were in the mod's root couldn't be included in a scenario. Storing the code in a scenario would probably allow me to include the code from the scenario and from the mod's data and control but not from other scenarios in the mod.

Apparently the core mod's lualib is available to all lua instances, could similarly a directory be made available to share code between a mod and its scenarios?
unique_2 on discord and mod portal

Post Reply

Return to “Modding interface requests”