Custom sections for entries in Factoripedia

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
everything-narrative
Inserter
Inserter
Posts: 39
Joined: Fri Aug 16, 2019 5:31 pm
Contact:

Custom sections for entries in Factoripedia

Post by everything-narrative »

TL;DR
Making custom sections in a Factoripedia entry would help mods document their own functionality.
WHY?
Truly high-quality, user-friendly mods provide the player information about their features, in-game. Factoripedia is a massively useful tool for this, but the functionality is limited.
WHAT?
A new field on Prototype or PrototypeBase.

This could just expose whatever format is used internally -- it seems to be regular enough that it can be exposed as a prototype.

I imagine something like:

Code: Select all

Prototype
  ...
  factoripedia_custom_sections :: FactoripediaCustomSection or array[FactoripediaCustomSection]

FactoripediaCustomSection
  heading     :: LocalisedString,
  order       :: uint8 -- same functionality as the order field on CustomTooltipField
  content :: FactoripediaSubsection or array[FactoripediaSubsection]

FactoripediaSubsection :: union
  FactoripediaSeparator
  FactoripediaText
  FactoripediaIconEntry
  FactoripediaTechnologyLink
  FactoripediaIconList
  FactoripediaCompactIconListSubsection

FactoripediaSeparator 
  type :: "separator"
  indented :: boolean (optional) -- whether to indent equal to the width of an icon, like under the recipe ingredients heading
  -- just a horizontal line

FactoripediaText
  type     :: "text"
  text     :: LocalisedString
  indented :: boolean (optional) -- whether to indent equal to the width of an icon, like under the recipe ingredients heading

FactoripediaIconEntry :: inherits from FactoripediaIconLink
  type  :: "icon"
  text      :: LocalisedString (optional) 
  ... fields of FactoripediaIconLink

FactoripediaIconLink :: union
  link      :: ItemID/RecipeID/EntityID/etc.
  -- the following are 'nice to have' for custom icons
  icon      :: Filename (optional)
  icon_size :: integer (optional)
  icons     :: IconData[] (optional)
  tooltip   :: CustomTooltip[] (optional)
  -- if icon etc. are present then link is not needed

CustomTooltip
  title  :: LocalisedString
  fields :: CustomTooltipField[]
  -- self-explanatory, this could also just be embedded in FactoripediaIconLink

FactoripediaCompactIconList
  type    :: "list"
  entries :: FactoripediaIconLink

FactoripediaTechnologyLink
  type       :: "technology"
  technology :: TechnologyID
User avatar
Shemp
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Mon Jan 19, 2026 6:51 pm
Contact:

Re: Custom sections for entries in Factoripedia

Post by Shemp »

You can do a lot with factoriopedia_description and rich text, but I think it only shows for entity prototypes. Making a rich text that references an item will effectively create a hyperlink to it.

You could use an img to create a divider, or declare a hidden ShortcutPrototype to make a link that can trigger a Lua script.

The rules for what sections will show in a Factoriopedia page, or when pages of different prototype types are merged, are not well documented sadly.

If you want to do something highly custom with element layouts for a Help section, you're probably better off making your own GUI.
Post Reply

Return to “Modding interface requests”