Shared utility foundation for Szentigrade Factorio mods. Provides reusable prototype, recipe, technology, event, GUI, migration, queue, route, starmap, loader, icon, stack, and validation helpers with no third-party hard dependencies.
Lua libraries for use by other mods and submods that are parts of a larger mod.
Version: 0.3.10
Date: 2026-10-18
Features:
- Added item.display_name(name) to resolve item, placed-entity and equipment localisation with safe locale fallbacks.
- Honors explicit equipment localised names and ignores empty LocalisedString overrides.
- Added item_display_name_helpers and icon_layer_helpers feature flags.
- Added icon.layers_from_item(item_prototype) for defensive icon layer composition in cross-mod cargo recipes.
Bugfixes:
- Corrected the Core runtime-reported version to match the packaged 0.3.10 release.
Compatibility:
- No changes to existing Core APIs; maintains Factorio 2.1.22 compatibility.
Version: 0.3.9
Date: 2026-10-17
Features:
- Added collision_mask.materialise(target), collision_mask.add_layer(target, layer_name), collision_mask.remove_layer(target, layer_name), and collision_mask.has_layer(target, layer_name) for safe Factorio 2.1 prototype collision-mask mutation.
- Added the collision_mask_helpers feature flag.
Changes:
- Shared collision-mask helpers materialise Factorio implicit default masks through Core collision-mask-util before changing layers, preventing consuming mods from accidentally replacing required default rolling-stock, tile, or entity collision layers.
- Updated the exported Forgeworks Core version constant to 0.3.9.
Notes:
- Core still does not mutate gameplay prototypes by itself; consuming mods explicitly call the helper for prototypes they own.
- No save migration is required.
Version: 0.3.8
Date: 2026-10-17
Bugfixes:
- Added a shared Factorio 2.1 FluidBox temperature compatibility migration for mods that still write removed minimum_temperature / maximum_temperature fields.
- Migrates legacy input temperature constraints onto Generator, Boiler, Fusion Generator, Fusion Reactor, Mining Drill, Thruster, and FluidEnergySource replacement properties before removing invalid FluidBox keys.
- Normalises FluidEnergySource maximum_temperature = 0 to nil, matching the Factorio 2.1 unlimited-temperature contract.
- Clamps migrated machine input-temperature limits to the filtered fluid's default temperature so legacy minimum_temperature = 0 definitions cannot become invalid Factorio 2.1 minimum_input_temperature values.
- Added caller-scoped repair for legacy WaterTileEffectParameters textures after Factorio 2.1 split them into exact-count noise_textures and image_textures arrays.
Features:
- Added fluid.migrate_removed_fluidbox_temperatures() and the fluidbox_temperature_compat_helpers feature flag for caller-scoped final-fixes compatibility passes.
- Added tile_effect.migrate_split_water_textures() and the tile_effect_texture_compat_helpers feature flag, including donor-based wetland/lava/oil texture repair for older planet packs.
Changes:
- Raised the base dependency floor to base >= 2.1.22 because the new compatibility helpers target prototype changes introduced in Factorio 2.1.22.
- Added the factorio_2_1_22 feature flag while retaining factorio_2_1_20 as the inherited baseline capability marker.
Notes:
- Core still does not mutate gameplay prototypes by itself; consuming mods explicitly invoke the compatibility pass when their dependency set requires it.
- No save migration is required.
Version: 0.3.7
Date: 2026-10-13
Features:
- Added technology.has_unlock(name, recipe_name) and technology.replace_unlock(name, old_recipe_name, new_recipe_name) for shared unlock ownership/replacement workflows.
- Added generic Factorio 2.1 lab-input helpers that accept any existing item-like research ingredient.
- Added technology dependency, cycle-detection, cycle-safe prerequisite insertion, and cycle-safe prerequisite-list helpers for shared progression rewrites.
- Added read-only whole-technology-graph cycle discovery and validation for release checks.
- Added technology_unlock_replacement_helpers, lab_input_helpers, technology_dependency_cycle_helpers, and technology_graph_validation_helpers feature flags.
Changes:
- Removed obsolete normal/expensive recipe-difficulty branches from the caller-scoped 2.1 stack/probability normalisers.
- Updated the exported Forgeworks Core version constant to 0.3.7.
Notes:
- No gameplay prototypes are changed by Core itself.
- No save migration is required.
Version: 0.3.6
Date: 2026-10-11
Features:
- Added technology.add_unlock_if_exists(name, recipe_name) for optional compatibility paths that should no-op when either prototype is absent.
- Added technology.replace_prerequisite(name, old_name, replacements) and technology.replace_prerequisite_everywhere(old_name, replacements) for shared prerequisite rewrites without duplicated compatibility loops.
- Added technology_optional_unlock_helpers and technology_prerequisite_replacement_helpers feature flags.
Notes:
- These helpers are data-stage infrastructure only and do not change gameplay prototypes by themselves.
- No save migration is required.
Version: 0.3.5
Date: 2026-10-10
Bugfixes:
- Added a shared Factorio 2.1 product-probability normaliser for compatibility code that must migrate legacy `probability` result fields to `independent_probability`.
Features:
- Added recipe.normalise_stack_entry_types(target_or_name) for Factorio 2.1 named ingredient/product stack compatibility.
- Added recipe.normalise_product_probabilities(target_or_name).
- Added the recipe_product_probability_compat_helpers and recipe_stack_entry_type_compat_helpers feature flags.
Notes:
- The helper only touches explicitly selected recipes; it does not broadly rewrite third-party prototypes.
- No save migration is required.
Version: 0.3.4
Date: 2026-10-08
Bugfixes:
- Fixed runtime GUI frame caption validation so shared GUI helpers accept the full Factorio runtime LocalisedString value forms.
Features:
- Added assert.localised_string for shared runtime GUI/input validation.
- Added the localised_gui_caption_helpers feature flag.
Notes:
- Runtime LocalisedString validation accepts strings, numbers, booleans, nil, LocalisedString arrays, and LuaObjects; Factorio remains responsible for validating locale keys and parameters.
- No save migration is required; this release changes only shared helper/API code.
Version: 0.3.3
Date: 2026-10-05
Features:
- Added prototype.copy_field(type_name, prototype_name, field_name) for defensively inheriting optional version-sensitive Base prototype fields, replacing removed legacy global helper calls in maintained ports.
- Added Factorio 2.1 fluid visual compatibility helpers for current Base assembler pipe pictures and pipe covers; consuming mods no longer need removed assembler2pipepictures/assembler3pipepictures globals.
- Added entity.inherit_crafting_categories(target_name, source_name) for copying a machine's complete crafting-category contract without duplicating version-sensitive category lists in consuming mods.
- Added ordered first-existing prototype selection with item-like and fluid convenience wrappers for optional dependency/prototype fallbacks.
- Added existing-only technology prerequisite and science-pack filters, with prerequisite setter reuse of the shared filter.
- Added shared recipe mutation helpers for incrementing, decrementing, replacing, minimum-amount ingredients/results, raw products, proportional scaling and catalyst-return recipes.
- Added shared technology science-pack mutation helpers and prerequisite-chain preservation for compatibility migrations.
- Added shared item-subgroup reassignment and entity upgrade-link cleanup helpers.
- Added a Factorio 2.1 ore-particle constructor so maintained mods no longer duplicate legacy particle builders or hr_version compatibility code.
Changes:
- Updated the exported Forgeworks Core version constant to 0.3.3.
- Expanded remote feature flags for prototype selection, technology filtering, recipe mutation, catalyst, science-pack and ore-particle helper coverage.
Notes:
- No save migration is required; this release changes only shared helper/API code.
Version: 0.3.2
Date: 2026-09-23
Bugfixes:
- Updated the shared item fuel helper for Factorio 2.1.20 ItemPrototype.fuel_categories, replacing the removed singular fuel_category field.
- Completed shared entity lookup coverage for current 2.x rail prototypes, including half-diagonal, legacy, elevated, rail-signal, and rail-chain-signal types.
Features:
- Added plural item fuel-category helpers: set_fuel_categories, add_fuel_category, and has_fuel_category; kept set_fuel as the single-category compatibility wrapper.
- Added plural recipe-category helpers: set_categories, add_category, has_category, and set_categories_many; kept set_category as the single-category wrapper.
- Added runtime fuel helpers for reading LuaItemPrototype.fuel_categories and testing category membership without duplicating compatibility loops in consuming mods.
- Added validated Factorio 2.1.20 space-location/space-connection origin helpers and space-connection shape helpers.
- Added remote feature flags for fuel-category helpers, space origin/shape helpers, and the Factorio 2.1.20 baseline.
Changes:
- Raised the base dependency floor to base >= 2.1.20 because the new fuel categories API is not available in earlier Factorio 2.1 builds.
- Updated the exported Forgeworks Core version constant to 0.3.2.
Notes:
- No save migration is required; this release changes only shared compatibility/helper code.
Version: 0.3.1
Date: 2026-07-15
Bugfixes:
- Completed Factorio 2.1 item-like prototype discovery by including item-with-label, item-with-inventory, item-with-tags, and copy-paste-tool prototypes.
- Ensured shared item lookup and mutation helpers recognise science ingredients and other valid items regardless of their Factorio 2.1 item prototype class.
Changes:
- Updated the exported Forgeworks Core version constant to 0.3.1.
Notes:
- This is the stable release of the Forgeworks Core Factorio 2.1 compatibility update prepared in 0.3.0.
- No gameplay prototypes, balance changes, planets, resources, or runtime save-state changes were added.
Version: 0.3.0
Date: 2026-07-14
Changes:
- Updated Forgeworks Core for Factorio 2.1 experimental.
- Set factorio_version to 2.1 and raised the base dependency floor to base >= 2.1.0.
- Updated recipe workflow helpers for Factorio 2.1 RecipePrototype.categories.
- Ensured category validation checks every category assigned to a recipe.
- Removed obsolete recipe difficulty-table and singular result/result_count compatibility handling.
- Updated generated fluid-resource products to use Factorio 2.1 independent_probability.
- Expanded shared item-like prototype discovery to cover all Factorio 2.1 item prototype types, including labelled, inventory, tagged, and copy-paste items.
- Added runtime surface helpers for Factorio 2.1 LuaSurface override_pollution_type handling.
- Added feature flags for factorio_2_1_experimental and surface_pollution_override_helpers on the Forgeworks remote interface.
- Kept Forgeworks Core infrastructure-only: no gameplay prototypes, planets, resources, or Space Age feature flags enabled by Core itself.
Version: 0.2.8
Date: 2026-06-28
Features:
- Added recipe workflow helpers for batch disable/show/hide, placement, category assignment, and energy assignment.
- Added technology workflow helpers for batch prerequisites, batch unlocks, moving unlock ownership, claiming recipe unlocks, and compact science-unit setup.
- Added unlock workflow helpers that disable recipes and assign one clear technology owner.
Documentation:
- Updated the API index, usage guide, conversion guide, validated-consumers note, and release notes for the new workflow helper APIs.
Notes:
- Inspired by common overhaul-helper patterns from MIT-licensed EternalIndustry, but implemented directly in Forgeworks Core without importing EternalIndustry files or graphics.
- Forgeworks Core remains infrastructure only and defines no gameplay prototypes.
Version: 0.2.7
Date: 2026-05-31
Features:
- Added narrow rail classification helpers for consuming rail mods.
Changes:
- Exposed rail helper predicates through the top-level Forgeworks facade.
Notes:
- No gameplay prototypes or RailForge-specific behavior are added by Forgeworks Core.
Version: 0.2.6
Date: 2026-05-28
Features:
- Added runtime_autoplace helpers for safe runtime editing of surface map_gen_settings autoplace_controls.
- Added resource-control patching and a reusable enlarge_resource_patches helper based on the manual /c resource map-generation test.
- Added remote interface methods for patching/enlarging resource controls on named surfaces.
- Added /fw-enlarge-resources developer command for quick in-game validation of future resource chunk generation.
Documentation:
- Added runtime resource autoplace usage notes and a 0.2.6 release note.
Notes:
- Existing generated chunks are not rewritten or deleted. The helpers intentionally affect future chunk generation unless a consuming mod/admin explicitly handles destructive regeneration.
- Forgeworks Core remains infrastructure only and defines no ores, fluids, planets, or balance.
Version: 0.2.5
Date: 2026-05-28
Features:
- Added resource helpers for resource prototype lookup, minable item/fluid assignment, required mining fluid setup, finite/infinite resource tuning, map colour/stage/collision boxes, patch search radius, and tree-removal metadata.
- Added wrappers around Factorio base resource-autoplace for Wube-style spot resource autoplace assignment without copying the base helper into consuming mods.
- Added autoplace helpers for autoplace-control creation, Frequency/Size/Richness normalization, map_gen_settings autoplace_controls patching, entity/tile/decorative autoplace settings, and planet-specific resource enable/disable wiring.
- Added planet facade helpers for ensuring map_gen_settings, patching map_gen_settings, and enabling/disabling resources per planet.
- Exposed resource/autoplace helpers through the top-level Forgeworks Core facade and remote feature diagnostics.
Documentation:
- Updated the API index and usage guide with ore and natural-fluid placement examples.
Notes:
- This is infrastructure only: Forgeworks Core still defines no project-specific ores, fluids, planets, machines, recipes, or balance.
- Forgeworks Core remains self-contained with no third-party hard dependencies.
Version: 0.2.4
Date: 2026-05-19
Bugfixes:
- Corrected the exported Forgeworks Core remote/library version constant to 0.2.4.
Documentation:
- Added a module API index for converted mods.
- Added a conversion guide for moving project-local helpers into Forgeworks Core.
- Added a validated consumers note for the current converted mod set.
- Refreshed usage examples to use the 0.2.x dependency floor.
Notes:
- This is a stabilization/documentation release after successful load tests with IPO, Stellar Foundry, Planet Crafter: Nauvis Reborn, Biter Born, and Real Industrial Chemistry.
- No gameplay content was added.
- Forgeworks Core remains self-contained with no third-party hard dependencies.
Version: 0.2.3
Date: 2026-05-19
Features:
- Added loader helpers for deterministic manifest-based data-stage content loading.
- Added icon helpers for direct and layered icon assignment contracts.
- Expanded prototype helpers with item/fluid/recipe/technology existence checks and stack normalization helpers.
- Expanded recipe, technology, and validation helpers for whole-overhaul data-stage conversion work.
Notes:
- Introduced during the Real Industrial Chemistry / Industrial Alchemy conversion.
- Forgeworks Core remains self-contained with no third-party hard dependencies and still defines no gameplay content.
Version: 0.2.2
Date: 2026-05-19
Features:
- Added persistent queue helpers for converted runtime systems.
- Added a bundled transparent empty sprite for mods that need a dependency-owned blank render shell.
Internal:
- Added Biter Born runtime conversion baseline notes.
- Kept Forgeworks Core self-contained with no third-party hard dependencies.
Version: 0.2.1
Date: 2026-05-19
Features:
- Added fluid connection category helpers for safely adding pipe connection categories to single entities, all assembling-machine inputs, or individual fluid boxes.
- Helpers normalize nil/string/table connection_category fields and deduplicate categories instead of producing duplicate connector entries.
Notes:
- Introduced during the Plasma Industries / Plasma Crafter conversion so plasma connector compatibility can live in Core instead of local one-off loops.
- Forgeworks Core still has no third-party hard dependencies and still defines no gameplay content.
Version: 0.2.0
Date: 2026-05-19
Features:
- Added route-graph helpers for native Space Age route chains, pair pruning, keep-lists, route sanitizing, and required-route validation.
- Added starmap layout helpers for board coordinates, local cluster placement, label orientation, orbit visibility, starmap icon application, and marker creation.
- Added optional dependency helpers for safe checks/calls without adding third-party hard dependencies.
- Added prototype cleanup helpers for focused deletion/property/icon cleanup passes.
- Added space-location and space-connection facade modules for clearer require paths in consuming mods.
Notes:
- This is the first 0.2.x baseline informed by the Stellar Foundry and IPO proof conversions.
- Forgeworks Core still has no third-party hard dependencies and still defines no gameplay content.
Version: 0.1.9
Date: 2026-05-19
Bugfixes:
- Space route endpoint normalization now rejects unresolved aliases instead of returning raw candidate text as a prototype endpoint.
- Prevents consuming mods from creating invalid native space-connection prototypes that point at non-existent marker names.
- Mirrors newly-created space locations into data.raw for same-stage route builders and validators.
Notes:
- Still has no third-party hard dependencies.
Version: 0.1.8
Date: 2026-05-19
Bugfixes:
- Ensured native space-connection helpers always provide a required icon/icon_size, including marker routes whose endpoints have no icon fields.
- Added a base-game fallback icon for dependency bridge/edge routes so repaired route prototypes do not fail Factorio prototype validation.
Version: 0.1.7
Date: 2026-05-19
Bugfixes:
- Normalizes native space-connection endpoints before prototype creation so aliases, candidate tables, and copied prototype records cannot leak table values into from/to fields.
- Invalid existing route endpoints are repaired or discarded instead of being preserved into final prototype validation.
Notes:
- Still has no third-party hard dependencies.
Version: 0.1.6
Date: 2026-05-19
Bugfixes:
- Hardened space-connection creation so newly repaired routes are mirrored into data.raw immediately for same-stack final validation passes.
- Keeps native Factorio 2.0 route creation self-contained without third-party library dependencies.
Version: 0.1.5
Date: 2026-05-19
Features:
- Added native Factorio 2.0 space-location and space-connection helpers for mods that should not hard-depend on third-party starmap libraries.
- Added prototype upsert helpers for safe data-stage replacement/extension workflows.
- Added technology helpers for existence checks, clean prerequisite replacement, and space-location unlock effects.
Notes:
- Still has no third-party hard dependencies.
Version: 0.1.4
Date: 2026-05-19
Features:
- Added migration version-marker helpers for consuming mods that need explicit, namespaced save markers.
- Added safe GUI event-element helpers for click/drag handlers.
- Added runtime event handler count diagnostics for conversion QA.
Bugfixes:
- Corrected the exported core version constant to match the packaged release version.
Notes:
- This is the first polished Forgeworks Core baseline after the Stellar Foundry 2.2.8 proof conversion.
- Forgeworks Core still has no third-party hard dependencies.
Version: 0.1.3
Date: 2026-05-19
Features:
- Added safe LuaGuiElement inspection helpers for runtime GUI handlers.
- Added helpers for valid-element checks, safe element names, safe element locations, and safe child lookup.
Bugfixes:
- Prevents consuming mods from needing to read LuaGuiElement.name or LuaGuiElement.location before confirming the element is still valid.
Version: 0.1.2
Date: 2026-05-19
Bugfixes:
- Fixed runtime-stage detection for Factorio LuaBootstrap userdata.
- Fixed LuaObject/player validation so runtime objects are accepted as userdata, not only tables.
- Fixed runtime game/remote object checks used by GUI, surface, and remote helpers.
Version: 0.1.1
Date: 2026-05-19
Bugfixes:
- Fixed the packaged recipe and event helper modules so they expose their intended APIs instead of the entity helper body.
Features:
- Added a shared runtime event dispatcher that composes multiple handlers for the same Factorio event.
- Added scheduled tick task helpers compatible with the small subset of flib on-tick-n previously used by Stellar Foundry.
- Added position helpers for tile conversion, subtraction, addition, lerp, and distance calculations.
Notes:
- Still has no third-party hard dependencies.
Version: 0.1.0
Date: 2026-05-19
Features:
- Initial Forgeworks Core library release.
- Added self-contained data-stage helpers for prototypes, recipes, technologies, unlocks, items, fluids, entities, planets, and compatibility checks.
- Added runtime helpers for event dispatching, GUI element handling, namespaced storage, remote interfaces, and migration guards.
- Added validation and assertion helpers designed to fail loudly when required prototypes or runtime structures are missing.
- Added documentation for dependency wiring, require paths, conversion strategy, and library contracts.
Notes:
- Forgeworks Core has no third-party hard dependencies.
- Other libraries may be studied or optionally supported by consuming mods, but they are not required by this library.