SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checkedGameplay & overhauls

Module category defaults

by thremtopod · for Factorio

Makes vanilla module categories the default allowed_module_categories for entity prototypes.

31KDownloads
4 mo agoLast updated
MITLicense
2.1Latest game version

About Module category defaults

From Factorio Mod Portal

Makes vanilla module categories the default allowed_module_categories for entity prototypes.

foundrygg.com Discord Downloads) GitLab Bugs GitLab Critical Gitlab Pipeline Status

Module Category Defaults

This library mod sets the vanilla module categories as allowed_module_categories for all applicable entity prototypes that do not have that field already set by another mod. This allows blacklisting special modules when a mod needs to define its own rules for including them.

In effect, this mod inverts the engine's behavior for modded module categories: instead of being allowed for all entities by default, all modded module categories will be _disallowed for all entities by default_. Modded module categories can be added to this mod's list of default categories, which will cause them to be treated as if they were vanilla categories (i.e. enabled by default). The same can also be done for recipes; this is not done automatically, but only if another mod requires it.

Mod Support

In the data stage, the global table ModuleCategoryDefaults is made available. Most importantly, it contains a table default_categories that will be used to apply the defaults. Add or remove values to change the outcome of this mod. You probably want to add your custom category that you want to be available to all regular machines. ModuleCategoryDefaults also has a few additional tables and functions, which are explained in the examples.

This mod makes all its changes in data-final-fixes. Default categories should be added in your mod's data or data-updates. Any logic that depends on allowed_module_categories being set should be in your mod's data-final-fixes, and may require an additional step for compatibility safety (explained in the examples).

Example: My mod adds a module category for all buildings to use.

  1. Add module-category-defaults as a dependency to your mod.
  2. Add your module category to the defaults table: table.insert(ModuleCategoryDefaults.default_categories, 'my-module-category').

Done. The module(s) will be available the same as without this mod. This must be done in either data or data-updates.

Example: My mod adds a special module for a special building.

  1. Add module-category-defaults as a dependency to your mod.
  2. Add your special module category to the allowed_module_categories table for each of the special buildings, as you would normally do.

Done. No other buildings will be able to use the module. You do not need to touch ModuleCategoryDefaults or the allowed_module_categories table of any other entity prototypes. This must be done in either data or data-updates.

Example: My mod adds a special module that should be used in _no_ buildings.

  1. Add module-category-defaults as a dependency to your mod.
  2. Add your module category to the restricted categories table: table.insert(ModuleCategoryDefaults.restricted_categories, 'my-module-category').

Done. No buildings will be able to use the module. This must be done in either data or data-updates.

Read the full description on Factorio Mod Portal →

Highlights

From source data

Game versions

Built for Factorio 2.1.

Footprint

Rated a light load on a server.

License

Published under MIT.

Module category defaults on Nxeon

From our catalogue
One-click install
Supported on Nxeon Factorio servers. We download it from Factorio Mod Portal, place it, and restart the server.
Server side
Required on the server
Server load
light
Smallest plan we suggest
Factorio — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
2.2.0, released 2026-08-03

Run Module category defaults on a Factorio server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Factorio Mod Portal as “Mods”

Gameplay & overhauls

New mechanics, content and overhauls that change how the game plays.

Runs on your server

From source side support

Factorio Mod Portal lists Module category defaults as required on the server. Check its Factorio Mod Portal page to see whether players need it too.

Compatibility

Game
Factorio
Runs on
Serverrequired on the server
Game versions
2.1

Verified at the source

  • ✓Factorio Mod PortalOfficial listing, checked 2026-10-08Open ↗
  • ✓Authorthremtopod, as published on Factorio Mod Portal
  • ✓LicenseMITFree

Module category defaults, answered

Generated from the mod’s own source data.

Do my players need to install Module category defaults?

Factorio Mod Portal lists Module category defaults as required on the server. Check its Factorio Mod Portal page to see whether players need it too.

Is it free?

Yes. Module category defaults is free to download from Factorio Mod Portal. Its license is MIT.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run Module category defaults on a Factorio server.

Deploy in about a minute from $2.99 a month, then add Module category defaults in one click.