Factorio, modifying and creating custom levels

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
User avatar
Zirr
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Feb 09, 2013 8:58 pm
Contact:

Factorio, modifying and creating custom levels

Post by Zirr »

Hello everyone :D
I would like to start out with saying that you should have some basic knowledge of lua, otherwise this will not make any sense to you.
I recently acquired Factorio, because I loved how it looked. I love mods, so naturally I had a look at the levels. Apparently, it is really easy to modify since it is all written in lua. For example, I made Level 03 spawn no creeps at all. This basically made it like free play, with no danger at all.

Basically, for each level there's a couple of files. First, there's blueprint.dat which I assume is the "blueprint", as in terrain, ore veins, creep spawners etc. I couldn't open it, since it's a .dat file and I do not know the format. It would be awesome to be given access to edit level and perhaps make new ones. I know I would have a lot of fun with it.
Then there's control.lua which basically, as far as I can see, defines the 'rules' of that specific level. For example, it includes what you start with, if you can research or not, what recipes you know from the start and also which recipes you learn from certain events, which is also defined in control.lua. It's called storytable and checks for certain events, and then makes you learn new recipes and writes a message ingame. I managed to make level 03 not spawn any creeps, have the character know the sentry tower recipe known from the start and start with metal armor too.

I really love how you guys did all this. It makes modding and hopefully creating custom levels soon, very easy.
Thank you for putting your money and time into making this awesome game, and I really hope you reach the funding.

I have also created a subreddit, to hopefully get some more attention. http://www.reddit.com/r/factorio/
For the header, I used the picture from your main website, which I hope you won't mind, otherwise I'll be happy to remove it.

zlosynus
Global Moderator
Global Moderator
Posts: 114
Joined: Sat Feb 09, 2013 2:17 am
Contact:

Re: Factorio, modifying and creating custom levels

Post by zlosynus »

Hi!

There is an in-game editor in the current alpha version, so if you have funded the Indiegogo campaign http://www.indiegogo.com/projects/factorio/x/2303968, you can just write the creators and they will send you access to the alpha version. It would be awesome if you could create some interesting levels and the scripting possibilities should be huge.

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

Re: Factorio, modifying and creating custom levels

Post by kovarex »

Hi, thank you for the effort you made :)

The blueprint is the map indeed, and it can be opened in map editor (if you don't have it , just msg me to get the alpha version, it contains map editor).
The lua controls the logic of the game, and we plan to make some documentation of the lua interface.
You are free to play with it, but we can't guarantee that we won't change the interface in the near future (in that case any custom scenarios would have to be altered as well).
There are lots of ways in which we would like to extend the current lua interface (alter recipes, add items/recipes, add custom entities, research basically all the data during the game)

Btw, in the data/prototype-definitions all (almost) of the specification of the game data is defined.
Adding new recipe/item/entity/tile etc. is as simple as adding new entry in the corresponding json file and restarting the game.
We made this while keeping in mind the mod support.

derrickspartan1
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Feb 22, 2013 2:29 am
Contact:

Re: Factorio, modifying and creating custom levels

Post by derrickspartan1 »

By any chance may i get a look at this? I am farely new to lua coding and only have had experience with it through minecraft's computercraft mod. I am on the other hand really interested in learning alot about lua so if you wouldn't mind helping out? That would be great! Thanks.

Post Reply

Return to “Modding discussion”