Life Pods


For those of us who love factorio's gameplay, but wish there were more of a challenge. If you want to feel a constant pressure to work fast and efficiently, a danger that you might ultimately fail, then this mod is for you. Also adds some incentives to build multiple distant bases connected by trains.

3 years ago
0.13 - 1.1
150

g How are possible recipes determined?

7 years ago

If I made a mod that disabled a bunch of technologies, would the game handle that, or would it still consider those disabled recipes and techs viable?
How does the mod determine what is appropriate resources to demand? I looked at the code, and it is extremely obfuscated, with minimal comments.

7 years ago
(updated 7 years ago)

Sorry I just noticed this post; it seems there's nothing to inform me when people make posts. The code legibility is slightly improved now, but not a ton - sorry about that.

tl;dr - It should only use legal techs that are enabled after your mod, but I haven't tested this extensively.

The determining of what recipes are legal happens in two stages.
1. During the data-final-fixes stage of loading Factorio, it looks through all the products available to the player and assembles a new "life pod repair" recipe for turning those into life pod hearts. This is done by iterating over data.raw.recipe, which includes everything.
2. When the game starts, it looks through the technologies available to the player, and buckets them into approximate "eras". In each era (e.g. the "green science era"), it looks at all recipes unlocked by techs in that era, and deems their products viable things to ask for in that era.

So if your mod disables recipes, that should work just fine (it will not consider the disabled recipes to be valid things to ask for). EDIT TO ADD: In other words, in step 2 above, it will ignore disabled recipes. But I have only played with this mod and the base game, and haven't tested inter-mod compatibility, so there may be dragons lurking in the shadows.

New response