Enable all Feature Flags


A simple mod to enable all DLC feature flags in Factorio 2.0. This mod only works if you own the DLC!

Utilities
3 days ago
2.0
1.50K
Factorio: Space Age Icon Space Age Mod
Owner:
notnotmelon
Source:
https://github.com/notnotmelon/enable...
Homepage:
https://github.com/notnotmelon/enable...
License:
MIT
Created:
a month ago
Latest Version:
1.0.2 (3 days ago)
Factorio version:
2.0
Downloaded by:
1.50K users

Enable all Feature Flags

A simple mod to enable the following feature flags in Factorio 2.0

  "quality_required": true,
  "space_travel_required": true,
  "spoiling_required": true,
  "freezing_required": true,
  "segmented_units_required": true,
  "expansion_shaders_required": true

Why?

The use-case for this mod is for another mod to add an optional dependency.
This way the dependent mod could either use DLC features, or not use DLC features based on if the player owns the DLC.


Detailed explaination

TL;DR This lets pyanodons load for players who -do not own the dlc- and -are restricted from using certain features like freezing/spoil/elevated/etc-, but if they -do own the dlc- then it enables those optional integrations (in py's case, spoil/elevated/stacking/etc) without making a separate spaceage extension mod. This mod just serves to see "does the player own the dlc" and enable/disable features based on that, because of the limitation of declaring used feature-flags in info.json restricting players who don't own the dlc from loading the mod entirely; as well as no convenient way to check "does player own dlc" at runtime plus the additional feature of having a way to play with "pretend I don't own dlc".

----- Wall of text ------
You can specify in info.json that a mod needs "space_travel_required": true or other feature flags. *footnote at the end
A mod with any feature flags set (including this one) cannot be loaded if DLC is -unowned-. It complains "user does not own feature x", because the info.json has one or more feature flags set to true.

You could set that feature flag inside your main mods info.json, but then people who don't own the DLC will not be able to load it period.
-This- mod allows one to, within their own -main- mods code, enable/disable features depending on whether -this- optional mod is loaded (like usual with any "optional" mod).
So you could add support for space age content/features in your main mod without making a separate mod and still allowing your main mod to be loaded by non-DLC-owning players.

This mod has nothing to do with a global "activation of flags to tell the game engine to load certain features".
It's about "making optional content available based on whether a player owns the DLC" (or more accurately, restricting DLC-requiring content for players that don't own it while still allowing the main mod to load by not setting flags that would prevent them playing on the main mod).

Footnote:
Currently there are 6 of them, even though realistically from what I can tell they act as an OR gate, since any of them being enabled demands you own the only DLC... this may become relevant if future dlc are released but as far as I can tell it's not necessary to include all the ones you want to use? I'm not sure if it -selectively- enables certain lua functions that are considered DLC-only (in which case it makes sense for them all/as needed) but trying to use them without declaring at least one random flag throws errors. These feature flags and their underlying executable/hardcoded code are not dependent on SpaceAge mod afaik, so you can make a freezing-using mod players can use without the SpaceAge mod active.