Factorio Codex

by sfyb

Adds a Satisfactory like codex with quick search to Factorio, which can act as a calculator and display information about items, recipes, technologies and factories

Utilities
7 months ago
1.1
832
Owner:
sfyb
Source:
https://github.com/sfybb/Factorio-Codex
Homepage:
N/A
License:
MIT
Created:
1 year, 10 months ago
Latest Version:
0.0.21 (7 months ago)
Factorio version:
1.1
Downloaded by:
832 users

Note

Because of the announcement of Factoriopedia I decided to limit the functionality of this mod to the quick search part. If possible quick search will directly open Factoriopedia in update 2.0 which should allow for quicker access to Factoriopedia. Therefore any future updates will only focus on the quick search part

Factorio Codex

This mod adds a Satisfactory like codex and quick search to factorio.
Currently, this mod is in its Alpha stages. This means this mod might not be stable and there will be a changes
in the future to the functionality and maybe ui.

Quick Search

By default, you can open quick search by pressing the n key on your keyboard.
This opens a text-box you can type into to search for items, fluids or technologies.
When you find what you searched for you can click on the search result, the codex will open and show more
information about what you clicked on.

Functionality

  • Search for any item, fluid or technology
  • Results are sorted such that technologies appear last and the item or fluid with the best match of your
    search term appears first (hidden items, fluids or technologies get excluded from the search)
  • Clicking on a search result will show more information about that item in the codex
  • While translation is taking place you will be asked to wait until it's finished before any results get shown to you.
  • If this mod completed the translation stage in this save before, this old data will be used for searches until the
    translation completes. However, this old data will not contain any information about new items, fluids and
    if you search for those you still have to wait.
  • Compute the solutions to math formulas like 144/45 or 15/3.2. Also supports brackets!
  • Math formulas respect the order of operations: exponents ^ first, then multiplication * or division /
    and lastly addition + or subtraction - (the evaluation progresses from left to right except for exponents,
    which go the opposite way: 3^2^5 => 3^10 )
  • Clicking on the result of a math formula will overwrite the search field with the result
    (Note: results that contain e like 1e+100 are not considered part of a valid math formula
    and need to be changed by you! To get a usable number you have to replace e with 10^ and the following +
    sing but keep a - sign)

Codex

The codex can only be opened by using the Quick Search (default key n) and clicking on a non math result
(clicking on Waiting for translation... also doesn't take you to the codex)
The codex shows information about items, fluids and technologies. At the moment the main focus of the codex is showing
ways to produce or consume items/fluids. Viewing technologies gives information about modifiers / recipes this technology unlocks.

Functionality

  • TODO

TODO List

  • <input checked disabled type="checkbox"> Improve search functionality and sorting
  • <input checked disabled type="checkbox"> Add locale support for hardcoded english stuff and hotkey name
  • <input checked disabled type="checkbox"> Better recipe support (e.g. show output chance, min and max ...)
  • <input disabled type="checkbox"> Finish description of the mod
  • <input disabled type="checkbox"> Recipes with only burner machines need some sort of indication that they are not free
  • <input disabled type="checkbox"> Open inventory/technology tree from codex IF possible
  • <input disabled type="checkbox"> Add search to codex (low priority since quick search exists)
  • <input disabled type="checkbox"> Better description for items/entities ...
  • <input disabled type="checkbox"> Think about more TODO's

Changelog

  • Version: 0.0.19
    • Codex Features:
      • When viewing recipes the "Produced by" tab prioritizes recipes that mainly produce the currently viewed item.
    • Features:
      • Added command to reset and rebuild mod data ("/fc-rebuild-all").
    • Changes:
      • Instead of crashing the game most errors will now be logged and only a notification will be shown to the player.
      • Massive performance improvements while using quick search.
    • Bugfixes:
      • Fixed a bug where offshore pumping recipes (pumping water) would show up as "Rocket launch crafting".
      • Fixed a bug where the codex would show "__1__" instead of the miner speed
      • Fixed a bug where the mod would crash when clicking on the quick search result "Waiting for translation...".
      • Fixed a bug where shared player data failed to initialize correctly after a saved game was loaded.
      • Fixed a bug where after installing/removing mods some new recipes wouldn't show up.
      • Fixed a bug where invalid prototypes cause the translation to crash.
      • Fixed a bug where invalid prototypes crash the codex.
      • Fixed a bug where invalid prototypes crash quick search.
      • Fixed a bug where the codex failed to show the entity list on first load.
  • Version: 0.0.18
    • Codex Features:
      • Now showing information like new recipes and modifiers for technologies.
      • Improved tooltips for recipe ingredients and products now shows average, min and max amount as well as probability.
      • Moved resource mining "recipes" to their own list titled "Mined from".
      • Added tooltip which displays the machine crafting speed for each machine that can craft a given recipe.
      • Added history feature which allows going back and forth to previously visited things (limit: 10 items).
    • Quick Search Features:
      • Improved performance drastically for searches with a lot of results (searching for 'e' can result in up to 3.6k results in SE + K2. This previously needed ~150ms and now only requires ~75ms).
      • Reduced the maximum number of shown results to 100 (you were not planning to look through more than that anyway right? right?).
    • Features:
    • Changes:
      • Completely new code base, it is only equal in functionally. No line was untouched.
  • Version: 0.0.17
    • Bugfixes:
      • Fixed validation always failing.
  • Version: 0.0.16
    • Codex Features:
      • Made category switching less laggy when viewing them again.
      • Increased visibility of "Produced by" and "Ingredient in" headlines.
      • Changed highlight color to green.
      • Main recipe output has the color gray now, if present.
      • Locked recipes are shown with different colors (default background = red, main recipe output = orange, highlight color = yellow).
      • If in debug mode ingredients/products with an amount of 0 are shown again.
    • Quick Search Features:
      • Now adjusts size and position when opened instead of only once when created.
      • If in debug mode information relevant for sorting is added to each result.
    • Features:
      • Added foundation for supporting newer factorio features while remaining compatible with older versions.
    • Changes:
      • Changelog now has different categories for quick search and codex features.
    • Bugfixes:
      • Fixed a bug with the item sorting where the order would be messed up.
  • Version: 0.0.14
    • Codex Features:
      • Recipes don't show any items/fluids that require/produce 0 units unless this is the only ingredient/product (the other ingredients/products are still shown. This manly affects the Arcosphere recipes in SE).
    • Quick Search Features:
      • Text input doesn't fight you in multiplayer anymore (this adds a very small delay to the search results).
    • Features:
      • Re-translation after changes to the mods (Anything that was translated before remains searchable while the re-translation is ongoing).
    • Changes:
      • Under the hood changes to hopefully fix de-syncs once and for all (queue the next de-sync bug).
      • Added more log messages.
  • Version: 0.0.13
    • Features:
      • Deactivated validate outside of migration.
  • Version: 0.0.12
    • Features:
      • Added missing file to zip.
  • Version: 0.0.11
    • Features:
      • Codex: added color indicator for fluids.
      • Validating saved mod data on migration to resolve some bugs. In some cases quick search and/or the codex reset, you will get notified if this happens.
    • Bugfixes:
      • Fixed in-game changelog.