Adds a subterranean layers and special entities to transfer items, players, and power between levels..

2 years ago
0.16 - 0.17


Frequent comments and questions

Q: I just started a game/loaded a save and my game freezes/slows down! Help?

SubTerra, by its nature increases the the size of world. Depending on your settings, it will add 1 to 5 new surfaces (each surface is, in essence it's own game world) each which are kept in lock-step with each other in terms of generation. When a chunk is generated on one surface (for example 'nauvis', the default-and only-surface in vanilla Factorio) SubTerra will request that the game engine to generate the same chunk coordinates in all underground surfaces. In addition, once a chunk is generated in one of these underground layers, SubTerra will remove all entities and decoratives and replace the tiles with it's own. There is likely improvement to be done with this last part since a lot has changed with the API since I wrote that part 3 years ago.

When loaded into an existing world for the first time, SubTerra has to catch up with all the chunks already generated on the main map. The more of the map that is already generated and the greater your max-depth setting, the longer it will take to catch up. If you think about it, SubTerra is trying to do what Factorio did over many hours of play. I made the decision to do this processing up-front so as to avoid placing things on chunks that have not been generated yet.

From my testing with the max-depth set to 5 (the highest), a new world will be slow for about a minute or two and a factory that is already launching rockets but not explored much beyond its borders will take 5-10 minutes to catch up. Once caught up, you should not notice a slow-down until the factory gets very large.

Q: I want to build X underground, can you add X to SubTerra?

Except for special cases, I will not add specific entities to the allowed underground list. However, you can add them yourself!

There are 3 startup settings for Subterra: a name whitelist, type whitelist, and a name-blacklist. These are each semicolon (;) delimited lists of entity names or types. These must match the string found in the prototype definition (i.e. the non-localized name or type).

So say you want to allow all Assembling Machines, except Assembling Machine 1 and Refineries, and the "Gunship" from the Aircraft mod to be built underground. These are what you would set those settings to:
- Underground name blacklist: assembling-machine-1;oil-refinery
- Underground name whitelist: gunship
- Underground type whitelist: assembling-machine
Note the semicolon between assembling-machine-1 and oil-refinery this is how Subterra knows where one name ends an another begins.

If you don't know the non-localized name of something, you'll have to look in the data file for the game or mod. The best place to look for these is in the locale folder for the mod (the vanilla game is the 'mod' called base, found in %factorio_directory%/data/base/. In this folder there will be one or more folders, each representing a language (EN=English, DE=German, zh-TW=Taiwanese Mandarin, etc.). Search through the [entity-name] sections of the .cfg files for the name you are looking for and copy the text before the equals sign (=). This is the internally used name for that entity by Factorio.

For example in en/base.cgf there is the line logistic-chest-active-provider=Active provider chest. This means that if you wanted to add "Active Provider Chest" to the blacklist, you would put the text logistic-chest-active-provider into the Underground name blacklist setting.

For adding things to the type whitelist search in the wiki for the type-name you want.