Factorio directories?

Place to get help with not working mods / modding interface.
Post Reply
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Factorio directories?

Post by ficolas »

So I was thinking about a way to make different mods be in different files, and make a little program to easily modify that, and I thought about this:

The freeplay.lua will include list.lua, and list.lua will include all the different mods, and the different mods will be a function, so:
List.lua

Code: Select all

include"f-mod"
include"treefarm"
f-mod.all()
treefarm.all()
f-mod.lua

Code: Select all

function all()
--code blablabla code
end
But to do this, I got one problem, directories where factorio is installed are different in each computer, so what can I do?

Also, I know this is a planned feature, but I wanted to do this :p

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Factorio directories?

Post by MF- »

Minecraft... resp. ModLoader/FML solves that IMO nicely
Each mod is bundled with a text file that contains the metadata and dropped into /mods.

The modloader then scans the dir, parses the manifest of each mod and loads them.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Factorio directories?

Post by ficolas »

Thats what I was going to do, something similar, but my problem is that I need to know a way to see the directories of the saves, and the directory where factorio is installed.
I also was going to add some APIs to make some stuff easier.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Factorio directories?

Post by MF- »

OK.. I misunderstood your question, then.

You want the game to export it's install and save location somehow. (Until modloader gets merged into the game I guess)

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Factorio directories?

Post by kovarex »

MF- wrote:Minecraft... resp. ModLoader/FML solves that IMO nicely
Each mod is bundled with a text file that contains the metadata and dropped into /mods.

The modloader then scans the dir, parses the manifest of each mod and loads them.
Something similar is planned.
There will be something like "mod package", it will contain
  • prototype-definitions directory with new json definitions
  • lua script that runs at the start of the game that modifies the prototypes already in the game (so different mods can modify the same object, this is something I saw in Baldur's gate modding and it was working pretty well, I believe I can use lot of knowledge from BG modding to do the modding right for Factorio)
  • Custom resource files
  • control.lua that will be used in every map along with the map control.lua (so no modifications of freeplay.lua)

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Factorio directories?

Post by ficolas »

Each time a map is created, the freeplay.lua is copied as control.lua, and what about the other lua files that are in the folder? All of them get copied? even the ones I place there?

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Factorio directories?

Post by kovarex »

It doesn't work like that now (only control.lua gets copied), but from 0.3.0 it all *.lua files are copied.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Factorio directories?

Post by ficolas »

I cant wait for 0.3 D: lots of modding changes!! :D

Can you say if it will be released soon at least? ;)

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Factorio directories?

Post by slpwnd »

The unofficial release data is the end of March. We really want to get as much modding support in there as possible.

Post Reply

Return to “Modding help”