A set of commonly-used utilities by QuingKhaos for creating Factorio mods.
Lua libraries for use by other mods and submods that are parts of a larger mod.
Version: 2.0.0
Date: 2026-07-18
Changes:
- Cleanup deprecated require paths.
Compatibility:
- Update for Factorio 2.1.
Version: 1.17.2
Date: 2026-07-18
Bugfixes:
- Fix crash in settings module, if the settings type didn't exist previously.
- Correct type hint for color setting.
Version: 1.17.1
Date: 2026-07-16
Bugfixes:
- Fix crash in copy() function of the entity module when called with only two arguments.
Version: 1.17.0
Date: 2026-07-15
Features:
- Add possibility to resolve child types of item module.
Version: 1.16.0
Date: 2026-07-15
Features:
- Add tile module.
Version: 1.15.1
Date: 2026-07-13
Bugfixes:
- Fix crash in force_default() function of the setting module.
Version: 1.15.0
Date: 2026-07-12
Features:
- Add capsule handling.
Version: 1.14.0
Date: 2026-07-12
Features:
- Add item group handling.
- Add item subgroup handling.
- Add tool handling.
Version: 1.13.0
Date: 2026-07-12
Features:
- Add minable result handling to entity module.
Version: 1.12.0
Date: 2026-07-11
Features:
- Add surface condition handling to entity and recipe modules.
Version: 1.11.0
Date: 2026-07-11
Features:
- Add setting module with manipulation methods for working with Factorio mod settings.
- Convert remove() functions of item, recipe, and technology modules to static functions for direct access without needing to create an instance.
Version: 1.10.0
Date: 2026-07-11
Bugfixes:
- Make stack_size typehint optional in set() function of item module.
Features:
- Add unit handling to technology module.
Version: 1.9.0
Date: 2026-07-11
Changes:
- Move modules into prototypes sub directory to better reflect their purpose and usage.
Version: 1.8.0
Date: 2026-07-11
Changes:
- Make entity module read-only functions static to allow for direct access without needing to create an instance.
Features:
- Add minable handling to entity module.
Version: 1.7.0
Date: 2026-07-11
Changes:
- Add missing get_* functions to all modules to retrieve the first item matching a comparison function or string.
- Use generic annotations for list module functions to improve type safety and clarity.
Features:
- Add find_*() functions to all modules to find all items matching a comparison function or string.
- Deprecate get/count_matching_*() functions in favor of find_*() functions for consistency across modules.
- Add category handling to recipe module.
- Add options parameter to add_*() functions to allow specifying an index for insertion.
- Add crafting machine tint handling to recipe module.
- Improve type hints for set() functions in all modules.
Version: 1.6.1
Date: 2026-07-10
Bugfixes:
- Fix get_icons() functions of entity, item, recipe, and technology modules to return a list of icons instead of a single icon map.
- icons should get priority over icon in get_icons() functions of entity, item, recipe, and technology modules.
Version: 1.6.0
Date: 2026-07-09
Features:
- Add get() function to list module.
- Add get_ingredient() to recipe module.
- Add get_result() to recipe module.
Version: 1.5.0
Date: 2026-07-08
Bugfixes:
- Ensure icons take priority in count_icons().
Features:
- Add entity module with icon handling.
- Add emissions handling to entity module.
Version: 1.4.1
Date: 2026-07-08
Bugfixes:
- Remove check for amount field in recipe:add_results().
Version: 1.4.0
Date: 2026-07-07
Features:
- Add icon handling to recipe and technology modules.
- Add item module with icon handling.
Version: 1.3.0
Date: 2026-07-05
Features:
- Traverse and replace icons too in the sprite module.
Version: 1.2.3
Date: 2026-07-04
Bugfixes:
- Fix wrong type check in replace_science_pack function of the technology module.
Version: 1.2.2
Date: 2026-07-04
Bugfixes:
- Fix wrong typehint in science pack replace/remove functions of the technology module.
Version: 1.2.1
Date: 2026-07-04
Bugfixes:
- Ensure write functions work on non-existent lists.
Changes:
- Add unset function to nil out values via the recipe/technology modules.
Version: 1.2.0
Date: 2026-07-03
Features:
- Add support for function callbacks in replace functions of the list/recipe/technology modules.
Version: 1.1.0
Date: 2026-07-03
Features:
- Add static read-only functions for faster access without deep-copying to the recipe and technology module.
Version: 1.0.0
Date: 2026-07-03
Features:
- Add generic list module for creating and managing lists of items, entities, or other game objects.
- Add comprehensive fluent API for manipulating technologies, including prerequisites, effects, and research costs.
- Add comprehensive fluent API for manipulating recipes, including ingredients, results, and unlocks.
Version: 0.1.1
Date: 2025-09-19
Changes:
- Pass a copy to the `khaoslib_sprites.traverse` function callback instead of the original sprite/animation.
- The callback function of `khaoslib_sprites.traverse` should now modify the passed sprite/animation copy instead of returning a modified copy.
Version: 0.1.0
Date: 2025-09-19
Features:
- Adds a sprites helper function to tint a sprite or an animation with possible layers.
- Adds a sprites helper function to replace sprite or animation filenames.
- Exposes a sprites traverse function to apply a function to all sprites in a sprite or animation structure with possible layers.