Page 1 of 1

Mod structure subfolders

Posted: Mon Aug 25, 2025 8:37 am
by RedRafe
Hello,

I would like to request if additional info could be provided regarding the subfolders of Mod Structure https://lua-api.factorio.com/latest/aux ... cture.html, in particular:

1. structure of "scenarios"
2. structure of "campaigns"

---

1. Scenario structure
Scenario already has a brief wiki page on its system (https://wiki.factorio.com/Scenario_system). From looking at the base's scenarios, I could say that these default files/properties are allowed for each scenario with this naming convention:
  • "control.lua" - (optional) runtime code
  • "image.png" - (optional) used as preview image of the scenario
  • "image_space_age.png" - (optional) used as preview image of the scenario when SA is enabled
  • "locale" dir - (optional) for all the localisations (worth mentioning that localisation of "scenario-name" and "scenario-description" supports both "scenario-name" and "scenario-name-space-age" / "scenario-description", "scenario-description-space-age")
  • "blueprint.zip" - (optional) the map's zip used in this scenario
  • "description.json" (mandatory) - keys as described in https://wiki.factorio.com/Scenario_system
Request:
  • 1A. can scenarios be organized in groups, or that is only available to campaigns?
  • 1B. are any other files/folder recognized by factorio as "staples" other than the listed ones?
2. Campaigns structure
Campaigns are a collection of scenarios basically, although campaigns dont have an official wiki reference, by looking at base's structure, here's the presumed structure of it:

Campaign structure:
  • "locale" dir - (optional) for all the localisations, supports default keys "name", "description" (with SA variants), probably supports "[levels]" localisation group as well to rename each campaign's level
  • "image.png" - (optional) used as preview image of the scenario
  • "image_space_age.png" - (optional) used as preview image of the scenario when SA is enabled
  • "lualib" dir - (optional) a directory to store other files that is ignored by the campaign's levels list
  • "*/" - any number of folders containing the levels, no specific naming convention
  • "description.json" (mandatory) - describes the properties of this campaign, in particular:
    1. "starting-level" - Undocumented- string - Default 1st level alphabetically sorted
    2. "is-main-game" - boolean - Default: false
    3. "multiplayer-compatible" - boolean - Default: false
    4. "order" - Order
    5. "difficulties" - Undocumented - Array of strings [ "easy", "normal", "hard" ]?
Campaign's Level structure:
- "locale" dir - (optional) for all the localisations (no default keys for level's name or description)
- "control.lua" - (optional) runtime code
- "blueprint.zip" - (optional) the map's zip used in this level
- no "image/image_SA.png" are supported, campaign's top level image/image_SA are used instead

Request:
  • 2A. would be possible to provide more info about "campaign/description.json" 's?
  • 2B. in particular, about "starting-level" and "difficulties" behavior (allowed values, how they work, how they are localised [seems its in core.cfg/difficulty]), and if the json supports other keys in addition to the ones listed
  • 2C. are any other files/folder recognized by factorio as "staples" other than the listed ones?
  • 2D. is it possible to assign a different preview image to each level, instead of using the top level preview of the campaign?
Thanks in advance for all the support,
RedRafe