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

OCs base assets

by OC1024 · for Factorio

Library Mod for my other mods without playable content on its own.

4.6KDownloads
27d agoLast updated
GPL-3.0License
2.1Latest game version

About OCs base assets

From Factorio Mod Portal

Library Mod for my other mods without playable content on its own.

Overview

This is my graphics and utility library mod. It does nothing on its own except preparing the recipe generator before use. Most of my mods use that generator and all other mods depend on this. It also have many helper functions for my mods, but other mod author could use them, too.


Library Mod

Many utility functions for recipes and techs e.g.

  • add_recipe_unlock(mapping) for technologies
  • remove_ingredients(mapping) for recipes

The recipe function are even compatible with probabilistic results, so you can modify things like the uranium recipe or scrap recycling, too.

It features a togglable debug logging system so you can specify what to log with a simple Boolean. It still gives hints like the function, and line of code.

The Icon helper makes adding an overlay easy as it handles all cases of existing icon or icon layers on its own.


Technical details of the Recipe Generator

For other mod authors and interested players. If you want to have an mod compatibility example, I have an example file included in the mod files.

Energy Calculation Example

This mod's recipe_generator calculates the total crafting time of a recipe by recursively expanding all intermediate products. Each recursive step contributes less to the total energy, controlled by a reduction factor. There is an option to also reduce the material costs in the same way, but by default, it is unused.

The general idea:

  • The base recipe energy is always fully counted
  • Each recursive step is multiplied by a constant factor (f)
  • Deeper crafting chains therefore contribute less

Formally:

E_{total} = E_{base} + \sum_i E_i \* f^{d_i}

Where:

  • E_{base}: crafting time of the selected recipe
  • E_i: crafting time of a sub-recipe
  • d_i: recursion depth
  • f: energy reduction factor (between 0% and 100%, a mod setting, default 80%)

Example: Piercing Rounds Magazine

The recipe chain (simplified) looks like this:

  • Piercing Rounds Magazine
  • Copper Plate
  • Steel Plate
  • Firearm Magazine
  • Iron Plate

This creates two levels of recursion.

Step 1: Base Recipe

Piercing Rounds Magazine:

  • Crafting time: <E_base> = 6s

Step 2: First Recursion Layer

Ingredients expanded:

  • 1 Steel Plate → <E_steel> = 3.2s
  • 2 Copper Plate → <E_cu> = 3.2s
  • 2 Firearm Magazine → 2 <E_firearm> = 2s

These are the crafting times from the foundry recipes of steel and copper plate. These two ingredients are fully resolved. Most are base materials. But the Firearm Magazine has to be dissected further, see next step. For each part the reduction factor (f) is applied:

  • 1 E_{steel} * f
  • 1 E_{cu} * f
  • 2 E_{firearm} * f

Here, the prefactor gives the amount of how many times this recipe is needed.

Step 3: Second Recursion Layer

Firearm Magazine expands further:

  • 8 Iron Plate → 4 <E_{iron}> = 4 * 3.2s = 12.8s

Note, we need 2 firearm magazine, therefore 8 iron plates. Per craft, we get 2 iron plates in 3.2s from the Foundry. Again, the reduction factor is applied. Since this is the second time for the iron plates from the fire arm magazine, effectively it is squared:

  • E_{iron} * f^2

Final Result

E_{total} = =<E_{base}> + f * ( <E_{steel}> + <E_{cu}> + <E_{firearm}> ) = = 6s + 0.8 * ( 3.2s + 3.2s + 2 * ( 1 + 0.8 * (2 * 3.2) ) = = 6s + ( 2.56s + 2.56s + 0.8 * 2 * 6.12s) = = 20.88s

The result is rounded to one decimal place and saved. This is how we get a crafting time of 20.8s for the "casting piercing firearm magazine" recipe on default setting. Note: the firearm magazine is also calculated with 6.1s and used therefore with the rounded value in the actual mod.


Special Cases

  • f = 0

Only the base recipe counts: E_{total} = E_{base} This allows you to completely ignore intermediate crafting complexity if desired.

  • 0 < f < 1

This is the usual behaviour; deeper recipes matter less and less. Default is even f = 80 %.

  • f = 1

E_{total} = E_{base} + E_{all intermediate steps} Full recursive expansion (no reduction). Recipe crafting time will be very long.

  • f > 1

I allow this for those who want to pay even more than the direct crafting recipe.


My other mods:

OCs Ammo and Armor -> for easy ammo production OCs Stone Casting -> for all stone-related things OCs Exoplanetary Expansion -> the "modpack" OCs Alternative Science Production -> alternative science recipes OCs Nauvis Science Port -> enables base game sciences in non-Nauvis buildings

Highlights

From source data

Game versions

Built for Factorio 2.1.

Footprint

Rated a light load on a server.

License

Published under GPL-3.0.

OCs base assets 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
0.6.4, released 2026-10-25

Recent builds

BuildReleasedGame versionsLoaders
0.6.42026-10-252.1n/a
0.6.32026-10-252.1n/a
0.6.22026-10-142.1n/a
0.6.12026-10-132.1n/a
0.6.02026-10-122.1n/a
0.5.42026-07-312.1n/a

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run OCs base assets 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”

Libraries & compatibility

Foundations and fixes other mods build on. Usually installed because something else needs it.

Runs on your server

From source side support

Factorio Mod Portal lists OCs base assets 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-26Open ↗
  • ✓AuthorOC1024, as published on Factorio Mod Portal
  • ✓LicenseGPL-3.0Free

OCs base assets, answered

Generated from the mod’s own source data.

Do my players need to install OCs base assets?

Factorio Mod Portal lists OCs base assets as required on the server. Check its Factorio Mod Portal page to see whether players need it too.

Is it free?

Yes. OCs base assets is free to download from Factorio Mod Portal. Its license is GPL-3.0.

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 OCs base assets on a Factorio server.

Deploy in about a minute from $2.99 a month, then add OCs base assets in one click.