SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Factorio

Baron Library

WBy wasmoo

Base library for Baron mods.

Description

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.

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.