Baron Library

by wasmoo

Base library for Baron mods.

7 days ago
0.18 - 1.1
2645
Owner:
wasmoo
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
10 months ago
Latest Version:
1.1.18 (7 days ago)
Factorio version:
0.18 - 1.1
Downloaded:
2645 times

Baron library includes helper functions for creating additional mods for the Baron Factions mod.

Baron Flags

The most forward feature is the special flags, accessible by the global variable baronConstants.flags. These flags can be added harmlessly to any prototype under the key "baron-flags":

  {
    type = "item",
    name = "dirty-fuel",
    [baronConstants.flags.key] = {baronConstants.flags.no_clean_fuel},
    ...
  }

Or using the baronEntity method:

  baronEntity.setBaronFlag(dirty_fuel_item, baronConstants.flags.no_clean_fuel)
Flag Effect
baronConstants.flags.no_clean_fuel Disables Burner faction processing for this fuel item
baronConstants.flags.no_split Prevents recipe from being duplicated among factions (though crafting will still be limited by factions.) This flag is automatically and appropriately added when using baronEntity.removeFaction().
baronConstants.flags.keep_subgroup Prevents recipe or item from gaining a unique subgroup for its faction. This keeps the recipes for each faction in a single row, rather than one faction per row.