New terrains?

Place to get help with not working mods / modding interface.
Sean Mirrsen
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Apr 27, 2016 6:30 pm
Contact:

New terrains?

Post by Sean Mirrsen »

I gave the matter a quick search-through, but nothing on this particular topic came up.

Is it possible to add in new terrain types via mods? For instance, if I wanted to add a "rocky plateau" terrain type that is just slightly worse than the stone pavement for movement, and has no trees on it at all. There's all kinds of things in the data files, but it seems like it'll take a lot of work to produce something that works even if it's possible, so I figured I'd ask first.
Sean Mirrsen
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Apr 27, 2016 6:30 pm
Contact:

Re: New terrains?

Post by Sean Mirrsen »

Upon further experimentation, I was able to add a new tile type (with desaturated dirt graphics in place of rock) so that it is available in the editor, but was unable to find a way to add it to world generation. Should I go to the suggestions forum with this? There doesn't seem to be a way to add new terrains.
User avatar
ArderBlackard
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Thu May 05, 2016 12:41 pm
Contact:

Re: New terrains?

Post by ArderBlackard »

You need to set proper value to the tile's prototype autoplace field. You may use one of the existing noise layers or (i guess) create some custom.

You may check out the '__base__\prototypes\tile\tiles.lua' file for examples. Pay attention that some local and external functions (like autoplace_settings or autoplace_utils.peaks) are used for it. You may also visit this Wiki page https://wiki.factorio.com/index.php?tit ... cification. It describes some details of autoplace settings (i didn't check whether it is up-to-date, but it seems to be OK).

With this approach I managed to generate quickly a map with blue grass :)
Attachments
BlueGrass.png
BlueGrass.png (572.15 KiB) Viewed 1102 times
Gib dich hin bis du Glück bist
Post Reply

Return to “Modding help”